Commit 2776914b authored by Simon Barner's avatar Simon Barner

Use org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle

* Instead of deprecated method in AbstractUIPlugin

Issue-Ref: 3939
Issue-Url: https://af3-developer.fortiss.org/issues/3939Signed-off-by: Simon Barner's avatarSimon Barner <barner@fortiss.org>
parent fc928a9f
DiagramUIActivator.java 953dfd0b2257711d94b5e1a91304fa17fe2fd2db GREEN
DiagramUIActivator.java f5063c69c6d39b8a7da2e725bd1e94b6ff089720 YELLOW
......@@ -16,6 +16,8 @@
*******************************************************************************/
package eu.fbk.af3.tools.diagram.ui;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
......@@ -52,6 +54,6 @@ public class DiagramUIActivator extends AbstractUIPlugin {
/** Returns the image descriptor for the given icon file. */
public static ImageDescriptor getImageDescriptor(String path) {
return imageDescriptorFromPlugin(PLUGIN_ID, path);
return imageDescriptorFromBundle(PLUGIN_ID, path).orElse(null);
}
}
AF3AllocationUIActivator.java d0d2f939b1c8a1ba0995a3dc6dfd2c197ab09832 GREEN
AF3AllocationUIActivator.java b7719bf283ba07912c14bacf0a527599f99c6313 YELLOW
......@@ -15,6 +15,8 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.allocation.ui;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
......@@ -58,6 +60,6 @@ public class AF3AllocationUIActivator extends AbstractUIPlugin {
/** Returns the image descriptor for the given icon file. */
public static ImageDescriptor getImageDescriptor(String path) {
return imageDescriptorFromPlugin(PLUGIN_ID, path);
return imageDescriptorFromBundle(PLUGIN_ID, path).orElse(null);
}
}
AF3ComponentUIActivator.java 64ae4377ecc4975ff42fc3dbe70754dd1775dc07 GREEN
AF3ComponentUIActivator.java e23ad4f3ca4df0befbcf8aad2bb54264e9a3bb29 YELLOW
DefaultStyle.java c3b60c89b4917e9d8514812ee1884010d142b616 GREEN
......@@ -15,6 +15,8 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.component.ui;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.fortiss.af3.component.ui.simulator.SimulationManager;
......@@ -61,6 +63,6 @@ public class AF3ComponentUIActivator extends AbstractUIPlugin {
/** Returns the image descriptor for the given icon file. */
public static ImageDescriptor getImageDescriptor(String path) {
return imageDescriptorFromPlugin(PLUGIN_ID, path);
return imageDescriptorFromBundle(PLUGIN_ID, path).orElse(null);
}
}
AF3CosimulationUIActivator.java 820d0fbc30668c2748c9cd7c2b177e8c2c670965 GREEN
AF3CosimulationUIActivator.java 1e581c853ad13a7e4bdc70a401d65c2bf49b77a7 YELLOW
......@@ -15,6 +15,8 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.cosimulation.ui;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
......@@ -59,6 +61,6 @@ public class AF3CosimulationUIActivator extends AbstractUIPlugin {
/** Returns the image descriptor for the given icon file. */
public static ImageDescriptor getImageDescriptor(String path) {
return imageDescriptorFromPlugin(PLUGIN_ID, path);
return imageDescriptorFromBundle(PLUGIN_ID, path).orElse(null);
}
}
AF3ExpressionUIActivator.java 107d818370079bda162847165416f412d7ea751a GREEN
AF3ExpressionUIActivator.java 992a38d73b306c4fb9dc5186fc39e494ab9a9fd8 YELLOW
......@@ -15,6 +15,7 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.expression.ui;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import static org.fortiss.af3.expression.ui.tutorial.DataDictionaryTutorialRootStepProvider.DATA_DICTIONARY_TUTORIAL;
import static org.fortiss.tooling.common.ui.javafx.util.GraphicUtils.getURIString;
......@@ -65,7 +66,7 @@ public class AF3ExpressionUIActivator extends AbstractUIPlugin {
/** Returns the image descriptor for the given icon file. */
public static ImageDescriptor getImageDescriptor(String path) {
return imageDescriptorFromPlugin(PLUGIN_ID, path);
return imageDescriptorFromBundle(PLUGIN_ID, path).orElse(null);
}
/** Returns the FX image URI for the given icon file. */
......
OverviewComparator.java 199353dde8e35028e2ab69002aaa62b2875a23f8 GREEN
OverviewLabelProvider.java b5cecccc2c00791f8b4997bb91b0bea239a90b9b GREEN
OverviewLabelProvider.java a378ea6a3852d55ee4d72506b3220901095ce712 YELLOW
OverviewTreeContentProvider.java 408a2098d6ea2bf29ed0d52077f0cf40650da3a5 GREEN
RequirementsOverviewEditor.java f389b6b976ed79f7fc8e716a1e3d2008e460c84e GREEN
......@@ -15,13 +15,15 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.mira.ui.editor.overview;
import static org.eclipse.ui.plugin.AbstractUIPlugin.imageDescriptorFromPlugin;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import static org.fortiss.af3.mira.ui.AF3MiraUIActivator.PLUGIN_ID;
import static org.fortiss.af3.mira.utils.MiraUtils.getContextElementName;
import static org.fortiss.af3.mira.utils.MiraUtils.getDisplayTypeFor;
import java.util.List;
import java.util.Optional;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
......@@ -43,26 +45,32 @@ import org.fortiss.tooling.kernel.model.INamedCommentedElement;
public class OverviewLabelProvider implements ITableLabelProvider {
/** {@link Image} icon for {@link RequirementsContainer}. */
private static Image requirementsContainerIcon =
imageDescriptorFromPlugin(PLUGIN_ID, "icons/Icon_RequirementsContainer.png")
.createImage();
private static Image requirementsContainerIcon = createImage(
imageDescriptorFromBundle(PLUGIN_ID, "icons/Icon_RequirementsContainer.png"));
/** {@link Image} icon for {@link RequirementsPackage}. */
private static Image requirementsPackageIcon =
imageDescriptorFromPlugin(PLUGIN_ID, "icons/Icon_RequirementsPackage.png")
.createImage();
createImage(imageDescriptorFromBundle(PLUGIN_ID, "icons/Icon_RequirementsPackage.png"));
/** {@link Image} icon for {@link Requirement}. */
private static Image requirementIcon =
imageDescriptorFromPlugin(PLUGIN_ID, "icons/Icon_Document.png").createImage();
createImage(imageDescriptorFromBundle(PLUGIN_ID, "icons/Icon_Document.png"));
/** {@link Image} icon for {@link Glossary}. */
private static Image glossaryIcon =
imageDescriptorFromPlugin(PLUGIN_ID, "icons/Icon_Glossary.png").createImage();
createImage(imageDescriptorFromBundle(PLUGIN_ID, "icons/Icon_Glossary.png"));
/** {@link Image} icon for {@link GlossaryEntry}. */
private static Image entryIcon =
imageDescriptorFromPlugin(PLUGIN_ID, "icons/Icon_Glossary_Entry.png").createImage();
createImage(imageDescriptorFromBundle(PLUGIN_ID, "icons/Icon_Glossary_Entry.png"));
/** Helper method to create {@link Image}. */
private static Image createImage(Optional<ImageDescriptor> imgDescr) {
if(imgDescr.isPresent()) {
return imgDescr.get().createImage();
}
return null;
}
/** {@inheritDoc} */
@Override
......
AnalysisHandler.java 4eec2c87131e80da9b6a76b7dce18ec3704e5612 GREEN
GlossaryEntryHandler.java a46722658b9281ed6dd2c63a8420957be5a0a22d GREEN
GlossaryHandler.java e1fd70e472f3f19714d94ecc2cb5c7d51c364538 GREEN
RequirementHandler.java 0f8a955721b5b3a9a06e27de1ae84174df6331ad GREEN
RequirementsContainerHandler.java ed9813de5f9725f1ceb11be76cefa59eb141b10e GREEN
RequirementsPackageHandler.java 354d0c26957380c0381b04b2a8bba828c60c68aa GREEN
AnalysisHandler.java cf514495913fccf51fcdfdf4e2f1710f735d1b45 YELLOW
GlossaryEntryHandler.java 67babe9c0a8cd156a52f13218f8e4cde41f95c93 YELLOW
GlossaryHandler.java 5a9d2350dc436ad6c58e59dcec8ca7e1a6224857 YELLOW
RequirementHandler.java 5a440f56aa61c93ccb3182823966fe9670cfa62c YELLOW
RequirementsContainerHandler.java 6498823bcbe1305390ce99237e870f2d89f4fbbb YELLOW
RequirementsPackageHandler.java 56204b0f69f3725281e46fc48afa87852ad27e1c YELLOW
......@@ -17,7 +17,7 @@ package org.fortiss.af3.mira.ui.handler;
import static java.util.Collections.sort;
import static org.conqat.lib.commons.string.StringUtils.isEmpty;
import static org.eclipse.ui.plugin.AbstractUIPlugin.imageDescriptorFromPlugin;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import static org.fortiss.af3.mira.ui.AF3MiraUIActivator.PLUGIN_ID;
import static org.fortiss.af3.mira.ui.AF3MiraUIActivator.getFXImageURI;
import static org.fortiss.af3.mira.utils.MiraUtils.ANALYSISNAVIGATORVIEWWEIGHT;
......@@ -66,7 +66,8 @@ public class AnalysisHandler extends ModelElementHandlerBase<Analysis> {
/** {@inheritDoc} */
@Override
public ImageDescriptor getIconImageDescriptor() {
return imageDescriptorFromPlugin(PLUGIN_ID, "icons/Icon_RequirementsAnalysis.png");
return imageDescriptorFromBundle(PLUGIN_ID, "icons/Icon_RequirementsAnalysis.png")
.orElse(null);
}
/** {@inheritDoc} */
......
......@@ -16,7 +16,7 @@
package org.fortiss.af3.mira.ui.handler;
import static org.conqat.lib.commons.string.StringUtils.isEmpty;
import static org.eclipse.ui.plugin.AbstractUIPlugin.imageDescriptorFromPlugin;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import static org.fortiss.af3.mira.ui.AF3MiraUIActivator.PLUGIN_ID;
import static org.fortiss.af3.mira.ui.AF3MiraUIActivator.getFXImageURI;
......@@ -46,7 +46,8 @@ public class GlossaryEntryHandler extends ModelElementHandlerBase<GlossaryEntry>
/** {@inheritDoc} */
@Override
public ImageDescriptor getIconImageDescriptor() {
return imageDescriptorFromPlugin(PLUGIN_ID, "icons/Icon_Glossary_Entry" + ".png");
return imageDescriptorFromBundle(PLUGIN_ID, "icons/Icon_Glossary_Entry" + ".png")
.orElse(null);
}
/** {@inheritDoc} */
......
......@@ -17,7 +17,7 @@ package org.fortiss.af3.mira.ui.handler;
import static java.util.Collections.sort;
import static org.conqat.lib.commons.string.StringUtils.isEmpty;
import static org.eclipse.ui.plugin.AbstractUIPlugin.imageDescriptorFromPlugin;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import static org.fortiss.af3.mira.ui.AF3MiraUIActivator.PLUGIN_ID;
import static org.fortiss.af3.mira.ui.AF3MiraUIActivator.getFXImageURI;
import static org.fortiss.af3.mira.utils.MiraUtils.GLOSSARYNAVIGATORVIEWWEIGHT;
......@@ -61,7 +61,7 @@ public class GlossaryHandler extends ModelElementHandlerBase<Glossary> {
/** {@inheritDoc} */
@Override
public ImageDescriptor getIconImageDescriptor() {
return imageDescriptorFromPlugin(PLUGIN_ID, "icons/Icon_Glossary.png");
return imageDescriptorFromBundle(PLUGIN_ID, "icons/Icon_Glossary.png").orElse(null);
}
/** {@inheritDoc} */
......
......@@ -16,7 +16,7 @@
package org.fortiss.af3.mira.ui.handler;
import static org.conqat.lib.commons.string.StringUtils.isEmpty;
import static org.eclipse.ui.plugin.AbstractUIPlugin.imageDescriptorFromPlugin;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import static org.fortiss.af3.mira.ui.AF3MiraUIActivator.PLUGIN_ID;
import static org.fortiss.af3.mira.ui.AF3MiraUIActivator.getFXImageURI;
......@@ -51,7 +51,7 @@ public class RequirementHandler extends NamedCommentedModelElementHandlerBase<Re
/** {@inheritDoc} */
@Override
public ImageDescriptor getIconImageDescriptor(Requirement element) {
return imageDescriptorFromPlugin(PLUGIN_ID, "icons/Icon_Requirement.png");
return imageDescriptorFromBundle(PLUGIN_ID, "icons/Icon_Requirement.png").orElse(null);
}
/** {@inheritDoc} */
......
......@@ -17,7 +17,7 @@ package org.fortiss.af3.mira.ui.handler;
import static java.util.Collections.sort;
import static org.conqat.lib.commons.string.StringUtils.isEmpty;
import static org.eclipse.ui.plugin.AbstractUIPlugin.imageDescriptorFromPlugin;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import static org.fortiss.af3.mira.ui.AF3MiraUIActivator.PLUGIN_ID;
import static org.fortiss.af3.mira.ui.AF3MiraUIActivator.getFXImageURI;
import static org.fortiss.af3.mira.utils.MiraUtils.REQUIREMENTSCONTAINERNAVIGATORVIEWWEIGHT;
......@@ -66,7 +66,8 @@ public class RequirementsContainerHandler extends ModelElementHandlerBase<Requir
/** {@inheritDoc} */
@Override
public ImageDescriptor getIconImageDescriptor() {
return imageDescriptorFromPlugin(PLUGIN_ID, "icons/Icon_RequirementsContainer.png");
return imageDescriptorFromBundle(PLUGIN_ID, "icons/Icon_RequirementsContainer.png")
.orElse(null);
}
/** {@inheritDoc} */
......
......@@ -17,7 +17,7 @@ package org.fortiss.af3.mira.ui.handler;
import static java.util.Collections.sort;
import static org.conqat.lib.commons.string.StringUtils.isEmpty;
import static org.eclipse.ui.plugin.AbstractUIPlugin.imageDescriptorFromPlugin;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import static org.fortiss.af3.mira.ui.AF3MiraUIActivator.PLUGIN_ID;
import static org.fortiss.af3.mira.ui.AF3MiraUIActivator.getFXImageURI;
......@@ -65,7 +65,8 @@ public class RequirementsPackageHandler extends ModelElementHandlerBase<Requirem
/** {@inheritDoc} */
@Override
public ImageDescriptor getIconImageDescriptor() {
return imageDescriptorFromPlugin(PLUGIN_ID, "icons/Icon_RequirementsPackage.png");
return imageDescriptorFromBundle(PLUGIN_ID, "icons/Icon_RequirementsPackage.png")
.orElse(null);
}
/** {@inheritDoc} */
......
AF3ModeUIActivator.java 97d6c993ff74db991b9ea778f751af769d0429a2 GREEN
AF3ModeUIActivator.java a4da5af9f53b2a33f48d9b089eb43b40138ac9fd YELLOW
......@@ -15,6 +15,8 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.mode.ui;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
......@@ -53,6 +55,6 @@ public class AF3ModeUIActivator extends AbstractUIPlugin {
/** Returns the image descriptor for the given icon file. */
public static ImageDescriptor getImageDescriptor(String path) {
return imageDescriptorFromPlugin(PLUGIN_ID, path);
return imageDescriptorFromBundle(PLUGIN_ID, path).orElse(null);
}
}
AF3OperatorpanelUIActivator.java a81b2456e732db25967cd69bdf44c522fa662006 GREEN
AF3OperatorpanelUIActivator.java beddfbba351aa4a6e8686af95e99c4ffd2a0648e YELLOW
......@@ -15,7 +15,7 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.operatorpanel.ui;
import static org.eclipse.ui.plugin.AbstractUIPlugin.imageDescriptorFromPlugin;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import static org.fortiss.tooling.common.ui.javafx.util.GraphicUtils.getURIString;
import org.eclipse.core.runtime.Plugin;
......@@ -56,7 +56,7 @@ public class AF3OperatorpanelUIActivator extends Plugin {
/** Returns the image descriptor for the given icon file. */
public static ImageDescriptor getImageDescriptor(String path) {
return imageDescriptorFromPlugin(PLUGIN_ID, path);
return imageDescriptorFromBundle(PLUGIN_ID, path).orElse(null);
}
/** Returns the FX image URI for the given icon file. */
......
AF3PartitionUIActivator.java b50e0e736acece40b219c0c7ca80b068ae4bda53 GREEN
AF3PartitionUIActivator.java 5d48e0a9dfdb188728d7e1a9ed234b3ae96cb1dd YELLOW
DefaultStyle.java d1ca8acfc5481faf934709edd6ce5016a00c0735 GREEN
PartitionRectangle.java 1da226f9b3d4ce058f639f8f8688b08768247af2 GREEN
......@@ -15,6 +15,8 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.partition.ui;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
......@@ -58,6 +60,6 @@ public class AF3PartitionUIActivator extends AbstractUIPlugin {
/** Returns the image descriptor for the given icon file. */
public static ImageDescriptor getImageDescriptor(String path) {
return imageDescriptorFromPlugin(PLUGIN_ID, path);
return imageDescriptorFromBundle(PLUGIN_ID, path).orElse(null);
}
}
HierarchicPlatformUIActivator.java 9db24b85e5f85c851a4c0e6cfe5bad4f2d3549fa GREEN
HierarchicPlatformUIActivator.java 712e15966c167521954c222fbad049b3a10d904b YELLOW
......@@ -15,6 +15,8 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.hierarchic.ui;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
......@@ -54,6 +56,6 @@ public class HierarchicPlatformUIActivator extends AbstractUIPlugin {
/** Returns the image descriptor for the given icon file. */
public static ImageDescriptor getImageDescriptor(String path) {
return imageDescriptorFromPlugin(PLUGIN_ID, path);
return imageDescriptorFromBundle(PLUGIN_ID, path).orElse(null);
}
}
AF3PlatformUIActivator.java 32ed6435954f9da6d6b593da850a52ba45bdd03e GREEN
AF3PlatformUIActivator.java d1787878f90fae64ea202415075b05a9e556ad41 YELLOW
DefaultStyle.java fb9b263c542b5c762e6eb9cff628422e0c26befa GREEN
......@@ -15,6 +15,8 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.platform.ui;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
......@@ -53,6 +55,6 @@ public class AF3PlatformUIActivator extends AbstractUIPlugin {
/** Returns the image descriptor for the given icon file. */
public static ImageDescriptor getImageDescriptor(String path) {
return imageDescriptorFromPlugin(PLUGIN_ID, path);
return imageDescriptorFromBundle(PLUGIN_ID, path).orElse(null);
}
}
AF3ProjectUIActivator.java 726364918120e72b4bd7ced7bf69f4eaf98e6e51 GREEN
AF3ProjectUIActivator.java a4510c0633b3ca4f739caa08d923d78b500a7c4c YELLOW
......@@ -15,6 +15,8 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.project.ui;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
......@@ -53,6 +55,6 @@ public class AF3ProjectUIActivator extends AbstractUIPlugin {
/** Returns the image descriptor for the given icon file. */
public static ImageDescriptor getImageDescriptor(String path) {
return imageDescriptorFromPlugin(PLUGIN_ID, path);
return imageDescriptorFromBundle(PLUGIN_ID, path).orElse(null);
}
}
AF3SafetyUIActivator.java d3d62e0aab9b5144d57ac39a71f54ffedc65f3fe GREEN
AF3SafetyUIActivator.java 3f7f13b08eb2e6bfbfd9ae063b106fba9fb5ca55 YELLOW
......@@ -15,6 +15,8 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.safety.ui;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;
......@@ -58,6 +60,6 @@ public class AF3SafetyUIActivator extends AbstractUIPlugin {
/** Returns the image descriptor for the given icon file. */
public static ImageDescriptor getImageDescriptor(String path) {
return imageDescriptorFromPlugin(PLUGIN_ID, path);
return imageDescriptorFromBundle(PLUGIN_ID, path).orElse(null);
}
}
AF3SafetyCasesUIActivator.java 77ad2e551270fd89469c6bcdf77f0cffc30265b9 GREEN
AF3SafetyCasesUIActivator.java f1f4a24ee67283a9410be9ec2bb0442f2553f7bc YELLOW
DefaultStyle.java 3ba5df36d48da2b55bc8137932fc6defacba466e GREEN
......@@ -15,6 +15,8 @@
+--------------------------------------------------------------------------*/
package org.fortiss.af3.safetycases.ui;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import java.io.InputStream;
import java.net.URL;
import java.util.HashMap;
......@@ -65,7 +67,7 @@ public class AF3SafetyCasesUIActivator extends AbstractUIPlugin {
/** Returns the image descriptor for the given icon file. */
public static ImageDescriptor getImageDescriptor(String path) {
return imageDescriptorFromPlugin(PLUGIN_ID, path);
return imageDescriptorFromBundle(PLUGIN_ID, path).orElse(null);
}
/** The image cache of loaded images. */
......
ConnectAssumptionToAF3Mode.java 4888f207bfd7a1291799af056658fcc58ad4a7a7 GREEN
ConnectAssumptionToAF3State.java a48774ed18bbb8917366bb87e02342184209cdaa GREEN
ConnectAssumptionToInputPortsAction.java 5b240c6b01fd141283b3a5c134da20897b668d72 GREEN
ConnectAwayContextToContextAction.java 08b3219207d44088992772ec158a8c880b608ec8 GREEN
ConnectAwayGoalToGoalAction.java d3080159fc15464de8ceac0957cf7f76f4fa7717 GREEN
ConnectAwaySolutionToSolutionAction.java 9ed0f42b2f5c9990fde3fe8abd8a05fba26eb1a4 GREEN
ConnectContextToInputPortsAction.java 06dbb5bf5d5f6fdd8e573acfb777f1e1d4866d3e GREEN
ConnectContextToOutputPortsAction.java d88c97008087289c50d1447ba9a411b4fc01c2b4 GREEN
ConnectGoalToAF3LogicalComponentAction.java 792d22985a30eab7b30d90b4d8d20cbf55396240 GREEN
ConnectGoalToSafetyRequirementAction.java f169934b982d2beff640048f2112fa92905b701d RED
ConnectSolutionToAF3PlatformEvidenceAction.java c01f45d14cb45d3234a4123cb7913f42c8c198de GREEN
ConnectSolutionToGeneratedCode.java 426397d3a0e02954ec90d1cf6a22e896ff0db395 GREEN
ConnectAssumptionToAF3Mode.java 8dc15d9a4265f815af1ca65389d2f6829afae975 YELLOW
ConnectAssumptionToAF3State.java 8ba58e73ba9d61ac06ecc86867b633086391a2f5 YELLOW
ConnectAssumptionToInputPortsAction.java 9701858808932a2fd7ee59ab2cae1d2ca00b3136 YELLOW
ConnectAwayContextToContextAction.java 999f140af2c6b51e69ecb9601d72262fb9943d89 YELLOW
ConnectAwayGoalToGoalAction.java f3759db771f9eaa662883e27cfbdcabef9353a97 YELLOW
ConnectAwaySolutionToSolutionAction.java 03377b379eb08b4075b798d2e287aa5be93ad1ea YELLOW
ConnectContextToInputPortsAction.java 4418ea42cd107f240fa87b594083c9bc8ea6f482 YELLOW
ConnectContextToOutputPortsAction.java a68912fc8f50dd884b7a9575008f645b8f43da1f YELLOW
ConnectGoalToAF3LogicalComponentAction.java 8c167ce5d8d4d748f0f22050bd593996788eae76 YELLOW
ConnectSolutionToAF3PlatformEvidenceAction.java bcbf81da1398d64988c8acb5cb0b29bf83162de9 YELLOW
ConnectSolutionToGeneratedCode.java e7d981bcf0e5fc304bb12c8df3e463098ad38e51 YELLOW
DownloadSafetyClaimPatternsDatabaseFromLibrary.java 8d47597b2d89dc72c99fab55666f4fc416a7a5c4 GREEN
......@@ -16,7 +16,7 @@
package org.fortiss.af3.safetycases.ui.action;
import static org.eclipse.jface.dialogs.MessageDialog.openWarning;
import static org.eclipse.ui.plugin.AbstractUIPlugin.imageDescriptorFromPlugin;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import static org.fortiss.af3.safetycases.ui.AF3SafetyCasesUIActivator.PLUGIN_ID;
import static org.fortiss.af3.safetycases.ui.utils.AF3SelectionDialogUtils.openAF3Modes;
import static org.fortiss.af3.safetycases.ui.utils.Utils.scopeAF3ElementToArgumentElement;
......@@ -49,7 +49,7 @@ public class ConnectAssumptionToAF3Mode extends EObjectActionBase<Assumption> {
/** Constructor. */
public ConnectAssumptionToAF3Mode(Assumption editedObject, Shell shell) {
super("ConnectAssumptionToAF3Mode",
imageDescriptorFromPlugin(PLUGIN_ID, "icons/unkown.png"));
imageDescriptorFromBundle(PLUGIN_ID, "icons/unkown.png").orElse(null));
setTarget(editedObject);
this.shell = shell;
}
......
......@@ -16,7 +16,7 @@
package org.fortiss.af3.safetycases.ui.action;
import static org.eclipse.jface.dialogs.MessageDialog.openWarning;
import static org.eclipse.ui.plugin.AbstractUIPlugin.imageDescriptorFromPlugin;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import static org.fortiss.af3.safetycases.ui.AF3SafetyCasesUIActivator.PLUGIN_ID;
import static org.fortiss.af3.safetycases.ui.utils.AF3SelectionDialogUtils.openAF3State;
import static org.fortiss.af3.safetycases.ui.utils.Utils.scopeAF3ElementToArgumentElement;
......@@ -48,7 +48,7 @@ public class ConnectAssumptionToAF3State extends EObjectActionBase<Assumption> {
/** Constructor. */
public ConnectAssumptionToAF3State(Assumption editedObject, Shell shell) {
super("ConnectAssumptionToAF3Mode",
imageDescriptorFromPlugin(PLUGIN_ID, "icons/unkown.png"));
imageDescriptorFromBundle(PLUGIN_ID, "icons/unkown.png").orElse(null));
setTarget(editedObject);
this.shell = shell;
}
......
......@@ -16,7 +16,7 @@
package org.fortiss.af3.safetycases.ui.action;
import static org.eclipse.jface.dialogs.MessageDialog.openError;
import static org.eclipse.ui.plugin.AbstractUIPlugin.imageDescriptorFromPlugin;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import static org.fortiss.af3.safetycases.ui.AF3SafetyCasesUIActivator.PLUGIN_ID;
import static org.fortiss.af3.safetycases.ui.utils.AF3SelectionDialogUtils.openLogicalComponents;
import static org.fortiss.af3.safetycases.ui.utils.Utils.messageChangeReferencedInputPorts;
......@@ -50,7 +50,7 @@ public class ConnectAssumptionToInputPortsAction extends EObjectActionBase<Assum
/** Constructor. */
public ConnectAssumptionToInputPortsAction(Assumption editedObject, Shell shell) {
super("ConnectPortsToAssumption",
imageDescriptorFromPlugin(PLUGIN_ID, "Icon_Requirement.png"));
imageDescriptorFromBundle(PLUGIN_ID, "Icon_Requirement.png").orElse(null));
setTarget(editedObject);
this.shell = shell;
}
......
......@@ -17,7 +17,7 @@ package org.fortiss.af3.safetycases.ui.action;
import static org.eclipse.jface.dialogs.MessageDialog.openConfirm;
import static org.eclipse.jface.dialogs.MessageDialog.openError;
import static org.eclipse.ui.plugin.AbstractUIPlugin.imageDescriptorFromPlugin;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import static org.fortiss.af3.safetycases.ui.AF3SafetyCasesUIActivator.PLUGIN_ID;
import static org.fortiss.af3.safetycases.ui.utils.GSNSelectionDialogUtils.openContexts;
import static org.fortiss.tooling.kernel.utils.KernelModelElementUtils.getRootElements;
......@@ -46,7 +46,8 @@ public class ConnectAwayContextToContextAction extends EObjectActionBase<AwayCon
/** Constructor. */
public ConnectAwayContextToContextAction(AwayContext editedObject, Shell shell) {
super("ConnectContextToAwayContext", imageDescriptorFromPlugin(PLUGIN_ID, "context.png"));
super("ConnectContextToAwayContext",
imageDescriptorFromBundle(PLUGIN_ID, "context.png").orElse(null));
setTarget(editedObject);
this.shell = shell;
}
......
......@@ -17,7 +17,7 @@ package org.fortiss.af3.safetycases.ui.action;
import static org.eclipse.jface.dialogs.MessageDialog.openConfirm;
import static org.eclipse.jface.dialogs.MessageDialog.openError;
import static org.eclipse.ui.plugin.AbstractUIPlugin.imageDescriptorFromPlugin;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import static org.fortiss.af3.safetycases.ui.AF3SafetyCasesUIActivator.PLUGIN_ID;
import static org.fortiss.af3.safetycases.ui.utils.GSNSelectionDialogUtils.openGoalsToConnectToAwayGoal;
import static org.fortiss.tooling.kernel.service.IPersistencyService.getInstance;
......@@ -46,7 +46,8 @@ public class ConnectAwayGoalToGoalAction extends EObjectActionBase<AwayGoal> {
/** Constructor. */
public ConnectAwayGoalToGoalAction(AwayGoal editedObject, Shell shell) {
super("ConnectGoalToAwayGoal", imageDescriptorFromPlugin(PLUGIN_ID, "goal.png"));
super("ConnectGoalToAwayGoal",
imageDescriptorFromBundle(PLUGIN_ID, "goal.png").orElse(null));
setTarget(editedObject);
this.shell = shell;
}
......
......@@ -17,7 +17,7 @@ package org.fortiss.af3.safetycases.ui.action;
import static org.eclipse.jface.dialogs.MessageDialog.openConfirm;
import static org.eclipse.jface.dialogs.MessageDialog.openError;
import static org.eclipse.ui.plugin.AbstractUIPlugin.imageDescriptorFromPlugin;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import static org.fortiss.af3.safetycases.ui.AF3SafetyCasesUIActivator.PLUGIN_ID;
import static org.fortiss.af3.safetycases.ui.utils.GSNSelectionDialogUtils.openSolutions;
import static org.fortiss.tooling.kernel.service.IPersistencyService.getInstance;
......@@ -47,7 +47,7 @@ public class ConnectAwaySolutionToSolutionAction extends EObjectActionBase<AwayS
/** Constructor. */
public ConnectAwaySolutionToSolutionAction(AwaySolution editedObject, Shell shell) {
super("ConnectSolutionToAwaySolution",
imageDescriptorFromPlugin(PLUGIN_ID, "solution.png"));
imageDescriptorFromBundle(PLUGIN_ID, "solution.png").orElse(null));
setTarget(editedObject);
this.shell = shell;
}
......
......@@ -16,7 +16,7 @@
package org.fortiss.af3.safetycases.ui.action;
import static org.eclipse.jface.dialogs.MessageDialog.openError;
import static org.eclipse.ui.plugin.AbstractUIPlugin.imageDescriptorFromPlugin;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;
import static org.fortiss.af3.safetycases.ui.AF3SafetyCasesUIActivator.PLUGIN_ID;
import static org.fortiss.af3.safetycases.ui.utils.AF3SelectionDialogUtils.openLogicalComponents;
import static org.fortiss.af3.safetycases.ui.utils.Utils.messageChangeReferencedInputPorts;
......@@ -48,7 +48,7 @@ public class ConnectContextToInputPortsAction extends EObjectActionBase<Context>
/** Constructor. */
public ConnectContextToInputPortsAction(Context editedObject, Shell shell) {
super("ConnectPortsToContext", imageDescriptorFromPlugin(PLUGIN_ID, ""));
super("ConnectPortsToContext", imageDescriptorFromBundle(PLUGIN_ID, "").orElse(null));
setTarget(editedObject);
this.shell = shell;
}
......
......@@ -17,8 +17,8 @@ package org.fortiss.af3.safetycases.ui.action;
import static org.eclipse.jface.dialogs.MessageDialog.openConfirm;
import static org.eclipse.jface.dialogs.MessageDialog.openError;
import static org.eclipse.jface.resource.ResourceLocator.imageDescriptorFromBundle;