Lines 110-117
Link Here
|
110 |
import org.eclipse.jdt.internal.ui.util.ExceptionHandler; |
110 |
import org.eclipse.jdt.internal.ui.util.ExceptionHandler; |
111 |
import org.eclipse.jdt.internal.ui.util.TypeNameMatchLabelProvider; |
111 |
import org.eclipse.jdt.internal.ui.util.TypeNameMatchLabelProvider; |
112 |
import org.eclipse.jdt.internal.ui.viewsupport.ColoredJavaElementLabels; |
112 |
import org.eclipse.jdt.internal.ui.viewsupport.ColoredJavaElementLabels; |
113 |
import org.eclipse.jdt.internal.ui.viewsupport.ColoredViewersManager; |
|
|
114 |
import org.eclipse.jdt.internal.ui.viewsupport.ColoredString; |
113 |
import org.eclipse.jdt.internal.ui.viewsupport.ColoredString; |
|
|
114 |
import org.eclipse.jdt.internal.ui.viewsupport.ColoredViewersManager; |
115 |
import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider; |
115 |
import org.eclipse.jdt.internal.ui.viewsupport.JavaElementImageProvider; |
116 |
import org.eclipse.jdt.internal.ui.viewsupport.OwnerDrawSupport; |
116 |
import org.eclipse.jdt.internal.ui.viewsupport.OwnerDrawSupport; |
117 |
import org.eclipse.jdt.internal.ui.workingsets.WorkingSetFilterActionGroup; |
117 |
import org.eclipse.jdt.internal.ui.workingsets.WorkingSetFilterActionGroup; |
Lines 566-580
Link Here
|
566 |
SearchEngine engine= new SearchEngine((WorkingCopyOwner) null); |
566 |
SearchEngine engine= new SearchEngine((WorkingCopyOwner) null); |
567 |
String packPattern= typeSearchFilter.getPackagePattern(); |
567 |
String packPattern= typeSearchFilter.getPackagePattern(); |
568 |
progressMonitor.setTaskName(JavaUIMessages.FilteredTypesSelectionDialog_searchJob_taskName); |
568 |
progressMonitor.setTaskName(JavaUIMessages.FilteredTypesSelectionDialog_searchJob_taskName); |
|
|
569 |
|
569 |
/* |
570 |
/* |
570 |
* Setting the filter into match everything mode avoids filtering twice by the same pattern |
571 |
* Setting the filter into match everything mode avoids filtering twice |
571 |
* (the search engine only provides filtered matches). |
572 |
* by the same pattern (the search engine only provides filtered |
|
|
573 |
* matches). For the case when the pattern is a camel case pattern with |
574 |
* a terminator, the filter is not set to match everything mode because |
575 |
* it handles this case wrong. |
572 |
*/ |
576 |
*/ |
573 |
typeSearchFilter.setMatchEverythingMode(true); |
577 |
String tempPatternString = itemsFilter.getPattern(); |
|
|
578 |
SearchPattern searchPattern = new SearchPattern(); |
579 |
searchPattern.setPattern(tempPatternString); |
580 |
|
581 |
if (searchPattern.getMatchRule() == SearchPattern.RULE_CAMELCASE_MATCH) { |
582 |
/* |
583 |
* If the pattern is empty, the RULE_BLANK_MATCH will be chose, so |
584 |
* we don't have to check the pattern length |
585 |
*/ |
586 |
String lastChar = tempPatternString.substring(tempPatternString |
587 |
.length() - 1); |
588 |
|
589 |
if (lastChar.equals("<") || lastChar.equals(" ")) { //$NON-NLS-1$//$NON-NLS-2$ |
590 |
tempPatternString = tempPatternString.substring(0, |
591 |
tempPatternString.length() - 1); |
592 |
} else { |
593 |
typeSearchFilter.setMatchEverythingMode(true); |
594 |
} |
595 |
} else { |
596 |
typeSearchFilter.setMatchEverythingMode(true); |
597 |
} |
598 |
|
574 |
try { |
599 |
try { |
575 |
engine.searchAllTypeNames(packPattern == null ? null : packPattern.toCharArray(), |
600 |
engine.searchAllTypeNames(packPattern == null ? null : packPattern.toCharArray(), |
576 |
typeSearchFilter.getPackageFlags(), //TODO: https://bugs.eclipse.org/bugs/show_bug.cgi?id=176017 |
601 |
typeSearchFilter.getPackageFlags(), //TODO: https://bugs.eclipse.org/bugs/show_bug.cgi?id=176017 |
577 |
typeSearchFilter.getPattern().toCharArray(), |
602 |
tempPatternString.toCharArray(), |
578 |
typeSearchFilter.getMatchRule(), //TODO: https://bugs.eclipse.org/bugs/show_bug.cgi?id=176017 |
603 |
typeSearchFilter.getMatchRule(), //TODO: https://bugs.eclipse.org/bugs/show_bug.cgi?id=176017 |
579 |
typeSearchFilter.getElementKind(), |
604 |
typeSearchFilter.getElementKind(), |
580 |
typeSearchFilter.getSearchScope(), |
605 |
typeSearchFilter.getSearchScope(), |