1 11 package org.eclipse.jdt.internal.core; 12 13 import java.io.IOException ; 14 import java.util.HashMap ; 15 import java.util.Map ; 16 import java.util.zip.ZipEntry ; 17 import java.util.zip.ZipFile ; 18 19 import org.eclipse.core.resources.IContainer; 20 import org.eclipse.core.resources.IFile; 21 import org.eclipse.core.resources.IResource; 22 import org.eclipse.core.runtime.CoreException; 23 import org.eclipse.core.runtime.IPath; 24 import org.eclipse.core.runtime.IProgressMonitor; 25 import org.eclipse.core.runtime.IStatus; 26 import org.eclipse.core.runtime.Path; 27 import org.eclipse.jdt.core.*; 28 import org.eclipse.jdt.core.compiler.IProblem; 29 import org.eclipse.jdt.internal.compiler.classfmt.ClassFileReader; 30 import org.eclipse.jdt.internal.compiler.classfmt.ClassFormatException; 31 import org.eclipse.jdt.internal.compiler.env.IBinaryType; 32 import org.eclipse.jdt.internal.compiler.env.IDependent; 33 import org.eclipse.jdt.internal.compiler.util.SuffixConstants; 34 import org.eclipse.jdt.internal.core.util.MementoTokenizer; 35 import org.eclipse.jdt.internal.core.util.Util; 36 37 40 41 public class ClassFile extends Openable implements IClassFile, SuffixConstants { 42 43 protected String name; 44 protected BinaryType binaryType = null; 45 46 49 protected ClassFile(PackageFragment parent, String nameWithoutExtension) { 50 super(parent); 51 this.name = nameWithoutExtension; 52 } 53 54 57 public ICompilationUnit becomeWorkingCopy(IProblemRequestor problemRequestor, WorkingCopyOwner owner, IProgressMonitor monitor) throws JavaModelException { 58 JavaModelManager manager = JavaModelManager.getJavaModelManager(); 59 CompilationUnit workingCopy = new ClassFileWorkingCopy(this, owner == null ? DefaultWorkingCopyOwner.PRIMARY : owner); 60 JavaModelManager.PerWorkingCopyInfo perWorkingCopyInfo = manager.getPerWorkingCopyInfo(workingCopy, false, true , null); 61 if (perWorkingCopyInfo == null) { 62 close(); 64 65 BecomeWorkingCopyOperation operation = new BecomeWorkingCopyOperation(workingCopy, problemRequestor); 66 operation.runOperation(monitor); 67 68 return workingCopy; 69 } 70 return perWorkingCopyInfo.workingCopy; 71 } 72 73 81 protected boolean buildStructure(OpenableElementInfo info, IProgressMonitor pm, Map newElements, IResource underlyingResource) throws JavaModelException { 82 IStatus status = validateClassFile(); 84 if (!status.isOK()) throw newJavaModelException(status); 85 if (underlyingResource != null && !underlyingResource.isAccessible()) throw newNotPresentException(); 86 87 IBinaryType typeInfo = getBinaryTypeInfo((IFile) underlyingResource); 88 if (typeInfo == null) { 89 info.setChildren(new IJavaElement[] {}); 92 return false; 93 } 94 95 IType type = getType(); 97 info.setChildren(new IJavaElement[] {type}); 98 newElements.put(type, typeInfo); 99 100 ((ClassFileInfo) info).readBinaryChildren(this, (HashMap ) newElements, typeInfo); 102 103 return true; 104 } 105 109 public void codeComplete(int offset, ICompletionRequestor requestor) throws JavaModelException { 110 codeComplete(offset, requestor, DefaultWorkingCopyOwner.PRIMARY); 111 } 112 116 public void codeComplete(int offset, ICompletionRequestor requestor, WorkingCopyOwner owner) throws JavaModelException { 117 if (requestor == null) { 118 throw new IllegalArgumentException ("Completion requestor cannot be null"); } 120 codeComplete(offset, new org.eclipse.jdt.internal.codeassist.CompletionRequestorWrapper(requestor), owner); 121 } 122 123 126 public void codeComplete(int offset, CompletionRequestor requestor) throws JavaModelException { 127 codeComplete(offset, requestor, DefaultWorkingCopyOwner.PRIMARY); 128 } 129 130 133 public void codeComplete(int offset, CompletionRequestor requestor, WorkingCopyOwner owner) throws JavaModelException { 134 String source = getSource(); 135 if (source != null) { 136 BinaryType type = (BinaryType) getType(); 137 BasicCompilationUnit cu = 138 new BasicCompilationUnit( 139 getSource().toCharArray(), 140 null, 141 type.sourceFileName((IBinaryType) type.getElementInfo()), 142 getJavaProject()); codeComplete(cu, cu, offset, requestor, owner); 144 } 145 } 146 147 150 public IJavaElement[] codeSelect(int offset, int length) throws JavaModelException { 151 return codeSelect(offset, length, DefaultWorkingCopyOwner.PRIMARY); 152 } 153 156 public IJavaElement[] codeSelect(int offset, int length, WorkingCopyOwner owner) throws JavaModelException { 157 IBuffer buffer = getBuffer(); 158 char[] contents; 159 if (buffer != null && (contents = buffer.getCharacters()) != null) { 160 BinaryType type = (BinaryType) getType(); 161 BasicCompilationUnit cu = new BasicCompilationUnit(contents, null, type.sourceFileName((IBinaryType) type.getElementInfo())); 162 return super.codeSelect(cu, offset, length, owner); 163 } else { 164 return new IJavaElement[] {}; 166 } 167 } 168 171 protected Object createElementInfo() { 172 return new ClassFileInfo(); 173 } 174 public boolean equals(Object o) { 175 if (!(o instanceof ClassFile)) return false; 176 ClassFile other = (ClassFile) o; 177 return this.name.equals(other.name) && this.parent.equals(other.parent); 178 } 179 public boolean exists() { 180 return super.exists() && validateClassFile().isOK(); 181 } 182 public boolean existsUsingJarTypeCache() { 183 if (getPackageFragmentRoot().isArchive()) { 184 JavaModelManager manager = JavaModelManager.getJavaModelManager(); 185 IType type = getType(); 186 Object info = manager.getInfo(type); 187 if (info == JavaModelCache.NON_EXISTING_JAR_TYPE_INFO) 188 return false; 189 else if (info != null) 190 return true; 191 JavaElementInfo parentInfo = (JavaElementInfo) manager.getInfo(getParent()); 193 if (parentInfo != null) { 194 IJavaElement[] children = parentInfo.getChildren(); 196 for (int i = 0, length = children.length; i < length; i++) { 197 if (this.name.equals(((ClassFile) children[i]).name)) 198 return true; 199 } 200 return false; 201 } 202 try { 203 info = getJarBinaryTypeInfo((PackageFragment) getParent()); 204 } catch (CoreException e) { 205 } catch (IOException e) { 207 } catch (ClassFormatException e) { 209 } 211 manager.putJarTypeInfo(type, info == null ? JavaModelCache.NON_EXISTING_JAR_TYPE_INFO : info); 212 return info != null; 213 } else 214 return exists(); 215 } 216 217 223 protected IJavaElement findElement(IJavaElement elt, int position, SourceMapper mapper) { 224 SourceRange range = mapper.getSourceRange(elt); 225 if (range == null || position < range.getOffset() || range.getOffset() + range.getLength() - 1 < position) { 226 return null; 227 } 228 if (elt instanceof IParent) { 229 try { 230 IJavaElement[] children = ((IParent) elt).getChildren(); 231 for (int i = 0; i < children.length; i++) { 232 IJavaElement match = findElement(children[i], position, mapper); 233 if (match != null) { 234 return match; 235 } 236 } 237 } catch (JavaModelException npe) { 238 } 240 } 241 return elt; 242 } 243 246 public IType findPrimaryType() { 247 IType primaryType= getType(); 248 if (primaryType.exists()) { 249 return primaryType; 250 } 251 return null; 252 } 253 public String getAttachedJavadoc(IProgressMonitor monitor) throws JavaModelException { 254 return this.getType().getAttachedJavadoc(monitor); 255 } 256 268 public IBinaryType getBinaryTypeInfo(IFile file) throws JavaModelException { 269 JavaElement pkg = (JavaElement) getParent(); 270 if (pkg instanceof JarPackageFragment) { 271 try { 272 IBinaryType info = getJarBinaryTypeInfo((PackageFragment) pkg); 273 if (info == null) { 274 throw newNotPresentException(); 275 } 276 return info; 277 } catch (ClassFormatException cfe) { 278 if (JavaCore.getPlugin().isDebugging()) { 280 cfe.printStackTrace(System.err); 281 } 282 return null; 283 } catch (IOException ioe) { 284 throw new JavaModelException(ioe, IJavaModelStatusConstants.IO_EXCEPTION); 285 } catch (CoreException e) { 286 if (e instanceof JavaModelException) { 287 throw (JavaModelException)e; 288 } else { 289 throw new JavaModelException(e); 290 } 291 } 292 } else { 293 byte[] contents = Util.getResourceContentsAsByteArray(file); 294 try { 295 return new ClassFileReader(contents, file.getFullPath().toString().toCharArray(), true); 296 } catch (ClassFormatException cfe) { 297 return null; 299 } 300 } 301 } 302 303 public byte[] getBytes() throws JavaModelException { 304 JavaElement pkg = (JavaElement) getParent(); 305 if (pkg instanceof JarPackageFragment) { 306 JarPackageFragmentRoot root = (JarPackageFragmentRoot) pkg.getParent(); 307 ZipFile zip = null; 308 try { 309 zip = root.getJar(); 310 String entryName = Util.concatWith(((PackageFragment) pkg).names, getElementName(), '/'); 311 ZipEntry ze = zip.getEntry(entryName); 312 if (ze != null) { 313 return org.eclipse.jdt.internal.compiler.util.Util.getZipEntryByteContent(ze, zip); 314 } 315 throw new JavaModelException(new JavaModelStatus(IJavaModelStatusConstants.ELEMENT_DOES_NOT_EXIST, this)); 316 } catch (IOException ioe) { 317 throw new JavaModelException(ioe, IJavaModelStatusConstants.IO_EXCEPTION); 318 } catch (CoreException e) { 319 if (e instanceof JavaModelException) { 320 throw (JavaModelException)e; 321 } else { 322 throw new JavaModelException(e); 323 } 324 } finally { 325 JavaModelManager.getJavaModelManager().closeZipFile(zip); 326 } 327 } else { 328 IFile file = (IFile) getResource(); 329 return Util.getResourceContentsAsByteArray(file); 330 } 331 } 332 private IBinaryType getJarBinaryTypeInfo(PackageFragment pkg) throws CoreException, IOException , ClassFormatException { 333 JarPackageFragmentRoot root = (JarPackageFragmentRoot) pkg.getParent(); 334 ZipFile zip = null; 335 try { 336 zip = root.getJar(); 337 String entryName = Util.concatWith(pkg.names, getElementName(), '/'); 338 ZipEntry ze = zip.getEntry(entryName); 339 if (ze != null) { 340 byte contents[] = org.eclipse.jdt.internal.compiler.util.Util.getZipEntryByteContent(ze, zip); 341 String fileName = root.getHandleIdentifier() + IDependent.JAR_FILE_ENTRY_SEPARATOR + entryName; 342 return new ClassFileReader(contents, fileName.toCharArray(), true); 343 } 344 } finally { 345 JavaModelManager.getJavaModelManager().closeZipFile(zip); 346 } 347 return null; 348 } 349 public IBuffer getBuffer() throws JavaModelException { 350 IStatus status = validateClassFile(); 351 if (status.isOK()) { 352 return super.getBuffer(); 353 } else { 354 Object info = ((ClassFile) getClassFile()).getBinaryTypeInfo((IFile) getResource()); 356 IBuffer buffer = openBuffer(null, info); 357 if (buffer != null && !(buffer instanceof NullBuffer)) 358 return buffer; 359 if (status.getCode() == IJavaModelStatusConstants.ELEMENT_NOT_ON_CLASSPATH) 360 return null; throw new JavaModelException((IJavaModelStatus) status); 362 } 363 } 364 367 public IClassFile getClassFile() { 368 return this; 369 } 370 373 public ITypeRoot getTypeRoot() { 374 return this; 375 } 376 382 public IResource getCorrespondingResource() throws JavaModelException { 383 IPackageFragmentRoot root= (IPackageFragmentRoot)getParent().getParent(); 384 if (root.isArchive()) { 385 return null; 386 } else { 387 return getUnderlyingResource(); 388 } 389 } 390 393 public IJavaElement getElementAt(int position) throws JavaModelException { 394 IJavaElement parentElement = getParent(); 395 while (parentElement.getElementType() != IJavaElement.PACKAGE_FRAGMENT_ROOT) { 396 parentElement = parentElement.getParent(); 397 } 398 PackageFragmentRoot root = (PackageFragmentRoot) parentElement; 399 SourceMapper mapper = root.getSourceMapper(); 400 if (mapper == null) { 401 return null; 402 } else { 403 getBuffer(); 405 406 IType type = getType(); 407 return findElement(type, position, mapper); 408 } 409 } 410 public IJavaElement getElementAtConsideringSibling(int position) throws JavaModelException { 411 IPackageFragment fragment = (IPackageFragment)getParent(); 412 PackageFragmentRoot root = (PackageFragmentRoot) fragment.getAncestor(IJavaElement.PACKAGE_FRAGMENT_ROOT); 413 SourceMapper mapper = root.getSourceMapper(); 414 if (mapper == null) { 415 return null; 416 } else { 417 int index = this.name.indexOf('$'); 418 int prefixLength = index < 0 ? this.name.length() : index; 419 420 IType type = null; 421 int start = -1; 422 int end = Integer.MAX_VALUE; 423 IJavaElement[] children = fragment.getChildren(); 424 for (int i = 0; i < children.length; i++) { 425 String childName = children[i].getElementName(); 426 427 int childIndex = childName.indexOf('$'); 428 int childPrefixLength = childIndex < 0 ? childName.indexOf('.') : childIndex; 429 if (prefixLength == childPrefixLength && this.name.regionMatches(0, childName, 0, prefixLength)) { 430 IClassFile classFile = (IClassFile) children[i]; 431 432 classFile.getBuffer(); 434 435 SourceRange range = mapper.getSourceRange(classFile.getType()); 436 if (range == SourceMapper.UNKNOWN_RANGE) continue; 437 int newStart = range.offset; 438 int newEnd = newStart + range.length - 1; 439 if(newStart > start && newEnd < end 440 && newStart <= position && newEnd >= position) { 441 type = classFile.getType(); 442 start = newStart; 443 end = newEnd; 444 } 445 } 446 } 447 if(type != null) { 448 return findElement(type, position, mapper); 449 } 450 return null; 451 } 452 } 453 public String getElementName() { 454 return this.name + SuffixConstants.SUFFIX_STRING_class; 455 } 456 459 public int getElementType() { 460 return CLASS_FILE; 461 } 462 465 public IJavaElement getHandleFromMemento(String token, MementoTokenizer memento, WorkingCopyOwner owner) { 466 switch (token.charAt(0)) { 467 case JEM_TYPE: 468 if (!memento.hasMoreTokens()) return this; 469 String typeName = memento.nextToken(); 470 JavaElement type = new BinaryType(this, typeName); 471 return type.getHandleFromMemento(memento, owner); 472 } 473 return null; 474 } 475 478 protected char getHandleMementoDelimiter() { 479 return JavaElement.JEM_CLASSFILE; 480 } 481 484 public IPath getPath() { 485 PackageFragmentRoot root = getPackageFragmentRoot(); 486 if (root.isArchive()) { 487 return root.getPath(); 488 } else { 489 return getParent().getPath().append(getElementName()); 490 } 491 } 492 495 public IResource getResource() { 496 PackageFragmentRoot root = this.getPackageFragmentRoot(); 497 if (root.isArchive()) { 498 return root.getResource(); 499 } else { 500 return ((IContainer)this.getParent().getResource()).getFile(new Path(this.getElementName())); 501 } 502 } 503 506 public String getSource() throws JavaModelException { 507 IBuffer buffer = getBuffer(); 508 if (buffer == null) { 509 return null; 510 } 511 return buffer.getContents(); 512 } 513 516 public ISourceRange getSourceRange() throws JavaModelException { 517 IBuffer buffer = getBuffer(); 518 if (buffer != null) { 519 String contents = buffer.getContents(); 520 if (contents == null) return null; 521 return new SourceRange(0, contents.length()); 522 } else { 523 return null; 524 } 525 } 526 529 public String getTopLevelTypeName() { 530 String topLevelTypeName = getElementName(); 531 int firstDollar = topLevelTypeName.indexOf('$'); 532 if (firstDollar != -1) { 533 topLevelTypeName = topLevelTypeName.substring(0, firstDollar); 534 } else { 535 topLevelTypeName = topLevelTypeName.substring(0, topLevelTypeName.length()-SUFFIX_CLASS.length); 536 } 537 return topLevelTypeName; 538 } 539 542 public IType getType() { 543 if (this.binaryType == null) { 544 this.binaryType = new BinaryType(this, getTypeName()); 545 } 546 return this.binaryType; 547 } 548 public String getTypeName() { 549 int lastDollar = this.name.lastIndexOf('$'); 551 return lastDollar > -1 ? Util.localTypeName(this.name, lastDollar, this.name.length()) : this.name; 552 } 553 556 public ICompilationUnit getWorkingCopy(WorkingCopyOwner owner, IProgressMonitor monitor) throws JavaModelException { 557 CompilationUnit workingCopy = new ClassFileWorkingCopy(this, owner == null ? DefaultWorkingCopyOwner.PRIMARY : owner); 558 JavaModelManager manager = JavaModelManager.getJavaModelManager(); 559 JavaModelManager.PerWorkingCopyInfo perWorkingCopyInfo = 560 manager.getPerWorkingCopyInfo(workingCopy, false, true, null); 561 if (perWorkingCopyInfo != null) { 562 return perWorkingCopyInfo.getWorkingCopy(); } 564 BecomeWorkingCopyOperation op = new BecomeWorkingCopyOperation(workingCopy, null); 565 op.runOperation(monitor); 566 return workingCopy; 567 } 568 572 public IJavaElement getWorkingCopy(IProgressMonitor monitor, org.eclipse.jdt.core.IBufferFactory factory) throws JavaModelException { 573 return getWorkingCopy(BufferFactoryWrapper.create(factory), monitor); 574 } 575 578 protected boolean hasBuffer() { 579 return true; 580 } 581 public int hashCode() { 582 return Util.combineHashCodes(this.name.hashCode(), this.parent.hashCode()); 583 } 584 587 public boolean isClass() throws JavaModelException { 588 return getType().isClass(); 589 } 590 593 public boolean isInterface() throws JavaModelException { 594 return getType().isInterface(); 595 } 596 599 public boolean isReadOnly() { 600 return true; 601 } 602 private IStatus validateClassFile() { 603 IPackageFragmentRoot root = getPackageFragmentRoot(); 604 try { 605 if (root.getKind() != IPackageFragmentRoot.K_BINARY) 606 return new JavaModelStatus(IJavaModelStatusConstants.INVALID_ELEMENT_TYPES, root); 607 } catch (JavaModelException e) { 608 return e.getJavaModelStatus(); 609 } 610 IJavaProject project = getJavaProject(); 611 return JavaConventions.validateClassFileName(getElementName(), project.getOption(JavaCore.COMPILER_SOURCE, true), project.getOption(JavaCore.COMPILER_COMPLIANCE, true)); 612 } 613 621 protected IBuffer openBuffer(IProgressMonitor pm, Object info) throws JavaModelException { 622 SourceMapper mapper = getSourceMapper(); 623 if (mapper != null) { 624 return mapSource(mapper, info instanceof IBinaryType ? (IBinaryType) info : null); 625 } 626 return null; 627 } 628 private IBuffer mapSource(SourceMapper mapper, IBinaryType info) { 629 char[] contents = mapper.findSource(getType(), info); 630 if (contents != null) { 631 IBuffer buffer = BufferManager.createBuffer(this); 633 if (buffer == null) return null; 634 BufferManager bufManager = getBufferManager(); 635 bufManager.addBuffer(buffer); 636 637 if (buffer.getCharacters() == null){ 639 buffer.setContents(contents); 640 } 641 642 buffer.addBufferChangedListener(this); 644 645 mapper.mapSource(getType(), contents, info); 647 648 return buffer; 649 } else { 650 IBuffer buffer = BufferManager.createNullBuffer(this); 652 if (buffer == null) return null; 653 BufferManager bufManager = getBufferManager(); 654 bufManager.addBuffer(buffer); 655 656 buffer.addBufferChangedListener(this); 658 return buffer; 659 } 660 } 661 static String simpleName(char[] className) { 662 if (className == null) 663 return null; 664 String simpleName = new String (unqualifiedName(className)); 665 int lastDollar = simpleName.lastIndexOf('$'); 666 if (lastDollar != -1) 667 return Util.localTypeName(simpleName, lastDollar, simpleName.length()); 668 else 669 return simpleName; 670 } 671 679 680 public static char[] translatedName(char[] name) { 681 if (name == null) 682 return null; 683 int nameLength = name.length; 684 char[] newName= new char[nameLength]; 685 for (int i= 0; i < nameLength; i++) { 686 if (name[i] == '/') { 687 newName[i]= '.'; 688 } else { 689 newName[i]= name[i]; 690 } 691 } 692 return newName; 693 } 694 702 703 static char[][] translatedNames(char[][] names) { 704 if (names == null) 705 return null; 706 int length = names.length; 707 char[][] newNames = new char[length][]; 708 for(int i = 0; i < length; i++) { 709 newNames[i] = translatedName(names[i]); 710 } 711 return newNames; 712 } 713 722 723 static char[] unqualifiedName(char[] className) { 724 if (className == null) 725 return null; 726 int count = 0; 727 for (int i = className.length - 1; i > -1; i--) { 728 if (className[i] == '/') { 729 char[] name = new char[count]; 730 System.arraycopy(className, i + 1, name, 0, count); 731 return name; 732 } 733 count++; 734 } 735 return className; 736 } 737 738 742 public void codeComplete(int offset, final org.eclipse.jdt.core.ICodeCompletionRequestor requestor) throws JavaModelException { 743 744 if (requestor == null){ 745 codeComplete(offset, (ICompletionRequestor)null); 746 return; 747 } 748 codeComplete( 749 offset, 750 new ICompletionRequestor(){ 751 public void acceptAnonymousType(char[] superTypePackageName,char[] superTypeName, char[][] parameterPackageNames,char[][] parameterTypeNames,char[][] parameterNames,char[] completionName,int modifiers,int completionStart,int completionEnd, int relevance) { 752 } 754 public void acceptClass(char[] packageName, char[] className, char[] completionName, int modifiers, int completionStart, int completionEnd, int relevance) { 755 requestor.acceptClass(packageName, className, completionName, modifiers, completionStart, completionEnd); 756 } 757 public void acceptError(IProblem error) { 758 } 760 public void acceptField(char[] declaringTypePackageName, char[] declaringTypeName, char[] fieldName, char[] typePackageName, char[] typeName, char[] completionName, int modifiers, int completionStart, int completionEnd, int relevance) { 761 requestor.acceptField(declaringTypePackageName, declaringTypeName, fieldName, typePackageName, typeName, completionName, modifiers, completionStart, completionEnd); 762 } 763 public void acceptInterface(char[] packageName,char[] interfaceName,char[] completionName,int modifiers,int completionStart,int completionEnd, int relevance) { 764 requestor.acceptInterface(packageName, interfaceName, completionName, modifiers, completionStart, completionEnd); 765 } 766 public void acceptKeyword(char[] keywordName,int completionStart,int completionEnd, int relevance){ 767 requestor.acceptKeyword(keywordName, completionStart, completionEnd); 768 } 769 public void acceptLabel(char[] labelName,int completionStart,int completionEnd, int relevance){ 770 requestor.acceptLabel(labelName, completionStart, completionEnd); 771 } 772 public void acceptLocalVariable(char[] localVarName,char[] typePackageName,char[] typeName,int modifiers,int completionStart,int completionEnd, int relevance){ 773 } 775 public void acceptMethod(char[] declaringTypePackageName,char[] declaringTypeName,char[] selector,char[][] parameterPackageNames,char[][] parameterTypeNames,char[][] parameterNames,char[] returnTypePackageName,char[] returnTypeName,char[] completionName,int modifiers,int completionStart,int completionEnd, int relevance){ 776 requestor.acceptMethod(declaringTypePackageName, declaringTypeName, selector, parameterPackageNames, parameterTypeNames, returnTypePackageName, returnTypeName, completionName, modifiers, completionStart, completionEnd); 778 } 779 public void acceptMethodDeclaration(char[] declaringTypePackageName,char[] declaringTypeName,char[] selector,char[][] parameterPackageNames,char[][] parameterTypeNames,char[][] parameterNames,char[] returnTypePackageName,char[] returnTypeName,char[] completionName,int modifiers,int completionStart,int completionEnd, int relevance){ 780 } 782 public void acceptModifier(char[] modifierName,int completionStart,int completionEnd, int relevance){ 783 requestor.acceptModifier(modifierName, completionStart, completionEnd); 784 } 785 public void acceptPackage(char[] packageName,char[] completionName,int completionStart,int completionEnd, int relevance){ 786 requestor.acceptPackage(packageName, completionName, completionStart, completionEnd); 787 } 788 public void acceptType(char[] packageName,char[] typeName,char[] completionName,int completionStart,int completionEnd, int relevance){ 789 requestor.acceptType(packageName, typeName, completionName, completionStart, completionEnd); 790 } 791 public void acceptVariableName(char[] typePackageName,char[] typeName,char[] varName,char[] completionName,int completionStart,int completionEnd, int relevance){ 792 } 794 }); 795 } 796 } 797 | Popular Tags |