Skip to content

Commit

Permalink
Remove duplicate classes JavaElementLabels, JavaElementLabelComposer.
Browse files Browse the repository at this point in the history
- JavaElementLabels -> JavaElementLabelsCore
- JavaElementLabelComposer -> JavaElementLabelComposerCore
- JavaElementLabelComposerCore constructor takes a StringBuffer instead
  of StringBuilder
- Define LABEL_FLAGS for JDTUtils

Signed-off-by: Roland Grunberg <[email protected]>
  • Loading branch information
rgrunber committed Sep 15, 2023
1 parent 5821462 commit bae72c2
Show file tree
Hide file tree
Showing 38 changed files with 150 additions and 1,915 deletions.
1 change: 0 additions & 1 deletion org.eclipse.jdt.ls.core/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ Export-Package: org.eclipse.jdt.ls.core.contentassist;x-friends:="org.eclipse.jd
org.eclipse.jdt.ls.core.internal.decompiler;x-friends:="org.eclipse.jdt.ls.tests",
org.eclipse.jdt.ls.core.internal.framework.protobuf;x-friends:="org.eclipse.jdt.ls.tests",
org.eclipse.jdt.ls.core.internal.handlers;x-friends:="org.eclipse.jdt.ls.tests",
org.eclipse.jdt.ls.core.internal.hover;x-friends:="org.eclipse.jdt.ls.tests",
org.eclipse.jdt.ls.core.internal.javadoc;x-friends:="org.eclipse.jdt.ls.tests",
org.eclipse.jdt.ls.core.internal.lsp;x-friends:="org.eclipse.jdt.ls.tests",
org.eclipse.jdt.ls.core.internal.managers;x-friends:="org.eclipse.jdt.ls.tests,org.eclipse.jdt.ls.tests.syntaxserver",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
import org.eclipse.jdt.core.search.SearchRequestor;
import org.eclipse.jdt.internal.core.BinaryMember;
import org.eclipse.jdt.ls.core.internal.handlers.CompletionResolveHandler;
import org.eclipse.jdt.ls.core.internal.hover.JavaElementLabels;
import org.eclipse.jdt.internal.core.manipulation.JavaElementLabelsCore;
import org.eclipse.jdt.ls.core.internal.javadoc.JavaDocSnippetStringEvaluator;
import org.eclipse.jdt.ls.core.internal.javadoc.JavadocContentAccess2;
import org.eclipse.jdt.ls.core.internal.managers.IBuildSupport;
Expand All @@ -62,21 +62,21 @@
public class HoverInfoProvider {

private static final long LABEL_FLAGS=
JavaElementLabels.ALL_FULLY_QUALIFIED
| JavaElementLabels.M_PRE_RETURNTYPE
| JavaElementLabels.M_PARAMETER_ANNOTATIONS
| JavaElementLabels.M_PARAMETER_TYPES
| JavaElementLabels.M_PARAMETER_NAMES
| JavaElementLabels.M_EXCEPTIONS
| JavaElementLabels.F_PRE_TYPE_SIGNATURE
| JavaElementLabels.M_PRE_TYPE_PARAMETERS
| JavaElementLabels.T_TYPE_PARAMETERS
| JavaElementLabels.USE_RESOLVED;
JavaElementLabelsCore.ALL_FULLY_QUALIFIED
| JavaElementLabelsCore.M_PRE_RETURNTYPE
| JavaElementLabelsCore.M_PARAMETER_ANNOTATIONS
| JavaElementLabelsCore.M_PARAMETER_TYPES
| JavaElementLabelsCore.M_PARAMETER_NAMES
| JavaElementLabelsCore.M_EXCEPTIONS
| JavaElementLabelsCore.F_PRE_TYPE_SIGNATURE
| JavaElementLabelsCore.M_PRE_TYPE_PARAMETERS
| JavaElementLabelsCore.T_TYPE_PARAMETERS
| JavaElementLabelsCore.USE_RESOLVED;

private static final long LOCAL_VARIABLE_FLAGS= LABEL_FLAGS & ~JavaElementLabels.F_FULLY_QUALIFIED | JavaElementLabels.F_POST_QUALIFIED;
private static final long LOCAL_VARIABLE_FLAGS= LABEL_FLAGS & ~JavaElementLabelsCore.F_FULLY_QUALIFIED | JavaElementLabelsCore.F_POST_QUALIFIED;

private static final long COMMON_SIGNATURE_FLAGS = LABEL_FLAGS & ~JavaElementLabels.ALL_FULLY_QUALIFIED
| JavaElementLabels.T_FULLY_QUALIFIED | JavaElementLabels.M_FULLY_QUALIFIED;
private static final long COMMON_SIGNATURE_FLAGS = LABEL_FLAGS & ~JavaElementLabelsCore.ALL_FULLY_QUALIFIED
| JavaElementLabelsCore.T_FULLY_QUALIFIED | JavaElementLabelsCore.M_FULLY_QUALIFIED;

private static final String LANGUAGE_ID = "java";

Expand Down Expand Up @@ -250,9 +250,9 @@ public static MarkedString computeSignature(IJavaElement element) {
}
String elementLabel = null;
if (element instanceof ILocalVariable) {
elementLabel = JavaElementLabels.getElementLabel(element, LOCAL_VARIABLE_FLAGS);
elementLabel = JavaElementLabelsCore.getElementLabel(element, LOCAL_VARIABLE_FLAGS);
} else {
elementLabel = JavaElementLabels.getElementLabel(element, COMMON_SIGNATURE_FLAGS);
elementLabel = JavaElementLabelsCore.getElementLabel(element, COMMON_SIGNATURE_FLAGS);
}
if (element instanceof IField field) {
IRegion region = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@
package org.eclipse.jdt.ls.core.internal;

import static org.eclipse.core.resources.IResource.DEPTH_ONE;
import static org.eclipse.jdt.ls.core.internal.hover.JavaElementLabels.ALL_DEFAULT;
import static org.eclipse.jdt.ls.core.internal.hover.JavaElementLabels.M_APP_RETURNTYPE;
import static org.eclipse.jdt.ls.core.internal.hover.JavaElementLabels.ROOT_VARIABLE;
import static org.eclipse.jdt.internal.core.manipulation.JavaElementLabelsCore.ALL_DEFAULT;
import static org.eclipse.jdt.internal.core.manipulation.JavaElementLabelsCore.M_APP_RETURNTYPE;
import static org.eclipse.jdt.internal.core.manipulation.JavaElementLabelsCore.ROOT_VARIABLE;

import java.io.File;
import java.io.IOException;
Expand Down Expand Up @@ -109,6 +109,8 @@
import org.eclipse.jdt.internal.codeassist.impl.Engine;
import org.eclipse.jdt.internal.compiler.lookup.Binding;
import org.eclipse.jdt.internal.compiler.lookup.MethodBinding;
import org.eclipse.jdt.internal.core.manipulation.JavaElementLabelComposerCore;
import org.eclipse.jdt.internal.core.manipulation.JavaElementLabelsCore;
import org.eclipse.jdt.internal.core.manipulation.search.IOccurrencesFinder.OccurrenceLocation;
import org.eclipse.jdt.internal.core.manipulation.search.OccurrencesFinder;
import org.eclipse.jdt.internal.core.util.Util;
Expand All @@ -124,8 +126,6 @@
import org.eclipse.jdt.launching.environments.IExecutionEnvironment;
import org.eclipse.jdt.launching.environments.IExecutionEnvironmentsManager;
import org.eclipse.jdt.ls.core.internal.handlers.JsonRpcHelpers;
import org.eclipse.jdt.ls.core.internal.hover.JavaElementLabelComposer;
import org.eclipse.jdt.ls.core.internal.hover.JavaElementLabels;
import org.eclipse.jdt.ls.core.internal.javadoc.JavaElementLinks;
import org.eclipse.jdt.ls.core.internal.managers.ContentProviderManager;
import org.eclipse.jdt.ls.core.internal.managers.ProjectsManager;
Expand All @@ -148,6 +148,17 @@ public final class JDTUtils {
public static final String PERIOD = ".";
public static final String SRC = "src";
private static final String JDT_SCHEME = "jdt";
private static final long LABEL_FLAGS=
JavaElementLabelsCore.ALL_FULLY_QUALIFIED
| JavaElementLabelsCore.M_PRE_RETURNTYPE
| JavaElementLabelsCore.M_PARAMETER_ANNOTATIONS
| JavaElementLabelsCore.M_PARAMETER_TYPES
| JavaElementLabelsCore.M_PARAMETER_NAMES
| JavaElementLabelsCore.M_EXCEPTIONS
| JavaElementLabelsCore.F_PRE_TYPE_SIGNATURE
| JavaElementLabelsCore.M_PRE_TYPE_PARAMETERS
| JavaElementLabelsCore.T_TYPE_PARAMETERS
| JavaElementLabelsCore.USE_RESOLVED;
//Code generators known to cause problems
private static Set<String> SILENCED_CODEGENS = Collections.singleton("lombok");

Expand Down Expand Up @@ -340,13 +351,13 @@ public static String getPackageName(IJavaProject javaProject, String fileContent
* Returns with the human readable name of the element. For types with type
* arguments, it is {@code Comparable<T>} instead of {@code Comparable}. First,
* this method tries to retrieve the
* {@link JavaElementLabels#getElementLabel(IJavaElement, long) label} of the
* {@link JavaElementLabelsCore#getElementLabel(IJavaElement, long) label} of the
* element, then falls back to {@link IJavaElement#getElementName() element
* name}. Returns {@code null} if the argument does not have a name.
*/
public static String getName(IJavaElement element) {
Assert.isNotNull(element, "element");
String name = JavaElementLabels.getElementLabel(element, ALL_DEFAULT | M_APP_RETURNTYPE | ROOT_VARIABLE);
String name = JavaElementLabelsCore.getElementLabel(element, ALL_DEFAULT | M_APP_RETURNTYPE | ROOT_VARIABLE);
return name == null ? element.getElementName() : name;
}

Expand Down Expand Up @@ -1393,8 +1404,8 @@ public static String getAnnotationMemberDefaultValue(IMethod method, ITypeRoot t

} else if (defaultValue != null) {
IAnnotation parentAnnotation = (IAnnotation) method.getAncestor(IJavaElement.ANNOTATION);
StringBuilder buf = new StringBuilder();
new JavaElementLabelComposer(buf).appendAnnotationValue(parentAnnotation, defaultValue, valueKind, JavaElementLabels.LABEL_FLAGS);
StringBuffer buf = new StringBuffer();
new JavaElementLabelComposerCore(buf).appendAnnotationValue(parentAnnotation, defaultValue, valueKind, LABEL_FLAGS);
return buf.toString();
}

Expand Down Expand Up @@ -1437,7 +1448,7 @@ private static void addValue(StringBuilder buf, Object value, boolean addLinks)
buf.append('{');
for (int i = 0; i < values.length; i++) {
if (i > 0) {
buf.append(JavaElementLabels.COMMA_STRING);
buf.append(JavaElementLabelsCore.COMMA_STRING);
}
addValue(buf, values[i], addLinks);
}
Expand Down Expand Up @@ -1467,7 +1478,7 @@ private static void addAnnotation(StringBuilder buf, IAnnotationBinding annotati
buf.append('(');
for (int j = 0; j < mvPairs.length; j++) {
if (j > 0) {
buf.append(JavaElementLabels.COMMA_STRING);
buf.append(JavaElementLabelsCore.COMMA_STRING);
}
IMemberValuePairBinding mvPair = mvPairs[j];
if (addLinks) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.internal.corext.refactoring.reorg.INewNameQuery;
import org.eclipse.jdt.ls.core.internal.corext.util.JavaElementResourceMapping;
import org.eclipse.jdt.ls.core.internal.hover.JavaElementLabels;
import org.eclipse.jdt.internal.core.manipulation.JavaElementLabelsCore;
import org.eclipse.ltk.core.refactoring.Change;
import org.eclipse.ltk.core.refactoring.participants.ReorgExecutionLog;
import org.eclipse.ltk.core.refactoring.resource.ResourceChange;
Expand Down Expand Up @@ -105,7 +105,7 @@ public String getNewName() throws OperationCanceledException {
}

static String getPackageName(IPackageFragment pack) {
return JavaElementLabels.getElementLabel(pack, JavaElementLabels.ALL_DEFAULT);
return JavaElementLabelsCore.getElementLabel(pack, JavaElementLabelsCore.ALL_DEFAULT);
}

private void markAsExecuted(ICompilationUnit unit, ResourceMapping mapping) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import org.eclipse.jdt.internal.corext.refactoring.RefactoringCoreMessages;
import org.eclipse.jdt.internal.corext.refactoring.reorg.INewNameQuery;
import org.eclipse.jdt.ls.core.internal.Messages;
import org.eclipse.jdt.ls.core.internal.hover.JavaElementLabels;
import org.eclipse.jdt.internal.core.manipulation.JavaElementLabelsCore;
import org.eclipse.ltk.core.refactoring.Change;

public class CopyPackageChange extends PackageReorgChange {
Expand All @@ -39,8 +39,8 @@ protected Change doPerformReorg(IProgressMonitor pm) throws JavaModelException,

@Override
public String getName() {
String packageName= JavaElementLabels.getElementLabel(getPackage(), JavaElementLabels.ALL_DEFAULT);
String destinationName= JavaElementLabels.getElementLabel(getDestination(), JavaElementLabels.ALL_DEFAULT);
String packageName= JavaElementLabelsCore.getElementLabel(getPackage(), JavaElementLabelsCore.ALL_DEFAULT);
String destinationName= JavaElementLabelsCore.getElementLabel(getDestination(), JavaElementLabelsCore.ALL_DEFAULT);
return Messages.format(RefactoringCoreMessages.CopyPackageChange_copy, new String[]{ packageName, destinationName});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import org.eclipse.jdt.internal.corext.refactoring.reorg.INewNameQuery;
import org.eclipse.jdt.ls.core.internal.Messages;
import org.eclipse.jdt.ls.core.internal.corext.refactoring.reorg.IPackageFragmentRootManipulationQuery;
import org.eclipse.jdt.ls.core.internal.hover.JavaElementLabels;
import org.eclipse.jdt.internal.core.manipulation.JavaElementLabelsCore;
import org.eclipse.ltk.core.refactoring.Change;

public class CopyPackageFragmentRootChange extends PackageFragmentRootReorgChange {
Expand All @@ -41,7 +41,7 @@ protected Change doPerformReorg(IPath destinationPath, IProgressMonitor pm) thro

@Override
public String getName() {
String rootName= JavaElementLabels.getElementLabel(getRoot(), JavaElementLabels.ALL_DEFAULT);
String rootName= JavaElementLabelsCore.getElementLabel(getRoot(), JavaElementLabelsCore.ALL_DEFAULT);
String destinationName= BasicElementLabels.getResourceName(getDestination());
return Messages.format(RefactoringCoreMessages.CopyPackageFragmentRootChange_copy, new String[] {rootName, destinationName});
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
import org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin;
import org.eclipse.jdt.ls.core.internal.Messages;
import org.eclipse.jdt.ls.core.internal.corext.refactoring.reorg.IPackageFragmentRootManipulationQuery;
import org.eclipse.jdt.ls.core.internal.hover.JavaElementLabels;
import org.eclipse.jdt.internal.core.manipulation.JavaElementLabelsCore;
import org.eclipse.ltk.core.refactoring.Change;
import org.eclipse.ltk.core.refactoring.CompositeChange;
import org.eclipse.ltk.core.refactoring.NullChange;
Expand Down Expand Up @@ -78,7 +78,7 @@ public DeletePackageFragmentRootChange(IPackageFragmentRoot root, boolean isExec

@Override
public String getName() {
String rootName= JavaElementLabels.getElementLabel(getRoot(), JavaElementLabels.ALL_DEFAULT);
String rootName= JavaElementLabelsCore.getElementLabel(getRoot(), JavaElementLabelsCore.ALL_DEFAULT);
return Messages.format(RefactoringCoreMessages.DeletePackageFragmentRootChange_delete, rootName);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
import org.eclipse.jdt.core.JavaCore;
import org.eclipse.jdt.internal.corext.refactoring.RefactoringCoreMessages;
import org.eclipse.jdt.ls.core.internal.Messages;
import org.eclipse.jdt.ls.core.internal.hover.JavaElementLabels;
import org.eclipse.jdt.internal.core.manipulation.JavaElementLabelsCore;
import org.eclipse.ltk.core.refactoring.Change;
import org.eclipse.ltk.core.refactoring.NullChange;
import org.eclipse.ltk.internal.core.refactoring.resource.UndoDeleteResourceChange;
Expand Down Expand Up @@ -64,7 +64,7 @@ public DeleteSourceManipulationChange(ISourceManipulation sm, boolean isExecuteC
@Override
public String getName() {
IJavaElement javaElement= getJavaElement(getSourceManipulation());
return Messages.format(RefactoringCoreMessages.DeleteSourceManipulationChange_0, JavaElementLabels.getElementLabel(javaElement, JavaElementLabels.ALL_DEFAULT));
return Messages.format(RefactoringCoreMessages.DeleteSourceManipulationChange_0, JavaElementLabelsCore.getElementLabel(javaElement, JavaElementLabelsCore.ALL_DEFAULT));
}

/*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
import org.eclipse.jdt.core.JavaModelException;
import org.eclipse.jdt.internal.corext.refactoring.RefactoringCoreMessages;
import org.eclipse.jdt.ls.core.internal.Messages;
import org.eclipse.jdt.ls.core.internal.hover.JavaElementLabels;
import org.eclipse.jdt.internal.core.manipulation.JavaElementLabelsCore;
import org.eclipse.ltk.core.refactoring.Change;

public class MovePackageChange extends PackageReorgChange {
Expand All @@ -38,8 +38,8 @@ protected Change doPerformReorg(IProgressMonitor pm) throws JavaModelException,

@Override
public String getName() {
String packageName= JavaElementLabels.getElementLabel(getPackage(), JavaElementLabels.ALL_DEFAULT);
String destinationName= JavaElementLabels.getElementLabel(getDestination(), JavaElementLabels.ALL_DEFAULT);
String packageName= JavaElementLabelsCore.getElementLabel(getPackage(), JavaElementLabelsCore.ALL_DEFAULT);
String destinationName= JavaElementLabelsCore.getElementLabel(getDestination(), JavaElementLabelsCore.ALL_DEFAULT);
return Messages.format(RefactoringCoreMessages.MovePackageChange_move, new String[] {packageName, destinationName });
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
import org.eclipse.jdt.internal.corext.refactoring.RefactoringCoreMessages;
import org.eclipse.jdt.ls.core.internal.Messages;
import org.eclipse.jdt.ls.core.internal.corext.refactoring.reorg.IPackageFragmentRootManipulationQuery;
import org.eclipse.jdt.ls.core.internal.hover.JavaElementLabels;
import org.eclipse.jdt.internal.core.manipulation.JavaElementLabelsCore;
import org.eclipse.ltk.core.refactoring.Change;

public class MovePackageFragmentRootChange extends PackageFragmentRootReorgChange {
Expand All @@ -40,7 +40,7 @@ protected Change doPerformReorg(IPath destinationPath, IProgressMonitor pm) thro

@Override
public String getName() {
String rootName= JavaElementLabels.getElementLabel(getRoot(), JavaElementLabels.ALL_DEFAULT);
String rootName= JavaElementLabelsCore.getElementLabel(getRoot(), JavaElementLabelsCore.ALL_DEFAULT);
String destinationName= BasicElementLabels.getResourceName(getDestination());
return Messages.format(RefactoringCoreMessages.MovePackageFragmentRootChange_move, new String[] { rootName, destinationName });
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
import org.eclipse.jdt.internal.corext.refactoring.util.JavaElementUtil;
import org.eclipse.jdt.ls.core.internal.Messages;
import org.eclipse.jdt.ls.core.internal.corext.refactoring.AbstractJavaElementRenameChange;
import org.eclipse.jdt.ls.core.internal.hover.JavaElementLabels;
import org.eclipse.jdt.internal.core.manipulation.JavaElementLabelsCore;
import org.eclipse.ltk.core.refactoring.Change;
import org.eclipse.ltk.core.refactoring.NullChange;
import org.eclipse.ltk.core.refactoring.RefactoringStatus;
Expand Down Expand Up @@ -206,7 +206,7 @@ private void isValid(RefactoringStatus result, IPackageFragment pack, IProgressM
ICompilationUnit[] units= pack.getCompilationUnits();
pm.beginTask("", units.length); //$NON-NLS-1$
for (int i= 0; i < units.length; i++) {
pm.subTask(Messages.format(RefactoringCoreMessages.RenamePackageChange_checking_change, JavaElementLabels.getElementLabel(pack, JavaElementLabels.ALL_DEFAULT)));
pm.subTask(Messages.format(RefactoringCoreMessages.RenamePackageChange_checking_change, JavaElementLabelsCore.getElementLabel(pack, JavaElementLabelsCore.ALL_DEFAULT)));
checkIfModifiable(result, units[i].getResource(), VALIDATE_NOT_READ_ONLY | VALIDATE_NOT_DIRTY);
pm.worked(1);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
import org.eclipse.jdt.internal.corext.refactoring.util.JavaStatusContext;
import org.eclipse.jdt.internal.corext.util.JavaModelUtil;
import org.eclipse.jdt.internal.corext.util.Messages;
import org.eclipse.jdt.ls.core.internal.hover.JavaElementLabels;
import org.eclipse.jdt.internal.core.manipulation.JavaElementLabelsCore;
import org.eclipse.jface.text.IRegion;
import org.eclipse.ltk.core.refactoring.RefactoringStatus;

Expand Down Expand Up @@ -659,7 +659,7 @@ private void computeOutput(RefactoringStatus status) {
StringBuilder affectedLocals = new StringBuilder();
for (int i = 0; i < localReads.size(); i++) {
IVariableBinding binding = localReads.get(i);
String bindingName = BindingLabelProviderCore.getBindingLabel(binding, BindingLabelProviderCore.DEFAULT_TEXTFLAGS | JavaElementLabels.F_PRE_TYPE_SIGNATURE);
String bindingName = BindingLabelProviderCore.getBindingLabel(binding, BindingLabelProviderCore.DEFAULT_TEXTFLAGS | JavaElementLabelsCore.F_PRE_TYPE_SIGNATURE);
affectedLocals.append(bindingName);
if (i != localReads.size() - 1) {
affectedLocals.append('\n');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@
import org.eclipse.jdt.ls.core.internal.JavaLanguageServerPlugin;
import org.eclipse.jdt.ls.core.internal.Messages;
import org.eclipse.jdt.ls.core.internal.corrections.ASTResolving;
import org.eclipse.jdt.ls.core.internal.hover.JavaElementLabels;
import org.eclipse.jdt.internal.core.manipulation.JavaElementLabelsCore;
import org.eclipse.ltk.core.refactoring.Change;
import org.eclipse.ltk.core.refactoring.Refactoring;
import org.eclipse.ltk.core.refactoring.RefactoringChangeDescriptor;
Expand Down Expand Up @@ -573,7 +573,7 @@ private final ExtractLocalDescriptor createRefactoringDescriptor() {
final BodyDeclaration decl = ASTNodes.getParent(fSelectedExpression.getAssociatedExpression(), BodyDeclaration.class);
if (decl instanceof MethodDeclaration) {
final IMethodBinding method = ((MethodDeclaration) decl).resolveBinding();
final String label = method != null ? BindingLabelProviderCore.getBindingLabel(method, JavaElementLabels.ALL_FULLY_QUALIFIED) : BasicElementLabels.getJavaElementName('{' + JavaElementLabels.ELLIPSIS_STRING + '}');
final String label = method != null ? BindingLabelProviderCore.getBindingLabel(method, JavaElementLabelsCore.ALL_FULLY_QUALIFIED) : BasicElementLabels.getJavaElementName('{' + JavaElementLabelsCore.ELLIPSIS_STRING + '}');
comment.addSetting(Messages.format(RefactoringCoreMessages.ExtractTempRefactoring_destination_pattern, label));
}
comment.addSetting(Messages.format(RefactoringCoreMessages.ExtractTempRefactoring_expression_pattern, BasicElementLabels.getJavaCodeString(expression)));
Expand Down
Loading

0 comments on commit bae72c2

Please sign in to comment.