コード例 #1
0
 static void addPackageDescriptorCompletion(
     CeylonParseController cpc, int offset, String prefix, List<ICompletionProposal> result) {
   if (!"package".startsWith(prefix)) return;
   IFile file = cpc.getProject().getFile(cpc.getPath());
   String packageName = getPackageName(file);
   if (packageName != null) {
     result.add(new PackageDescriptorProposal(offset, prefix, packageName));
   }
 }
コード例 #2
0
 static void addCurrentPackageNameCompletion(
     CeylonParseController cpc, int offset, String prefix, List<ICompletionProposal> result) {
   IFile file = cpc.getProject().getFile(cpc.getPath());
   String moduleName = getPackageName(file);
   if (moduleName != null) {
     result.add(
         new CompletionProposal(
             offset, prefix, isModuleDescriptor(cpc) ? MODULE : PACKAGE, moduleName, moduleName));
   }
 }