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 285573
Collapse All | Expand All

(-)ui/org/eclipse/jdt/internal/ui/text/correction/CorrectionMessages.properties (-2 / +1 lines)
Lines 117-123 Link Here
117
LocalCorrectionsSubProcessor_setparenteses_instanceof_description=Put 'instanceof' in parentheses
117
LocalCorrectionsSubProcessor_setparenteses_instanceof_description=Put 'instanceof' in parentheses
118
LocalCorrectionsSubProcessor_qualify_left_hand_side_description=Qualify left hand side
118
LocalCorrectionsSubProcessor_qualify_left_hand_side_description=Qualify left hand side
119
LocalCorrectionsSubProcessor_replacefieldaccesswithmethod_description=Replace with ''{0}''
119
LocalCorrectionsSubProcessor_replacefieldaccesswithmethod_description=Replace with ''{0}''
120
TypeMismatchSubProcessor_0=boolean
121
TypeMismatchSubProcessor_addcast_description=Add cast to ''{0}''
120
TypeMismatchSubProcessor_addcast_description=Add cast to ''{0}''
122
TypeMismatchSubProcessor_changecast_description=Change cast to ''{0}''
121
TypeMismatchSubProcessor_changecast_description=Change cast to ''{0}''
123
TypeMismatchSubProcessor_changereturntype_description=Change method return type to ''{0}''
122
TypeMismatchSubProcessor_changereturntype_description=Change method return type to ''{0}''
Lines 127-133 Link Here
127
TypeArgumentMismatchSubProcessor_removeTypeArguments=Remove type arguments
126
TypeArgumentMismatchSubProcessor_removeTypeArguments=Remove type arguments
128
TypeMismatchSubProcessor_addexceptions_description=Add exceptions to ''{0}.{1}(..)''
127
TypeMismatchSubProcessor_addexceptions_description=Add exceptions to ''{0}.{1}(..)''
129
TypeMismatchSubProcessor_incompatible_for_each_type_description=Change type of ''{0}'' to ''{1}''
128
TypeMismatchSubProcessor_incompatible_for_each_type_description=Change type of ''{0}'' to ''{1}''
130
TypeMismatchSubProcessor_insertnullcheck_description=Insert null check
129
TypeMismatchSubProcessor_insertnullcheck_description=Insert '!= null' check
131
130
132
RemoveDeclarationCorrectionProposal_removeunusedfield_description=Remove declaration of ''{0}'' and assignments without possible side effects
131
RemoveDeclarationCorrectionProposal_removeunusedfield_description=Remove declaration of ''{0}'' and assignments without possible side effects
133
RemoveDeclarationCorrectionProposal_removeunusedmethod_description=Remove method ''{0}''
132
RemoveDeclarationCorrectionProposal_removeunusedmethod_description=Remove method ''{0}''
(-)ui/org/eclipse/jdt/internal/ui/text/correction/UnresolvedElementsSubProcessor.java (-3 / +14 lines)
Lines 1289-1304 Link Here
1289
			}
1289
			}
1290
			if (castType != null) {
1290
			if (castType != null) {
1291
				ITypeBinding binding= nodeToCast.resolveTypeBinding();
1291
				ITypeBinding binding= nodeToCast.resolveTypeBinding();
1292
				if (binding == null || binding.isCastCompatible(castType)) {
1292
				ITypeBinding castFixType= null;
1293
					ASTRewriteCorrectionProposal proposal= TypeMismatchSubProcessor.createCastProposal(context, castType, nodeToCast, 6);
1293
				if (binding == null || castType.isCastCompatible(binding)) {
1294
					String castTypeName= BindingLabelProvider.getBindingLabel(castType, JavaElementLabels.ALL_DEFAULT);
1294
					castFixType= castType;
1295
				} else if (JavaModelUtil.is50OrHigher(cu.getJavaProject())) {
1296
					ITypeBinding boxUnboxedTypeBinding= TypeMismatchSubProcessor.boxUnboxPrimitives(castType, binding, nodeToCast.getAST());
1297
					if (boxUnboxedTypeBinding != castType && boxUnboxedTypeBinding.isCastCompatible(binding)) {
1298
						castFixType= boxUnboxedTypeBinding;
1299
					}
1300
				}
1301
				if (castFixType != null) {
1302
					ASTRewriteCorrectionProposal proposal= TypeMismatchSubProcessor.createCastProposal(context, castFixType, nodeToCast, 6);
1303
					String castTypeName= BindingLabelProvider.getBindingLabel(castFixType, JavaElementLabels.ALL_DEFAULT);
1295
					String[] arg= new String[] { getArgumentName(arguments, idx), castTypeName};
1304
					String[] arg= new String[] { getArgumentName(arguments, idx), castTypeName};
1296
					proposal.setDisplayName(Messages.format(CorrectionMessages.UnresolvedElementsSubProcessor_addargumentcast_description, arg));
1305
					proposal.setDisplayName(Messages.format(CorrectionMessages.UnresolvedElementsSubProcessor_addargumentcast_description, arg));
1297
					proposals.add(proposal);
1306
					proposals.add(proposal);
1298
				}
1307
				}
1308
				
1299
				TypeMismatchSubProcessor.addChangeSenderTypeProposals(context, nodeToCast, castType, false, 5, proposals);
1309
				TypeMismatchSubProcessor.addChangeSenderTypeProposals(context, nodeToCast, castType, false, 5, proposals);
1300
			}
1310
			}
1301
		}
1311
		}
1312
		
1302
		if (nDiffs == 2) { // try to swap
1313
		if (nDiffs == 2) { // try to swap
1303
			int idx1= indexOfDiff[0];
1314
			int idx1= indexOfDiff[0];
1304
			int idx2= indexOfDiff[1];
1315
			int idx2= indexOfDiff[1];
(-)ui/org/eclipse/jdt/internal/ui/text/correction/CorrectionMessages.java (-1 lines)
Lines 108-114 Link Here
108
	public static String LocalCorrectionsSubProcessor_setparenteses_instanceof_description;
108
	public static String LocalCorrectionsSubProcessor_setparenteses_instanceof_description;
109
	public static String LocalCorrectionsSubProcessor_InferGenericTypeArguments;
109
	public static String LocalCorrectionsSubProcessor_InferGenericTypeArguments;
110
	public static String LocalCorrectionsSubProcessor_InferGenericTypeArguments_description;
110
	public static String LocalCorrectionsSubProcessor_InferGenericTypeArguments_description;
111
	public static String TypeMismatchSubProcessor_0;
112
	public static String TypeMismatchSubProcessor_addcast_description;
111
	public static String TypeMismatchSubProcessor_addcast_description;
113
	public static String TypeMismatchSubProcessor_changecast_description;
112
	public static String TypeMismatchSubProcessor_changecast_description;
114
	public static String TypeMismatchSubProcessor_changereturntype_description;
113
	public static String TypeMismatchSubProcessor_changereturntype_description;
(-)ui/org/eclipse/jdt/internal/ui/text/correction/TypeMismatchSubProcessor.java (-9 / +32 lines)
Lines 47-52 Link Here
47
47
48
import org.eclipse.jdt.internal.corext.dom.ASTNodes;
48
import org.eclipse.jdt.internal.corext.dom.ASTNodes;
49
import org.eclipse.jdt.internal.corext.dom.Bindings;
49
import org.eclipse.jdt.internal.corext.dom.Bindings;
50
import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
50
import org.eclipse.jdt.internal.corext.util.Messages;
51
import org.eclipse.jdt.internal.corext.util.Messages;
51
52
52
import org.eclipse.jdt.ui.JavaElementLabels;
53
import org.eclipse.jdt.ui.JavaElementLabels;
Lines 125-139 Link Here
125
			return;
126
			return;
126
		}
127
		}
127
128
129
		ITypeBinding currBinding= nodeToCast.resolveTypeBinding();
130
		
128
		if (!(nodeToCast instanceof ArrayInitializer)) {
131
		if (!(nodeToCast instanceof ArrayInitializer)) {
129
			ITypeBinding binding= nodeToCast.resolveTypeBinding();
132
			ITypeBinding castFixType= null;
130
			if (binding == null || binding.isCastCompatible(castTypeBinding) || nodeToCast instanceof CastExpression) {
133
			if (currBinding == null || castTypeBinding.isCastCompatible(currBinding) || nodeToCast instanceof CastExpression) {
131
				proposals.add(createCastProposal(context, castTypeBinding, nodeToCast, 7));
134
				castFixType= castTypeBinding;
135
			} else if (JavaModelUtil.is50OrHigher(cu.getJavaProject())) {
136
				ITypeBinding boxUnboxedTypeBinding= boxUnboxPrimitives(castTypeBinding, currBinding, ast);
137
				if (boxUnboxedTypeBinding != castTypeBinding && boxUnboxedTypeBinding.isCastCompatible(currBinding)) {
138
					castFixType= boxUnboxedTypeBinding;
139
				}
140
			}
141
			if (castFixType != null) {
142
				proposals.add(createCastProposal(context, castFixType, nodeToCast, 7));
132
			}
143
			}
133
		}
144
		}
134
145
135
		ITypeBinding currBinding= nodeToCast.resolveTypeBinding();
136
137
		boolean nullOrVoid= currBinding == null || "void".equals(currBinding.getName()); //$NON-NLS-1$
146
		boolean nullOrVoid= currBinding == null || "void".equals(currBinding.getName()); //$NON-NLS-1$
138
147
139
		// change method return statement to actual type
148
		// change method return statement to actual type
Lines 185-191 Link Here
185
194
186
		addChangeSenderTypeProposals(context, nodeToCast, castTypeBinding, false, 5, proposals);
195
		addChangeSenderTypeProposals(context, nodeToCast, castTypeBinding, false, 5, proposals);
187
196
188
		if (castTypeBinding == ast.resolveWellKnownType(CorrectionMessages.TypeMismatchSubProcessor_0) && currBinding != null && !currBinding.isPrimitive() && !Bindings.isVoidType(currBinding)) {
197
		if (castTypeBinding == ast.resolveWellKnownType("boolean") && currBinding != null && !currBinding.isPrimitive() && !Bindings.isVoidType(currBinding)) { //$NON-NLS-1$
189
			String label= CorrectionMessages.TypeMismatchSubProcessor_insertnullcheck_description;
198
			String label= CorrectionMessages.TypeMismatchSubProcessor_insertnullcheck_description;
190
			Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);
199
			Image image= JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CHANGE);
191
			ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
200
			ASTRewrite rewrite= ASTRewrite.create(astRoot.getAST());
Lines 201-206 Link Here
201
210
202
	}
211
	}
203
212
213
	public static ITypeBinding boxUnboxPrimitives(ITypeBinding castType, ITypeBinding toCast, AST ast) {
214
		/*
215
		 * e.g:
216
		 * 	void m(toCast var) {
217
		 * 		castType i= var;
218
		 * 	}
219
		 */
220
		if (castType.isPrimitive() && !toCast.isPrimitive()) {
221
			return Bindings.getBoxedTypeBinding(castType, ast);
222
		} else if (!castType.isPrimitive() && toCast.isPrimitive()) {
223
			return Bindings.getUnboxedTypeBinding(castType, ast);
224
		} else {
225
			return castType;
226
		}
227
	}
228
204
	public static void addChangeSenderTypeProposals(IInvocationContext context, Expression nodeToCast, ITypeBinding castTypeBinding, boolean isAssignedNode, int relevance, Collection proposals) throws JavaModelException {
229
	public static void addChangeSenderTypeProposals(IInvocationContext context, Expression nodeToCast, ITypeBinding castTypeBinding, boolean isAssignedNode, int relevance, Collection proposals) throws JavaModelException {
205
		IBinding callerBinding= Bindings.resolveExpressionBinding(nodeToCast, false);
230
		IBinding callerBinding= Bindings.resolveExpressionBinding(nodeToCast, false);
206
231
Lines 264-272 Link Here
264
		ICompilationUnit cu= context.getCompilationUnit();
289
		ICompilationUnit cu= context.getCompilationUnit();
265
290
266
		String label;
291
		String label;
267
		ITypeBinding toCastBinding= nodeToCast.resolveTypeBinding();
292
		String castType= BindingLabelProvider.getBindingLabel(castTypeBinding, JavaElementLabels.ALL_DEFAULT);
268
		ITypeBinding resultingTypeBinding= CastCorrectionProposal.getBoxedTypeBindingIfNeeded(castTypeBinding, toCastBinding, nodeToCast.getAST());
269
		String castType= BindingLabelProvider.getBindingLabel(resultingTypeBinding, JavaElementLabels.ALL_DEFAULT);
270
		if (nodeToCast.getNodeType() == ASTNode.CAST_EXPRESSION) {
293
		if (nodeToCast.getNodeType() == ASTNode.CAST_EXPRESSION) {
271
			label= Messages.format(CorrectionMessages.TypeMismatchSubProcessor_changecast_description, castType);
294
			label= Messages.format(CorrectionMessages.TypeMismatchSubProcessor_changecast_description, castType);
272
		} else {
295
		} else {
(-)core extension/org/eclipse/jdt/internal/corext/dom/Bindings.java (-1 / +50 lines)
Lines 1-5 Link Here
1
/*******************************************************************************
1
/*******************************************************************************
2
 * Copyright (c) 2000, 2008 IBM Corporation and others.
2
 * Copyright (c) 2000, 2009 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 1288-1293 Link Here
1288
	}
1288
	}
1289
1289
1290
	/**
1290
	/**
1291
	 * Returns the unboxed type binding according to JLS3 5.1.7, or the original binding if
1292
	 * the given type is not a boxed type.
1293
	 *
1294
	 * @param type a type binding
1295
	 * @param ast an AST to resolve the unboxed type
1296
	 * @return the unboxed type, or the original type if no unboxed type found
1297
	 */
1298
	public static ITypeBinding getUnboxedTypeBinding(ITypeBinding type, AST ast) {
1299
		if (!type.isClass())
1300
			return type;
1301
		String unboxedTypeName= getUnboxedTypeName(type.getQualifiedName());
1302
		if (unboxedTypeName == null)
1303
			return type;
1304
		ITypeBinding unboxed= ast.resolveWellKnownType(unboxedTypeName);
1305
		if (unboxed == null)
1306
			return type;
1307
		return unboxed;
1308
	}
1309
	
1310
	private static String getUnboxedTypeName(String boxedName) {
1311
		if ("java.lang.Long".equals(boxedName)) //$NON-NLS-1$
1312
			return "long"; //$NON-NLS-1$
1313
		
1314
		else if ("java.lang.Integer".equals(boxedName)) //$NON-NLS-1$
1315
			return "int"; //$NON-NLS-1$
1316
		
1317
		else if ("java.lang.Short".equals(boxedName)) //$NON-NLS-1$
1318
			return "short"; //$NON-NLS-1$
1319
		
1320
		else if ("java.lang.Character".equals(boxedName)) //$NON-NLS-1$
1321
			return "char"; //$NON-NLS-1$
1322
		
1323
		else if ("java.lang.Byte".equals(boxedName)) //$NON-NLS-1$
1324
			return "byte"; //$NON-NLS-1$
1325
		
1326
		else if ("java.lang.Boolean".equals(boxedName)) //$NON-NLS-1$
1327
			return "boolean"; //$NON-NLS-1$
1328
		
1329
		else if ("java.lang.Float".equals(boxedName)) //$NON-NLS-1$
1330
			return "float"; //$NON-NLS-1$
1331
		
1332
		else if ("java.lang.Double".equals(boxedName)) //$NON-NLS-1$
1333
			return "double"; //$NON-NLS-1$
1334
		
1335
		else
1336
			return null;
1337
	}
1338
	
1339
	/**
1291
	 * Resolve the binding (<em>not</em> the type binding) for the expression or a nested expression
1340
	 * Resolve the binding (<em>not</em> the type binding) for the expression or a nested expression
1292
	 * (e.g. nested in parentheses, cast, ...).
1341
	 * (e.g. nested in parentheses, cast, ...).
1293
	 * 
1342
	 * 
(-)ui/org/eclipse/jdt/internal/ui/text/correction/proposals/CastCorrectionProposal.java (-14 / +11 lines)
Lines 32-38 Link Here
32
import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
32
import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
33
33
34
import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
34
import org.eclipse.jdt.internal.corext.codemanipulation.ContextSensitiveImportRewriteContext;
35
import org.eclipse.jdt.internal.corext.dom.Bindings;
36
35
37
import org.eclipse.jdt.internal.ui.JavaPluginImages;
36
import org.eclipse.jdt.internal.ui.JavaPluginImages;
38
import org.eclipse.jdt.internal.ui.text.correction.ASTResolving;
37
import org.eclipse.jdt.internal.ui.text.correction.ASTResolving;
Lines 44-49 Link Here
44
	private final Expression fNodeToCast;
43
	private final Expression fNodeToCast;
45
	private final ITypeBinding fCastType;
44
	private final ITypeBinding fCastType;
46
45
46
	/**
47
	 * Creates a cast correction proposal.
48
	 * 
49
	 * @param label the display name of the proposal
50
	 * @param targetCU the compilation unit that is modified
51
	 * @param nodeToCast the node to cast
52
	 * @param castType the type to cast to, may be <code>null</code>
53
	 * @param relevance the relevance of this proposal
54
	 */
47
	public CastCorrectionProposal(String label, ICompilationUnit targetCU, Expression nodeToCast, ITypeBinding castType, int relevance) {
55
	public CastCorrectionProposal(String label, ICompilationUnit targetCU, Expression nodeToCast, ITypeBinding castType, int relevance) {
48
		super(label, targetCU, null, relevance, JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CAST));
56
		super(label, targetCU, null, relevance, JavaPluginImages.get(JavaPluginImages.IMG_CORRECTION_CAST));
49
		fNodeToCast= nodeToCast;
57
		fNodeToCast= nodeToCast;
Lines 51-74 Link Here
51
		setCommandId(ADD_CAST_ID);
59
		setCommandId(ADD_CAST_ID);
52
	}
60
	}
53
61
54
	public static ITypeBinding getBoxedTypeBindingIfNeeded(ITypeBinding castType, ITypeBinding toCast, AST ast) {
55
		// e.g: m(toCast var) { castType i= var; } 
56
		if (castType.isPrimitive() && !toCast.isPrimitive()) {
57
			ITypeBinding boxedTypeBinding= Bindings.getBoxedTypeBinding(castType, ast);
58
			return boxedTypeBinding;
59
		} else {
60
			return castType;
61
		}
62
	}
63
	
64
	private Type getNewCastTypeNode(ASTRewrite rewrite, ImportRewrite importRewrite) {
62
	private Type getNewCastTypeNode(ASTRewrite rewrite, ImportRewrite importRewrite) {
65
		AST ast= rewrite.getAST();
63
		AST ast= rewrite.getAST();
66
64
67
		ImportRewriteContext context= new ContextSensitiveImportRewriteContext((CompilationUnit) fNodeToCast.getRoot(), fNodeToCast.getStartPosition(), importRewrite);
65
		ImportRewriteContext context= new ContextSensitiveImportRewriteContext((CompilationUnit) fNodeToCast.getRoot(), fNodeToCast.getStartPosition(), importRewrite);
68
66
69
		ITypeBinding nodeToCastBinding= fNodeToCast.resolveTypeBinding();
70
		if (fCastType != null) {
67
		if (fCastType != null) {
71
			return importRewrite.addImport(getBoxedTypeBindingIfNeeded(fCastType, nodeToCastBinding, ast), ast,context);
68
			return importRewrite.addImport(fCastType, ast,context);
72
		}
69
		}
73
70
74
		ASTNode node= fNodeToCast;
71
		ASTNode node= fNodeToCast;
Lines 87-93 Link Here
87
				IBinding targetContext= ASTResolving.getParentMethodOrTypeBinding(node);
84
				IBinding targetContext= ASTResolving.getParentMethodOrTypeBinding(node);
88
				ITypeBinding[] bindings= ASTResolving.getQualifierGuess(node.getRoot(), invocation.getName().getIdentifier(), invocation.arguments(), targetContext);
85
				ITypeBinding[] bindings= ASTResolving.getQualifierGuess(node.getRoot(), invocation.getName().getIdentifier(), invocation.arguments(), targetContext);
89
				if (bindings.length > 0) {
86
				if (bindings.length > 0) {
90
					ITypeBinding first= getCastFavorite(bindings, nodeToCastBinding);
87
					ITypeBinding first= getCastFavorite(bindings, fNodeToCast.resolveTypeBinding());
91
88
92
					Type newTypeNode= importRewrite.addImport(first, ast, context);
89
					Type newTypeNode= importRewrite.addImport(first, ast, context);
93
					addLinkedPosition(rewrite.track(newTypeNode), true, "casttype"); //$NON-NLS-1$
90
					addLinkedPosition(rewrite.track(newTypeNode), true, "casttype"); //$NON-NLS-1$
(-)ui/org/eclipse/jdt/ui/tests/quickfix/UnresolvedMethodsQuickFixTest.java (+61 lines)
Lines 1802-1807 Link Here
1802
		assertEqualStringsIgnoreOrder(new String[] { preview1, preview2, preview3 }, new String[] { expected1, expected2, expected3 });
1802
		assertEqualStringsIgnoreOrder(new String[] { preview1, preview2, preview3 }, new String[] { expected1, expected2, expected3 });
1803
	}
1803
	}
1804
1804
1805
	public void testParameterMismatchCastBoxing() throws Exception {
1806
		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);
1807
		StringBuffer buf= new StringBuffer();
1808
1809
		buf= new StringBuffer();
1810
		buf.append("package test1;\n");
1811
		buf.append("public class E {\n");
1812
		buf.append("    public void foo(Integer i) {\n");
1813
		buf.append("        foo(1.0);\n");
1814
		buf.append("    }\n");
1815
		buf.append("}\n");
1816
		ICompilationUnit cu1= pack1.createCompilationUnit("E.java", buf.toString(), false, null);
1817
1818
		CompilationUnit astRoot= getASTRoot(cu1);
1819
		ArrayList proposals= collectCorrections(cu1, astRoot);
1820
		assertNumberOfProposals(proposals, 3);
1821
		assertCorrectLabels(proposals);
1822
1823
		CUCorrectionProposal proposal= (CUCorrectionProposal) proposals.get(0);
1824
		String preview1= getPreviewContent(proposal);
1825
1826
		buf= new StringBuffer();
1827
		buf.append("package test1;\n");
1828
		buf.append("public class E {\n");
1829
		buf.append("    public void foo(Integer i) {\n");
1830
		buf.append("        foo((int) 1.0);\n");
1831
		buf.append("    }\n");
1832
		buf.append("}\n");
1833
		String expected1= buf.toString();
1834
1835
		proposal= (CUCorrectionProposal) proposals.get(1);
1836
		String preview2= getPreviewContent(proposal);
1837
1838
		buf= new StringBuffer();
1839
		buf.append("package test1;\n");
1840
		buf.append("public class E {\n");
1841
		buf.append("    public void foo(Integer i) {\n");
1842
		buf.append("        foo(1.0);\n");
1843
		buf.append("    }\n");
1844
		buf.append("\n");
1845
		buf.append("    private void foo(double d) {\n");
1846
		buf.append("    }\n");
1847
		buf.append("}\n");
1848
		String expected2= buf.toString();
1849
1850
		proposal= (CUCorrectionProposal) proposals.get(2);
1851
		String preview3= getPreviewContent(proposal);
1852
1853
		buf= new StringBuffer();
1854
		buf.append("package test1;\n");
1855
		buf.append("public class E {\n");
1856
		buf.append("    public void foo(double d) {\n");
1857
		buf.append("        foo(1.0);\n");
1858
		buf.append("    }\n");
1859
		buf.append("}\n");
1860
		String expected3= buf.toString();
1861
1862
1863
		assertEqualStringsIgnoreOrder(new String[] { preview1, preview2, preview3 }, new String[] { expected1, expected2, expected3 });
1864
	}
1865
1805
	public void testParameterMismatchChangeVarType() throws Exception {
1866
	public void testParameterMismatchChangeVarType() throws Exception {
1806
		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);
1867
		IPackageFragment pack1= fSourceFolder.createPackageFragment("test1", false, null);
1807
		StringBuffer buf= new StringBuffer();
1868
		StringBuffer buf= new StringBuffer();

Return to bug 285573