Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
View | Details | Raw Unified | Return to bug 349400 | Differences between
and this patch

Collapse All | Expand All

(-)eval/org/eclipse/jdt/internal/debug/eval/ast/engine/ASTEvaluationEngine.java (-2 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2010 IBM Corporation and others.
2
 * Copyright (c) 2000, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 268-274 Link Here
268
	}
268
	}
269
	
269
	
270
	private CompilationUnit parseCompilationUnit(char[] source, String unitName, IJavaProject project) {
270
	private CompilationUnit parseCompilationUnit(char[] source, String unitName, IJavaProject project) {
271
		ASTParser parser = ASTParser.newParser(AST.JLS3);
271
		ASTParser parser = ASTParser.newParser(AST.JLS4);
272
		parser.setSource(source);
272
		parser.setSource(source);
273
		parser.setUnitName(unitName);
273
		parser.setUnitName(unitName);
274
		parser.setProject(project);
274
		parser.setProject(project);
(-)eval/org/eclipse/jdt/internal/debug/eval/ast/engine/EvaluationSourceGenerator.java (-2 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2009 IBM Corporation and others.
2
 * Copyright (c) 2000, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 133-139 Link Here
133
	}
133
	}
134
134
135
	private void createEvaluationSourceFromSource(String source, IType type, boolean createInAStaticMethod, IJavaProject project) throws DebugException {
135
	private void createEvaluationSourceFromSource(String source, IType type, boolean createInAStaticMethod, IJavaProject project) throws DebugException {
136
		ASTParser parser = ASTParser.newParser(AST.JLS3);
136
		ASTParser parser = ASTParser.newParser(AST.JLS4);
137
		parser.setSource(source.toCharArray());
137
		parser.setSource(source.toCharArray());
138
		Map options=getCompilerOptions(project);
138
		Map options=getCompilerOptions(project);
139
		String sourceLevel = project.getOption(JavaCore.COMPILER_SOURCE, true);
139
		String sourceLevel = project.getOption(JavaCore.COMPILER_SOURCE, true);
(-)eval/org/eclipse/jdt/internal/debug/eval/ast/engine/SourceBasedSourceGenerator.java (+11 lines)
Lines 105-110 Link Here
105
import org.eclipse.jdt.core.dom.TypeDeclarationStatement;
105
import org.eclipse.jdt.core.dom.TypeDeclarationStatement;
106
import org.eclipse.jdt.core.dom.TypeLiteral;
106
import org.eclipse.jdt.core.dom.TypeLiteral;
107
import org.eclipse.jdt.core.dom.TypeParameter;
107
import org.eclipse.jdt.core.dom.TypeParameter;
108
import org.eclipse.jdt.core.dom.UnionType;
108
import org.eclipse.jdt.core.dom.VariableDeclarationExpression;
109
import org.eclipse.jdt.core.dom.VariableDeclarationExpression;
109
import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
110
import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
110
import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
111
import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
Lines 1681-1686 Link Here
1681
		return true;
1682
		return true;
1682
	}
1683
	}
1683
1684
1685
	/* (non-Javadoc)
1686
	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.UnionType)
1687
	 */
1688
	public boolean visit(UnionType node) {
1689
		if (rightTypeFound()) {
1690
			return false;
1691
		}
1692
		return true;
1693
	}
1694
	
1684
	/**
1695
	/**
1685
	 * @see ASTVisitor#visit(TypeDeclaration)
1696
	 * @see ASTVisitor#visit(TypeDeclaration)
1686
	 */
1697
	 */
(-)model/org/eclipse/jdt/internal/debug/core/JavaDebugUtils.java (-2 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2005, 2009 IBM Corporation and others.
2
 * Copyright (c) 2005, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 225-231 Link Here
225
                		Integer.parseInt(innerTypeName.substring(0, 1)); // throws NFE if not an integer
225
                		Integer.parseInt(innerTypeName.substring(0, 1)); // throws NFE if not an integer
226
                		
226
                		
227
                		// perform expensive lookup for anonymous types:
227
                		// perform expensive lookup for anonymous types:
228
                		ASTParser parser = ASTParser.newParser(AST.JLS3);
228
                		ASTParser parser = ASTParser.newParser(AST.JLS4);
229
                		parser.setResolveBindings(true);
229
                		parser.setResolveBindings(true);
230
                		parser.setSource(type.getTypeRoot());
230
                		parser.setSource(type.getTypeRoot());
231
                		CompilationUnit cu = (CompilationUnit) parser.createAST(null);
231
                		CompilationUnit cu = (CompilationUnit) parser.createAST(null);
(-)model/org/eclipse/jdt/internal/debug/core/breakpoints/JavaBreakpointImportParticipant.java (-2 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2008, 2009 IBM Corporation and others.
2
 * Copyright (c) 2008, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 470-476 Link Here
470
		if(resource != null && resource.getType() == IResource.FILE) {
470
		if(resource != null && resource.getType() == IResource.FILE) {
471
			ICompilationUnit cunit = JavaCore.createCompilationUnitFrom((IFile) resource);
471
			ICompilationUnit cunit = JavaCore.createCompilationUnitFrom((IFile) resource);
472
			if(cunit != null) {
472
			if(cunit != null) {
473
				ASTParser parser = ASTParser.newParser(AST.JLS3);
473
				ASTParser parser = ASTParser.newParser(AST.JLS4);
474
				parser.setSource(cunit);
474
				parser.setSource(cunit);
475
				parser.setResolveBindings(true);
475
				parser.setResolveBindings(true);
476
				unit = (CompilationUnit) parser.createAST(new NullProgressMonitor());
476
				unit = (CompilationUnit) parser.createAST(new NullProgressMonitor());
(-)model/org/eclipse/jdt/internal/debug/core/breakpoints/ValidBreakpointLocationLocator.java (-2 / +10 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2003, 2009 IBM Corporation and others.
2
 * Copyright (c) 2003, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 77-82 Link Here
77
import org.eclipse.jdt.core.dom.ParenthesizedExpression;
77
import org.eclipse.jdt.core.dom.ParenthesizedExpression;
78
import org.eclipse.jdt.core.dom.PostfixExpression;
78
import org.eclipse.jdt.core.dom.PostfixExpression;
79
import org.eclipse.jdt.core.dom.PrefixExpression;
79
import org.eclipse.jdt.core.dom.PrefixExpression;
80
import org.eclipse.jdt.core.dom.PrefixExpression.Operator;
80
import org.eclipse.jdt.core.dom.PrimitiveType;
81
import org.eclipse.jdt.core.dom.PrimitiveType;
81
import org.eclipse.jdt.core.dom.QualifiedName;
82
import org.eclipse.jdt.core.dom.QualifiedName;
82
import org.eclipse.jdt.core.dom.QualifiedType;
83
import org.eclipse.jdt.core.dom.QualifiedType;
Lines 101-112 Link Here
101
import org.eclipse.jdt.core.dom.TypeDeclarationStatement;
102
import org.eclipse.jdt.core.dom.TypeDeclarationStatement;
102
import org.eclipse.jdt.core.dom.TypeLiteral;
103
import org.eclipse.jdt.core.dom.TypeLiteral;
103
import org.eclipse.jdt.core.dom.TypeParameter;
104
import org.eclipse.jdt.core.dom.TypeParameter;
105
import org.eclipse.jdt.core.dom.UnionType;
104
import org.eclipse.jdt.core.dom.VariableDeclarationExpression;
106
import org.eclipse.jdt.core.dom.VariableDeclarationExpression;
105
import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
107
import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
106
import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
108
import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
107
import org.eclipse.jdt.core.dom.WhileStatement;
109
import org.eclipse.jdt.core.dom.WhileStatement;
108
import org.eclipse.jdt.core.dom.WildcardType;
110
import org.eclipse.jdt.core.dom.WildcardType;
109
import org.eclipse.jdt.core.dom.PrefixExpression.Operator;
110
111
111
/**
112
/**
112
 * Compute a valid location where to put a breakpoint from an JDOM CompilationUnit.
113
 * Compute a valid location where to put a breakpoint from an JDOM CompilationUnit.
Lines 1091-1096 Link Here
1091
		return visit(node, false);
1092
		return visit(node, false);
1092
	}
1093
	}
1093
1094
1095
	/* (non-Javadoc)
1096
	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.UnionType)
1097
	 */
1098
	public boolean visit(UnionType node) {
1099
		return visit(node, false);
1100
	}
1101
	
1094
	/**
1102
	/**
1095
	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.TypeDeclaration)
1103
	 * @see org.eclipse.jdt.core.dom.ASTVisitor#visit(org.eclipse.jdt.core.dom.TypeDeclaration)
1096
	 */
1104
	 */
(-)model/org/eclipse/jdt/internal/debug/core/hcr/CompilationUnitDelta.java (-2 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2005 IBM Corporation and others.
2
 * Copyright (c) 2000, 2011 IBM Corporation and others.
3
 * All rights reserved. This program and the accompanying materials
3
 * All rights reserved. This program and the accompanying materials
4
 * are made available under the terms of the Eclipse Public License v1.0
4
 * are made available under the terms of the Eclipse Public License v1.0
5
 * which accompanies this distribution, and is available at
5
 * which accompanies this distribution, and is available at
Lines 154-160 Link Here
154
		char[] buffer= readString(input);		
154
		char[] buffer= readString(input);		
155
		if (buffer != null) {
155
		if (buffer != null) {
156
		    if (fParser == null) {
156
		    if (fParser == null) {
157
		        fParser = ASTParser.newParser(AST.JLS3);
157
		        fParser = ASTParser.newParser(AST.JLS4);
158
		    }
158
		    }
159
		    fParser.setSource(buffer);
159
		    fParser.setSource(buffer);
160
		    fParser.setProject(cu.getJavaProject());
160
		    fParser.setProject(cu.getJavaProject());
(-)tests/org/eclipse/jdt/debug/tests/breakpoints/BreakpointLocationVerificationTests.java (-2 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 *  Copyright (c) 2000, 2009 IBM Corporation and others.
2
 *  Copyright (c) 2000, 2011 IBM Corporation and others.
3
 *  All rights reserved. This program and the accompanying materials
3
 *  All rights reserved. This program and the accompanying materials
4
 *  are made available under the terms of the Eclipse Public License v1.0
4
 *  are made available under the terms of the Eclipse Public License v1.0
5
 *  which accompanies this distribution, and is available at
5
 *  which accompanies this distribution, and is available at
Lines 41-47 Link Here
41
	 * @return the parsed <code>CompilationUnit</code>
41
	 * @return the parsed <code>CompilationUnit</code>
42
	 */
42
	 */
43
	private CompilationUnit parseCompilationUnit(ICompilationUnit unit) {
43
	private CompilationUnit parseCompilationUnit(ICompilationUnit unit) {
44
		ASTParser parser = ASTParser.newParser(AST.JLS3);
44
		ASTParser parser = ASTParser.newParser(AST.JLS4);
45
		parser.setSource(unit);
45
		parser.setSource(unit);
46
		parser.setUnitName(unit.getElementName());
46
		parser.setUnitName(unit.getElementName());
47
		parser.setResolveBindings(true);
47
		parser.setResolveBindings(true);

Return to bug 349400