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 23280 Details for
Bug 99606
Subtype not found if parameterized on inner class
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Improved fix
patch99606_org.eclipse.jdt.core.txt (text/plain), 4.21 KB, created by
Jerome Lanneluc
on 2005-06-16 06:21:06 EDT
(
hide
)
Description:
Improved fix
Filename:
MIME Type:
Creator:
Jerome Lanneluc
Created:
2005-06-16 06:21:06 EDT
Size:
4.21 KB
patch
obsolete
>Index: search/org/eclipse/jdt/internal/core/index/DiskIndex.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/index/DiskIndex.java,v >retrieving revision 1.37 >diff -u -r1.37 DiskIndex.java >--- search/org/eclipse/jdt/internal/core/index/DiskIndex.java 7 Jun 2005 12:00:10 -0000 1.37 >+++ search/org/eclipse/jdt/internal/core/index/DiskIndex.java 16 Jun 2005 10:19:47 -0000 >@@ -35,7 +35,7 @@ > private HashtableOfObject categoryTables; // category name -> HashtableOfObject(words -> int[] of document #'s) or offset if not read yet > private char[] cachedCategoryName; > >-public static final String SIGNATURE= "INDEX VERSION 1.105"; //$NON-NLS-1$ >+public static final String SIGNATURE= "INDEX VERSION 1.106"; //$NON-NLS-1$ > public static boolean DEBUG = false; > > private static final int RE_INDEXED = -1; >Index: search/org/eclipse/jdt/internal/core/search/indexing/SourceIndexerRequestor.java >=================================================================== >RCS file: /home/eclipse/org.eclipse.jdt.core/search/org/eclipse/jdt/internal/core/search/indexing/SourceIndexerRequestor.java,v >retrieving revision 1.32 >diff -u -r1.32 SourceIndexerRequestor.java >--- search/org/eclipse/jdt/internal/core/search/indexing/SourceIndexerRequestor.java 7 Jun 2005 12:00:10 -0000 1.32 >+++ search/org/eclipse/jdt/internal/core/search/indexing/SourceIndexerRequestor.java 16 Jun 2005 10:19:47 -0000 >@@ -145,15 +145,15 @@ > private void enterClass(TypeInfo typeInfo) { > > // eliminate possible qualifications, given they need to be fully resolved again >- if (typeInfo.superclass != null){ >- typeInfo.superclass = CharOperation.lastSegment(typeInfo.superclass, '.'); >+ if (typeInfo.superclass != null) { >+ typeInfo.superclass = getSimpleName(typeInfo.superclass); > > // add implicit constructor reference to default constructor > this.indexer.addConstructorReference(typeInfo.superclass, 0); > } > if (typeInfo.superinterfaces != null){ >- for (int i = 0, length = typeInfo.superinterfaces.length; i < length; i++){ >- typeInfo.superinterfaces[i] = CharOperation.lastSegment(typeInfo.superinterfaces[i], '.'); >+ for (int i = 0, length = typeInfo.superinterfaces.length; i < length; i++) { >+ typeInfo.superinterfaces[i] = getSimpleName(typeInfo.superinterfaces[i]); > } > } > char[][] typeNames; >@@ -191,7 +191,7 @@ > // eliminate possible qualifications, given they need to be fully resolved again > if (typeInfo.superinterfaces != null){ > for (int i = 0, length = typeInfo.superinterfaces.length; i < length; i++){ >- typeInfo.superinterfaces[i] = CharOperation.lastSegment(typeInfo.superinterfaces[i], '.'); >+ typeInfo.superinterfaces[i] = getSimpleName(typeInfo.superinterfaces[i]); > } > } > char[][] typeNames; >@@ -220,7 +220,7 @@ > // eliminate possible qualifications, given they need to be fully resolved again > if (typeInfo.superinterfaces != null){ > for (int i = 0, length = typeInfo.superinterfaces.length; i < length; i++){ >- typeInfo.superinterfaces[i] = CharOperation.lastSegment(typeInfo.superinterfaces[i], '.'); >+ typeInfo.superinterfaces[i] = getSimpleName(typeInfo.superinterfaces[i]); > } > } > char[][] typeNames; >@@ -305,6 +305,38 @@ > public void exitType(int declarationEnd) { > popTypeName(); > } >+/* >+ * Returns the unqualified name without parameters from the given type name. >+ */ >+private char[] getSimpleName(char[] typeName) { >+ int lastDot = -1, lastGenericStart = -1; >+ int depthCount = 0; >+ int length = typeName.length; >+ lastDotLookup: for (int i = length -1; i >= 0; i--) { >+ switch (typeName[i]) { >+ case '.': >+ if (depthCount == 0) { >+ lastDot = i; >+ break lastDotLookup; >+ } >+ break; >+ case '<': >+ depthCount--; >+ if (depthCount == 0) lastGenericStart = i; >+ break; >+ case '>': >+ depthCount++; >+ break; >+ } >+ } >+ if (lastGenericStart < 0) { >+ if (lastDot < 0) { >+ return typeName; >+ } >+ return CharOperation.subarray(typeName, lastDot + 1, length); >+ } >+ return CharOperation.subarray(typeName, lastDot + 1, lastGenericStart); >+} > public void popTypeName() { > if (depth > 0) { > enclosingTypeNames[--depth] = null;
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 99606
:
23153
|
23154
| 23280 |
23281