From a68cc2e5841b4f7a4774b5513b1653bc73ee2abf Mon Sep 17 00:00:00 2001 From: Hannes Wellmann Date: Tue, 13 Aug 2024 12:40:24 +0200 Subject: [PATCH] Remove unused imports in Java and xtend classes Run the 'Organize imports' action on each class that has unused imports. --- .../text/services/GRandomGrammarAccess.java | 7 ++-- .../text/services/KGraphGrammarAccess.java | 7 ++-- .../kieler/klighd/kgraph/util/KGraphUtil.java | 1 - .../klighd/krendering/KRenderingOptions.java | 2 +- .../krendering/impl/KRenderingImpl.java | 36 +++++-------------- .../impl/KRenderingPackageImpl.java | 26 ++++++-------- .../klighd/lsp/KGraphDiagramGenerator.xtend | 1 - .../klighd/lsp/KGraphDiagramServer.xtend | 2 -- .../lsp/gson_utils/EObjectSerializer.xtend | 1 - .../cs/kieler/klighd/lsp/model/Actions.xtend | 2 -- .../klighd/internal/ILayoutRecorder.java | 1 - .../management/LabelManagementUtil.java | 1 - 12 files changed, 29 insertions(+), 58 deletions(-) diff --git a/plugins/de.cau.cs.kieler.kgraph.text/src-gen/de/cau/cs/kieler/kgraph/text/services/GRandomGrammarAccess.java b/plugins/de.cau.cs.kieler.kgraph.text/src-gen/de/cau/cs/kieler/kgraph/text/services/GRandomGrammarAccess.java index a385e06f7..8763a1ffb 100644 --- a/plugins/de.cau.cs.kieler.kgraph.text/src-gen/de/cau/cs/kieler/kgraph/text/services/GRandomGrammarAccess.java +++ b/plugins/de.cau.cs.kieler.kgraph.text/src-gen/de/cau/cs/kieler/kgraph/text/services/GRandomGrammarAccess.java @@ -3,9 +3,8 @@ */ package de.cau.cs.kieler.kgraph.text.services; -import com.google.inject.Inject; -import com.google.inject.Singleton; import java.util.List; + import org.eclipse.xtext.Action; import org.eclipse.xtext.Alternatives; import org.eclipse.xtext.Assignment; @@ -20,10 +19,12 @@ import org.eclipse.xtext.TerminalRule; import org.eclipse.xtext.UnorderedGroup; import org.eclipse.xtext.common.services.TerminalsGrammarAccess; -import org.eclipse.xtext.service.AbstractElementFinder.AbstractEnumRuleElementFinder; import org.eclipse.xtext.service.AbstractElementFinder.AbstractGrammarElementFinder; import org.eclipse.xtext.service.GrammarProvider; +import com.google.inject.Inject; +import com.google.inject.Singleton; + @Singleton public class GRandomGrammarAccess extends AbstractGrammarElementFinder { diff --git a/plugins/de.cau.cs.kieler.kgraph.text/src-gen/de/cau/cs/kieler/kgraph/text/services/KGraphGrammarAccess.java b/plugins/de.cau.cs.kieler.kgraph.text/src-gen/de/cau/cs/kieler/kgraph/text/services/KGraphGrammarAccess.java index 1ddd22839..3a89216e4 100644 --- a/plugins/de.cau.cs.kieler.kgraph.text/src-gen/de/cau/cs/kieler/kgraph/text/services/KGraphGrammarAccess.java +++ b/plugins/de.cau.cs.kieler.kgraph.text/src-gen/de/cau/cs/kieler/kgraph/text/services/KGraphGrammarAccess.java @@ -3,9 +3,8 @@ */ package de.cau.cs.kieler.kgraph.text.services; -import com.google.inject.Inject; -import com.google.inject.Singleton; import java.util.List; + import org.eclipse.xtext.Action; import org.eclipse.xtext.Alternatives; import org.eclipse.xtext.Assignment; @@ -20,10 +19,12 @@ import org.eclipse.xtext.RuleCall; import org.eclipse.xtext.TerminalRule; import org.eclipse.xtext.UnorderedGroup; -import org.eclipse.xtext.service.AbstractElementFinder.AbstractEnumRuleElementFinder; import org.eclipse.xtext.service.AbstractElementFinder.AbstractGrammarElementFinder; import org.eclipse.xtext.service.GrammarProvider; +import com.google.inject.Inject; +import com.google.inject.Singleton; + @Singleton public class KGraphGrammarAccess extends AbstractGrammarElementFinder { diff --git a/plugins/de.cau.cs.kieler.klighd.kgraph/src/de/cau/cs/kieler/klighd/kgraph/util/KGraphUtil.java b/plugins/de.cau.cs.kieler.klighd.kgraph/src/de/cau/cs/kieler/klighd/kgraph/util/KGraphUtil.java index 022c8479e..cc4255e94 100644 --- a/plugins/de.cau.cs.kieler.klighd.kgraph/src/de/cau/cs/kieler/klighd/kgraph/util/KGraphUtil.java +++ b/plugins/de.cau.cs.kieler.klighd.kgraph/src/de/cau/cs/kieler/klighd/kgraph/util/KGraphUtil.java @@ -31,7 +31,6 @@ import org.eclipse.elk.graph.ElkEdge; import org.eclipse.elk.graph.ElkGraphElement; import org.eclipse.elk.graph.ElkNode; -import org.eclipse.elk.graph.ElkPort; import org.eclipse.elk.graph.util.ElkGraphUtil; import org.eclipse.emf.common.util.AbstractTreeIterator; import org.eclipse.emf.common.util.TreeIterator; diff --git a/plugins/de.cau.cs.kieler.klighd.krendering/src-custom/de/cau/cs/kieler/klighd/krendering/KRenderingOptions.java b/plugins/de.cau.cs.kieler.klighd.krendering/src-custom/de/cau/cs/kieler/klighd/krendering/KRenderingOptions.java index b17cb9a97..fea1cc0e9 100644 --- a/plugins/de.cau.cs.kieler.klighd.krendering/src-custom/de/cau/cs/kieler/klighd/krendering/KRenderingOptions.java +++ b/plugins/de.cau.cs.kieler.klighd.krendering/src-custom/de/cau/cs/kieler/klighd/krendering/KRenderingOptions.java @@ -16,8 +16,8 @@ */ package de.cau.cs.kieler.klighd.krendering; -import de.cau.cs.kieler.klighd.krendering.KRendering; import java.util.EnumSet; + import org.eclipse.elk.core.data.ILayoutMetaDataProvider; import org.eclipse.elk.core.data.LayoutOptionData; import org.eclipse.elk.graph.properties.IProperty; diff --git a/plugins/de.cau.cs.kieler.klighd.krendering/src/de/cau/cs/kieler/klighd/krendering/impl/KRenderingImpl.java b/plugins/de.cau.cs.kieler.klighd.krendering/src/de/cau/cs/kieler/klighd/krendering/impl/KRenderingImpl.java index deddb4381..01d5269c6 100644 --- a/plugins/de.cau.cs.kieler.klighd.krendering/src/de/cau/cs/kieler/klighd/krendering/impl/KRenderingImpl.java +++ b/plugins/de.cau.cs.kieler.klighd.krendering/src/de/cau/cs/kieler/klighd/krendering/impl/KRenderingImpl.java @@ -16,45 +16,27 @@ */ package de.cau.cs.kieler.klighd.krendering.impl; -import de.cau.cs.kieler.klighd.kgraph.EMapPropertyHolder; -import de.cau.cs.kieler.klighd.kgraph.KGraphData; -import de.cau.cs.kieler.klighd.kgraph.KGraphPackage; -import de.cau.cs.kieler.klighd.kgraph.PersistentEntry; - -import de.cau.cs.kieler.klighd.kgraph.impl.IPropertyToObjectMapImpl; - -import de.cau.cs.kieler.klighd.kgraph.impl.KGraphDataImpl; -import de.cau.cs.kieler.klighd.krendering.KAction; -import de.cau.cs.kieler.klighd.krendering.KContainerRendering; -import de.cau.cs.kieler.klighd.krendering.KPlacementData; -import de.cau.cs.kieler.klighd.krendering.KRendering; -import de.cau.cs.kieler.klighd.krendering.KRenderingPackage; - -import de.cau.cs.kieler.klighd.krendering.KStyle; -import de.cau.cs.kieler.klighd.krendering.KStyleHolder; import java.util.Collection; -import java.util.Map; - -import org.eclipse.elk.graph.properties.IProperty; -import org.eclipse.elk.graph.properties.IPropertyHolder; import org.eclipse.emf.common.notify.Notification; import org.eclipse.emf.common.notify.NotificationChain; - import org.eclipse.emf.common.util.EList; -import org.eclipse.emf.common.util.EMap; - import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EStructuralFeature; import org.eclipse.emf.ecore.InternalEObject; - import org.eclipse.emf.ecore.impl.ENotificationImpl; - import org.eclipse.emf.ecore.util.EObjectContainmentEList; -import org.eclipse.emf.ecore.util.EcoreEMap; import org.eclipse.emf.ecore.util.EcoreUtil; import org.eclipse.emf.ecore.util.InternalEList; +import de.cau.cs.kieler.klighd.kgraph.impl.KGraphDataImpl; +import de.cau.cs.kieler.klighd.krendering.KAction; +import de.cau.cs.kieler.klighd.krendering.KContainerRendering; +import de.cau.cs.kieler.klighd.krendering.KPlacementData; +import de.cau.cs.kieler.klighd.krendering.KRendering; +import de.cau.cs.kieler.klighd.krendering.KRenderingPackage; +import de.cau.cs.kieler.klighd.krendering.KStyle; +import de.cau.cs.kieler.klighd.krendering.KStyleHolder; + /** * * An implementation of the model object 'KRendering'. diff --git a/plugins/de.cau.cs.kieler.klighd.krendering/src/de/cau/cs/kieler/klighd/krendering/impl/KRenderingPackageImpl.java b/plugins/de.cau.cs.kieler.klighd.krendering/src/de/cau/cs/kieler/klighd/krendering/impl/KRenderingPackageImpl.java index 54ec9d992..a096f7541 100644 --- a/plugins/de.cau.cs.kieler.klighd.krendering/src/de/cau/cs/kieler/klighd/krendering/impl/KRenderingPackageImpl.java +++ b/plugins/de.cau.cs.kieler.klighd.krendering/src/de/cau/cs/kieler/klighd/krendering/impl/KRenderingPackageImpl.java @@ -16,10 +16,18 @@ */ package de.cau.cs.kieler.klighd.krendering.impl; -import de.cau.cs.kieler.klighd.kgraph.KGraphPackage; - -import de.cau.cs.kieler.klighd.kgraph.impl.KGraphPackageImpl; +import org.eclipse.emf.ecore.EAttribute; +import org.eclipse.emf.ecore.EClass; +import org.eclipse.emf.ecore.EDataType; +import org.eclipse.emf.ecore.EEnum; +import org.eclipse.emf.ecore.EGenericType; +import org.eclipse.emf.ecore.EOperation; +import org.eclipse.emf.ecore.EPackage; +import org.eclipse.emf.ecore.EReference; +import org.eclipse.emf.ecore.ETypeParameter; +import org.eclipse.emf.ecore.impl.EPackageImpl; +import de.cau.cs.kieler.klighd.kgraph.KGraphPackage; import de.cau.cs.kieler.klighd.krendering.Arc; import de.cau.cs.kieler.klighd.krendering.Colors; import de.cau.cs.kieler.klighd.krendering.HorizontalAlignment; @@ -86,18 +94,6 @@ import de.cau.cs.kieler.klighd.krendering.Underline; import de.cau.cs.kieler.klighd.krendering.VerticalAlignment; -import org.eclipse.emf.ecore.EAttribute; -import org.eclipse.emf.ecore.EClass; -import org.eclipse.emf.ecore.EDataType; -import org.eclipse.emf.ecore.EEnum; -import org.eclipse.emf.ecore.EGenericType; -import org.eclipse.emf.ecore.EOperation; -import org.eclipse.emf.ecore.EPackage; -import org.eclipse.emf.ecore.EReference; -import org.eclipse.emf.ecore.ETypeParameter; - -import org.eclipse.emf.ecore.impl.EPackageImpl; - /** * * An implementation of the model Package. diff --git a/plugins/de.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/KGraphDiagramGenerator.xtend b/plugins/de.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/KGraphDiagramGenerator.xtend index aac307a32..fad21258f 100644 --- a/plugins/de.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/KGraphDiagramGenerator.xtend +++ b/plugins/de.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/KGraphDiagramGenerator.xtend @@ -50,7 +50,6 @@ import java.util.List import org.apache.log4j.Logger import org.eclipse.elk.alg.layered.options.LayeredOptions import org.eclipse.elk.core.options.CoreOptions -import org.eclipse.emf.ecore.EObject import org.eclipse.sprotty.Dimension import org.eclipse.sprotty.SEdge import org.eclipse.sprotty.SGraph diff --git a/plugins/de.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/KGraphDiagramServer.xtend b/plugins/de.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/KGraphDiagramServer.xtend index 512d7e1f3..b6623fdfa 100644 --- a/plugins/de.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/KGraphDiagramServer.xtend +++ b/plugins/de.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/KGraphDiagramServer.xtend @@ -51,8 +51,6 @@ import java.util.List import java.util.Map import java.util.ServiceLoader import java.util.Set -import java.util.concurrent.CompletableFuture -import org.apache.log4j.Logger import org.eclipse.core.runtime.Platform import org.eclipse.elk.core.data.LayoutMetaDataService import org.eclipse.elk.core.data.LayoutOptionData diff --git a/plugins/de.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/gson_utils/EObjectSerializer.xtend b/plugins/de.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/gson_utils/EObjectSerializer.xtend index 0eb1d98af..8f9f3e027 100644 --- a/plugins/de.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/gson_utils/EObjectSerializer.xtend +++ b/plugins/de.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/gson_utils/EObjectSerializer.xtend @@ -20,7 +20,6 @@ import com.google.gson.JsonNull import com.google.gson.JsonObject import com.google.gson.JsonSerializationContext import com.google.gson.JsonSerializer -import de.cau.cs.kieler.klighd.KlighdDataManager import de.cau.cs.kieler.klighd.kgraph.EMapPropertyHolder import de.cau.cs.kieler.klighd.kgraph.KInsets import de.cau.cs.kieler.klighd.kgraph.impl.EMapPropertyHolderImpl diff --git a/plugins/de.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/model/Actions.xtend b/plugins/de.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/model/Actions.xtend index 6682e4dbd..407e853a3 100644 --- a/plugins/de.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/model/Actions.xtend +++ b/plugins/de.cau.cs.kieler.klighd.lsp/src/de/cau/cs/kieler/klighd/lsp/model/Actions.xtend @@ -24,8 +24,6 @@ import org.eclipse.sprotty.Action import org.eclipse.sprotty.RequestAction import org.eclipse.sprotty.ResponseAction import org.eclipse.sprotty.SModelElement -import org.eclipse.sprotty.SModelRoot -import org.eclipse.sprotty.UpdateModelAction import org.eclipse.xtend.lib.annotations.Accessors import org.eclipse.xtend.lib.annotations.EqualsHashCode import org.eclipse.xtend.lib.annotations.ToString diff --git a/plugins/de.cau.cs.kieler.klighd/src/de/cau/cs/kieler/klighd/internal/ILayoutRecorder.java b/plugins/de.cau.cs.kieler.klighd/src/de/cau/cs/kieler/klighd/internal/ILayoutRecorder.java index 38fe7e916..aeff7d6a7 100644 --- a/plugins/de.cau.cs.kieler.klighd/src/de/cau/cs/kieler/klighd/internal/ILayoutRecorder.java +++ b/plugins/de.cau.cs.kieler.klighd/src/de/cau/cs/kieler/klighd/internal/ILayoutRecorder.java @@ -20,7 +20,6 @@ import de.cau.cs.kieler.klighd.ZoomStyle; import de.cau.cs.kieler.klighd.kgraph.KGraphElement; -import de.cau.cs.kieler.klighd.kgraph.KNode; /** * A dedicated interface enable the separation of the features provided by diff --git a/plugins/de.cau.cs.kieler.klighd/src/de/cau/cs/kieler/klighd/labels/management/LabelManagementUtil.java b/plugins/de.cau.cs.kieler.klighd/src/de/cau/cs/kieler/klighd/labels/management/LabelManagementUtil.java index 273d7a671..6a56b03a6 100644 --- a/plugins/de.cau.cs.kieler.klighd/src/de/cau/cs/kieler/klighd/labels/management/LabelManagementUtil.java +++ b/plugins/de.cau.cs.kieler.klighd/src/de/cau/cs/kieler/klighd/labels/management/LabelManagementUtil.java @@ -23,7 +23,6 @@ import com.google.common.collect.Iterators; -import de.cau.cs.kieler.klighd.KlighdOptions; import de.cau.cs.kieler.klighd.krendering.KRendering; import de.cau.cs.kieler.klighd.krendering.KRenderingOptions; import de.cau.cs.kieler.klighd.krendering.KRenderingUtil;