Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorddunne2010-09-29 14:40:48 -0400
committerRyan D. Brooks2010-09-29 14:40:48 -0400
commita0515cc8efec86726783704ecad02ea2a4199175 (patch)
tree87e5af165b99fe96fb5f771a1ea676c8d58bcbad /plugins
parentdf4339a8127d547d5c5014815e2d5765930a785d (diff)
downloadorg.eclipse.osee-a0515cc8efec86726783704ecad02ea2a4199175.tar.gz
org.eclipse.osee-a0515cc8efec86726783704ecad02ea2a4199175.tar.xz
org.eclipse.osee-a0515cc8efec86726783704ecad02ea2a4199175.zip
bug: TeamWorkflowExtensions synchronization
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkflowExtensions.java58
1 files changed, 27 insertions, 31 deletions
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkflowExtensions.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkflowExtensions.java
index eaa0f0a5d1b..603cf0607f8 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkflowExtensions.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/artifact/TeamWorkflowExtensions.java
@@ -48,38 +48,34 @@ public final class TeamWorkflowExtensions {
/*
* due to lazy initialization, this function is non-reentrant therefore, the synchronized keyword is necessary
*/
- public static Set<IAtsTeamWorkflow> getAtsTeamWorkflowExtensions() {
- synchronized (teamWorkflowExtensionItems) {
- if (teamWorkflowExtensionItems != null) {
- return teamWorkflowExtensionItems;
- }
- teamWorkflowExtensionItems = new HashSet<IAtsTeamWorkflow>();
+ public synchronized static Set<IAtsTeamWorkflow> getAtsTeamWorkflowExtensions() {
+ if (teamWorkflowExtensionItems != null) {
+ return teamWorkflowExtensionItems;
+ }
+ teamWorkflowExtensionItems = new HashSet<IAtsTeamWorkflow>();
- IExtensionPoint point =
- Platform.getExtensionRegistry().getExtensionPoint("org.eclipse.osee.ats.AtsTeamWorkflow");
- if (point == null) {
- OseeLog.log(AtsPlugin.class, OseeLevel.SEVERE_POPUP, "Can't access AtsTeamWorkflow extension point");
- return teamWorkflowExtensionItems;
- }
- IExtension[] extensions = point.getExtensions();
- for (IExtension extension : extensions) {
- IConfigurationElement[] elements = extension.getConfigurationElements();
- String classname = null;
- String bundleName = null;
- for (IConfigurationElement el : elements) {
- if (el.getName().equals("AtsTeamWorkflow")) {
- classname = el.getAttribute("classname");
- bundleName = el.getContributor().getName();
- if (classname != null && bundleName != null) {
- Bundle bundle = Platform.getBundle(bundleName);
- try {
- Class<?> taskClass = bundle.loadClass(classname);
- Object obj = taskClass.newInstance();
- teamWorkflowExtensionItems.add((IAtsTeamWorkflow) obj);
- } catch (Exception ex) {
- OseeLog.log(AtsPlugin.class, OseeLevel.SEVERE_POPUP, "Error loading AtsTeamWorkflow extension",
- ex);
- }
+ IExtensionPoint point = Platform.getExtensionRegistry().getExtensionPoint("org.eclipse.osee.ats.AtsTeamWorkflow");
+ if (point == null) {
+ OseeLog.log(AtsPlugin.class, OseeLevel.SEVERE_POPUP, "Can't access AtsTeamWorkflow extension point");
+ return teamWorkflowExtensionItems;
+ }
+ IExtension[] extensions = point.getExtensions();
+ for (IExtension extension : extensions) {
+ IConfigurationElement[] elements = extension.getConfigurationElements();
+ String classname = null;
+ String bundleName = null;
+ for (IConfigurationElement el : elements) {
+ if (el.getName().equals("AtsTeamWorkflow")) {
+ classname = el.getAttribute("classname");
+ bundleName = el.getContributor().getName();
+ if (classname != null && bundleName != null) {
+ Bundle bundle = Platform.getBundle(bundleName);
+ try {
+ Class<?> taskClass = bundle.loadClass(classname);
+ Object obj = taskClass.newInstance();
+ teamWorkflowExtensionItems.add((IAtsTeamWorkflow) obj);
+ } catch (Exception ex) {
+ OseeLog.log(AtsPlugin.class, OseeLevel.SEVERE_POPUP, "Error loading AtsTeamWorkflow extension", ex);
}
}
}

Back to the top