Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDominic Guss2021-01-12 20:35:12 +0000
committerDominic Guss2021-01-13 16:05:04 +0000
commit42a52f8843dc5ed00fd71e3c77af0f6d74ccd92f (patch)
tree9995ed7c28349519f51f6e8cad4604a4d7cc6a8d
parent24972e226cafdda1d79bb471499eef8d736d1f22 (diff)
downloadorg.eclipse.osee-42a52f8843dc5ed00fd71e3c77af0f6d74ccd92f.tar.gz
org.eclipse.osee-42a52f8843dc5ed00fd71e3c77af0f6d74ccd92f.tar.xz
org.eclipse.osee-42a52f8843dc5ed00fd71e3c77af0f6d74ccd92f.zip
bug[TW18576]: Wrong artifact type icon in NR Beta
Change-Id: Id9666c24c5ea0db2ad3b08259c57944180d5c851 Signed-off-by: Dominic Guss <Dominic.Guss@boeing.com>
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactImageManager.java29
1 files changed, 19 insertions, 10 deletions
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactImageManager.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactImageManager.java
index d3a9c409a41..76b40bc24d0 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactImageManager.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactImageManager.java
@@ -204,7 +204,10 @@ public final class ArtifactImageManager {
}
// Check if image provider provides override for this image
- ArtifactImageProvider imageProvider = getProvider(artifactType);
+ ArtifactImageProvider imageProvider = providersOverrideImageMap.get(artifactType);
+ if (imageProvider == null) {
+ imageProvider = getProvider(artifactType);
+ }
if (imageProvider != null) {
String imageKey = imageProvider.setupImage(artifactType);
if (imageKey != null) {
@@ -221,13 +224,16 @@ public final class ArtifactImageManager {
}
public static ArtifactImageProvider getProvider(ArtifactTypeToken artifactType) {
- for (Entry<ArtifactTypeToken, ArtifactImageProvider> entry : providersOverrideImageMap.entrySet()) {
- if (artifactType.inheritsFrom(entry.getKey())) {
- ArtifactImageProvider imageProvider = entry.getValue();
- return imageProvider;
+ ArtifactImageProvider imageProvider = providersOverrideImageMap.get(artifactType);
+ if (imageProvider == null) {
+ for (Entry<ArtifactTypeToken, ArtifactImageProvider> entry : providersOverrideImageMap.entrySet()) {
+ if (artifactType.inheritsFrom(entry.getKey())) {
+ imageProvider = entry.getValue();
+ break;
+ }
}
}
- return null;
+ return imageProvider;
}
public static Image getImage(Artifact artifact, KeyedImage overlay, Location location) {
@@ -336,12 +342,15 @@ public final class ArtifactImageManager {
}
public static KeyedImage getArtifactTypeImage(ArtifactTypeToken artifactType) {
- for (Entry<ArtifactTypeToken, KeyedImage> entry : artifactTypeImageMap.entrySet()) {
- if (artifactType.inheritsFrom(entry.getKey())) {
- return entry.getValue();
+ KeyedImage image = artifactTypeImageMap.get(artifactType);
+ if (image == null) {
+ for (Entry<ArtifactTypeToken, KeyedImage> entry : artifactTypeImageMap.entrySet()) {
+ if (artifactType.inheritsFrom(entry.getKey())) {
+ image = entry.getValue();
+ }
}
}
- return null;
+ return image;
}
/**

Back to the top