Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrescobar2010-09-21 19:38:16 -0400
committerRyan D. Brooks2010-09-21 19:38:16 -0400
commitf58314602623c7c939a4850735880e23d5b574bc (patch)
tree660337d380c9e1ed5d524887d7621e9a15a2f4a0 /plugins
parentd799b025b9bf629923a0bae85e5a8b47b4fa4952 (diff)
downloadorg.eclipse.osee-f58314602623c7c939a4850735880e23d5b574bc.tar.gz
org.eclipse.osee-f58314602623c7c939a4850735880e23d5b574bc.tar.xz
org.eclipse.osee-f58314602623c7c939a4850735880e23d5b574bc.zip
refactor[ats_BRD6F]: Move OseeStatusContributionItem to ui.plugin
Diffstat (limited to 'plugins')
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditor.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/hyper/HyperView.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/NavigateView.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskEditor.java4
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditor.java4
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditor.java4
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/navigate/CoverageNavigateView.java4
-rw-r--r--plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/OseeStatusContributionItem.java70
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/AdminContributionItem.java28
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactExplorer.java2
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/OseeBuildTypeContributionItem.java20
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/OseeServicesStatusContributionItem.java20
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/OseeStatusContributionItemFactory.java (renamed from plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/OseeContributionItem.java)72
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ResServiceContributionItem.java3
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/SessionContributionItem.java20
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/ArtifactEditor.java4
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/ArtifactEditorContributor.java4
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/BlamEditor.java4
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/ChangeReportEditor.java5
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/group/GroupExplorer.java4
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/ResultsEditor.java4
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/QuickSearchView.java4
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/page/ArtifactSearchPage.java4
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/BranchView.java4
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryView.java4
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeView.java4
-rw-r--r--plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/core/TestManagerEditorContributor.java16
27 files changed, 160 insertions, 164 deletions
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditor.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditor.java
index 2157dbced85..0be13309861 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditor.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/editor/SMAEditor.java
@@ -55,7 +55,7 @@ import org.eclipse.osee.framework.ui.plugin.util.Result;
import org.eclipse.osee.framework.ui.skynet.ArtifactImageManager;
import org.eclipse.osee.framework.ui.skynet.AttributesComposite;
import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
-import org.eclipse.osee.framework.ui.skynet.OseeContributionItem;
+import org.eclipse.osee.framework.ui.skynet.OseeStatusContributionItemFactory;
import org.eclipse.osee.framework.ui.skynet.SkynetGuiPlugin;
import org.eclipse.osee.framework.ui.skynet.artifact.editor.AbstractArtifactEditor;
import org.eclipse.osee.framework.ui.skynet.notify.OseeNotificationManager;
@@ -293,7 +293,7 @@ public class SMAEditor extends AbstractArtifactEditor implements ISMAEditorEvent
@Override
protected void createPages() {
super.createPages();
- OseeContributionItem.addTo(this, true);
+ OseeStatusContributionItemFactory.addTo(this, true);
}
private void createMetricsTab() {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/hyper/HyperView.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/hyper/HyperView.java
index 94bcaab3eb6..a84b5a407ca 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/hyper/HyperView.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/hyper/HyperView.java
@@ -48,7 +48,7 @@ import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.ui.plugin.PluginUiImage;
-import org.eclipse.osee.framework.ui.skynet.OseeContributionItem;
+import org.eclipse.osee.framework.ui.skynet.OseeStatusContributionItemFactory;
import org.eclipse.osee.framework.ui.skynet.render.PresentationType;
import org.eclipse.osee.framework.ui.skynet.render.RendererManager;
import org.eclipse.osee.framework.ui.swt.Displays;
@@ -228,7 +228,7 @@ public class HyperView extends ViewPart implements IPartListener {
if (HyperView.debugOn) {
System.out.println("createPartControl");
}
- OseeContributionItem.addTo(this, true);
+ OseeStatusContributionItemFactory.addTo(this, true);
canvas = new FigureCanvas(parent);
canvas.setScrollBarVisibility(FigureCanvas.ALWAYS);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/NavigateView.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/NavigateView.java
index 970efdd09c3..5abfd5c5b22 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/NavigateView.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/NavigateView.java
@@ -47,7 +47,7 @@ import org.eclipse.osee.framework.plugin.core.IActionable;
import org.eclipse.osee.framework.skynet.core.UserManager;
import org.eclipse.osee.framework.ui.plugin.OseeUiActions;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem;
-import org.eclipse.osee.framework.ui.skynet.OseeContributionItem;
+import org.eclipse.osee.framework.ui.skynet.OseeStatusContributionItemFactory;
import org.eclipse.osee.framework.ui.skynet.action.CollapseAllAction;
import org.eclipse.osee.framework.ui.skynet.action.ExpandAllAction;
import org.eclipse.osee.framework.ui.skynet.notify.OseeNotificationManager;
@@ -170,7 +170,7 @@ public class NavigateView extends ViewPart implements IActionable {
gridData.heightHint = 15;
label.setLayoutData(gridData);
- OseeContributionItem.addTo(navView, false);
+ OseeStatusContributionItemFactory.addTo(navView, false);
xNavComp.layout();
addExtensionPointListenerBecauseOfWorkspaceLoading();
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskEditor.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskEditor.java
index 8251f9ef8e1..4ada317afeb 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskEditor.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/task/TaskEditor.java
@@ -40,7 +40,7 @@ import org.eclipse.osee.framework.skynet.core.transaction.SkynetTransaction;
import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
import org.eclipse.osee.framework.ui.plugin.util.Result;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite.TableLoadOption;
-import org.eclipse.osee.framework.ui.skynet.OseeContributionItem;
+import org.eclipse.osee.framework.ui.skynet.OseeStatusContributionItemFactory;
import org.eclipse.osee.framework.ui.skynet.artifact.editor.AbstractArtifactEditor;
import org.eclipse.osee.framework.ui.swt.CursorManager;
import org.eclipse.osee.framework.ui.swt.Displays;
@@ -155,7 +155,7 @@ public class TaskEditor extends AbstractArtifactEditor implements IActionable, I
protected void addPages() {
try {
- OseeContributionItem.addTo(this, true);
+ OseeStatusContributionItemFactory.addTo(this, true);
IEditorInput editorInput = getEditorInput();
if (!(editorInput instanceof TaskEditorInput)) {
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditor.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditor.java
index 36893bda8b5..30a2e7e7217 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditor.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/world/WorldEditor.java
@@ -28,7 +28,7 @@ import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.plugin.core.IActionable;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
-import org.eclipse.osee.framework.ui.skynet.OseeContributionItem;
+import org.eclipse.osee.framework.ui.skynet.OseeStatusContributionItemFactory;
import org.eclipse.osee.framework.ui.swt.Displays;
import org.eclipse.osee.framework.ui.swt.IDirtiableEditor;
import org.eclipse.swt.SWT;
@@ -142,7 +142,7 @@ public class WorldEditor extends FormEditor implements IWorldEditor, IDirtiableE
protected void addPages() {
try {
- OseeContributionItem.addTo(this, true);
+ OseeStatusContributionItemFactory.addTo(this, true);
IWorldEditorProvider provider = getWorldEditorProvider();
if (provider instanceof IWorldEditorConsumer) {
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditor.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditor.java
index 2b7919ad7ef..908ddf0a48b 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditor.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditor.java
@@ -39,7 +39,7 @@ import org.eclipse.osee.framework.skynet.core.relation.RelationManager;
import org.eclipse.osee.framework.skynet.core.utility.ElapsedTime;
import org.eclipse.osee.framework.ui.plugin.OseeUiActions;
import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
-import org.eclipse.osee.framework.ui.skynet.OseeContributionItem;
+import org.eclipse.osee.framework.ui.skynet.OseeStatusContributionItemFactory;
import org.eclipse.osee.framework.ui.skynet.SkynetGuiPlugin;
import org.eclipse.osee.framework.ui.swt.Displays;
import org.eclipse.osee.framework.ui.swt.ImageManager;
@@ -67,7 +67,7 @@ public class CoverageEditor extends FormEditor implements IActionable {
@Override
protected void addPages() {
try {
- OseeContributionItem.addTo(this, true);
+ OseeStatusContributionItemFactory.addTo(this, true);
String loadingStr = "Loading Coverage Package \"" + getCoverageEditorInput().getPreLoadName() + "\" ...";
coverageEditorLoadingTab = new CoverageEditorLoadingTab(loadingStr, this);
addFormPage(coverageEditorLoadingTab);
diff --git a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/navigate/CoverageNavigateView.java b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/navigate/CoverageNavigateView.java
index 57baac9c170..648c93f7f5f 100644
--- a/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/navigate/CoverageNavigateView.java
+++ b/plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/navigate/CoverageNavigateView.java
@@ -29,7 +29,7 @@ import org.eclipse.osee.framework.ui.plugin.OseeUiActions;
import org.eclipse.osee.framework.ui.plugin.PluginUiImage;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem;
-import org.eclipse.osee.framework.ui.skynet.OseeContributionItem;
+import org.eclipse.osee.framework.ui.skynet.OseeStatusContributionItemFactory;
import org.eclipse.osee.framework.ui.skynet.util.DbConnectionExceptionComposite;
import org.eclipse.osee.framework.ui.skynet.widgets.XBranchSelectWidget;
import org.eclipse.osee.framework.ui.swt.Displays;
@@ -62,7 +62,7 @@ public class CoverageNavigateView extends ViewPart implements IActionable {
return;
}
- OseeContributionItem.addTo(this, false);
+ OseeStatusContributionItemFactory.addTo(this, false);
Composite comp = new Composite(parent, SWT.None);
comp.setLayoutData(new GridData(SWT.FILL, SWT.NONE, true, false));
diff --git a/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/OseeStatusContributionItem.java b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/OseeStatusContributionItem.java
new file mode 100644
index 00000000000..e9710529f4f
--- /dev/null
+++ b/plugins/org.eclipse.osee.framework.ui.plugin/src/org/eclipse/osee/framework/ui/plugin/OseeStatusContributionItem.java
@@ -0,0 +1,70 @@
+/*******************************************************************************
+ * Copyright (c) 2004, 2007 Boeing.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.osee.framework.ui.plugin;
+
+import org.eclipse.osee.framework.ui.swt.Displays;
+import org.eclipse.swt.graphics.Image;
+import org.eclipse.ui.texteditor.StatusLineContributionItem;
+
+/**
+ * @author Jeff C. Phillips
+ */
+public abstract class OseeStatusContributionItem extends StatusLineContributionItem {
+
+ private boolean isDisposed = false;
+
+ protected OseeStatusContributionItem(String id) {
+ this(id, 4);
+ }
+
+ protected OseeStatusContributionItem(String id, int width) {
+ super(id, true, width);
+ }
+
+ protected abstract String getEnabledToolTip();
+
+ protected abstract String getDisabledToolTip();
+
+ protected abstract Image getEnabledImage();
+
+ protected abstract Image getDisabledImage();
+
+ @Override
+ public void dispose() {
+ this.isDisposed = true;
+ super.dispose();
+ }
+
+ public boolean isDisposed() {
+ return isDisposed;
+ }
+
+ public boolean isCreationAllowed() {
+ return true;
+ }
+
+ public void updateStatus(final boolean isActive) {
+ Displays.ensureInDisplayThread(new Runnable() {
+ @Override
+ public void run() {
+ Image image = isActive ? getEnabledImage() : getDisabledImage();
+ String toolTip = isActive ? getEnabledToolTip() : getDisabledToolTip();
+
+ if (image != null) {
+ setImage(image);
+ }
+ if (toolTip != null) {
+ setToolTipText(toolTip);
+ }
+ }
+ });
+ }
+}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/AdminContributionItem.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/AdminContributionItem.java
index 374d2d1ceec..d3f23e2bb05 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/AdminContributionItem.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/AdminContributionItem.java
@@ -10,22 +10,23 @@
*******************************************************************************/
package org.eclipse.osee.framework.ui.skynet;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.IStatusLineManager;
+import org.eclipse.osee.framework.ui.plugin.OseeStatusContributionItem;
+import org.eclipse.osee.framework.ui.skynet.cm.IOseeCmService;
+import org.eclipse.osee.framework.ui.skynet.cm.OseeCm;
import org.eclipse.osee.framework.ui.swt.ImageManager;
import org.eclipse.swt.graphics.Image;
/**
* @author Donald G. Dunne
*/
-public class AdminContributionItem extends OseeContributionItem {
+public class AdminContributionItem extends OseeStatusContributionItem {
private static final String ID = "ats.admin";
private static String ENABLED_TOOLTIP = "AtsAdmin";
private static String DISABLED_TOOLTIP = "";
- private AdminContributionItem() {
+ public AdminContributionItem() {
super(ID);
init();
}
@@ -34,19 +35,6 @@ public class AdminContributionItem extends OseeContributionItem {
updateStatus(true);
}
- public static void addTo(IStatusLineManager manager) {
- boolean wasFound = false;
- for (IContributionItem item : manager.getItems()) {
- if (item instanceof AdminContributionItem) {
- wasFound = true;
- break;
- }
- }
- if (!wasFound) {
- manager.add(new AdminContributionItem());
- }
- }
-
@Override
protected Image getDisabledImage() {
return ImageManager.getImage(FrameworkImage.EXCLAIM_RED);
@@ -67,4 +55,10 @@ public class AdminContributionItem extends OseeContributionItem {
return ENABLED_TOOLTIP;
}
+ @Override
+ public boolean isCreationAllowed() {
+ IOseeCmService atsService = OseeCm.getInstance();
+ return atsService != null && atsService.isCmAdmin();
+ }
+
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactExplorer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactExplorer.java
index 1c2ee4c90a0..d30f03f852c 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactExplorer.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactExplorer.java
@@ -357,7 +357,7 @@ public class ArtifactExplorer extends ViewPart implements IArtifactExplorerEvent
OseeUiActions.addBugToViewToolbar(this, this, SkynetGuiPlugin.getInstance(), VIEW_ID, "Artifact Explorer");
- OseeContributionItem.addTo(this, false);
+ OseeStatusContributionItemFactory.addTo(this, false);
updateEnablementsEtAl();
trees.add(tree);
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/OseeBuildTypeContributionItem.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/OseeBuildTypeContributionItem.java
index 86e3cd7c364..8495b97b9ad 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/OseeBuildTypeContributionItem.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/OseeBuildTypeContributionItem.java
@@ -15,13 +15,12 @@ import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.osee.framework.core.client.ClientSessionManager;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
import org.eclipse.osee.framework.jdk.core.type.MutableBoolean;
import org.eclipse.osee.framework.jdk.core.util.Strings;
import org.eclipse.osee.framework.plugin.core.util.Jobs;
+import org.eclipse.osee.framework.ui.plugin.OseeStatusContributionItem;
import org.eclipse.osee.framework.ui.skynet.preferences.ConfigurationDetails;
import org.eclipse.osee.framework.ui.swt.ImageManager;
import org.eclipse.swt.SWT;
@@ -34,13 +33,13 @@ import org.eclipse.ui.progress.UIJob;
/**
* @author Roberto E. Escobar
*/
-public class OseeBuildTypeContributionItem extends OseeContributionItem {
+public class OseeBuildTypeContributionItem extends OseeStatusContributionItem {
private static final String ID = "osee.build.type";
private static String TOOLTIP = "Version [%s]\nBuild Type[%s]\nDouble-Click for details";
- private OseeBuildTypeContributionItem() {
+ public OseeBuildTypeContributionItem() {
super(ID);
setActionHandler(new OpenConfigDetailsAction());
updateStatus(true);
@@ -86,19 +85,6 @@ public class OseeBuildTypeContributionItem extends OseeContributionItem {
return version;
}
- public static void addTo(IStatusLineManager manager) {
- boolean wasFound = false;
- for (IContributionItem item : manager.getItems()) {
- if (item instanceof OseeBuildTypeContributionItem) {
- wasFound = true;
- break;
- }
- }
- if (!wasFound) {
- manager.add(new OseeBuildTypeContributionItem());
- }
- }
-
public final static class OpenConfigDetailsAction extends Action {
private final MutableBoolean isSelectionAllowed;
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/OseeServicesStatusContributionItem.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/OseeServicesStatusContributionItem.java
index 35b19baad30..00e754a125f 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/OseeServicesStatusContributionItem.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/OseeServicesStatusContributionItem.java
@@ -10,11 +10,10 @@
*******************************************************************************/
package org.eclipse.osee.framework.ui.skynet;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.osee.framework.logging.IHealthStatus;
import org.eclipse.osee.framework.logging.IStatusListener;
import org.eclipse.osee.framework.logging.OseeLog;
+import org.eclipse.osee.framework.ui.plugin.OseeStatusContributionItem;
import org.eclipse.osee.framework.ui.swt.Displays;
import org.eclipse.osee.framework.ui.swt.ImageManager;
import org.eclipse.osee.framework.ui.swt.OverlayImage;
@@ -23,7 +22,7 @@ import org.eclipse.swt.graphics.Image;
/**
* @author Roberto E. Escobar
*/
-public class OseeServicesStatusContributionItem extends OseeContributionItem implements IStatusListener {
+public class OseeServicesStatusContributionItem extends OseeStatusContributionItem implements IStatusListener {
private static final String ID = "osee.service.status";
private static final Image DISABLED_IMAGE = new OverlayImage(
ImageManager.getImage(FrameworkImage.APPLICATION_SERVER),
@@ -32,7 +31,7 @@ public class OseeServicesStatusContributionItem extends OseeContributionItem imp
private static String errorMessage;
private static String okMessage;
- private OseeServicesStatusContributionItem() {
+ public OseeServicesStatusContributionItem() {
super(ID);
errorMessage = null;
okMessage = null;
@@ -46,19 +45,6 @@ public class OseeServicesStatusContributionItem extends OseeContributionItem imp
super.dispose();
}
- public static void addTo(IStatusLineManager manager) {
- boolean wasFound = false;
- for (IContributionItem item : manager.getItems()) {
- if (item instanceof OseeServicesStatusContributionItem) {
- wasFound = true;
- break;
- }
- }
- if (!wasFound) {
- manager.add(new OseeServicesStatusContributionItem());
- }
- }
-
@Override
protected Image getDisabledImage() {
return DISABLED_IMAGE;
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/OseeContributionItem.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/OseeStatusContributionItemFactory.java
index 5989710a129..fa72d72dccf 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/OseeContributionItem.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/OseeStatusContributionItemFactory.java
@@ -10,63 +10,53 @@
*******************************************************************************/
package org.eclipse.osee.framework.ui.skynet;
+import java.util.logging.Level;
+import org.eclipse.jface.action.IContributionItem;
import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.osee.framework.ui.skynet.cm.IOseeCmService;
-import org.eclipse.osee.framework.ui.skynet.cm.OseeCm;
-import org.eclipse.osee.framework.ui.swt.Displays;
-import org.eclipse.swt.graphics.Image;
+import org.eclipse.osee.framework.logging.OseeLog;
+import org.eclipse.osee.framework.ui.plugin.OseeStatusContributionItem;
import org.eclipse.ui.part.IPageSite;
import org.eclipse.ui.part.MultiPageEditorPart;
import org.eclipse.ui.part.ViewPart;
-import org.eclipse.ui.texteditor.StatusLineContributionItem;
/**
* @author Jeff C. Phillips
*/
-public abstract class OseeContributionItem extends StatusLineContributionItem {
+public final class OseeStatusContributionItemFactory {
- protected OseeContributionItem(String id) {
- this(id, 4);
+ private OseeStatusContributionItemFactory() {
+ // Static Factory Class
}
- protected OseeContributionItem(String id, int width) {
- super(id, true, width);
+ public static void addTo(IStatusLineManager manager) {
+ createItem(manager, OseeBuildTypeContributionItem.class);
+ createItem(manager, ResServiceContributionItem.class);
+ createItem(manager, AdminContributionItem.class);
+ createItem(manager, OseeServicesStatusContributionItem.class);
+ createItem(manager, SessionContributionItem.class);
}
- protected abstract String getEnabledToolTip();
-
- protected abstract String getDisabledToolTip();
-
- protected abstract Image getEnabledImage();
-
- protected abstract Image getDisabledImage();
-
- protected void updateStatus(final boolean isActive) {
- Displays.ensureInDisplayThread(new Runnable() {
- @Override
- public void run() {
- Image image = isActive ? getEnabledImage() : getDisabledImage();
- String toolTip = isActive ? getEnabledToolTip() : getDisabledToolTip();
-
- if (image != null) {
- setImage(image);
- }
- if (toolTip != null) {
- setToolTipText(toolTip);
+ private static void createItem(IStatusLineManager manager, Class<? extends OseeStatusContributionItem> contribClazz) {
+ boolean wasFound = false;
+ for (IContributionItem item : manager.getItems()) {
+ if (contribClazz.isAssignableFrom(item.getClass())) {
+ wasFound = true;
+ break;
+ }
+ }
+ if (!wasFound) {
+ try {
+ OseeStatusContributionItem object = contribClazz.newInstance();
+ if (object.isCreationAllowed()) {
+ manager.add(object);
+ } else {
+ object.dispose();
}
+ } catch (Exception ex) {
+ OseeLog.log(SkynetGuiPlugin.class, Level.SEVERE,
+ String.format("Error creating status line contribution item [%s]", contribClazz), ex);
}
- });
- }
-
- public static void addTo(IStatusLineManager manager) {
- OseeBuildTypeContributionItem.addTo(manager);
- ResServiceContributionItem.addTo(manager);
- IOseeCmService atsService = OseeCm.getInstance();
- if (atsService != null && atsService.isCmAdmin()) {
- AdminContributionItem.addTo(manager);
}
- OseeServicesStatusContributionItem.addTo(manager);
- SessionContributionItem.addTo(manager);
}
public static void addTo(IPageSite pageSite, boolean update) {
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ResServiceContributionItem.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ResServiceContributionItem.java
index ba901a7b477..f7104822827 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ResServiceContributionItem.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ResServiceContributionItem.java
@@ -17,6 +17,7 @@ import org.eclipse.osee.framework.skynet.core.event.OseeEventManager;
import org.eclipse.osee.framework.skynet.core.event.listener.IRemoteEventManagerEventListener;
import org.eclipse.osee.framework.skynet.core.event.model.RemoteEventServiceEventType;
import org.eclipse.osee.framework.skynet.core.event.model.Sender;
+import org.eclipse.osee.framework.ui.plugin.OseeStatusContributionItem;
import org.eclipse.osee.framework.ui.skynet.OseeBuildTypeContributionItem.OpenConfigDetailsAction;
import org.eclipse.osee.framework.ui.swt.Displays;
import org.eclipse.osee.framework.ui.swt.ImageManager;
@@ -26,7 +27,7 @@ import org.eclipse.swt.graphics.Image;
/**
* @author Jeff C. Phillips
*/
-public class ResServiceContributionItem extends OseeContributionItem implements IRemoteEventManagerEventListener {
+public class ResServiceContributionItem extends OseeStatusContributionItem implements IRemoteEventManagerEventListener {
public static final String ID = "res.service";
private static final Image ENABLED_IMAGE = ImageManager.getImageDescriptor(FrameworkImage.RES).createImage();
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/SessionContributionItem.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/SessionContributionItem.java
index ed27827ea37..c1a0062bdf5 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/SessionContributionItem.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/SessionContributionItem.java
@@ -12,8 +12,6 @@ package org.eclipse.osee.framework.ui.skynet;
import java.util.logging.Level;
import org.eclipse.jface.action.Action;
-import org.eclipse.jface.action.IContributionItem;
-import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.osee.framework.core.client.ClientSessionManager;
import org.eclipse.osee.framework.core.exception.OseeCoreException;
@@ -24,6 +22,7 @@ import org.eclipse.osee.framework.skynet.core.event.listener.IAccessControlEvent
import org.eclipse.osee.framework.skynet.core.event.model.AccessControlEvent;
import org.eclipse.osee.framework.skynet.core.event.model.AccessControlEventType;
import org.eclipse.osee.framework.skynet.core.event.model.Sender;
+import org.eclipse.osee.framework.ui.plugin.OseeStatusContributionItem;
import org.eclipse.osee.framework.ui.skynet.dialogs.AuthenticationDialog;
import org.eclipse.osee.framework.ui.swt.Displays;
import org.eclipse.osee.framework.ui.swt.ImageManager;
@@ -34,7 +33,7 @@ import org.eclipse.ui.PlatformUI;
/**
* @author Roberto E. Escobar
*/
-public final class SessionContributionItem extends OseeContributionItem implements IAccessControlEventListener {
+public final class SessionContributionItem extends OseeStatusContributionItem implements IAccessControlEventListener {
private static final String CONTRIBUTION_ITEM_ID = "session.contribution.item";
@@ -44,7 +43,7 @@ public final class SessionContributionItem extends OseeContributionItem implemen
private static final String ENABLED_TOOLTIP = "Authenticated as: %s (%s) - session(%s)\nDouble-Click to Log Off.";
private static final String DISABLED_TOOLTIP = "Not Authenticated.\nDouble-Click to Log On.";
- private SessionContributionItem() {
+ public SessionContributionItem() {
super(CONTRIBUTION_ITEM_ID);
init();
updateStatus(true);
@@ -95,19 +94,6 @@ public final class SessionContributionItem extends OseeContributionItem implemen
}
- public static void addTo(IStatusLineManager manager) {
- boolean wasFound = false;
- for (IContributionItem item : manager.getItems()) {
- if (item instanceof SessionContributionItem) {
- wasFound = true;
- break;
- }
- }
- if (!wasFound) {
- manager.add(new SessionContributionItem());
- }
- }
-
@Override
public void dispose() {
OseeEventManager.removeListener(this);
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/ArtifactEditor.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/ArtifactEditor.java
index 6bfe24d0b0e..d1e1c965425 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/ArtifactEditor.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/ArtifactEditor.java
@@ -22,7 +22,7 @@ import org.eclipse.osee.framework.plugin.core.IActionable;
import org.eclipse.osee.framework.plugin.core.util.Jobs;
import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
-import org.eclipse.osee.framework.ui.skynet.OseeContributionItem;
+import org.eclipse.osee.framework.ui.skynet.OseeStatusContributionItemFactory;
import org.eclipse.osee.framework.ui.skynet.RelationsComposite;
import org.eclipse.osee.framework.ui.skynet.SkynetGuiPlugin;
import org.eclipse.osee.framework.ui.skynet.artifact.editor.pages.ArtifactEditorOutlinePage;
@@ -155,7 +155,7 @@ public class ArtifactEditor extends AbstractEventArtifactEditor {
@Override
protected void addPages() {
- OseeContributionItem.addTo(this, true);
+ OseeStatusContributionItemFactory.addTo(this, true);
setPartName(getEditorInput().getName());
setTitleImage(getEditorInput().getImage());
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/ArtifactEditorContributor.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/ArtifactEditorContributor.java
index 76f3bd2e8e2..ebeac20398e 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/ArtifactEditorContributor.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/ArtifactEditorContributor.java
@@ -16,7 +16,7 @@ import org.eclipse.osee.framework.skynet.core.artifact.Artifact;
import org.eclipse.osee.framework.skynet.core.artifact.ISelectedArtifact;
import org.eclipse.osee.framework.ui.plugin.util.SelectionCountChangeListener;
import org.eclipse.osee.framework.ui.skynet.ArtifactImageManager;
-import org.eclipse.osee.framework.ui.skynet.OseeContributionItem;
+import org.eclipse.osee.framework.ui.skynet.OseeStatusContributionItemFactory;
import org.eclipse.osee.framework.ui.skynet.RelationsComposite;
import org.eclipse.osee.framework.ui.skynet.action.RevealInExplorerAction;
import org.eclipse.ui.IEditorPart;
@@ -65,7 +65,7 @@ public class ArtifactEditorContributor extends MultiPageEditorActionBarContribut
@Override
public void contributeToStatusLine(IStatusLineManager statusLineManager) {
statusLineManager.add(typeStatusItem);
- OseeContributionItem.addTo(statusLineManager);
+ OseeStatusContributionItemFactory.addTo(statusLineManager);
}
@Override
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/BlamEditor.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/BlamEditor.java
index 60014b53c65..e030527d34c 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/BlamEditor.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/BlamEditor.java
@@ -19,7 +19,7 @@ import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.plugin.core.IActionable;
import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
-import org.eclipse.osee.framework.ui.skynet.OseeContributionItem;
+import org.eclipse.osee.framework.ui.skynet.OseeStatusContributionItemFactory;
import org.eclipse.osee.framework.ui.skynet.SkynetGuiPlugin;
import org.eclipse.osee.framework.ui.swt.Displays;
import org.eclipse.osee.framework.ui.swt.IDirtiableEditor;
@@ -61,7 +61,7 @@ public class BlamEditor extends FormEditor implements IDirtiableEditor {
@Override
protected void addPages() {
- OseeContributionItem.addTo(this, true);
+ OseeStatusContributionItemFactory.addTo(this, true);
setPartName(getEditorInput().getName());
setTitleImage(getEditorInput().getImage());
try {
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/ChangeReportEditor.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/ChangeReportEditor.java
index 1d4520ee6a4..758c359b3f5 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/ChangeReportEditor.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/ChangeReportEditor.java
@@ -28,7 +28,7 @@ import org.eclipse.osee.framework.skynet.core.event.model.BranchEventType;
import org.eclipse.osee.framework.skynet.core.event.model.Sender;
import org.eclipse.osee.framework.skynet.core.event.model.TransactionChange;
import org.eclipse.osee.framework.skynet.core.event.model.TransactionEvent;
-import org.eclipse.osee.framework.ui.skynet.OseeContributionItem;
+import org.eclipse.osee.framework.ui.skynet.OseeStatusContributionItemFactory;
import org.eclipse.osee.framework.ui.skynet.SkynetGuiPlugin;
import org.eclipse.osee.framework.ui.skynet.change.ChangeReportActionBarContributor;
import org.eclipse.osee.framework.ui.skynet.change.ChangeReportEditorInput;
@@ -79,14 +79,13 @@ public class ChangeReportEditor extends FormEditor implements IChangeReportView
@Override
protected void addPages() {
- OseeContributionItem.addTo(this, true);
+ OseeStatusContributionItemFactory.addTo(this, true);
try {
changeReportPage = new ChangeReportPage(this);
addPage(changeReportPage);
} catch (PartInitException ex) {
OseeLog.log(SkynetGuiPlugin.class, OseeLevel.SEVERE_POPUP, ex);
}
- OseeContributionItem.addTo(this, true);
OseeEventManager.addListener(eventRelay);
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/group/GroupExplorer.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/group/GroupExplorer.java
index 36a82259336..a6f61c52933 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/group/GroupExplorer.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/group/GroupExplorer.java
@@ -45,7 +45,7 @@ import org.eclipse.osee.framework.ui.plugin.OseeUiActions;
import org.eclipse.osee.framework.ui.plugin.PluginUiImage;
import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
import org.eclipse.osee.framework.ui.skynet.OpenWithMenuListener;
-import org.eclipse.osee.framework.ui.skynet.OseeContributionItem;
+import org.eclipse.osee.framework.ui.skynet.OseeStatusContributionItemFactory;
import org.eclipse.osee.framework.ui.skynet.SkynetGuiPlugin;
import org.eclipse.osee.framework.ui.skynet.listener.IRebuildMenuListener;
import org.eclipse.osee.framework.ui.skynet.menu.ArtifactTreeViewerGlobalMenuHelper;
@@ -146,7 +146,7 @@ public class GroupExplorer extends ViewPart implements IArtifactEventListener, I
treeViewer.getControl().setLayoutData(gridData);
globalMenuHelper = new ArtifactTreeViewerGlobalMenuHelper(treeViewer);
- OseeContributionItem.addTo(this, true);
+ OseeStatusContributionItemFactory.addTo(this, true);
OseeEventManager.addListener(this);
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/ResultsEditor.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/ResultsEditor.java
index f8aedced780..aebc2e20f3c 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/ResultsEditor.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/results/ResultsEditor.java
@@ -22,7 +22,7 @@ import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.plugin.core.IActionable;
import org.eclipse.osee.framework.ui.plugin.OseeUiActions;
import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
-import org.eclipse.osee.framework.ui.skynet.OseeContributionItem;
+import org.eclipse.osee.framework.ui.skynet.OseeStatusContributionItemFactory;
import org.eclipse.osee.framework.ui.skynet.SkynetGuiPlugin;
import org.eclipse.osee.framework.ui.skynet.artifact.editor.AbstractArtifactEditor;
import org.eclipse.osee.framework.ui.skynet.results.html.ResultsEditorHtmlTab;
@@ -49,7 +49,7 @@ public class ResultsEditor extends AbstractArtifactEditor implements IActionable
protected void addPages() {
try {
- OseeContributionItem.addTo(this, true);
+ OseeStatusContributionItemFactory.addTo(this, true);
IResultsEditorProvider provider = getResultsEditorProvider();
List<IResultsEditorTab> tabs = provider.getResultsEditorTabs();
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/QuickSearchView.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/QuickSearchView.java
index acd34419f3d..15bfe44ad4c 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/QuickSearchView.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/QuickSearchView.java
@@ -28,7 +28,7 @@ import org.eclipse.osee.framework.plugin.core.IActionable;
import org.eclipse.osee.framework.skynet.core.artifact.BranchManager;
import org.eclipse.osee.framework.ui.plugin.OseeUiActions;
import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
-import org.eclipse.osee.framework.ui.skynet.OseeContributionItem;
+import org.eclipse.osee.framework.ui.skynet.OseeStatusContributionItemFactory;
import org.eclipse.osee.framework.ui.skynet.SkynetGuiPlugin;
import org.eclipse.osee.framework.ui.skynet.panels.SearchComposite;
import org.eclipse.osee.framework.ui.skynet.util.DbConnectionExceptionComposite;
@@ -162,7 +162,7 @@ public class QuickSearchView extends ViewPart implements IActionable, Listener {
branchSelect.getSelectComposite().getBranchSelectText().setDoubleClickEnabled(true);
}
}
- OseeContributionItem.addTo(this, true);
+ OseeStatusContributionItemFactory.addTo(this, true);
createActions();
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/page/ArtifactSearchPage.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/page/ArtifactSearchPage.java
index cc44f9f86d8..cae0501f60d 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/page/ArtifactSearchPage.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/search/page/ArtifactSearchPage.java
@@ -46,7 +46,7 @@ import org.eclipse.osee.framework.skynet.core.event.model.EventModType;
import org.eclipse.osee.framework.skynet.core.event.model.Sender;
import org.eclipse.osee.framework.ui.skynet.ArtifactDecorator;
import org.eclipse.osee.framework.ui.skynet.ArtifactDoubleClick;
-import org.eclipse.osee.framework.ui.skynet.OseeContributionItem;
+import org.eclipse.osee.framework.ui.skynet.OseeStatusContributionItemFactory;
import org.eclipse.osee.framework.ui.skynet.SkynetGuiPlugin;
import org.eclipse.osee.framework.ui.skynet.listener.IRebuildMenuListener;
import org.eclipse.osee.framework.ui.skynet.search.AbstractArtifactSearchResult;
@@ -211,7 +211,7 @@ public class ArtifactSearchPage extends AbstractArtifactSearchViewPage implement
public void init(IPageSite site) {
super.init(site);
setID(VIEW_ID);
- OseeContributionItem.addTo(getSite(), false);
+ OseeStatusContributionItemFactory.addTo(getSite(), false);
getSite().getActionBars().updateActionBars();
OseeEventManager.addListener(this);
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/BranchView.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/BranchView.java
index 404fe65ef9b..712e9c89daf 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/BranchView.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xBranch/BranchView.java
@@ -40,7 +40,7 @@ import org.eclipse.osee.framework.skynet.core.event.model.Sender;
import org.eclipse.osee.framework.skynet.core.event.model.TransactionEvent;
import org.eclipse.osee.framework.skynet.core.event.model.TransactionEventType;
import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
-import org.eclipse.osee.framework.ui.skynet.OseeContributionItem;
+import org.eclipse.osee.framework.ui.skynet.OseeStatusContributionItemFactory;
import org.eclipse.osee.framework.ui.skynet.SkynetGuiPlugin;
import org.eclipse.osee.framework.ui.skynet.action.EditTransactionComment;
import org.eclipse.osee.framework.ui.skynet.action.ITransactionRecordSelectionProvider;
@@ -132,7 +132,7 @@ public class BranchView extends ViewPart implements IActionable, IBranchEventLis
getSite().setSelectionProvider(xBranchWidget.getXViewer());
SkynetGuiPlugin.getInstance().setHelp(parent, HELP_CONTEXT_ID, "org.eclipse.osee.framework.help.ui");
- OseeContributionItem.addTo(this, true);
+ OseeStatusContributionItemFactory.addTo(this, true);
getViewSite().getActionBars().updateActionBars();
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryView.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryView.java
index 1342bfaa12c..2c30066c5f8 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryView.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xHistory/HistoryView.java
@@ -47,7 +47,7 @@ import org.eclipse.osee.framework.skynet.core.event.model.Sender;
import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
import org.eclipse.osee.framework.ui.skynet.OpenWithMenuListener;
-import org.eclipse.osee.framework.ui.skynet.OseeContributionItem;
+import org.eclipse.osee.framework.ui.skynet.OseeStatusContributionItemFactory;
import org.eclipse.osee.framework.ui.skynet.SkynetGuiPlugin;
import org.eclipse.osee.framework.ui.skynet.action.EditTransactionComment;
import org.eclipse.osee.framework.ui.skynet.action.ITransactionRecordSelectionProvider;
@@ -168,7 +168,7 @@ public class HistoryView extends ViewPart implements IActionable, IBranchEventLi
getSite().setSelectionProvider(xHistoryWidget.getXViewer());
SkynetGuiPlugin.getInstance().setHelp(parent, HELP_CONTEXT_ID, "org.eclipse.osee.framework.help.ui");
- OseeContributionItem.addTo(this, true);
+ OseeStatusContributionItemFactory.addTo(this, true);
setupMenus();
}
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeView.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeView.java
index d0c3f1360b9..ee6e9b01278 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeView.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/xmerge/MergeView.java
@@ -56,7 +56,7 @@ import org.eclipse.osee.framework.ui.plugin.util.AbstractSelectionEnabledHandler
import org.eclipse.osee.framework.ui.plugin.util.Commands;
import org.eclipse.osee.framework.ui.skynet.ArtifactExplorer;
import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
-import org.eclipse.osee.framework.ui.skynet.OseeContributionItem;
+import org.eclipse.osee.framework.ui.skynet.OseeStatusContributionItemFactory;
import org.eclipse.osee.framework.ui.skynet.SkynetGuiPlugin;
import org.eclipse.osee.framework.ui.skynet.render.PresentationType;
import org.eclipse.osee.framework.ui.skynet.render.RendererManager;
@@ -223,7 +223,7 @@ public class MergeView extends ViewPart implements IActionable, IBranchEventList
menuManager.add(new Separator(IWorkbenchActionConstants.MB_ADDITIONS));
createRevertUnresolvableConflictsMenuItem(menuManager);
- OseeContributionItem.addTo(this, true);
+ OseeStatusContributionItemFactory.addTo(this, true);
getSite().registerContextMenu("org.eclipse.osee.framework.ui.skynet.widgets.xmerge.MergeView", menuManager,
mergeXWidget.getXViewer());
diff --git a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/core/TestManagerEditorContributor.java b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/core/TestManagerEditorContributor.java
index 375caa33ca8..c4e4456d63e 100644
--- a/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/core/TestManagerEditorContributor.java
+++ b/plugins/org.eclipse.osee.ote.ui.test.manager/src/org/eclipse/osee/ote/ui/test/manager/core/TestManagerEditorContributor.java
@@ -10,11 +10,8 @@
*******************************************************************************/
package org.eclipse.osee.ote.ui.test.manager.core;
-import java.util.logging.Level;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IStatusLineManager;
-import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.ote.ui.test.manager.internal.TestManagerPlugin;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.actions.ActionFactory;
@@ -102,18 +99,5 @@ public class TestManagerEditorContributor extends MultiPageEditorActionBarContri
@Override
public void contributeToStatusLine(final IStatusLineManager statusLineManager) {
super.contributeToStatusLine(statusLineManager);
- try {
- /*
- * Job addStatusLineManager = new Job("TM contributing to the status line.") {
- * @Override protected IStatus run(IProgressMonitor monitor) { try {
- * OseeContributionItem.addTo(statusLineManager); } catch (Throwable th) { OseeLog.log(TestManagerPlugin.class,
- * Level.SEVERE, th.getMessage(), th); return Status.CANCEL_STATUS; } return Status.OK_STATUS; } };
- * addStatusLineManager.schedule();
- */
-
- } catch (Throwable th) {
- OseeLog.log(TestManagerPlugin.class, Level.WARNING, "Unable to contribute to the status line.", th);
- }
}
-
}

Back to the top