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)); } }
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)); } }