View | Details | Raw Unified | Return to bug 157814 | Differences between
and this patch

Collapse All | Expand All

(-)core refactoring/org/eclipse/jdt/internal/corext/refactoring/rename/MethodOccurenceCollector.java (-1 / +1 lines)
Lines 37-43 Link Here
37
				return;
37
				return;
38
			
38
			
39
			if (match instanceof MethodReferenceMatch
39
			if (match instanceof MethodReferenceMatch
40
					&& ((MethodReferenceMatch) match).isPolymorphic()
40
					&& ((MethodReferenceMatch) match).isOverridden()
41
					&& match.getAccuracy() == SearchMatch.A_INACCURATE) {
41
					&& match.getAccuracy() == SearchMatch.A_INACCURATE) {
42
				return; // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=156491
42
				return; // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=156491
43
			}
43
			}
(-)ui/org/eclipse/jdt/internal/ui/search/JavaElementMatch.java (-5 / +5 lines)
Lines 21-36 Link Here
21
	private final boolean fIsWriteAccess;
21
	private final boolean fIsWriteAccess;
22
	private final boolean fIsReadAccess;
22
	private final boolean fIsReadAccess;
23
	private final boolean fIsJavadoc;
23
	private final boolean fIsJavadoc;
24
	private final boolean fIsPolymorphic;
24
	private final boolean fIsOverridden;
25
	
25
	
26
	JavaElementMatch(Object element, int matchRule, int offset, int length, int accuracy, boolean isReadAccess, boolean isWriteAccess, boolean isJavadoc, boolean isPolymorphic) {
26
	JavaElementMatch(Object element, int matchRule, int offset, int length, int accuracy, boolean isReadAccess, boolean isWriteAccess, boolean isJavadoc, boolean isOverridden) {
27
		super(element, offset, length);
27
		super(element, offset, length);
28
		fAccuracy= accuracy;
28
		fAccuracy= accuracy;
29
		fMatchRule= matchRule;
29
		fMatchRule= matchRule;
30
		fIsWriteAccess= isWriteAccess;
30
		fIsWriteAccess= isWriteAccess;
31
		fIsReadAccess= isReadAccess;
31
		fIsReadAccess= isReadAccess;
32
		fIsJavadoc= isJavadoc;
32
		fIsJavadoc= isJavadoc;
33
		fIsPolymorphic= isPolymorphic;
33
		fIsOverridden= isOverridden;
34
	}
34
	}
35
35
36
	public int getAccuracy() {
36
	public int getAccuracy() {
Lines 49-56 Link Here
49
		return fIsJavadoc;
49
		return fIsJavadoc;
50
	}
50
	}
51
	
51
	
52
	public boolean isPolymorphic() {
52
	public boolean isOverridden() {
53
		return fIsPolymorphic;
53
		return fIsOverridden;
54
	}
54
	}
55
	
55
	
56
	public int getMatchRule() {
56
	public int getMatchRule() {
(-)ui/org/eclipse/jdt/internal/ui/search/JavaMatchFilter.java (-4 / +4 lines)
Lines 294-312 Link Here
294
294
295
class PolymorphicFilter extends JavaMatchFilter {
295
class PolymorphicFilter extends JavaMatchFilter {
296
    public boolean filters(JavaElementMatch match) {
296
    public boolean filters(JavaElementMatch match) {
297
        return match.isPolymorphic();
297
        return match.isOverridden();
298
    }
298
    }
299
299
300
    public String getName() {
300
    public String getName() {
301
        return SearchMessages.MatchFilter_PolymorphicFilter_name; 
301
        return SearchMessages.MatchFilter_OverriddenFilter_name; 
302
    }
302
    }
303
303
304
    public String getActionLabel() {
304
    public String getActionLabel() {
305
        return SearchMessages.MatchFilter_PolymorphicFilter_actionLabel; 
305
        return SearchMessages.MatchFilter_OverriddenFilter_actionLabel; 
306
    }
306
    }
307
307
308
    public String getDescription() {
308
    public String getDescription() {
309
        return SearchMessages.MatchFilter_PolymorphicFilter_description; 
309
        return SearchMessages.MatchFilter_OverriddenFilter_description; 
310
    }
310
    }
311
    
311
    
312
    public boolean isApplicable(JavaSearchQuery query) {
312
    public boolean isApplicable(JavaSearchQuery query) {
(-)ui/org/eclipse/jdt/internal/ui/search/NewSearchResultCollector.java (-3 / +3 lines)
Lines 45-56 Link Here
45
				isWriteAccess= localVarRef.isWriteAccess();
45
				isWriteAccess= localVarRef.isWriteAccess();
46
				isReadAccess= localVarRef.isReadAccess();
46
				isReadAccess= localVarRef.isReadAccess();
47
			}
47
			}
48
			boolean isPolymorphic= false;
48
			boolean isOverridden= false;
49
			if (match instanceof MethodReferenceMatch) {
49
			if (match instanceof MethodReferenceMatch) {
50
				MethodReferenceMatch methodRef= (MethodReferenceMatch) match;
50
				MethodReferenceMatch methodRef= (MethodReferenceMatch) match;
51
				isPolymorphic= methodRef.isPolymorphic();
51
				isOverridden= methodRef.isOverridden();
52
			}
52
			}
53
			fSearch.addMatch(new JavaElementMatch(enclosingElement, match.getRule(), match.getOffset(), match.getLength(), match.getAccuracy(), isReadAccess, isWriteAccess, match.isInsideDocComment(), isPolymorphic));
53
			fSearch.addMatch(new JavaElementMatch(enclosingElement, match.getRule(), match.getOffset(), match.getLength(), match.getAccuracy(), isReadAccess, isWriteAccess, match.isInsideDocComment(), isOverridden));
54
		}
54
		}
55
	}
55
	}
56
56
(-)ui/org/eclipse/jdt/internal/ui/search/SearchMessages.java (-3 / +18 lines)
Lines 71-76 Link Here
71
	public static String SearchPage_searchFor_field;
71
	public static String SearchPage_searchFor_field;
72
	public static String SearchPage_searchFor_package;
72
	public static String SearchPage_searchFor_package;
73
	public static String SearchPage_searchFor_constructor;
73
	public static String SearchPage_searchFor_constructor;
74
	public static String SearchPage_searchFor_class;
75
	public static String SearchPage_searchFor_interface;
76
	public static String SearchPage_searchFor_enum;
77
	public static String SearchPage_searchFor_annotation;
78
	public static String SearchPage_searchFor_class_enum;
79
	public static String SearchPage_searchFor_class_interface;
80
	public static String SearchPage_matchMode_label;
81
	public static String SearchPage_matchMode_exact;
82
	public static String SearchPage_matchMode_prefix;
83
	public static String SearchPage_matchMode_pattern;
84
	public static String SearchPage_matchMode_regexp;
85
	public static String SearchPage_matchMode_erasure;
86
	public static String SearchPage_matchMode_equivalent;
87
	public static String SearchPage_matchMode_full;
88
	public static String SearchPage_matchMode_camelcase;
74
	public static String SearchPage_limitTo_label;
89
	public static String SearchPage_limitTo_label;
75
	public static String SearchPage_limitTo_declarations;
90
	public static String SearchPage_limitTo_declarations;
76
	public static String SearchPage_limitTo_implementors;
91
	public static String SearchPage_limitTo_implementors;
Lines 227-235 Link Here
227
	public static String MatchFilter_JavadocFilter_name;
242
	public static String MatchFilter_JavadocFilter_name;
228
	public static String MatchFilter_JavadocFilter_actionLabel;
243
	public static String MatchFilter_JavadocFilter_actionLabel;
229
	public static String MatchFilter_JavadocFilter_description;
244
	public static String MatchFilter_JavadocFilter_description;
230
	public static String MatchFilter_PolymorphicFilter_name;
245
	public static String MatchFilter_OverriddenFilter_name;
231
	public static String MatchFilter_PolymorphicFilter_actionLabel;
246
	public static String MatchFilter_OverriddenFilter_actionLabel;
232
	public static String MatchFilter_PolymorphicFilter_description;
247
	public static String MatchFilter_OverriddenFilter_description;
233
	public static String MatchFilter_ErasureFilter_name;
248
	public static String MatchFilter_ErasureFilter_name;
234
	public static String MatchFilter_ErasureFilter_actionLabel;
249
	public static String MatchFilter_ErasureFilter_actionLabel;
235
	public static String MatchFilter_ErasureFilter_description;
250
	public static String MatchFilter_ErasureFilter_description;
(-)ui/org/eclipse/jdt/internal/ui/search/SearchMessages.properties (-4 / +25 lines)
Lines 53-58 Link Here
53
SearchPage_searchIn_projects=Required projects
53
SearchPage_searchIn_projects=Required projects
54
SearchPage_searchIn_libraries=Application libraries
54
SearchPage_searchIn_libraries=Application libraries
55
SearchPage_searchFor_constructor= Co&nstructor
55
SearchPage_searchFor_constructor= Co&nstructor
56
SearchPage_searchFor_class= &Class
57
SearchPage_searchFor_interface= &Interface
58
SearchPage_searchFor_enum= &Enum
59
SearchPage_searchFor_annotation= &Annotation
60
SearchPage_searchFor_class_enum= Class+En&um
61
SearchPage_searchFor_class_interface= Class+Inte&rface
62
63
SearchPage_matchMode_label= Match Mode
64
SearchPage_matchMode_exact= &Exact
65
SearchPage_matchMode_prefix= &Prefix
66
SearchPage_matchMode_pattern= Pa&ttern
67
SearchPage_matchMode_regexp= &Regexp
68
SearchPage_matchMode_erasure= Eras&ure
69
SearchPage_matchMode_equivalent= E&quivalent
70
SearchPage_matchMode_full= &Full
71
SearchPage_matchMode_camelcase= &Camel Case
56
72
57
SearchPage_limitTo_label= Limit To
73
SearchPage_limitTo_label= Limit To
58
SearchPage_limitTo_declarations= Dec&larations
74
SearchPage_limitTo_declarations= Dec&larations
Lines 65-71 Link Here
65
SearchPage_expression_label= Se&arch string (* = any string, ? = any character):
81
SearchPage_expression_label= Se&arch string (* = any string, ? = any character):
66
SearchPage_expression_caseSensitive= Case sens&itive
82
SearchPage_expression_caseSensitive= Case sens&itive
67
83
68
SearchPage_searchJRE_label=Search the JRE s&ystem libraries
84
#SearchPage_searchJRE_label=Search the JRE s&ystem libraries
85
SearchPage_includeMask_label=Search include mask
86
SearchPage_includeMask_sources=Sources
87
SearchPage_includeMask_applicationLibraries=Application Libraries
88
SearchPage_includeMask_systemLibraries=System Libraries
89
SearchPage_includeMask_referencedProjects=Referenced Projects
69
90
70
# Concatenate two working set names e.g. "Source, Lib"
91
# Concatenate two working set names e.g. "Source, Lib"
71
SearchUtil_workingSetConcatenation= {0}, {1}
92
SearchUtil_workingSetConcatenation= {0}, {1}
Lines 268-276 Link Here
268
MatchFilter_JavadocFilter_actionLabel=Filter &Javadoc
289
MatchFilter_JavadocFilter_actionLabel=Filter &Javadoc
269
MatchFilter_JavadocFilter_description=Filters matches that are inside Javadoc comments
290
MatchFilter_JavadocFilter_description=Filters matches that are inside Javadoc comments
270
291
271
MatchFilter_PolymorphicFilter_name=Polymorphic method references
292
MatchFilter_OverriddenFilter_name=Overridden method references
272
MatchFilter_PolymorphicFilter_actionLabel=Filter &Polymorphic
293
MatchFilter_OverriddenFilter_actionLabel=Filter &Overridden
273
MatchFilter_PolymorphicFilter_description=Filters polymorphic method references (references to methods that are declared in a supertype or in a subtype)
294
MatchFilter_OverriddenFilter_description=Filters overridden method references (references to methods that are declared in a supertype)
274
295
275
MatchFilter_ErasureFilter_name=Incompatible type arguments
296
MatchFilter_ErasureFilter_name=Incompatible type arguments
276
MatchFilter_ErasureFilter_actionLabel=Filter In&compatible
297
MatchFilter_ErasureFilter_actionLabel=Filter In&compatible

Return to bug 157814