summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkwilk2011-07-05 18:39:55 (EDT)
committerRyan D. Brooks2011-07-05 18:39:55 (EDT)
commit77fe1bcef1ed44283402c2aecaf90d1e76ca8fea (patch)
tree6e308c87d88fe9c891c67e68016bb01ea43f8dd7
parentda53851eb2edb1d4f52612775d287c5b6e73daa0 (diff)
downloadorg.eclipse.osee-77fe1bcef1ed44283402c2aecaf90d1e76ca8fea.zip
org.eclipse.osee-77fe1bcef1ed44283402c2aecaf90d1e76ca8fea.tar.gz
org.eclipse.osee-77fe1bcef1ed44283402c2aecaf90d1e76ca8fea.tar.bz2
bug: Prevent BlamContributionManager from creating double instances of all BlamOperation-type objects
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/BlamContributionManager.java13
1 files changed, 9 insertions, 4 deletions
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/BlamContributionManager.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/BlamContributionManager.java
index 67977db..9779e1e 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/BlamContributionManager.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/BlamContributionManager.java
@@ -34,6 +34,8 @@ import org.eclipse.osee.framework.ui.skynet.widgets.xnavigate.XNavigateItemBlam;
*/
public class BlamContributionManager implements IXNavigateCommonItem {
+ private static Collection<AbstractBlam> blams;
+
public static Collection<AbstractBlam> getBlamOperationsNameSort() {
ArrayList<AbstractBlam> blamsSortedByName = new ArrayList<AbstractBlam>();
Map<String, AbstractBlam> blamMap = new HashMap<String, AbstractBlam>();
@@ -49,10 +51,13 @@ public class BlamContributionManager implements IXNavigateCommonItem {
}
public static Collection<AbstractBlam> getBlamOperations() {
- ExtensionDefinedObjects<AbstractBlam> definedObjects =
- new ExtensionDefinedObjects<AbstractBlam>("org.eclipse.osee.framework.ui.skynet.BlamOperation", "Operation",
- "className");
- return definedObjects.getObjects();
+ if (blams == null) {
+ ExtensionDefinedObjects<AbstractBlam> definedObjects =
+ new ExtensionDefinedObjects<AbstractBlam>("org.eclipse.osee.framework.ui.skynet.BlamOperation",
+ "Operation", "className");
+ blams = definedObjects.getObjects();
+ }
+ return blams;
}
private static void createCategories(String[] categoryElements, int index, XNavigateItem parentItem, Map<String, XNavigateItem> nameToParent) throws OseeCoreException {