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

Collapse All | Expand All

(-)model/org/eclipse/jdt/core/JavaConventions.java (-3 / +8 lines)
Lines 42-47 Link Here
42
	private static final String PACKAGE_INFO = new String(TypeConstants.PACKAGE_INFO_NAME);
42
	private static final String PACKAGE_INFO = new String(TypeConstants.PACKAGE_INFO_NAME);
43
	private static final Scanner SCANNER = new Scanner(false /*comment*/, true /*whitespace*/, false /*nls*/, ClassFileConstants.JDK1_3 /*sourceLevel*/, null/*taskTag*/, null/*taskPriorities*/, true /*taskCaseSensitive*/);
43
	private static final Scanner SCANNER = new Scanner(false /*comment*/, true /*whitespace*/, false /*nls*/, ClassFileConstants.JDK1_3 /*sourceLevel*/, null/*taskTag*/, null/*taskPriorities*/, true /*taskCaseSensitive*/);
44
44
45
//{ObjectTeams: be conservative: this class has no context so cannot distinguish OT vs. Java projects, always assume pure Java:
46
	static {
47
		SCANNER.forceBaseIsIdentifier();
48
		SCANNER.parsePureJavaOnly = true;
49
		SCANNER.parseOTJonly = false;
50
	}
51
//SH}
52
45
	private JavaConventions() {
53
	private JavaConventions() {
46
		// Not instantiable
54
		// Not instantiable
47
	}
55
	}
Lines 80-88 Link Here
80
88
81
		try {
89
		try {
82
			SCANNER.setSource(id.toCharArray());
90
			SCANNER.setSource(id.toCharArray());
83
//{ObjectTeams: recognize "base" as an identifier in plain java code:
84
			SCANNER.forceBaseIsIdentifier();
85
// SH}
86
			int token = SCANNER.scanIdentifier();
91
			int token = SCANNER.scanIdentifier();
87
			if (token != TerminalTokens.TokenNameIdentifier) return null;
92
			if (token != TerminalTokens.TokenNameIdentifier) return null;
88
			if (SCANNER.currentPosition == SCANNER.eofPosition) { // to handle case where we had an ArrayIndexOutOfBoundsException
93
			if (SCANNER.currentPosition == SCANNER.eofPosition) { // to handle case where we had an ArrayIndexOutOfBoundsException

Return to bug 357029