Lines 4002-4008
Link Here
|
4002 |
"expectedTypesKeys={I}\n" + |
4002 |
"expectedTypesKeys={I}\n" + |
4003 |
"completion token location=UNKNOWN\n" + |
4003 |
"completion token location=UNKNOWN\n" + |
4004 |
"visibleElements={\n" + |
4004 |
"visibleElements={\n" + |
4005 |
" field1 {key=Ltest/X;.field1)I} [in X [in [Working copy] X.java [in test [in src3 [in Completion]]]]],\n" + |
|
|
4006 |
" field0 {key=Ltest/X;.field0)I} [in X [in [Working copy] X.java [in test [in src3 [in Completion]]]]],\n" + |
4005 |
" field0 {key=Ltest/X;.field0)I} [in X [in [Working copy] X.java [in test [in src3 [in Completion]]]]],\n" + |
4007 |
" 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" + |
4006 |
" 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" + |
4008 |
" 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" + |
4007 |
" 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" + |
Lines 5291-5294
Link Here
|
5291 |
"}", |
5290 |
"}", |
5292 |
result.context); |
5291 |
result.context); |
5293 |
} |
5292 |
} |
|
|
5293 |
|
5294 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=312603 |
5295 |
public void test0174() throws JavaModelException { |
5296 |
this.workingCopies = new ICompilationUnit[3]; |
5297 |
this.workingCopies[0] = getWorkingCopy( |
5298 |
"/Completion/src3/test/X.java", |
5299 |
"package test;\n" + |
5300 |
"import java.text.MessageFormat;\n" + |
5301 |
"public class X {\n" + |
5302 |
" String fooBar = \"Hi\";" + |
5303 |
" String furchtbar= MessageFormat.format\n" + |
5304 |
"}"); |
5305 |
|
5306 |
String str = this.workingCopies[0].getSource(); |
5307 |
int tokenStart = str.lastIndexOf("format"); |
5308 |
int tokenEnd = tokenStart + "format".length() - 1; |
5309 |
int cursorLocation = str.lastIndexOf("format") + "format".length(); |
5310 |
|
5311 |
CompletionResult result = contextComplete(this.workingCopies[0], cursorLocation, true, true); |
5312 |
String jclPath = getExternalJCLPathString(); |
5313 |
assertResults( |
5314 |
"completion offset="+(cursorLocation)+"\n" + |
5315 |
"completion range=["+(tokenStart)+", "+(tokenEnd)+"]\n" + |
5316 |
"completion token=\"format\"\n" + |
5317 |
"completion token kind=TOKEN_KIND_NAME\n" + |
5318 |
"expectedTypesSignatures={Ljava.lang.String;}\n" + |
5319 |
"expectedTypesKeys={Ljava/lang/String;}\n" + |
5320 |
"completion token location=UNKNOWN\n" + |
5321 |
"enclosingElement=furchtbar {key=Ltest/X;.furchtbar)Ljava/lang/String;} [in X [in [Working copy] X.java [in test [in src3 [in Completion]]]]]\n" + |
5322 |
"visibleElements={\n" + |
5323 |
" fooBar {key=Ltest/X;.fooBar)Ljava/lang/String;} [in X [in [Working copy] X.java [in test [in src3 [in Completion]]]]],\n" + |
5324 |
" 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" + |
5325 |
" 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" + |
5326 |
" wait() {key=Ljava/lang/Object;.wait()V|Ljava/lang/IllegalMonitorStateException;|Ljava/lang/InterruptedException;} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + |
5327 |
" toString() {key=Ljava/lang/Object;.toString()Ljava/lang/String;} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + |
5328 |
" notifyAll() {key=Ljava/lang/Object;.notifyAll()V|Ljava/lang/IllegalMonitorStateException;} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + |
5329 |
" notify() {key=Ljava/lang/Object;.notify()V|Ljava/lang/IllegalMonitorStateException;} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + |
5330 |
" hashCode() {key=Ljava/lang/Object;.hashCode()I} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + |
5331 |
" getClass() {key=Ljava/lang/Object;.getClass()Ljava/lang/Class;} [in Object [in Object.class [in java.lang [in " + jclPath +"]]]],\n" + |
5332 |
" finalize() {key=Ljava/lang/Object;.finalize()V|Ljava/lang/Throwable;} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + |
5333 |
" equals(java.lang.Object) {key=Ljava/lang/Object;.equals(Ljava/lang/Object;)Z} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + |
5334 |
" clone() {key=Ljava/lang/Object;.clone()Ljava/lang/Object;|Ljava/lang/CloneNotSupportedException;} [in Object [in Object.class [in java.lang [in " + jclPath +"]]]],\n" + |
5335 |
"}", |
5336 |
result.context); |
5337 |
} |
5338 |
|
5339 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=312603 |
5340 |
public void test0175() throws JavaModelException { |
5341 |
this.workingCopies = new ICompilationUnit[3]; |
5342 |
this.workingCopies[0] = getWorkingCopy( |
5343 |
"/Completion/src3/test/X.java", |
5344 |
"package test;\n" + |
5345 |
"import java.text.MessageFormat;\n" + |
5346 |
"public class X {\n" + |
5347 |
" String fooBar = \"Hi\";" + |
5348 |
" String furchtbar= new String(String.format;\n" + |
5349 |
"}"); |
5350 |
|
5351 |
String str = this.workingCopies[0].getSource(); |
5352 |
int tokenStart = str.lastIndexOf("format"); |
5353 |
int tokenEnd = tokenStart + "format".length() - 1; |
5354 |
int cursorLocation = str.lastIndexOf("format") + "format".length(); |
5355 |
|
5356 |
CompletionResult result = contextComplete(this.workingCopies[0], cursorLocation, true, true); |
5357 |
String jclPath = getExternalJCLPathString(); |
5358 |
assertResults( |
5359 |
"completion offset="+(cursorLocation)+"\n" + |
5360 |
"completion range=["+(tokenStart)+", "+(tokenEnd)+"]\n" + |
5361 |
"completion token=\"format\"\n" + |
5362 |
"completion token kind=TOKEN_KIND_NAME\n" + |
5363 |
"expectedTypesSignatures=null\n" + |
5364 |
"expectedTypesKeys=null\n" + |
5365 |
"completion token location=UNKNOWN\n" + |
5366 |
"enclosingElement=X {key=Ltest/X;} [in [Working copy] X.java [in test [in src3 [in Completion]]]]\n" + |
5367 |
"visibleElements={\n" + |
5368 |
" fooBar {key=Ltest/X;.fooBar)Ljava/lang/String;} [in X [in [Working copy] X.java [in test [in src3 [in Completion]]]]],\n" + |
5369 |
" 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" + |
5370 |
" 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" + |
5371 |
" wait() {key=Ljava/lang/Object;.wait()V|Ljava/lang/IllegalMonitorStateException;|Ljava/lang/InterruptedException;} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + |
5372 |
" toString() {key=Ljava/lang/Object;.toString()Ljava/lang/String;} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + |
5373 |
" notifyAll() {key=Ljava/lang/Object;.notifyAll()V|Ljava/lang/IllegalMonitorStateException;} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + |
5374 |
" notify() {key=Ljava/lang/Object;.notify()V|Ljava/lang/IllegalMonitorStateException;} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + |
5375 |
" hashCode() {key=Ljava/lang/Object;.hashCode()I} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + |
5376 |
" getClass() {key=Ljava/lang/Object;.getClass()Ljava/lang/Class;} [in Object [in Object.class [in java.lang [in " + jclPath +"]]]],\n" + |
5377 |
" finalize() {key=Ljava/lang/Object;.finalize()V|Ljava/lang/Throwable;} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + |
5378 |
" equals(java.lang.Object) {key=Ljava/lang/Object;.equals(Ljava/lang/Object;)Z} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + |
5379 |
" clone() {key=Ljava/lang/Object;.clone()Ljava/lang/Object;|Ljava/lang/CloneNotSupportedException;} [in Object [in Object.class [in java.lang [in " + jclPath +"]]]],\n" + |
5380 |
"}", |
5381 |
result.context); |
5382 |
} |
5383 |
|
5384 |
// https://bugs.eclipse.org/bugs/show_bug.cgi?id=312603 |
5385 |
public void test0176() throws JavaModelException { |
5386 |
this.workingCopies = new ICompilationUnit[3]; |
5387 |
this.workingCopies[0] = getWorkingCopy( |
5388 |
"/Completion/src3/test/X.java", |
5389 |
"package test;\n" + |
5390 |
"import java.text.MessageFormat;\n" + |
5391 |
"public class X {\n" + |
5392 |
" String fooBar = \"Hi\";" + |
5393 |
" String furchtbar= (fooBar = new String(String.format;\n" + |
5394 |
"}"); |
5395 |
|
5396 |
String str = this.workingCopies[0].getSource(); |
5397 |
int tokenStart = str.lastIndexOf("format"); |
5398 |
int tokenEnd = tokenStart + "format".length() - 1; |
5399 |
int cursorLocation = str.lastIndexOf("format") + "format".length(); |
5400 |
|
5401 |
CompletionResult result = contextComplete(this.workingCopies[0], cursorLocation, true, true); |
5402 |
String jclPath = getExternalJCLPathString(); |
5403 |
assertResults( |
5404 |
"completion offset="+(cursorLocation)+"\n" + |
5405 |
"completion range=["+(tokenStart)+", "+(tokenEnd)+"]\n" + |
5406 |
"completion token=\"format\"\n" + |
5407 |
"completion token kind=TOKEN_KIND_NAME\n" + |
5408 |
"expectedTypesSignatures=null\n" + |
5409 |
"expectedTypesKeys=null\n" + |
5410 |
"completion token location=UNKNOWN\n" + |
5411 |
"enclosingElement=X {key=Ltest/X;} [in [Working copy] X.java [in test [in src3 [in Completion]]]]\n" + |
5412 |
"visibleElements={\n" + |
5413 |
" fooBar {key=Ltest/X;.fooBar)Ljava/lang/String;} [in X [in [Working copy] X.java [in test [in src3 [in Completion]]]]],\n" + |
5414 |
" 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" + |
5415 |
" 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" + |
5416 |
" wait() {key=Ljava/lang/Object;.wait()V|Ljava/lang/IllegalMonitorStateException;|Ljava/lang/InterruptedException;} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + |
5417 |
" toString() {key=Ljava/lang/Object;.toString()Ljava/lang/String;} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + |
5418 |
" notifyAll() {key=Ljava/lang/Object;.notifyAll()V|Ljava/lang/IllegalMonitorStateException;} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + |
5419 |
" notify() {key=Ljava/lang/Object;.notify()V|Ljava/lang/IllegalMonitorStateException;} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + |
5420 |
" hashCode() {key=Ljava/lang/Object;.hashCode()I} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + |
5421 |
" getClass() {key=Ljava/lang/Object;.getClass()Ljava/lang/Class;} [in Object [in Object.class [in java.lang [in " + jclPath +"]]]],\n" + |
5422 |
" finalize() {key=Ljava/lang/Object;.finalize()V|Ljava/lang/Throwable;} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + |
5423 |
" equals(java.lang.Object) {key=Ljava/lang/Object;.equals(Ljava/lang/Object;)Z} [in Object [in Object.class [in java.lang [in " + jclPath + "]]]],\n" + |
5424 |
" clone() {key=Ljava/lang/Object;.clone()Ljava/lang/Object;|Ljava/lang/CloneNotSupportedException;} [in Object [in Object.class [in java.lang [in " + jclPath +"]]]],\n" + |
5425 |
"}", |
5426 |
result.context); |
5427 |
} |
5294 |
} |
5428 |
} |