Lines 5425-5428
Link Here
|
5425 |
"}", |
5425 |
"}", |
5426 |
result.context); |
5426 |
result.context); |
5427 |
} |
5427 |
} |
|
|
5428 |
|
5429 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=312603 |
5430 |
public void test0177() throws JavaModelException { |
5431 |
this.workingCopies = new ICompilationUnit[3]; |
5432 |
this.workingCopies[0] = getWorkingCopy( |
5433 |
"/Completion/src3/test/X.java", |
5434 |
"package test;\n" + |
5435 |
"import java.text.MessageFormat;\n" + |
5436 |
"public class X {\n" + |
5437 |
" String fooBar = \"Hi\";" + |
5438 |
" String furchtbar= MessageFormat.format\n" + |
5439 |
" String abc1 = \"Hi\";" + |
5440 |
" String abc2 = \"Hi\";" + |
5441 |
" String abc3 = \"Hi\";" + |
5442 |
" String abc4 = \"Hi\";" + |
5443 |
"}"); |
5444 |
|
5445 |
String str = this.workingCopies[0].getSource(); |
5446 |
int tokenStart = str.lastIndexOf("format"); |
5447 |
int tokenEnd = tokenStart + "format".length() - 1; |
5448 |
int cursorLocation = str.lastIndexOf("format") + "format".length(); |
5449 |
|
5450 |
CompletionResult result = contextComplete(this.workingCopies[0], cursorLocation, true, true); |
5451 |
String jclPath = getExternalJCLPathString(); |
5452 |
assertResults( |
5453 |
"completion offset="+(cursorLocation)+"\n" + |
5454 |
"completion range=["+(tokenStart)+", "+(tokenEnd)+"]\n" + |
5455 |
"completion token=\"format\"\n" + |
5456 |
"completion token kind=TOKEN_KIND_NAME\n" + |
5457 |
"expectedTypesSignatures={Ljava.lang.String;}\n" + |
5458 |
"expectedTypesKeys={Ljava/lang/String;}\n" + |
5459 |
"completion token location=UNKNOWN\n" + |
5460 |
"enclosingElement=furchtbar {key=Ltest/X;.furchtbar)Ljava/lang/String;} [in X [in [Working copy] X.java [in test [in src3 [in Completion]]]]]\n" + |
5461 |
"visibleElements={\n" + |
5462 |
" fooBar {key=Ltest/X;.fooBar)Ljava/lang/String;} [in X [in [Working copy] X.java [in test [in src3 [in Completion]]]]],\n" + |
5463 |
" wait(long, int) {key=Ljava/lang/Object;.wait(JI)V|Ljava/lang/IllegalMonitorStateException;|Ljava/lang/InterruptedException;} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + |
5464 |
" wait(long) {key=Ljava/lang/Object;.wait(J)V|Ljava/lang/IllegalMonitorStateException;|Ljava/lang/InterruptedException;} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + |
5465 |
" wait() {key=Ljava/lang/Object;.wait()V|Ljava/lang/IllegalMonitorStateException;|Ljava/lang/InterruptedException;} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + |
5466 |
" toString() {key=Ljava/lang/Object;.toString()Ljava/lang/String;} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + |
5467 |
" notifyAll() {key=Ljava/lang/Object;.notifyAll()V|Ljava/lang/IllegalMonitorStateException;} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + |
5468 |
" notify() {key=Ljava/lang/Object;.notify()V|Ljava/lang/IllegalMonitorStateException;} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + |
5469 |
" hashCode() {key=Ljava/lang/Object;.hashCode()I} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + |
5470 |
" getClass() {key=Ljava/lang/Object;.getClass()Ljava/lang/Class;} [in Object [in Object.class [in java.lang [in " + jclPath +"]]]],\n" + |
5471 |
" finalize() {key=Ljava/lang/Object;.finalize()V|Ljava/lang/Throwable;} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + |
5472 |
" equals(java.lang.Object) {key=Ljava/lang/Object;.equals(Ljava/lang/Object;)Z} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + |
5473 |
" clone() {key=Ljava/lang/Object;.clone()Ljava/lang/Object;|Ljava/lang/CloneNotSupportedException;} [in Object [in Object.class [in java.lang [in " + jclPath +"]]]],\n" + |
5474 |
"}", |
5475 |
result.context); |
5476 |
} |
5428 |
} |
5477 |
} |