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

Collapse All | Expand All

(-)model/org/eclipse/jdt/internal/core/SourceMapper.java (-1 / +14 lines)
Lines 34-39 Link Here
34
import org.eclipse.core.runtime.IPath;
34
import org.eclipse.core.runtime.IPath;
35
import org.eclipse.core.runtime.IStatus;
35
import org.eclipse.core.runtime.IStatus;
36
import org.eclipse.core.runtime.Path;
36
import org.eclipse.core.runtime.Path;
37
import org.eclipse.jdt.core.Flags;
37
import org.eclipse.jdt.core.IClassFile;
38
import org.eclipse.jdt.core.IClassFile;
38
import org.eclipse.jdt.core.IField;
39
import org.eclipse.jdt.core.IField;
39
import org.eclipse.jdt.core.IJavaElement;
40
import org.eclipse.jdt.core.IJavaElement;
Lines 170-175 Link Here
170
	IType[] types;
171
	IType[] types;
171
	int[] typeDeclarationStarts;
172
	int[] typeDeclarationStarts;
172
	SourceRange[] typeNameRanges;
173
	SourceRange[] typeNameRanges;
174
	int[] typeModifiers;
173
	int typeDepth;
175
	int typeDepth;
174
	
176
	
175
	/**
177
	/**
Lines 626-631 Link Here
626
				this.methodParameterNames = new char[this.typeDepth * 2][][],
628
				this.methodParameterNames = new char[this.typeDepth * 2][][],
627
				0,
629
				0,
628
				this.typeDepth);					
630
				this.typeDepth);					
631
			System.arraycopy(
632
				this.typeModifiers,
633
				0,
634
				this.typeModifiers = new int[this.typeDepth * 2],
635
				0,
636
				this.typeDepth);
629
		}
637
		}
630
		if (typeInfo.name.length == 0) {
638
		if (typeInfo.name.length == 0) {
631
			this.anonymousCounter++;
639
			this.anonymousCounter++;
Lines 659-664 Link Here
659
			}
667
			}
660
		}
668
		}
661
		
669
		
670
		// type modifiers
671
		this.typeModifiers[typeDepth] = typeInfo.modifiers;
672
662
		// categories
673
		// categories
663
		addCategories(currentType, typeInfo.categories);
674
		addCategories(currentType, typeInfo.categories);
664
	}
675
	}
Lines 717-724 Link Here
717
				new SourceRange(methodInfo.nameSourceStart, methodInfo.nameSourceEnd - methodInfo.nameSourceStart + 1);
728
				new SourceRange(methodInfo.nameSourceStart, methodInfo.nameSourceEnd - methodInfo.nameSourceStart + 1);
718
			this.memberDeclarationStart[typeDepth] = methodInfo.declarationStart;
729
			this.memberDeclarationStart[typeDepth] = methodInfo.declarationStart;
719
			IType currentType = this.types[typeDepth];
730
			IType currentType = this.types[typeDepth];
731
			int currenTypeModifiers = this.typeModifiers[typeDepth];
720
			char[][] parameterTypes = methodInfo.parameterTypes;
732
			char[][] parameterTypes = methodInfo.parameterTypes;
721
			if (parameterTypes != null && methodInfo.isConstructor && currentType.getDeclaringType() != null) {
733
			if (parameterTypes != null && methodInfo.isConstructor && currentType.getDeclaringType() != null && !Flags.isStatic(currenTypeModifiers)) {
722
				IType declaringType = currentType.getDeclaringType();
734
				IType declaringType = currentType.getDeclaringType();
723
				String declaringTypeName = declaringType.getElementName();
735
				String declaringTypeName = declaringType.getElementName();
724
				if (declaringTypeName.length() == 0) {
736
				if (declaringTypeName.length() == 0) {
Lines 1220-1225 Link Here
1220
		this.types = new IType[1];
1232
		this.types = new IType[1];
1221
		this.typeDeclarationStarts = new int[1];
1233
		this.typeDeclarationStarts = new int[1];
1222
		this.typeNameRanges = new SourceRange[1];
1234
		this.typeNameRanges = new SourceRange[1];
1235
		this.typeModifiers = new int[1];
1223
		this.typeDepth = -1;
1236
		this.typeDepth = -1;
1224
		this.memberDeclarationStart = new int[1];
1237
		this.memberDeclarationStart = new int[1];
1225
		this.memberName = new String[1];
1238
		this.memberName = new String[1];

Return to bug 153133