Skip to content
Commits on Source (5)
eclipse-jdt-ui (4.11-1) unstable; urgency=medium
* New upstream release
- Depend on libeclipse-ui-ide-java (>= 3.15)
-- Emmanuel Bourg <ebourg@apache.org> Thu, 11 Jul 2019 17:57:00 +0200
eclipse-jdt-ui (4.10-1) unstable; urgency=medium
* New upstream release
......
......@@ -34,7 +34,7 @@ Build-Depends:
libeclipse-ui-console-java,
libeclipse-ui-editors-java,
libeclipse-ui-forms-java,
libeclipse-ui-ide-java,
libeclipse-ui-ide-java (>= 3.15),
libeclipse-ui-navigator-java,
libeclipse-ui-views-java,
libeclipse-ui-workbench-java,
......@@ -81,7 +81,7 @@ Description: Eclipse AST View Plug-in
* Java Outline View - shows the structure of a Java compilation unit
or class file
* Java Browsing Perspecitve - allows navigating the Java model using
separate views for projects, packages, types and memebers.
separate views for projects, packages, types and members.
* Wizards for creating Java elements - Java project, package, class,
interface
* Java Editor - syntax coloring, content specific code assist, code
......@@ -126,7 +126,7 @@ Description: Eclipse Java Code Manipulation Functionality
* Java Outline View - shows the structure of a Java compilation unit
or class file
* Java Browsing Perspecitve - allows navigating the Java model using
separate views for projects, packages, types and memebers.
separate views for projects, packages, types and members.
* Wizards for creating Java elements - Java project, package, class,
interface
* Java Editor - syntax coloring, content specific code assist, code
......@@ -171,7 +171,7 @@ Description: Eclipse Java Development Tools JUnit core support
* Java Outline View - shows the structure of a Java compilation unit
or class file
* Java Browsing Perspecitve - allows navigating the Java model using
separate views for projects, packages, types and memebers.
separate views for projects, packages, types and members.
* Wizards for creating Java elements - Java project, package, class,
interface
* Java Editor - syntax coloring, content specific code assist, code
......@@ -202,7 +202,7 @@ Description: Eclipse Java Development Tools JUnit Runtime Support
* Java Outline View - shows the structure of a Java compilation unit
or class file
* Java Browsing Perspecitve - allows navigating the Java model using
separate views for projects, packages, types and memebers.
separate views for projects, packages, types and members.
* Wizards for creating Java elements - Java project, package, class,
interface
* Java Editor - syntax coloring, content specific code assist, code
......@@ -233,7 +233,7 @@ Description: Eclipse Java Development Tools JUnit4 Runtime Support
* Java Outline View - shows the structure of a Java compilation unit
or class file
* Java Browsing Perspecitve - allows navigating the Java model using
separate views for projects, packages, types and memebers.
separate views for projects, packages, types and members.
* Wizards for creating Java elements - Java project, package, class,
interface
* Java Editor - syntax coloring, content specific code assist, code
......@@ -282,7 +282,7 @@ Depends:
libeclipse-ui-console-java,
libeclipse-ui-editors-java,
libeclipse-ui-forms-java,
libeclipse-ui-ide-java,
libeclipse-ui-ide-java (>= 3.15),
libeclipse-ui-navigator-java,
libeclipse-ui-views-java,
libeclipse-ui-workbench-java,
......@@ -302,7 +302,7 @@ Description: Eclipse Java Development Tools UI
* Java Outline View - shows the structure of a Java compilation unit
or class file
* Java Browsing Perspecitve - allows navigating the Java model using
separate views for projects, packages, types and memebers.
separate views for projects, packages, types and members.
* Wizards for creating Java elements - Java project, package, class,
interface
* Java Editor - syntax coloring, content specific code assist, code
......@@ -347,7 +347,7 @@ Description: Eclipse Refactoring Core
* Java Outline View - shows the structure of a Java compilation unit
or class file
* Java Browsing Perspecitve - allows navigating the Java model using
separate views for projects, packages, types and memebers.
separate views for projects, packages, types and members.
* Wizards for creating Java elements - Java project, package, class,
interface
* Java Editor - syntax coloring, content specific code assist, code
......@@ -400,7 +400,7 @@ Description: Eclipse Refactoring UI
* Java Outline View - shows the structure of a Java compilation unit
or class file
* Java Browsing Perspecitve - allows navigating the Java model using
separate views for projects, packages, types and memebers.
separate views for projects, packages, types and members.
* Wizards for creating Java elements - Java project, package, class,
interface
* Java Editor - syntax coloring, content specific code assist, code
......
......@@ -14,7 +14,7 @@
<parent>
<artifactId>eclipse.jdt.ui</artifactId>
<groupId>eclipse.jdt.ui</groupId>
<version>4.10.0-SNAPSHOT</version>
<version>4.11.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jdt.feature</groupId>
<artifactId>org.eclipse.jdt.astview.feature</artifactId>
......
......@@ -14,7 +14,7 @@
<parent>
<artifactId>eclipse.jdt.ui</artifactId>
<groupId>eclipse.jdt.ui</groupId>
<version>4.10.0-SNAPSHOT</version>
<version>4.11.0-SNAPSHOT</version>
</parent>
<groupId>org.eclipse.jdt</groupId>
<artifactId>org.eclipse.jdt.astview</artifactId>
......
......@@ -3,7 +3,7 @@ Automatic-Module-Name: org.eclipse.jdt.core.manipulation
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.jdt.core.manipulation; singleton:=true
Bundle-Version: 1.11.0.qualifier
Bundle-Version: 1.11.100.qualifier
Bundle-Vendor: %providerName
Bundle-Activator: org.eclipse.jdt.internal.core.manipulation.JavaManipulationPlugin
Bundle-Localization: plugin
......@@ -28,6 +28,7 @@ Export-Package: org.eclipse.jdt.core.manipulation,
org.eclipse.jdt.internal.core.refactoring.descriptors;x-friends:="org.eclipse.jdt.ui",
org.eclipse.jdt.internal.corext;x-friends:="org.eclipse.jdt.ui",
org.eclipse.jdt.internal.corext.codemanipulation;x-friends:="org.eclipse.jdt.ui",
org.eclipse.jdt.internal.corext.codemanipulation.tostringgeneration;x-friends:="org.eclipse.jdt.ui",
org.eclipse.jdt.internal.corext.dom;manipulation=split;mandatory:=manipulation;x-friends:="org.eclipse.jdt.ui,org.eclipse.jdt.junit",
org.eclipse.jdt.internal.corext.fix;x-friends:="org.eclipse.jdt.ui",
org.eclipse.jdt.internal.corext.refactoring;x-friends:="org.eclipse.jdt.ui",
......
......@@ -270,7 +270,7 @@ public class CodeGeneration {
public static String getMethodComment(IMethod method, IMethod overridden, String lineDelimiter) throws CoreException {
String retType= method.isConstructor() ? null : method.getReturnType();
String[] paramNames= method.getParameterNames();
String[] typeParameterNames= StubUtility.shouldGenerateMethodTypeParameterTags(method.getJavaProject()) ? StubUtility.getTypeParameterNames(method.getTypeParameters()) : new String[0];
String[] typeParameterNames= StubUtility.getTypeParameterNames(method.getTypeParameters());
return StubUtility.getMethodComment(method.getCompilationUnit(), method.getDeclaringType().getElementName(),
method.getElementName(), paramNames, method.getExceptionTypes(), retType, typeParameterNames, overridden, false, lineDelimiter);
......
......@@ -82,8 +82,9 @@ public class TypeNameMatchCollector extends TypeNameMatchRequestor {
String curr= tok.nextToken();
if (curr.length() > 0) {
// Simulate '*', and '?' wildcards using '.*' and '.'
curr = curr.replaceAll("\\*", ".*"); //$NON-NLS-1$ //$NON-NLS-2$
curr = curr.replaceAll("\\?", "."); //$NON-NLS-1$ //$NON-NLS-2$
curr = curr.replace(".", "\\."); //$NON-NLS-1$ //$NON-NLS-2$
curr = curr.replace("*", ".*"); //$NON-NLS-1$ //$NON-NLS-2$
curr = curr.replace("?", "."); //$NON-NLS-1$ //$NON-NLS-2$
fStringMatchers[i]= Pattern.compile(curr);
}
}
......
......@@ -19,7 +19,6 @@ import java.lang.reflect.Modifier;
import java.util.AbstractList;
import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import java.util.HashSet;
import java.util.LinkedHashSet;
import java.util.List;
......@@ -661,7 +660,7 @@ public class StubUtility {
}
IDocument textBuffer= new Document(str);
List<TypeParameter> typeParams= shouldGenerateMethodTypeParameterTags(cu.getJavaProject()) ? decl.typeParameters() : Collections.emptyList();
List<TypeParameter> typeParams= decl.typeParameters();
String[] typeParamNames= new String[typeParams.size()];
for (int i= 0; i < typeParamNames.length; i++) {
TypeParameter elem= typeParams.get(i);
......
/*******************************************************************************
* Copyright (c) 2000, 2018 IBM Corporation and others.
* Copyright (c) 2000, 2019 IBM Corporation and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
......@@ -13,6 +13,8 @@
* Pierre-Yves B. <pyvesdev@gmail.com> - Generation of equals and hashcode with java 7 Objects.equals and Objects.hashcode - https://bugs.eclipse.org/424214
* Pierre-Yves B. <pyvesdev@gmail.com> - Different behaviour when generating hashCode and equals - https://bugs.eclipse.org/539589
* Pierre-Yves B. <pyvesdev@gmail.com> - Confusing name when generating hashCode and equals with outer type - https://bugs.eclipse.org/539872
* Red Hat Inc. - refactored to jdt.core.manipulation
* Pierre-Yves B. <pyvesdev@gmail.com> - Allow hashCode and equals generation when no fields but a super/enclosing class that implements them - https://bugs.eclipse.org/539901
*******************************************************************************/
package org.eclipse.jdt.internal.corext.codemanipulation;
......@@ -426,7 +428,12 @@ public final class GenerateHashCodeEqualsOperation implements IWorkspaceRunnable
boolean needsNoSuperCall= needsNoSuperCall(fType, METHODNAME_HASH_CODE, new ITypeBinding[0]);
boolean memberType= isMemberType();
ReturnStatement endReturn= fAst.newReturnStatement();
if (fUseJ7HashEquals && needsNoSuperCall && !memberType && containsNoArrays()) {
if (!memberType && fFields.length == 0) {
// return super.hashCode();
SuperMethodInvocation invoc= fAst.newSuperMethodInvocation();
invoc.setName(fAst.newSimpleName(METHODNAME_HASH_CODE));
endReturn.setExpression(invoc);
} else if (fUseJ7HashEquals && needsNoSuperCall && !memberType && containsNoArrays()) {
// return Objects.hash(...);
endReturn.setExpression(createStandaloneJ7HashCall());
} else {
......@@ -903,6 +910,8 @@ public final class GenerateHashCodeEqualsOperation implements IWorkspaceRunnable
body.statements().add(createReturningIfStatement(thisClass, objGetClass, Operator.NOT_EQUALS, false));
}
boolean memberType= isMemberType();
if (memberType || fFields.length > 0) {
// Type other= (Type) obj;
VariableDeclarationFragment sd= fAst.newVariableDeclarationFragment();
sd.setName(fAst.newSimpleName(VARIABLE_NAME_EQUALS_CASTED));
......@@ -916,12 +925,13 @@ public final class GenerateHashCodeEqualsOperation implements IWorkspaceRunnable
otherDeclaration.setType(fAst.newSimpleType(fAst.newSimpleName(fType.getName())));
body.statements().add(otherDeclaration);
}
if (isMemberType()) {
if (memberType) {
body.statements().add(createEnclosingInstanceComparison());
}
if (fUseJ7HashEquals) {
if (fUseJ7HashEquals && fFields.length > 0) {
body.statements().add(createJ7EqualsStatement());
} else {
for (int i= 0; i < fFields.length; i++) {
......
/*******************************************************************************
* Copyright (c) 2008, 2018 Mateusz Matela and others.
* Copyright (c) 2008, 2019 Mateusz Matela and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
......@@ -11,6 +11,7 @@
* Contributors:
* Mateusz Matela <mateusz.matela@gmail.com> - [code manipulation] [dcr] toString() builder wizard - https://bugs.eclipse.org/bugs/show_bug.cgi?id=26070
* Mateusz Matela <mateusz.matela@gmail.com> - [toString] Generator uses wrong suffixes and prefixes - https://bugs.eclipse.org/bugs/show_bug.cgi?id=275370
* Red Hat Inc. - moved to jdt.core.manipulation
*******************************************************************************/
package org.eclipse.jdt.internal.corext.codemanipulation.tostringgeneration;
......
/*******************************************************************************
* Copyright (c) 2008, 2011 Mateusz Matela and others.
* Copyright (c) 2008, 2019 Mateusz Matela and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
......@@ -11,6 +11,7 @@
* Contributors:
* Mateusz Matela <mateusz.matela@gmail.com> - [code manipulation] [dcr] toString() builder wizard - https://bugs.eclipse.org/bugs/show_bug.cgi?id=26070
* Mateusz Matela <mateusz.matela@gmail.com> - [toString] finish toString() builder wizard - https://bugs.eclipse.org/bugs/show_bug.cgi?id=267710
* Red Hat Inc. - moved to jdt.core.manipulation
*******************************************************************************/
package org.eclipse.jdt.internal.corext.codemanipulation.tostringgeneration;
......
/*******************************************************************************
* Copyright (c) 2010, 2018 Mateusz Matela and others.
* Copyright (c) 2010, 2019 Mateusz Matela and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
......@@ -11,6 +11,7 @@
* Contributors:
* Mateusz Matela <mateusz.matela@gmail.com> - [code manipulation] [dcr] toString() builder wizard - https://bugs.eclipse.org/bugs/show_bug.cgi?id=26070
* Mateusz Matela <mateusz.matela@gmail.com> - [toString] finish toString() builder wizard - https://bugs.eclipse.org/bugs/show_bug.cgi?id=267710
* Red Hat Inc. - moved to jdt.core.manipulation
*******************************************************************************/
package org.eclipse.jdt.internal.corext.codemanipulation.tostringgeneration;
......@@ -237,7 +238,7 @@ public class GenerateToStringOperation implements IWorkspaceRunnable {
* @return a ready to use <code>GenerateToStringOperation</code> object
*/
public static GenerateToStringOperation createOperation(ITypeBinding typeBinding, Object[] selectedBindings, CompilationUnit unit, IJavaElement elementPosition,
ToStringGenerationSettings settings) {
ToStringGenerationSettingsCore settings) {
AbstractToStringGenerator generator= createToStringGenerator(settings.toStringStyle);
ToStringTemplateParser parser= createTemplateParser(settings.toStringStyle);
parser.parseTemplate(settings.stringFormatTemplate);
......
/*******************************************************************************
* Copyright (c) 2008, 2011 Mateusz Matela and others.
* Copyright (c) 2008, 2019 Mateusz Matela and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
......@@ -10,6 +10,7 @@
*
* Contributors:
* Mateusz Matela <mateusz.matela@gmail.com> - [code manipulation] [dcr] toString() builder wizard - https://bugs.eclipse.org/bugs/show_bug.cgi?id=26070
* Red Hat Inc. - moved to jdt.core.manipulation
*******************************************************************************/
package org.eclipse.jdt.internal.corext.codemanipulation.tostringgeneration;
......
/*******************************************************************************
* Copyright (c) 2008, 2011 Mateusz Matela and others.
* Copyright (c) 2008, 2019 Mateusz Matela and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
......@@ -10,6 +10,7 @@
*
* Contributors:
* Mateusz Matela <mateusz.matela@gmail.com> - [code manipulation] [dcr] toString() builder wizard - https://bugs.eclipse.org/bugs/show_bug.cgi?id=26070
* Red Hat Inc. - moved to jdt.core.manipulation
*******************************************************************************/
package org.eclipse.jdt.internal.corext.codemanipulation.tostringgeneration;
......
/*******************************************************************************
* Copyright (c) 2008, 2011 Mateusz Matela and others.
* Copyright (c) 2008, 2019 Mateusz Matela and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
......@@ -11,6 +11,7 @@
* Contributors:
* Mateusz Matela <mateusz.matela@gmail.com> - [code manipulation] [dcr] toString() builder wizard - https://bugs.eclipse.org/bugs/show_bug.cgi?id=26070
* Mateusz Matela <mateusz.matela@gmail.com> - [toString] Wrong code generated with String concatenation - https://bugs.eclipse.org/bugs/show_bug.cgi?id=275360
* Red Hat Inc. - moved to jdt.core.manipulation
*******************************************************************************/
package org.eclipse.jdt.internal.corext.codemanipulation.tostringgeneration;
......
/*******************************************************************************
* Copyright (c) 2008, 2011 Mateusz Matela and others.
* Copyright (c) 2008, 2019 Mateusz Matela and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
......@@ -11,6 +11,7 @@
* Contributors:
* Mateusz Matela <mateusz.matela@gmail.com> - [code manipulation] [dcr] toString() builder wizard - https://bugs.eclipse.org/bugs/show_bug.cgi?id=26070
* Mateusz Matela <mateusz.matela@gmail.com> - [toString] toString wizard generates wrong code - https://bugs.eclipse.org/bugs/show_bug.cgi?id=270462
* Red Hat Inc. - moved to jdt.core.manipulation
*******************************************************************************/
package org.eclipse.jdt.internal.corext.codemanipulation.tostringgeneration;
......
/*******************************************************************************
* Copyright (c) 2008, 2016 Mateusz Matela and others.
* Copyright (c) 2008, 2019 Mateusz Matela and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
......@@ -11,6 +11,7 @@
* Contributors:
* Mateusz Matela <mateusz.matela@gmail.com> - [code manipulation] [dcr] toString() builder wizard - https://bugs.eclipse.org/bugs/show_bug.cgi?id=26070
* Mateusz Matela <mateusz.matela@gmail.com> - [toString] finish toString() builder wizard - https://bugs.eclipse.org/bugs/show_bug.cgi?id=267710
* Red Hat Inc. - moved to jdt.core.manipulation
*******************************************************************************/
package org.eclipse.jdt.internal.corext.codemanipulation.tostringgeneration;
......@@ -32,13 +33,13 @@ class ToStringGenerationContext {
private ITypeBinding fType;
private ToStringGenerationSettings fSettings;
private ToStringGenerationSettingsCore fSettings;
private ToStringGenerationSettings.CustomBuilderSettings fCustomBuilderSettings;
private ToStringGenerationSettingsCore.CustomBuilderSettings fCustomBuilderSettings;
private CompilationUnitRewrite fRewrite;
ToStringGenerationContext(ToStringTemplateParser parser, Object[] selectedMembers, ToStringGenerationSettings settings, ITypeBinding type,
ToStringGenerationContext(ToStringTemplateParser parser, Object[] selectedMembers, ToStringGenerationSettingsCore settings, ITypeBinding type,
CompilationUnitRewrite rewrite) {
fParser= parser;
fSelectedMembers= selectedMembers;
......
/*******************************************************************************
* Copyright (c) 2019 Mateusz Matela and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
* which accompanies this distribution, and is available at
* https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Mateusz Matela <mateusz.matela@gmail.com> - [code manipulation] [dcr] toString() builder wizard - https://bugs.eclipse.org/bugs/show_bug.cgi?id=26070
* Mateusz Matela <mateusz.matela@gmail.com> - [toString] finish toString() builder wizard - https://bugs.eclipse.org/bugs/show_bug.cgi?id=267710
* Red Hat Inc. - copied and modified to make ToStringGenerationSettingsCore
*******************************************************************************/
package org.eclipse.jdt.internal.corext.codemanipulation.tostringgeneration;
import org.eclipse.jdt.internal.corext.codemanipulation.CodeGenerationSettings;
public class ToStringGenerationSettingsCore extends CodeGenerationSettings {
public static final String SETTINGS_SELECTED_TEMPLATE= "ToStringTemplateSelected"; //$NON-NLS-1$
public static final String SETTINGS_STRINGSTYLE= "StringStyle"; //$NON-NLS-1$
public static final String SETTINGS_SKIPNULLS= "SkipNull"; //$NON-NLS-1$
public static final String SETTINGS_IGNOREDEFAULT= "IgnoreDefault"; //$NON-NLS-1$
public static final String SETTINGS_LIMITELEMENTS= "LimitElements"; //$NON-NLS-1$
public static final String SETTINGS_LIMITVALUE= "LimitValue"; //$NON-NLS-1$
public static final String SETTINGS_TEMPLATE_NAMES= "ToStringTemplateNames"; //$NON-NLS-1$
public static final String SETTINGS_TEMPLATES= "ToStringTemplates"; //$NON-NLS-1$
public static final String SETTINGS_CUSTOMBUILDER_CLASS= "CustomBuilderClass"; //$NON-NLS-1$
public static final String SETTINGS_CUSTOMBUILDER_LABEL= "CustomBuilderLabel"; //$NON-NLS-1$
public static final String SETTINGS_CUSTOMBUILDER_APPENDMETHOD= "CustomBuilderAppendMethod"; //$NON-NLS-1$
public static final String SETTINGS_CUSTOMBUILDER_RESULTMETHOD= "CustomBuilderResultMethod"; //$NON-NLS-1$
public static final String SETTINGS_CUSTOMBUILDER_CHAINCALLS= "CustomBuilderChainCalls"; //$NON-NLS-1$
/**
* Container for settings specific for custom toString() generator code style
*/
public static class CustomBuilderSettings {
/**
* what class should be used as a custom toString() builder (this is a fully qualified and
* Parameterized name)
**/
public String className;
/** identifier for the local variable that holds the custom toString() builder in generated code **/
public String variableName;
/** name of a custom toString() builder's methods that should be called to append content **/
public String appendMethod;
/** name of a custom toString() builder method that should be called to retrieve result **/
public String resultMethod;
/** should custom toString() builder method calls be joined into chains? **/
public boolean chainCalls;
}
/** which template should be used to format the output of the toString() method? */
public int stringFormatTemplateNumber;
/**
* what is the template (redundancy - this field can be determined basing on
* <code>GenerateToStringDialog.getTemplates()</code> and
* <code>stringFormatTemplateNumber</code>, but this way it's more convenient)
*/
public String stringFormatTemplate;
/** what style of code should the toString() method have? */
public int toStringStyle;
/** should the toString() method skip null values? */
public boolean skipNulls;
/** should the toString() method use its own way to show elements of an array? */
public boolean customArrayToString;
/**
* should the toString() limit maximum number of elements of arrays/Collections to be
* listed?
*/
public boolean limitElements;
/** what is the maximum number of elements in array/Collection to show? */
public int limitValue;
/** should blocks be forced in if/for/while statements? */
public boolean useBlocks;
/** can generated code use jdk 1.5 API? **/
public boolean is50orHigher;
/** can generated code use jdk 1.6 API? **/
public boolean is60orHigher;
/** settings specific for custom builder code style **/
public CustomBuilderSettings customBuilderSettings;
/**
* Returns a copy of customBuilderSettings. Changes made in the returned object will not affect
* this settings object. To save changes made to the object, use:
*
* ToStringGenerationSettings#writeCustomBuilderSettings(ToStringGenerationSettings.CustomBuilderSettings)
*
* @return copy of custom builder settings object
*/
public CustomBuilderSettings getCustomBuilderSettings() {
CustomBuilderSettings result= new CustomBuilderSettings();
result.className= customBuilderSettings.className;
result.variableName= customBuilderSettings.variableName;
result.appendMethod= customBuilderSettings.appendMethod;
result.resultMethod= customBuilderSettings.resultMethod;
result.chainCalls= customBuilderSettings.chainCalls;
return result;
}
}
/*******************************************************************************
* Copyright (c) 2008, 2011 Mateusz Matela and others.
* Copyright (c) 2008, 2019 Mateusz Matela and others.
*
* This program and the accompanying materials
* are made available under the terms of the Eclipse Public License 2.0
......@@ -10,6 +10,7 @@
*
* Contributors:
* Mateusz Matela <mateusz.matela@gmail.com> - [code manipulation] [dcr] toString() builder wizard - https://bugs.eclipse.org/bugs/show_bug.cgi?id=26070
* Red Hat Inc. - moved to jdt.core.manipulation
*******************************************************************************/
package org.eclipse.jdt.internal.corext.codemanipulation.tostringgeneration;
......
......@@ -32,6 +32,7 @@ import org.eclipse.jdt.core.dom.ITypeBinding;
import org.eclipse.jdt.core.dom.Type;
import org.eclipse.jdt.core.dom.rewrite.ImportRewrite;
import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.ImportRewriteContext;
import org.eclipse.jdt.core.dom.rewrite.ImportRewrite.TypeLocation;
import org.eclipse.jdt.core.refactoring.CompilationUnitChange;
import org.eclipse.jdt.internal.core.manipulation.JavaManipulationPlugin;
......@@ -44,9 +45,9 @@ public class CompilationUnitRewriteOperationsFixCore extends AbstractFix {
public abstract void rewriteAST(CompilationUnitRewrite cuRewrite, LinkedProposalModelCore linkedModel) throws CoreException;
protected Type importType(final ITypeBinding toImport, final ASTNode accessor, ImportRewrite imports, final CompilationUnit compilationUnit) {
protected Type importType(final ITypeBinding toImport, final ASTNode accessor, ImportRewrite imports, final CompilationUnit compilationUnit, TypeLocation location) {
ImportRewriteContext importContext= new ContextSensitiveImportRewriteContext(compilationUnit, accessor.getStartPosition(), imports);
return imports.addImport(toImport, compilationUnit.getAST(), importContext);
return imports.addImport(toImport, compilationUnit.getAST(), importContext, location);
}
protected TextEditGroup createTextEditGroup(String label, CompilationUnitRewrite rewrite) {
......