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

Collapse All | Expand All

(-)search/org/eclipse/jdt/internal/core/index/DiskIndex.java (-1 / +1 lines)
Lines 35-41 Link Here
35
private HashtableOfObject categoryTables; // category name -> HashtableOfObject(words -> int[] of document #'s) or offset if not read yet
35
private HashtableOfObject categoryTables; // category name -> HashtableOfObject(words -> int[] of document #'s) or offset if not read yet
36
private char[] cachedCategoryName;
36
private char[] cachedCategoryName;
37
37
38
public static final String SIGNATURE= "INDEX VERSION 1.105"; //$NON-NLS-1$
38
public static final String SIGNATURE= "INDEX VERSION 1.106"; //$NON-NLS-1$
39
public static boolean DEBUG = false;
39
public static boolean DEBUG = false;
40
40
41
private static final int RE_INDEXED = -1;
41
private static final int RE_INDEXED = -1;
(-)search/org/eclipse/jdt/internal/core/search/indexing/SourceIndexerRequestor.java (-6 / +35 lines)
Lines 145-159 Link Here
145
private void enterClass(TypeInfo typeInfo) {
145
private void enterClass(TypeInfo typeInfo) {
146
146
147
	// eliminate possible qualifications, given they need to be fully resolved again
147
	// eliminate possible qualifications, given they need to be fully resolved again
148
	if (typeInfo.superclass != null){
148
	if (typeInfo.superclass != null) {
149
		typeInfo.superclass = CharOperation.lastSegment(typeInfo.superclass, '.');
149
		typeInfo.superclass = getSimpleName(typeInfo.superclass);
150
		
150
		
151
		// add implicit constructor reference to default constructor
151
		// add implicit constructor reference to default constructor
152
		this.indexer.addConstructorReference(typeInfo.superclass, 0);
152
		this.indexer.addConstructorReference(typeInfo.superclass, 0);
153
	}
153
	}
154
	if (typeInfo.superinterfaces != null){
154
	if (typeInfo.superinterfaces != null){
155
		for (int i = 0, length = typeInfo.superinterfaces.length; i < length; i++){
155
		for (int i = 0, length = typeInfo.superinterfaces.length; i < length; i++) {
156
			typeInfo.superinterfaces[i] = CharOperation.lastSegment(typeInfo.superinterfaces[i], '.');
156
			typeInfo.superinterfaces[i] = getSimpleName(typeInfo.superinterfaces[i]);
157
		}
157
		}
158
	}
158
	}
159
	char[][] typeNames;
159
	char[][] typeNames;
Lines 191-197 Link Here
191
	// eliminate possible qualifications, given they need to be fully resolved again
191
	// eliminate possible qualifications, given they need to be fully resolved again
192
	if (typeInfo.superinterfaces != null){
192
	if (typeInfo.superinterfaces != null){
193
		for (int i = 0, length = typeInfo.superinterfaces.length; i < length; i++){
193
		for (int i = 0, length = typeInfo.superinterfaces.length; i < length; i++){
194
			typeInfo.superinterfaces[i] = CharOperation.lastSegment(typeInfo.superinterfaces[i], '.');
194
			typeInfo.superinterfaces[i] = getSimpleName(typeInfo.superinterfaces[i]);
195
		}
195
		}
196
	}	
196
	}	
197
	char[][] typeNames;
197
	char[][] typeNames;
Lines 220-226 Link Here
220
	// eliminate possible qualifications, given they need to be fully resolved again
220
	// eliminate possible qualifications, given they need to be fully resolved again
221
	if (typeInfo.superinterfaces != null){
221
	if (typeInfo.superinterfaces != null){
222
		for (int i = 0, length = typeInfo.superinterfaces.length; i < length; i++){
222
		for (int i = 0, length = typeInfo.superinterfaces.length; i < length; i++){
223
			typeInfo.superinterfaces[i] = CharOperation.lastSegment(typeInfo.superinterfaces[i], '.');
223
			typeInfo.superinterfaces[i] = getSimpleName(typeInfo.superinterfaces[i]);
224
		}
224
		}
225
	}	
225
	}	
226
	char[][] typeNames;
226
	char[][] typeNames;
Lines 305-310 Link Here
305
public void exitType(int declarationEnd) {
305
public void exitType(int declarationEnd) {
306
	popTypeName();
306
	popTypeName();
307
}
307
}
308
/*
309
 * Returns the unqualified name without parameters from the given type name.
310
 */
311
private char[] getSimpleName(char[] typeName) {
312
	int lastDot = -1;
313
	int length = length = typeName.length;
314
	int lastGenericStart = length;
315
	int depthCount = 0;
316
	for (int i = 0; i < length; i++) {
317
		char c = typeName[i];
318
		switch (c) {
319
			case '.':
320
				if (depthCount == 0)
321
					lastDot = i;
322
				break;
323
			case '<':
324
				if (depthCount == 0)
325
					lastGenericStart = i;
326
				depthCount++;
327
				break;
328
			case '>':
329
				depthCount--;
330
				break;
331
		}
332
	}
333
	if (lastDot == -1 && lastGenericStart == length)
334
		return typeName;
335
	return CharOperation.subarray(typeName, lastDot+1, lastGenericStart);
336
}
308
public void popTypeName() {
337
public void popTypeName() {
309
	if (depth > 0) {
338
	if (depth > 0) {
310
		enclosingTypeNames[--depth] = null;
339
		enclosingTypeNames[--depth] = null;

Return to bug 99606