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

(-)META-INF/MANIFEST.MF (-1 / +1 lines)
Lines 2-8 Link Here
2
Bundle-ManifestVersion: 2
2
Bundle-ManifestVersion: 2
3
Bundle-Name: %pluginName
3
Bundle-Name: %pluginName
4
Bundle-SymbolicName: org.eclipse.jdt.debug; singleton:=true
4
Bundle-SymbolicName: org.eclipse.jdt.debug; singleton:=true
5
Bundle-Version: 3.7.0.qualifier
5
Bundle-Version: 3.7.100.qualifier
6
Bundle-ClassPath: jdi.jar,
6
Bundle-ClassPath: jdi.jar,
7
 jdimodel.jar,
7
 jdimodel.jar,
8
 tools.jar
8
 tools.jar
(-)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/ASTInstructionCompiler.java (-3 / +7 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 3583-3589 Link Here
3583
					storeInstruction(); // jump
3583
					storeInstruction(); // jump
3584
					statementsDefault= new ArrayList();
3584
					statementsDefault= new ArrayList();
3585
				} else {
3585
				} else {
3586
					push(new EqualEqualOperator(Instruction.T_int, Instruction.T_int, true, fCounter));
3586
					if(switchCase.getExpression() instanceof StringLiteral) {
3587
						push(new SendMessage("equals", "(Ljava/lang/Object;)Z", 1, null, fCounter)); //$NON-NLS-1$ //$NON-NLS-2$
3588
					}
3589
					else {
3590
						push(new EqualEqualOperator(Instruction.T_int, Instruction.T_int, true, fCounter));
3591
					}
3587
					push(new Dup());
3592
					push(new Dup());
3588
					storeInstruction(); // dupe
3593
					storeInstruction(); // dupe
3589
					switchCase.getExpression().accept(this);
3594
					switchCase.getExpression().accept(this);
Lines 3660-3666 Link Here
3660
				}
3665
				}
3661
			}
3666
			}
3662
		}
3667
		}
3663
3664
		return false;
3668
		return false;
3665
	}
3669
	}
3666
3670
(-)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());
(-)model/org/eclipse/jdt/internal/debug/core/hcr/MethodSearchVisitor.java (-2 / +6 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 92-97 Link Here
92
import org.eclipse.jdt.core.dom.TypeDeclarationStatement;
92
import org.eclipse.jdt.core.dom.TypeDeclarationStatement;
93
import org.eclipse.jdt.core.dom.TypeLiteral;
93
import org.eclipse.jdt.core.dom.TypeLiteral;
94
import org.eclipse.jdt.core.dom.TypeParameter;
94
import org.eclipse.jdt.core.dom.TypeParameter;
95
import org.eclipse.jdt.core.dom.UnionType;
95
import org.eclipse.jdt.core.dom.VariableDeclarationExpression;
96
import org.eclipse.jdt.core.dom.VariableDeclarationExpression;
96
import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
97
import org.eclipse.jdt.core.dom.VariableDeclarationFragment;
97
import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
98
import org.eclipse.jdt.core.dom.VariableDeclarationStatement;
Lines 99-105 Link Here
99
import org.eclipse.jdt.core.dom.WildcardType;
100
import org.eclipse.jdt.core.dom.WildcardType;
100
101
101
/**
102
/**
102
 * Visits an AST to find a method declartion
103
 * Visits an AST to find a method declaration
103
 */
104
 */
104
public class MethodSearchVisitor extends ASTVisitor {
105
public class MethodSearchVisitor extends ASTVisitor {
105
    
106
    
Lines 404-409 Link Here
404
    public boolean visit(TypeParameter node) {
405
    public boolean visit(TypeParameter node) {
405
        return isSearching();
406
        return isSearching();
406
    }
407
    }
408
    public boolean visit(UnionType node) {
409
    	return super.visit(node);
410
    }
407
    public boolean visit(VariableDeclarationExpression node) {
411
    public boolean visit(VariableDeclarationExpression node) {
408
        return isSearching();
412
        return isSearching();
409
    }
413
    }
(-)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);
(-)ui/org/eclipse/jdt/internal/debug/ui/JavaDebugHover.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 339-345 Link Here
339
            		    		ITypeRoot typeRoot = (ITypeRoot) codeAssist;
339
            		    		ITypeRoot typeRoot = (ITypeRoot) codeAssist;
340
            		    		ASTNode root= SharedASTProvider.getAST(typeRoot, SharedASTProvider.WAIT_NO, null);
340
            		    		ASTNode root= SharedASTProvider.getAST(typeRoot, SharedASTProvider.WAIT_NO, null);
341
            		    		if (root == null) {
341
            		    		if (root == null) {
342
	            		    		ASTParser parser = ASTParser.newParser(AST.JLS3);
342
	            		    		ASTParser parser = ASTParser.newParser(AST.JLS4);
343
	            		    		parser.setSource(typeRoot);
343
	            		    		parser.setSource(typeRoot);
344
	            		    		parser.setFocalPosition(hoverRegion.getOffset());
344
	            		    		parser.setFocalPosition(hoverRegion.getOffset());
345
									root = parser.createAST(null);
345
									root = parser.createAST(null);
(-)ui/org/eclipse/jdt/internal/debug/ui/actions/RunToLineAdapter.java (-2 / +2 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 *  Copyright (c) 2000, 2008 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 71-77 Link Here
71
					Runnable r = new Runnable() {
71
					Runnable r = new Runnable() {
72
						public void run() {
72
						public void run() {
73
							lineNumber[0] = textSelection.getStartLine() + 1;
73
							lineNumber[0] = textSelection.getStartLine() + 1;
74
							ASTParser parser = ASTParser.newParser(AST.JLS3);
74
							ASTParser parser = ASTParser.newParser(AST.JLS4);
75
							parser.setSource(document.get().toCharArray());
75
							parser.setSource(document.get().toCharArray());
76
							CompilationUnit compilationUnit= (CompilationUnit)parser.createAST(null);
76
							CompilationUnit compilationUnit= (CompilationUnit)parser.createAST(null);
77
							ValidBreakpointLocationLocator locator= new ValidBreakpointLocationLocator(compilationUnit, lineNumber[0], false, false);
77
							ValidBreakpointLocationLocator locator= new ValidBreakpointLocationLocator(compilationUnit, lineNumber[0], false, false);
(-)launching/org/eclipse/jdt/launching/JavaRuntime.java (-2 / +1 lines)
Lines 2754-2761 Link Here
2754
            	} else if (javaVersion.startsWith(JavaCore.VERSION_1_6)) {
2754
            	} else if (javaVersion.startsWith(JavaCore.VERSION_1_6)) {
2755
            		compliance = JavaCore.VERSION_1_6;
2755
            		compliance = JavaCore.VERSION_1_6;
2756
            	} else if (javaVersion.startsWith(JavaCore.VERSION_1_7)) {
2756
            	} else if (javaVersion.startsWith(JavaCore.VERSION_1_7)) {
2757
            		// since 1.7 compliance options are not yet supported, default to 1.6 compliance when running on 1.7, see https://bugs.eclipse.org/321043
2757
            		compliance = JavaCore.VERSION_1_7;
2758
            		compliance = JavaCore.VERSION_1_6;
2759
            	}
2758
            	}
2760
            	if (compliance != null) {
2759
            	if (compliance != null) {
2761
	                Hashtable options= JavaCore.getOptions();
2760
	                Hashtable options= JavaCore.getOptions();

Return to bug 349400