diff --git a/plugins/org.eclipse.sirius.diagram.sequence/src/org/eclipse/sirius/diagram/sequence/business/api/util/Pair.java b/plugins/org.eclipse.sirius.diagram.sequence/src/org/eclipse/sirius/diagram/sequence/business/api/util/Pair.java index 13cfe5ed9f..de118c24aa 100644 --- a/plugins/org.eclipse.sirius.diagram.sequence/src/org/eclipse/sirius/diagram/sequence/business/api/util/Pair.java +++ b/plugins/org.eclipse.sirius.diagram.sequence/src/org/eclipse/sirius/diagram/sequence/business/api/util/Pair.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2021 THALES GLOBAL SERVICES. + * Copyright (c) 2010, 2024 THALES GLOBAL SERVICES 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 @@ -12,7 +12,7 @@ *******************************************************************************/ package org.eclipse.sirius.diagram.sequence.business.api.util; -import com.google.common.base.Objects; +import java.util.Objects; /** * Generic helper class to hold two elements of the same type. In some @@ -62,32 +62,22 @@ public T second() { return second; } - /** - * {@inheritDoc} - */ @Override public int hashCode() { - return Objects.hashCode(first, second); + return Objects.hash(first, second); } - /** - * {@inheritDoc} - */ @Override public boolean equals(Object obj) { boolean result = false; if (this == obj) { result = true; - } else if (obj instanceof Pair) { - Pair that = (Pair) obj; - result = Objects.equal(this.first, that.first) && Objects.equal(this.second, that.second); + } else if (obj instanceof Pair that) { + result = Objects.equals(this.first, that.first) && Objects.equals(this.second, that.second); } return result; } - /** - * {@inheritDoc} - */ @Override public String toString() { return "<" + String.valueOf(first) + ", " + String.valueOf(second) + ">"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ diff --git a/plugins/org.eclipse.sirius.diagram.sequence/src/org/eclipse/sirius/diagram/sequence/business/internal/operation/SetMessageRangeOperation.java b/plugins/org.eclipse.sirius.diagram.sequence/src/org/eclipse/sirius/diagram/sequence/business/internal/operation/SetMessageRangeOperation.java index 3838b9a050..e7eea1452a 100644 --- a/plugins/org.eclipse.sirius.diagram.sequence/src/org/eclipse/sirius/diagram/sequence/business/internal/operation/SetMessageRangeOperation.java +++ b/plugins/org.eclipse.sirius.diagram.sequence/src/org/eclipse/sirius/diagram/sequence/business/internal/operation/SetMessageRangeOperation.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2021 THALES GLOBAL SERVICES and others. + * Copyright (c) 2010, 2024 THALES GLOBAL SERVICES 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 @@ -12,6 +12,8 @@ *******************************************************************************/ package org.eclipse.sirius.diagram.sequence.business.internal.operation; +import java.util.Objects; + import org.eclipse.draw2d.geometry.Rectangle; import org.eclipse.gmf.runtime.notation.Edge; import org.eclipse.gmf.runtime.notation.View; @@ -21,8 +23,6 @@ import org.eclipse.sirius.diagram.sequence.tool.internal.Messages; import org.eclipse.sirius.diagram.ui.business.internal.operation.AbstractModelChangeOperation; -import com.google.common.base.Objects; - /** * An operation to set the vertical range of a sequence message. * @@ -102,12 +102,12 @@ public Void execute() { Edge currentMessage = message; currentMessage.setSource(source); - if (currentMessage.getElement() instanceof DEdge && source.getElement() instanceof EdgeTarget) { - ((DEdge) currentMessage.getElement()).setSourceNode((EdgeTarget) source.getElement()); + if (currentMessage.getElement() instanceof DEdge edge && source.getElement() instanceof EdgeTarget edgeTarget) { + edge.setSourceNode(edgeTarget); } currentMessage.setTarget(target); - if (currentMessage.getElement() instanceof DEdge && target.getElement() instanceof EdgeTarget) { - ((DEdge) currentMessage.getElement()).setTargetNode((EdgeTarget) target.getElement()); + if (currentMessage.getElement() instanceof DEdge edge && target.getElement() instanceof EdgeTarget edgeTarget) { + edge.setTargetNode(edgeTarget); } int srcTop = sourceBounds.getTop().y; @@ -132,7 +132,7 @@ public Void execute() { private boolean isMessageToSelf(Edge msg) { View src = msg.getSource(); View tgt = msg.getTarget(); - return Objects.equal(src, tgt) || Objects.equal(src.eContainer(), tgt) || Objects.equal(src, tgt.eContainer()); + return Objects.equals(src, tgt) || Objects.equals(src.eContainer(), tgt) || Objects.equals(src, tgt.eContainer()); } } diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/edit/internal/part/listener/SynchronizedStatusPostCommitListener.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/edit/internal/part/listener/SynchronizedStatusPostCommitListener.java index 3db5b4ccea..fe1b5c8195 100644 --- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/edit/internal/part/listener/SynchronizedStatusPostCommitListener.java +++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/edit/internal/part/listener/SynchronizedStatusPostCommitListener.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2017 THALES GLOBAL SERVICES. + * Copyright (c) 2017, 2024 THALES GLOBAL SERVICES 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 @@ -13,6 +13,7 @@ package org.eclipse.sirius.diagram.ui.edit.internal.part.listener; import java.util.Iterator; +import java.util.Objects; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.ecore.EObject; @@ -26,8 +27,6 @@ import org.eclipse.sirius.diagram.ui.tools.internal.figure.SynchronizeStatusFigure; import org.eclipse.ui.PlatformUI; -import com.google.common.base.Objects; - /** * When the DDiagram synchronize state changes, this ResourceSet listener will update
* - the status bar
@@ -74,7 +73,7 @@ public void resourceSetChanged(ResourceSetChangeEvent event) { while (notifs.hasNext()) { Notification notif = notifs.next(); - if (Objects.equal(resolveSemanticElement, notif.getNotifier())) { + if (Objects.equals(resolveSemanticElement, notif.getNotifier())) { SynchronizeStatusFigure.updateNotification((DiagramRootEditPart) diagramEditor.getDiagramEditPart().getRoot()); break; } diff --git a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/format/semantic/AbstractSemanticFormatDataKey.java b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/format/semantic/AbstractSemanticFormatDataKey.java index 8040ea7f7a..ae08b534eb 100644 --- a/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/format/semantic/AbstractSemanticFormatDataKey.java +++ b/plugins/org.eclipse.sirius.diagram.ui/src-diag/org/eclipse/sirius/diagram/ui/tools/internal/format/semantic/AbstractSemanticFormatDataKey.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2016 THALES GLOBAL SERVICES. + * Copyright (c) 2009, 2024 THALES GLOBAL SERVICES 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 @@ -12,12 +12,12 @@ *******************************************************************************/ package org.eclipse.sirius.diagram.ui.tools.internal.format.semantic; +import java.util.Objects; + import org.eclipse.emf.ecore.EObject; import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.sirius.diagram.ui.tools.api.format.FormatDataKey; -import com.google.common.base.Objects; - /** * Common behavior for Semantic*FormatDataKey classes. * @@ -52,21 +52,11 @@ protected String getSemanticElementURIFragment() { return semanticElementURIFragment; } - /** - * {@inheritDoc} - * - * @see java.lang.Object#hashCode() - */ @Override public int hashCode() { - return Objects.hashCode(semanticElementURIFragment); + return Objects.hash(semanticElementURIFragment); } - /** - * {@inheritDoc} - * - * @see java.lang.Object#equals(java.lang.Object) - */ @Override public boolean equals(final Object obj) { boolean result = false; @@ -78,25 +68,16 @@ public boolean equals(final Object obj) { return result; } - /** - * {@inheritDoc} - */ @Override public String toString() { return "Key ID: " + getId(); //$NON-NLS-1$ } - /** - * {@inheritDoc} - */ @Override public String getId() { return getSemanticElementURIFragment(); } - /** - * {@inheritDoc} - */ @Override public int compareTo(final AbstractSemanticFormatDataKey o) { return getId().compareTo(o.getId()); diff --git a/plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/business/internal/helper/task/DropinForNodeTaskCommand.java b/plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/business/internal/helper/task/DropinForNodeTaskCommand.java index f3788e34b2..a87eacf2af 100644 --- a/plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/business/internal/helper/task/DropinForNodeTaskCommand.java +++ b/plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/business/internal/helper/task/DropinForNodeTaskCommand.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2021 THALES GLOBAL SERVICES. + * Copyright (c) 2009, 2024 THALES GLOBAL SERVICES 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 @@ -12,6 +12,8 @@ *******************************************************************************/ package org.eclipse.sirius.diagram.business.internal.helper.task; +import java.util.Objects; + import org.eclipse.emf.ecore.EObject; import org.eclipse.sirius.business.api.helper.task.AbstractCommandTask; import org.eclipse.sirius.common.tools.api.interpreter.IInterpreter; @@ -30,8 +32,6 @@ import org.eclipse.sirius.diagram.tools.api.Messages; import org.eclipse.sirius.tools.api.SiriusPlugin; -import com.google.common.base.Objects; - /** * Default command for dropin node. * @@ -120,7 +120,7 @@ private void handleDNodeListCase(DDiagram parentDiagram) { } else if (abstractDNode instanceof DNode) { ((DNodeList) target).getOwnedBorderedNodes().add((DNode) abstractDNode); } - if (!Objects.equal(abstractDNode, droppedDiagramElement)) { + if (!Objects.equals(abstractDNode, droppedDiagramElement)) { if (moveEdges) { DnDTasksOperations.moveEdges(target, semanticContainer, droppedDiagramElement, abstractDNode); } diff --git a/plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/business/internal/metamodel/helper/StyleHelper.java b/plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/business/internal/metamodel/helper/StyleHelper.java index 0f3c41cf09..d8bf6890fa 100644 --- a/plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/business/internal/metamodel/helper/StyleHelper.java +++ b/plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/business/internal/metamodel/helper/StyleHelper.java @@ -13,6 +13,7 @@ package org.eclipse.sirius.diagram.business.internal.metamodel.helper; import java.util.List; +import java.util.Objects; import org.eclipse.core.runtime.Platform; import org.eclipse.core.runtime.preferences.IPreferencesService; @@ -104,8 +105,6 @@ import org.eclipse.sirius.viewpoint.description.style.LabelStyleDescription; import org.eclipse.sirius.viewpoint.description.style.StyleDescription; -import com.google.common.base.Objects; - /** * This helper class contains utility methods to create and update (refresh) concrete style instances from a style * description. This helper modify sometimes the diagram element to which apply the style (width, height, ...). @@ -293,7 +292,7 @@ private void updateEdgeStyle(final EdgeStyleDescription edgeDescription, final E } catch (final EvaluationException e) { // silent. } - if (!Objects.equal(size, edgeStyle.getSize())) { + if (!Objects.equals(size, edgeStyle.getSize())) { edgeStyle.setSize(size); } } @@ -775,7 +774,7 @@ private void updateBorderedStyleFeatures(BorderedStyleDescription description, B && !style.getCustomFeatures().contains(DiagramPackage.Literals.BORDERED_STYLE__BORDER_SIZE.getName())) { try { Integer borderSize = interpreter.evaluateInteger(((AbstractDNode) style.eContainer()).getTarget(), description.getBorderSizeComputationExpression()); - if (!Objects.equal(borderSize, style.getBorderSize())) { + if (!Objects.equals(borderSize, style.getBorderSize())) { style.setBorderSize(borderSize); } } catch (final EvaluationException e) { @@ -962,7 +961,7 @@ private void updateWorkspaceImage(final WorkspaceImage image, final WorkspaceIma if (image.eContainer() instanceof DNode && description.getSizeComputationExpression() != null) { final DNode node = (DNode) image.eContainer(); Integer size = computeStyleSize(node.getTarget(), description); - if (Objects.equal(-1, size)) { + if (Objects.equals(-1, size)) { // real image size if (!size.equals(node.getHeight())) { node.setHeight(size); diff --git a/plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/business/internal/sync/DDiagramElementSynchronizer.java b/plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/business/internal/sync/DDiagramElementSynchronizer.java index bde000df4b..a833803b00 100644 --- a/plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/business/internal/sync/DDiagramElementSynchronizer.java +++ b/plugins/org.eclipse.sirius.diagram/src/org/eclipse/sirius/diagram/business/internal/sync/DDiagramElementSynchronizer.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2021 THALES GLOBAL SERVICES and others. + * Copyright (c) 2007, 2024 THALES GLOBAL SERVICES 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 @@ -18,6 +18,7 @@ import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.Set; import org.eclipse.emf.common.util.BasicEList; @@ -93,7 +94,6 @@ import org.eclipse.sirius.viewpoint.description.style.StylePackage; import org.eclipse.sirius.viewpoint.description.style.TooltipStyleDescription; -import com.google.common.base.Objects; import com.google.common.collect.ImmutableSet; import com.google.common.collect.Iterables; @@ -596,7 +596,7 @@ private void refreshTooltip(final DDiagramElement elt, final TooltipStyleDescrip if (!StringUtil.isEmpty(style.getTooltipExpression())) { final String oldValue = elt.getTooltipText(); final String newValue = computeTooltip(elt, style); - if (!Objects.equal(newValue, oldValue)) { + if (!Objects.equals(newValue, oldValue)) { elt.setTooltipText(newValue); } } diff --git a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/sequence/AbstractSequenceSiriusDiagramTests.java b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/sequence/AbstractSequenceSiriusDiagramTests.java index d0cead5dfe..825d1b9cc1 100644 --- a/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/sequence/AbstractSequenceSiriusDiagramTests.java +++ b/plugins/org.eclipse.sirius.tests.junit/src/org/eclipse/sirius/tests/unit/diagram/sequence/AbstractSequenceSiriusDiagramTests.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2019 THALES GLOBAL SERVICES. + * Copyright (c) 2010, 2024 THALES GLOBAL SERVICES 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 @@ -14,6 +14,7 @@ import java.io.IOException; import java.util.Collection; +import java.util.Objects; import org.eclipse.core.runtime.NullProgressMonitor; import org.eclipse.draw2d.Polyline; @@ -59,8 +60,6 @@ import org.eclipse.sirius.viewpoint.description.tool.AbstractToolDescription; import org.junit.Assert; -import com.google.common.base.Objects; - public abstract class AbstractSequenceSiriusDiagramTests extends SiriusDiagramTestCase { public static final String UNIT_DATA_ROOT = "/data/sequence/unit/"; @@ -216,7 +215,7 @@ protected Option getLifelineByName(SequenceDiagram sd, String name) { protected Option getLifelineByName(Collection lifelines, String name) { for (Lifeline lifeline : lifelines) { - if (Objects.equal(getLifelineSemanticName(lifeline), name)) { + if (Objects.equals(getLifelineSemanticName(lifeline), name)) { return Options.newSome(lifeline); } } @@ -238,7 +237,7 @@ protected Option getMessageByName(SequenceDiagram sd, String name) { protected Option getMessageByName(Collection messages, String name) { for (Message message : messages) { - if (Objects.equal(getMessageSemanticName(message), name)) { + if (Objects.equals(getMessageSemanticName(message), name)) { return Options.newSome(message); } } @@ -260,7 +259,7 @@ protected Option getInteractionUseByName(SequenceDiagram sd, Str protected Option getInteractionUseByName(Collection ius, String name) { for (InteractionUse iu : ius) { - if (Objects.equal(getInteractionUseSemanticName(iu), name)) { + if (Objects.equals(getInteractionUseSemanticName(iu), name)) { return Options.newSome(iu); } } @@ -282,7 +281,7 @@ protected Option getCombinedFragmentByName(SequenceDiagram sd, protected Option getCombinedFragmentByName(Collection cfs, String name) { for (CombinedFragment cf : cfs) { - if (Objects.equal(getCombinedFragmentSemanticName(cf), name)) { + if (Objects.equals(getCombinedFragmentSemanticName(cf), name)) { return Options.newSome(cf); } } @@ -304,7 +303,7 @@ protected Option getExecutionByName(SequenceDiagram sd, String name) protected Option getExecutionByName(Collection executions, String name) { for (Execution execution : executions) { - if (Objects.equal(getExecutionSemanticName(execution), name)) { + if (Objects.equals(getExecutionSemanticName(execution), name)) { return Options.newSome(execution); } } @@ -326,7 +325,7 @@ protected Option getStateByName(SequenceDiagram sd, String name) { protected Option getStateByName(Collection states, String name) { for (State state : states) { - if (Objects.equal(getStateSemanticName(state), name)) { + if (Objects.equals(getStateSemanticName(state), name)) { return Options.newSome(state); } } @@ -348,7 +347,7 @@ protected Option getOperandByName(SequenceDiagram sd, String name) { protected Option getOperandByName(Collection operands, String name) { for (Operand operand : operands) { - if (Objects.equal(getOperandSemanticName(operand), name)) { + if (Objects.equals(getOperandSemanticName(operand), name)) { return Options.newSome(operand); } } diff --git a/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/api/color/VisualBindingManager.java b/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/api/color/VisualBindingManager.java index e4416fdfb0..6cb3cd6061 100644 --- a/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/api/color/VisualBindingManager.java +++ b/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/api/color/VisualBindingManager.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2021 THALES GLOBAL SERVICES and others. + * Copyright (c) 2007, 2024 THALES GLOBAL SERVICES 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 @@ -21,6 +21,7 @@ import java.util.List; import java.util.Map; import java.util.Map.Entry; +import java.util.Objects; import java.util.Set; import org.eclipse.emf.common.util.URI; @@ -48,8 +49,6 @@ import org.eclipse.swt.graphics.Resource; import org.eclipse.swt.widgets.Display; -import com.google.common.base.Objects; - /** * Take care of computing colors, font or size from integer values. Avoid memory leaks by properly caching and disposing * the corresponding SWT resources. @@ -511,7 +510,7 @@ private static final class PatternDescriptor { * @param backgroundColor * the background color * @param foregrounColor - * the forground color + * the foreground color */ PatternDescriptor(final int x, final int y, final int w, final int h, final Color backgroundColor, final Color foregrounColor) { this.x = x; @@ -527,10 +526,9 @@ public boolean equals(final Object obj) { final boolean result; if (this == obj) { result = true; - } else if (obj instanceof PatternDescriptor) { - final PatternDescriptor that = (PatternDescriptor) obj; + } else if (obj instanceof PatternDescriptor that) { final boolean sameCoordinates = this.x == that.x && this.y == that.y && this.h == that.h && this.w == that.w; - result = sameCoordinates && Objects.equal(this.backgroundColor, that.backgroundColor) && Objects.equal(this.foregroundColor, that.foregroundColor); + result = sameCoordinates && Objects.equals(this.backgroundColor, that.backgroundColor) && Objects.equals(this.foregroundColor, that.foregroundColor); } else { result = false; } @@ -539,7 +537,7 @@ public boolean equals(final Object obj) { @Override public int hashCode() { - return Objects.hashCode(this.x, this.y, this.w, this.h, this.foregroundColor, this.backgroundColor); + return Objects.hash(this.x, this.y, this.w, this.h, this.foregroundColor, this.backgroundColor); } public Pattern createPattern() { @@ -799,7 +797,7 @@ private static final class FontStyleDescriptor { @Override public int hashCode() { - return Objects.hashCode(name, format, size); + return Objects.hash(name, format, size); } @Override @@ -809,7 +807,7 @@ public boolean equals(final Object obj) { result = true; } else if (obj instanceof FontStyleDescriptor) { final FontStyleDescriptor that = (FontStyleDescriptor) obj; - result = Objects.equal(this.name, that.name) && Objects.equal(this.format, that.format) && this.size == that.size; + result = Objects.equals(this.name, that.name) && Objects.equals(this.format, that.format) && this.size == that.size; } else { result = false; } diff --git a/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/views/common/item/AnalysisResourceItemImpl.java b/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/views/common/item/AnalysisResourceItemImpl.java index e5ca50b869..6fe969db74 100644 --- a/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/views/common/item/AnalysisResourceItemImpl.java +++ b/plugins/org.eclipse.sirius.ui/src/org/eclipse/sirius/ui/tools/internal/views/common/item/AnalysisResourceItemImpl.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2009, 2015 THALES GLOBAL SERVICES and others. + * Copyright (c) 2009, 2024 THALES GLOBAL SERVICES 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 @@ -16,6 +16,7 @@ import java.util.Collection; import java.util.Collections; import java.util.List; +import java.util.Objects; import org.eclipse.emf.ecore.resource.Resource; import org.eclipse.sirius.business.api.session.Session; @@ -27,8 +28,6 @@ import org.eclipse.sirius.viewpoint.provider.SiriusEditPlugin; import org.eclipse.swt.graphics.Image; -import com.google.common.base.Objects; - /** * Resource item wrapper class. * @@ -119,7 +118,7 @@ public boolean equals(Object obj) { result = true; } else if (obj instanceof AnalysisResourceItemImpl) { AnalysisResourceItemImpl other = (AnalysisResourceItemImpl) obj; - result = Objects.equal(parent, other.parent) && Objects.equal(resource, other.resource); + result = Objects.equals(parent, other.parent) && Objects.equals(resource, other.resource); } return result; }