Lines 11479-11482
Link Here
|
11479 |
expectedReplacedSource, |
11479 |
expectedReplacedSource, |
11480 |
"full ast"); |
11480 |
"full ast"); |
11481 |
} |
11481 |
} |
|
|
11482 |
//https://bugs.eclipse.org/bugs/show_bug.cgi?id=150632 |
11483 |
public void test0172() { |
11484 |
|
11485 |
String str = |
11486 |
"abstract class MatchFilter {\n"+ |
11487 |
" private static final String SETTINGS_LAST_USED_FILTERS= \"filters_last_used\"; \n"+ |
11488 |
"\n"+ |
11489 |
" // works if next line is commented out or moved to after PUBLIC_FILTER\n"+ |
11490 |
" public abstract String getName();\n"+ |
11491 |
"\n"+ |
11492 |
" // content assist at new ModifierFilter(|):\n"+ |
11493 |
" private static final MatchFilter PUBLIC_FILTER= new ModifierFilter();\n"+ |
11494 |
"}\n"+ |
11495 |
"\n"+ |
11496 |
"class ModifierFilter extends MatchFilter {\n"+ |
11497 |
" private final String fName;\n"+ |
11498 |
" public ModifierFilter(String name) {\n"+ |
11499 |
" fName= name;\n"+ |
11500 |
" }\n"+ |
11501 |
" public String getName() {\n"+ |
11502 |
" return fName;\n"+ |
11503 |
" }\n"+ |
11504 |
"}\n"; |
11505 |
|
11506 |
String completeBehind = "new ModifierFilter("; |
11507 |
int cursorLocation = str.lastIndexOf("new ModifierFilter(") + completeBehind.length() - 1; |
11508 |
String expectedCompletionNodeToString = "<CompleteOnAllocationExpression:new ModifierFilter()>"; |
11509 |
String expectedParentNodeToString = "<NONE>"; |
11510 |
String completionIdentifier = ""; |
11511 |
String expectedReplacedSource = ""; |
11512 |
String expectedUnitDisplayString = |
11513 |
"abstract class MatchFilter {\n" + |
11514 |
" private static final String SETTINGS_LAST_USED_FILTERS;\n" + |
11515 |
" private static final MatchFilter PUBLIC_FILTER = <CompleteOnAllocationExpression:new ModifierFilter()>;\n" + |
11516 |
" MatchFilter() {\n" + |
11517 |
" }\n" + |
11518 |
" <clinit>() {\n" + |
11519 |
" }\n" + |
11520 |
" public abstract String getName();\n" + |
11521 |
"}\n" + |
11522 |
"class ModifierFilter extends MatchFilter {\n" + |
11523 |
" private final String fName;\n" + |
11524 |
" public ModifierFilter(String name) {\n" + |
11525 |
" }\n" + |
11526 |
" public String getName() {\n" + |
11527 |
" }\n" + |
11528 |
"}\n"; |
11529 |
|
11530 |
checkDietParse( |
11531 |
str.toCharArray(), |
11532 |
cursorLocation, |
11533 |
expectedCompletionNodeToString, |
11534 |
expectedParentNodeToString, |
11535 |
expectedUnitDisplayString, |
11536 |
completionIdentifier, |
11537 |
expectedReplacedSource, |
11538 |
"diet ast"); |
11539 |
} |
11482 |
} |
11540 |
} |