Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 79465 Details for
Bug 201426
[search] New SearchPattern constant R_CAMEL_CASE_MATCH name may be misleading for users
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Necessary changes in JDT/UI code
v02-jdt-ui_v20070914.txt (text/plain), 4.58 KB, created by
Frederic Fusier
on 2007-10-01 08:03:50 EDT
(
hide
)
Description:
Necessary changes in JDT/UI code
Filename:
MIME Type:
Creator:
Frederic Fusier
Created:
2007-10-01 08:03:50 EDT
Size:
4.58 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.jdt.ui >Index: core extension/org/eclipse/jdt/internal/corext/util/TypeInfoFilter.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/TypeInfoFilter.java,v >retrieving revision 1.17 >diff -u -r1.17 TypeInfoFilter.java >--- core extension/org/eclipse/jdt/internal/corext/util/TypeInfoFilter.java 24 Aug 2007 14:45:07 -0000 1.17 >+++ core extension/org/eclipse/jdt/internal/corext/util/TypeInfoFilter.java 26 Sep 2007 17:48:01 -0000 >@@ -35,7 +35,7 @@ > > public PatternMatcher(String pattern) { > this(pattern, SearchPattern.R_EXACT_MATCH | SearchPattern.R_PREFIX_MATCH | >- SearchPattern.R_PATTERN_MATCH | SearchPattern.R_CAMEL_CASE_MATCH); >+ SearchPattern.R_PATTERN_MATCH | SearchPattern.R_CAMELCASE_MATCH | SearchPattern.R_CAMELCASE_SAME_PART_COUNT_MATCH); > } > > public PatternMatcher(String pattern, int allowedModes) { >@@ -60,10 +60,10 @@ > return fStringMatcher.match(text); > case SearchPattern.R_EXACT_MATCH: > return fPattern.equalsIgnoreCase(text); >- case SearchPattern.R_CAMEL_CASE_MATCH: >- return (SearchPattern.camelCaseMatch(fPattern, text, false)); >- case SearchPattern.R_CAMEL_CASE_MATCH | SearchPattern.R_PREFIX_MATCH: >- if (SearchPattern.camelCaseMatch(fPattern, text)) { >+ case SearchPattern.R_CAMELCASE_SAME_PART_COUNT_MATCH: >+ return SearchPattern.camelCaseMatch(fPattern, text, fMatchKind == SearchPattern.R_CAMELCASE_SAME_PART_COUNT_MATCH); >+ case SearchPattern.R_CAMELCASE_MATCH: >+ if (SearchPattern.camelCaseMatch(fPattern, text, fMatchKind == SearchPattern.R_CAMELCASE_SAME_PART_COUNT_MATCH)) { > return true; > } > // fall through to prefix match if camel case failed (bug 137244) >@@ -102,7 +102,7 @@ > if (last == END_SYMBOL || last == BLANK) { > fPattern= pattern.substring(0, length - 1); > if (SearchUtils.isCamelCasePattern(fPattern)) { >- fMatchKind= SearchPattern.R_CAMEL_CASE_MATCH; >+ fMatchKind= SearchPattern.R_CAMELCASE_SAME_PART_COUNT_MATCH; > } else { > fMatchKind= SearchPattern.R_EXACT_MATCH; > } >@@ -110,7 +110,7 @@ > } > > if (SearchUtils.isCamelCasePattern(pattern)) { >- fMatchKind= SearchPattern.R_CAMEL_CASE_MATCH | SearchPattern.R_PREFIX_MATCH; >+ fMatchKind= SearchPattern.R_CAMELCASE_MATCH; > fPattern= pattern; > return; > } >@@ -202,7 +202,7 @@ > } > > public boolean isCamelCasePattern() { >- return (fNameMatcher.getMatchKind() & SearchPattern.R_CAMEL_CASE_MATCH) != 0; >+ return (fNameMatcher.getMatchKind() & (SearchPattern.R_CAMELCASE_MATCH | SearchPattern.R_CAMELCASE_SAME_PART_COUNT_MATCH)) != 0; > } > > public String getPackagePattern() { >Index: core extension/org/eclipse/jdt/internal/corext/util/SearchUtils.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/core extension/org/eclipse/jdt/internal/corext/util/SearchUtils.java,v >retrieving revision 1.7 >diff -u -r1.7 SearchUtils.java >--- core extension/org/eclipse/jdt/internal/corext/util/SearchUtils.java 24 Aug 2007 14:45:07 -0000 1.7 >+++ core extension/org/eclipse/jdt/internal/corext/util/SearchUtils.java 26 Sep 2007 17:48:01 -0000 >@@ -69,7 +69,7 @@ > * @return whether it is a camel case pattern or not > */ > public static boolean isCamelCasePattern(String pattern) { >- int camelOrPrefix= SearchPattern.R_CAMEL_CASE_MATCH | SearchPattern.R_PREFIX_MATCH; >- return SearchPattern.validateMatchRule(pattern, camelOrPrefix) == camelOrPrefix; >+ int camel = SearchPattern.R_CAMELCASE_MATCH; >+ return SearchPattern.validateMatchRule(pattern, camel) == camel; > } > } >\ No newline at end of file >Index: ui/org/eclipse/jdt/internal/ui/search/JavaSearchQuery.java >=================================================================== >RCS file: /cvsroot/eclipse/org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/search/JavaSearchQuery.java,v >retrieving revision 1.44 >diff -u -r1.44 JavaSearchQuery.java >--- ui/org/eclipse/jdt/internal/ui/search/JavaSearchQuery.java 24 Aug 2007 14:45:07 -0000 1.44 >+++ ui/org/eclipse/jdt/internal/ui/search/JavaSearchQuery.java 26 Sep 2007 17:48:01 -0000 >@@ -180,7 +180,7 @@ > if (pattern.indexOf('*') != -1 || pattern.indexOf('?') != -1) { > return SearchPattern.R_PATTERN_MATCH; > } else if (SearchUtils.isCamelCasePattern(pattern)) { >- return SearchPattern.R_CAMEL_CASE_MATCH | SearchPattern.R_PREFIX_MATCH; >+ return SearchPattern.R_CAMELCASE_MATCH; > } > return SearchPattern.R_EXACT_MATCH; > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 201426
:
79464
|
79465
|
79539
|
79563