feature: Updating OTE navigator to latest
OTE Navigator now using new way of adding folders and
navigator items. These will still be extension point
based until the XNavigator is fully transitioned away
from that implementation.
Change-Id: Iab8206c0e1ab65930956591370018b725c5c6c07
diff --git a/org.eclipse.osee.ote.ui/META-INF/MANIFEST.MF b/org.eclipse.osee.ote.ui/META-INF/MANIFEST.MF
index a449198..ab39381 100644
--- a/org.eclipse.osee.ote.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.osee.ote.ui/META-INF/MANIFEST.MF
@@ -17,8 +17,12 @@
org.eclipse.jface.resource,
org.eclipse.jface.viewers,
org.eclipse.osee.connection.service,
+ org.eclipse.osee.framework.core.data,
+ org.eclipse.osee.framework.core.enums,
org.eclipse.osee.framework.core.exception,
org.eclipse.osee.framework.core.operation,
+ org.eclipse.osee.framework.jdk.core.annotation,
+ org.eclipse.osee.framework.jdk.core.result,
org.eclipse.osee.framework.jdk.core.type,
org.eclipse.osee.framework.jdk.core.util,
org.eclipse.osee.framework.logging,
diff --git a/org.eclipse.osee.ote.ui/plugin.xml b/org.eclipse.osee.ote.ui/plugin.xml
index 94c652d..4ee7119 100644
--- a/org.eclipse.osee.ote.ui/plugin.xml
+++ b/org.eclipse.osee.ote.ui/plugin.xml
@@ -72,4 +72,10 @@
</enablement>
</consolePageParticipant>
</extension>
+ <extension
+ point="org.eclipse.osee.framework.ui.plugin.XNavigateItemProvider">
+ <XNavigateItemProvider
+ classname="org.eclipse.osee.ote.ui.navigate.OteNavigatorTopFolders">
+ </XNavigateItemProvider>
+ </extension>
</plugin>
diff --git a/org.eclipse.osee.ote.ui/src/org/eclipse/osee/ote/ui/OteImage.java b/org.eclipse.osee.ote.ui/src/org/eclipse/osee/ote/ui/OteImage.java
index 0f74b0d..1c72203 100644
--- a/org.eclipse.osee.ote.ui/src/org/eclipse/osee/ote/ui/OteImage.java
+++ b/org.eclipse.osee.ote.ui/src/org/eclipse/osee/ote/ui/OteImage.java
@@ -13,32 +13,30 @@
package org.eclipse.osee.ote.ui;
-import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.osee.framework.ui.swt.ImageManager;
-import org.eclipse.osee.framework.ui.swt.KeyedImage;
+import org.eclipse.osee.framework.core.enums.OseeImage;
import org.eclipse.osee.ote.ui.internal.TestCoreGuiPlugin;
/**
* @author Andrew M. Finkbeiner
*/
-public enum OteImage implements KeyedImage {
- CHECKOUT("checkout.gif"),
- CONNECTED("connected_sm.gif"),
- OTE("welcome_item3.gif");
-
- private final String fileName;
+public class OteImage extends OseeImage {
+ private static final Long ENUM_ID = 8675309L;
+ public static OteImage CHECKOUT = new OteImage("checkout.gif");
+ public static OteImage CONNECTED = new OteImage("connected_sm.gif");
+ public static OteImage OTE = new OteImage("welcome_item3.gif");
private OteImage(String fileName) {
- this.fileName = fileName;
+ super(fileName);
}
@Override
- public ImageDescriptor createImageDescriptor() {
- return ImageManager.createImageDescriptor(TestCoreGuiPlugin.PLUGIN_ID, fileName);
+ public String getPluginId() {
+ return TestCoreGuiPlugin.PLUGIN_ID;
}
@Override
- public String getImageKey() {
- return TestCoreGuiPlugin.PLUGIN_ID + ".images." + fileName;
+ public Long getTypeId() {
+ return ENUM_ID;
}
+
}
\ No newline at end of file
diff --git a/org.eclipse.osee.ote.ui/src/org/eclipse/osee/ote/ui/OteNavigateComposite.java b/org.eclipse.osee.ote.ui/src/org/eclipse/osee/ote/ui/OteNavigateComposite.java
index f92ccf6..3557964 100644
--- a/org.eclipse.osee.ote.ui/src/org/eclipse/osee/ote/ui/OteNavigateComposite.java
+++ b/org.eclipse.osee.ote.ui/src/org/eclipse/osee/ote/ui/OteNavigateComposite.java
@@ -13,11 +13,16 @@
package org.eclipse.osee.ote.ui;
+import java.util.Arrays;
+import java.util.Collection;
+
+import org.eclipse.osee.framework.core.data.ArtifactId;
+import org.eclipse.osee.framework.core.enums.CoreUserGroups;
import org.eclipse.osee.framework.logging.OseeLevel;
import org.eclipse.osee.framework.logging.OseeLog;
+import org.eclipse.osee.framework.ui.plugin.xnavigate.NavigateItemCollector;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem;
-import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateViewItems;
import org.eclipse.swt.widgets.Composite;
/**
@@ -25,11 +30,11 @@
*/
public class OteNavigateComposite extends XNavigateComposite {
- public OteNavigateComposite(XNavigateViewItems navigateViewItems, Composite parent, int style) {
+ public OteNavigateComposite(NavigateItemCollector navigateViewItems, Composite parent, int style) {
super(navigateViewItems, parent, style);
}
- public OteNavigateComposite(XNavigateViewItems navigateViewItems, Composite parent, int style, String filterText) {
+ public OteNavigateComposite(NavigateItemCollector navigateViewItems, Composite parent, int style, String filterText) {
super(navigateViewItems, parent, style, filterText);
}
@@ -48,4 +53,9 @@
}
}
+ @Override
+ public Collection<? extends ArtifactId> getCurrUserUserGroups() {
+ return Arrays.asList(CoreUserGroups.Everyone);
+ }
+
}
diff --git a/org.eclipse.osee.ote.ui/src/org/eclipse/osee/ote/ui/navigate/OteNavigateView.java b/org.eclipse.osee.ote.ui/src/org/eclipse/osee/ote/ui/navigate/OteNavigateView.java
index 22e40d4..6c4df3c 100644
--- a/org.eclipse.osee.ote.ui/src/org/eclipse/osee/ote/ui/navigate/OteNavigateView.java
+++ b/org.eclipse.osee.ote.ui/src/org/eclipse/osee/ote/ui/navigate/OteNavigateView.java
@@ -1,5 +1,5 @@
/*********************************************************************
- * Copyright (c) 2004, 2007 Boeing
+ * Copyright (c) 2022 Boeing
*
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
@@ -21,24 +21,28 @@
import org.eclipse.core.runtime.IRegistryEventListener;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.action.Action;
+import org.eclipse.osee.framework.jdk.core.result.XResultData;
import org.eclipse.osee.framework.logging.OseeLog;
import org.eclipse.osee.framework.ui.plugin.PluginUiImage;
import org.eclipse.osee.framework.ui.plugin.util.HelpUtil;
+import org.eclipse.osee.framework.ui.plugin.xnavigate.INavigateItemRefresher;
+import org.eclipse.osee.framework.ui.plugin.xnavigate.NavigateItemCollector;
+import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem;
import org.eclipse.osee.framework.ui.swt.ImageManager;
+import org.eclipse.osee.framework.ui.swt.Widgets;
import org.eclipse.osee.ote.ui.OteNavigateComposite;
import org.eclipse.swt.SWT;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.part.ViewPart;
/**
- * Insert the type's description here.
- *
- * @see ViewPart
+ * XNavigator for the OTE product
*/
-public class OteNavigateView extends ViewPart {
+public class OteNavigateView extends ViewPart implements INavigateItemRefresher {
public static final String VIEW_ID = "org.eclipse.osee.ote.ui.navigate.OteNavigateView";
private OteNavigateComposite xNavComp;
+ private NavigateItemCollector itemCollector;
@Override
public void setFocus() {
@@ -47,12 +51,24 @@
}
}
+ @Override
+ public void refresh(XNavigateItem item) {
+ if (xNavComp != null && Widgets.isAccessible(xNavComp.getFilteredTree())
+ && Widgets.isAccessible(xNavComp.getFilteredTree().getViewer().getTree())) {
+
+ xNavComp.getFilteredTree().getViewer().refresh(item);
+ }
+ }
+
/*
* @see IWorkbenchPart#createPartControl(Composite)
*/
@Override
public void createPartControl(Composite parent) {
- xNavComp = new OteNavigateComposite(new OteNavigateViewItems(), parent, SWT.NONE);
+ XResultData rd = new XResultData();
+ itemCollector = new NavigateItemCollector(OteXNavigateItemProviders.getProviders(), this, rd);
+
+ xNavComp = new OteNavigateComposite(itemCollector, parent, SWT.NONE);
xNavComp.getFilteredTree().getViewer().setSorter(new OteNavigateViewerSorter());
@@ -73,7 +89,8 @@
public void added(IExtension[] extensions) {
try {
refresh();
- } catch (Exception ex) {
+ }
+ catch (Exception ex) {
OseeLog.log(getClass(), Level.SEVERE, ex);
}
}
@@ -82,7 +99,8 @@
public void added(IExtensionPoint[] extensionPoints) {
try {
refresh();
- } catch (Exception ex) {
+ }
+ catch (Exception ex) {
OseeLog.log(getClass(), Level.SEVERE, ex);
}
}
@@ -91,7 +109,8 @@
public void removed(IExtension[] extensions) {
try {
refresh();
- } catch (Exception ex) {
+ }
+ catch (Exception ex) {
OseeLog.log(getClass(), Level.SEVERE, ex);
}
}
@@ -100,7 +119,8 @@
public void removed(IExtensionPoint[] extensionPoints) {
try {
refresh();
- } catch (Exception ex) {
+ }
+ catch (Exception ex) {
OseeLog.log(getClass(), Level.SEVERE, ex);
}
}
diff --git a/org.eclipse.osee.ote.ui/src/org/eclipse/osee/ote/ui/navigate/OteNavigateViewItems.java b/org.eclipse.osee.ote.ui/src/org/eclipse/osee/ote/ui/navigate/OteNavigateViewItems.java
deleted file mode 100644
index c57340e..0000000
--- a/org.eclipse.osee.ote.ui/src/org/eclipse/osee/ote/ui/navigate/OteNavigateViewItems.java
+++ /dev/null
@@ -1,103 +0,0 @@
-/*********************************************************************
- * Copyright (c) 2004, 2007 Boeing
- *
- * This program and the accompanying materials are made
- * available under the terms of the Eclipse Public License 2.0
- * which is available at https://www.eclipse.org/legal/epl-2.0/
- *
- * SPDX-License-Identifier: EPL-2.0
- *
- * Contributors:
- * Boeing - initial API and implementation
- **********************************************************************/
-
-package org.eclipse.osee.ote.ui.navigate;
-
-import java.util.ArrayList;
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import java.util.logging.Level;
-import org.eclipse.osee.framework.jdk.core.type.OseeCoreException;
-import org.eclipse.osee.framework.logging.OseeLog;
-import org.eclipse.osee.framework.ui.plugin.PluginUiImage;
-import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateContributionManager;
-import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateExtensionPointData;
-import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem;
-import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateViewItems;
-import org.eclipse.osee.ote.ui.internal.TestCoreGuiPlugin;
-
-/**
- * @author Donald G. Dunne
- */
-public class OteNavigateViewItems implements XNavigateViewItems {
-
- public OteNavigateViewItems() {
- super();
- }
-
- @Override
- public List<XNavigateItem> getSearchNavigateItems() {
- List<XNavigateItem> items = new ArrayList<>();
- try {
- addExtensionPointItems(items);
- } catch (OseeCoreException ex) {
- OseeLog.log(TestCoreGuiPlugin.class, Level.SEVERE, ex);
- }
- return items;
- }
-
- private void addExtensionPointItems(List<XNavigateItem> items) throws OseeCoreException {
- Collection<XNavigateExtensionPointData> oteNavigateItemExtensions =
- XNavigateContributionManager.getNavigateItems(OteNavigateView.VIEW_ID);
- Map<String, XNavigateItem> categoryToNavigateItem =
- createCategoriesAndAddToItems(items, oteNavigateItemExtensions);
- for (XNavigateExtensionPointData data : oteNavigateItemExtensions) {
- XNavigateItem item = categoryToNavigateItem.get(data.getCategory());
- try {
- if (item == null) {
- items.addAll(data.getNavigateItems());
- } else {
-
- for (XNavigateItem navItem : data.getNavigateItems()) {
- item.addChild(navItem);
- }
- }
- } catch (Throwable th) {
- OseeLog.log(OteNavigateViewItems.class, Level.SEVERE, th);
- }
- }
- }
-
- private Map<String, XNavigateItem> createCategoriesAndAddToItems(List<XNavigateItem> items, Collection<XNavigateExtensionPointData> oteNavigateItemExtensions) {
- Map<String, XNavigateItem> categoryToNavigateItem = new HashMap<>();
- for (XNavigateExtensionPointData data : oteNavigateItemExtensions) {
- if (!categoryToNavigateItem.containsKey(data.getCategory())) {
- String[] path = data.getItemPath();
- StringBuilder keyBuilder = new StringBuilder(256);
- XNavigateItem lastItem = null;
- for (int i = 0; i < path.length; i++) {
-
- keyBuilder.append(path[i]);
- String key = keyBuilder.toString();
- XNavigateItem foundItem = categoryToNavigateItem.get(key);
- if (foundItem == null) {
- foundItem = new XNavigateItem(lastItem, path[i], PluginUiImage.FOLDER);
- categoryToNavigateItem.put(key, foundItem);
- // if(lastItem != null){
- // lastItem.addChild(foundItem);
- // }
- if (i == 0) {
- items.add(foundItem);
- }
- }
- lastItem = foundItem;
- keyBuilder.append('.');
- }
- }
- }
- return categoryToNavigateItem;
- }
-
-}
diff --git a/org.eclipse.osee.ote.ui/src/org/eclipse/osee/ote/ui/navigate/OteNavigatorTopFolders.java b/org.eclipse.osee.ote.ui/src/org/eclipse/osee/ote/ui/navigate/OteNavigatorTopFolders.java
new file mode 100644
index 0000000..0742de4
--- /dev/null
+++ b/org.eclipse.osee.ote.ui/src/org/eclipse/osee/ote/ui/navigate/OteNavigatorTopFolders.java
@@ -0,0 +1,45 @@
+/*********************************************************************
+ * Copyright (c) 2022 Boeing
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ **********************************************************************/
+
+package org.eclipse.osee.ote.ui.navigate;
+
+import java.util.List;
+
+import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavItemCat;
+import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem;
+import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemFolder;
+import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemProvider;
+
+/**
+ * @author Michael P. Masterson
+ */
+public class OteNavigatorTopFolders implements XNavigateItemProvider {
+
+ public static final XNavigateItemFolder CONNECTIONS_FOLDER = new XNavigateItemFolder("Connections",
+ XNavItemCat.TOP);
+ public static final XNavigateItemFolder MESSAGING_FOLDER = new XNavigateItemFolder("Messaging",
+ XNavItemCat.TOP);
+
+ @Override
+ public List<XNavigateItem> getNavigateItems(List<XNavigateItem> items) {
+ items.add(CONNECTIONS_FOLDER);
+ items.add(MESSAGING_FOLDER);
+ return items;
+ }
+
+ @Override
+ public boolean isApplicable() {
+ return true;
+ }
+
+}
diff --git a/org.eclipse.osee.ote.ui/src/org/eclipse/osee/ote/ui/navigate/OteXNavigateItemProviders.java b/org.eclipse.osee.ote.ui/src/org/eclipse/osee/ote/ui/navigate/OteXNavigateItemProviders.java
new file mode 100644
index 0000000..c49072a
--- /dev/null
+++ b/org.eclipse.osee.ote.ui/src/org/eclipse/osee/ote/ui/navigate/OteXNavigateItemProviders.java
@@ -0,0 +1,40 @@
+/*********************************************************************
+ * Copyright (c) 2022 Boeing
+ *
+ * This program and the accompanying materials are made
+ * available under the terms of the Eclipse Public License 2.0
+ * which is available at https://www.eclipse.org/legal/epl-2.0/
+ *
+ * SPDX-License-Identifier: EPL-2.0
+ *
+ * Contributors:
+ * Boeing - initial API and implementation
+ **********************************************************************/
+
+package org.eclipse.osee.ote.ui.navigate;
+
+import java.util.Iterator;
+import java.util.Set;
+
+import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemProvider;
+import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemProviders;
+
+/**
+ * @author Michael P. Masterson
+ */
+public class OteXNavigateItemProviders {
+
+ public static synchronized Set<XNavigateItemProvider> getProviders() {
+ Set<XNavigateItemProvider> providers = XNavigateItemProviders.getProviders();
+
+ Iterator<XNavigateItemProvider> iterator = providers.iterator();
+ iterator.forEachRemaining(provider -> {
+ String typeName = provider.getClass().getTypeName();
+ if (!typeName.contains(".ote.")) {
+ iterator.remove();
+ }
+ });
+
+ return providers;
+ }
+}
diff --git a/org.eclipse.ote.client.ui/META-INF/MANIFEST.MF b/org.eclipse.ote.client.ui/META-INF/MANIFEST.MF
index 91b356e..7e2b312 100644
--- a/org.eclipse.ote.client.ui/META-INF/MANIFEST.MF
+++ b/org.eclipse.ote.client.ui/META-INF/MANIFEST.MF
@@ -34,6 +34,7 @@
org.eclipse.e4.ui.workbench,
org.eclipse.nebula.widgets.xviewer.core.model,
org.eclipse.osee.framework.core.data,
+ org.eclipse.osee.framework.core.enums,
org.eclipse.osee.framework.core.exception,
org.eclipse.osee.ote.master.rest.client,
org.eclipse.osee.ote.master.rest.model,
diff --git a/org.eclipse.ote.client.ui/plugin.xml b/org.eclipse.ote.client.ui/plugin.xml
index fe4c430..0d1edc1 100644
--- a/org.eclipse.ote.client.ui/plugin.xml
+++ b/org.eclipse.ote.client.ui/plugin.xml
@@ -2,14 +2,6 @@
<?eclipse version="3.2"?>
<plugin>
<extension
- point="org.eclipse.osee.framework.ui.plugin.XNavigateItem">
- <XNavigateItem
- category="Connections"
- classname="org.eclipse.ote.client.ui.core.ConnectionNavigatorItem"
- viewId="org.eclipse.osee.ote.ui.navigate.OteNavigateView">
- </XNavigateItem>
- </extension>
- <extension
point="org.eclipse.ui.views">
<view
allowMultiple="false"
@@ -29,6 +21,12 @@
name="OTE Prompt View">
</page>
</extension>
+ <extension
+ point="org.eclipse.osee.framework.ui.plugin.XNavigateItemProvider">
+ <XNavigateItemProvider
+ classname="org.eclipse.ote.client.ui.core.ConnectionNavigatorItem">
+ </XNavigateItemProvider>
+ </extension>
</plugin>
diff --git a/org.eclipse.ote.client.ui/src/org/eclipse/ote/client/ui/actions/HostSelectionAction.java b/org.eclipse.ote.client.ui/src/org/eclipse/ote/client/ui/actions/HostSelectionAction.java
index a847e87..cc0cfe0 100644
--- a/org.eclipse.ote.client.ui/src/org/eclipse/ote/client/ui/actions/HostSelectionAction.java
+++ b/org.eclipse.ote.client.ui/src/org/eclipse/ote/client/ui/actions/HostSelectionAction.java
@@ -28,8 +28,8 @@
public static final String ID = "ote.tools.action.selectHostAction";
public HostSelectionAction() {
- super("Ote Server Connect", OteClientUiPlugin.getImageDescriptor("OSEE-INF/images/connect.gif"));
- setId(ID);
+ super("Ote Server Connect", OteClientUiPlugin.getImageDescriptor("OSEE-INF/images/connect.gif"));
+ setId(ID);
}
@Override
diff --git a/org.eclipse.ote.client.ui/src/org/eclipse/ote/client/ui/core/ConnectionNavigatorItem.java b/org.eclipse.ote.client.ui/src/org/eclipse/ote/client/ui/core/ConnectionNavigatorItem.java
index 48d71d6..49ccb90 100644
--- a/org.eclipse.ote.client.ui/src/org/eclipse/ote/client/ui/core/ConnectionNavigatorItem.java
+++ b/org.eclipse.ote.client.ui/src/org/eclipse/ote/client/ui/core/ConnectionNavigatorItem.java
@@ -13,25 +13,36 @@
package org.eclipse.ote.client.ui.core;
-import java.util.Collections;
import java.util.List;
-import org.eclipse.osee.framework.ui.plugin.xnavigate.IXNavigateContainer;
+
+import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavItemCat;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemAction;
+import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemProvider;
import org.eclipse.osee.ote.ui.OteImage;
+import org.eclipse.osee.ote.ui.navigate.OteNavigatorTopFolders;
import org.eclipse.ote.client.ui.actions.HostSelectionAction;
/**
* @author Andrew M. Finkbeiner
*/
-public class ConnectionNavigatorItem implements IXNavigateContainer {
+public class ConnectionNavigatorItem implements XNavigateItemProvider {
+
+ private final XNavItemCat navItemCat = new XNavItemCat(OteNavigatorTopFolders.CONNECTIONS_FOLDER.getName() + ".host");
@Override
- public List<XNavigateItem> getNavigateItems() {
+ public List<XNavigateItem> getNavigateItems(List<XNavigateItem> items) {
- XNavigateItem item = new XNavigateItemAction(null, new HostSelectionAction(), OteImage.CONNECTED, false);
+ HostSelectionAction hostSelectionAction = new HostSelectionAction();
+ XNavigateItem item = new XNavigateItemAction(hostSelectionAction, OteImage.CONNECTED,
+ navItemCat, XNavItemCat.SUBCAT);
+ items.add(item);
+ return items;
+ }
- return Collections.singletonList(item);
+ @Override
+ public boolean isApplicable() {
+ return true;
}
}
diff --git a/org.eclipse.ote.test.manager.uut.selector/META-INF/MANIFEST.MF b/org.eclipse.ote.test.manager.uut.selector/META-INF/MANIFEST.MF
index d4fa310..3eb3ff1 100644
--- a/org.eclipse.ote.test.manager.uut.selector/META-INF/MANIFEST.MF
+++ b/org.eclipse.ote.test.manager.uut.selector/META-INF/MANIFEST.MF
@@ -17,6 +17,7 @@
org.eclipse.nebula.widgets.xviewer.core.model,
org.eclipse.nebula.widgets.xviewer.customize,
org.eclipse.nebula.widgets.xviewer.edit,
+ org.eclipse.osee.framework.core.enums.token,
org.eclipse.osee.framework.jdk.core.type,
org.eclipse.osee.framework.logging,
org.eclipse.osee.framework.ui.swt,
diff --git a/org.eclipse.ote.test.manager/plugin.xml b/org.eclipse.ote.test.manager/plugin.xml
index c58cb00..d591fc1 100644
--- a/org.eclipse.ote.test.manager/plugin.xml
+++ b/org.eclipse.ote.test.manager/plugin.xml
@@ -36,12 +36,6 @@
<Transform File="transforms/outputFlat.xsl"/>
<Transform File="transforms/outputDebug.xsl"/>
</extension> -->
- <extension
- point="org.eclipse.osee.framework.ui.plugin.XNavigateItem">
- <XNavigateItem classname="org.eclipse.ote.test.manager.navigate.TestManagerNavigateViewItems"
- viewId="org.eclipse.osee.ote.ui.navigate.OteNavigateView">
- </XNavigateItem>
- </extension>
<extension
point="org.eclipse.osee.framework.ui.plugin.PropertyStoreControl">
<PropertyStoreControl
@@ -63,4 +57,10 @@
viewId="org.eclipse.osee.ote.ui.test.manager">
</PropertyStoreControl>
</extension>
+ <extension
+ point="org.eclipse.osee.framework.ui.plugin.XNavigateItemProvider">
+ <XNavigateItemProvider
+ classname="org.eclipse.ote.test.manager.navigate.TestManagerNavigateViewItems">
+ </XNavigateItemProvider>
+ </extension>
</plugin>
diff --git a/org.eclipse.ote.test.manager/src/org/eclipse/ote/test/manager/navigate/TestManagerNavigateViewItems.java b/org.eclipse.ote.test.manager/src/org/eclipse/ote/test/manager/navigate/TestManagerNavigateViewItems.java
index d3709e4..0dfc192 100644
--- a/org.eclipse.ote.test.manager/src/org/eclipse/ote/test/manager/navigate/TestManagerNavigateViewItems.java
+++ b/org.eclipse.ote.test.manager/src/org/eclipse/ote/test/manager/navigate/TestManagerNavigateViewItems.java
@@ -13,28 +13,31 @@
package org.eclipse.ote.test.manager.navigate;
-import java.util.ArrayList;
import java.util.List;
-import org.eclipse.osee.framework.ui.plugin.xnavigate.IXNavigateContainer;
+import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavItemCat;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemAction;
+import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemProvider;
import org.eclipse.osee.ote.ui.test.manager.TestManagerImage;
/**
* @author Donald G. Dunne
*/
-public class TestManagerNavigateViewItems implements IXNavigateContainer {
+public class TestManagerNavigateViewItems implements XNavigateItemProvider {
public TestManagerNavigateViewItems() {
super();
}
@Override
- public List<XNavigateItem> getNavigateItems() {
- List<XNavigateItem> items = new ArrayList<>();
-
- items.add(new XNavigateItemAction(null, new TestManagerAction(), TestManagerImage.TEST_MANAGER, false));
+ public List<XNavigateItem> getNavigateItems(List<XNavigateItem> items) {
+ items.add(new XNavigateItemAction(new TestManagerAction(), TestManagerImage.TEST_MANAGER, XNavItemCat.TOP));
return items;
}
+ @Override
+ public boolean isApplicable() {
+ return true;
+ }
+
}
diff --git a/org.eclipse.ote.ui.eviewer/META-INF/MANIFEST.MF b/org.eclipse.ote.ui.eviewer/META-INF/MANIFEST.MF
index e4a4b25..6be4ffa 100644
--- a/org.eclipse.ote.ui.eviewer/META-INF/MANIFEST.MF
+++ b/org.eclipse.ote.ui.eviewer/META-INF/MANIFEST.MF
@@ -19,6 +19,7 @@
org.eclipse.ote.ui.eviewer.view
Import-Package: org.eclipse.osee.framework.core.data,
org.eclipse.osee.framework.jdk.core.persistence,
+ org.eclipse.osee.ote.ui.navigate,
org.eclipse.ote.io,
org.eclipse.ote.message.lookup,
org.eclipse.ote.ui.message.util
diff --git a/org.eclipse.ote.ui.eviewer/plugin.xml b/org.eclipse.ote.ui.eviewer/plugin.xml
index 4db327a..c3c1691 100644
--- a/org.eclipse.ote.ui.eviewer/plugin.xml
+++ b/org.eclipse.ote.ui.eviewer/plugin.xml
@@ -19,12 +19,10 @@
</view>
</extension>
<extension
- point="org.eclipse.osee.framework.ui.plugin.XNavigateItem">
- <XNavigateItem
- category="Messaging"
- classname="org.eclipse.ote.ui.eviewer.view.MessageNavigateViewItems"
- viewId="org.eclipse.osee.ote.ui.navigate.OteNavigateView">
- </XNavigateItem>
+ point="org.eclipse.osee.framework.ui.plugin.XNavigateItemProvider">
+ <XNavigateItemProvider
+ classname="org.eclipse.ote.ui.eviewer.view.MessageNavigateViewItems">
+ </XNavigateItemProvider>
</extension>
</plugin>
diff --git a/org.eclipse.ote.ui.eviewer/src/org/eclipse/ote/ui/eviewer/view/MessageNavigateViewItems.java b/org.eclipse.ote.ui.eviewer/src/org/eclipse/ote/ui/eviewer/view/MessageNavigateViewItems.java
index 7ff18a6..cbaf24d 100644
--- a/org.eclipse.ote.ui.eviewer/src/org/eclipse/ote/ui/eviewer/view/MessageNavigateViewItems.java
+++ b/org.eclipse.ote.ui.eviewer/src/org/eclipse/ote/ui/eviewer/view/MessageNavigateViewItems.java
@@ -13,28 +13,35 @@
package org.eclipse.ote.ui.eviewer.view;
-import java.util.ArrayList;
import java.util.List;
-import org.eclipse.osee.framework.ui.plugin.xnavigate.IXNavigateContainer;
+import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavItemCat;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemAction;
+import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemProvider;
+import org.eclipse.osee.ote.ui.navigate.OteNavigatorTopFolders;
import org.eclipse.ote.ui.eviewer.OteElementImage;
import org.eclipse.ote.ui.eviewer.action.EViewerAction;
/**
* @author Donald G. Dunne
*/
-public class MessageNavigateViewItems implements IXNavigateContainer {
+public class MessageNavigateViewItems implements XNavigateItemProvider {
+ private final XNavItemCat navItemCat = new XNavItemCat(OteNavigatorTopFolders.MESSAGING_FOLDER.getName() + ".element_viewer");
+
public MessageNavigateViewItems() {
super();
}
@Override
- public List<XNavigateItem> getNavigateItems() {
- List<XNavigateItem> items = new ArrayList<XNavigateItem>();
- items.add(new XNavigateItemAction(null, new EViewerAction(), OteElementImage.ELEMENT_VIEW, false));
+ public List<XNavigateItem> getNavigateItems(List<XNavigateItem> items) {
+ items.add(new XNavigateItemAction(new EViewerAction(), OteElementImage.ELEMENT_VIEW, navItemCat, XNavItemCat.SUBCAT));
return items;
}
+ @Override
+ public boolean isApplicable() {
+ return true;
+ }
+
}
diff --git a/org.eclipse.ote.ui.message.search/META-INF/MANIFEST.MF b/org.eclipse.ote.ui.message.search/META-INF/MANIFEST.MF
index 8ede10d..8f84214 100644
--- a/org.eclipse.ote.ui.message.search/META-INF/MANIFEST.MF
+++ b/org.eclipse.ote.ui.message.search/META-INF/MANIFEST.MF
@@ -6,7 +6,8 @@
Require-Bundle: org.eclipse.ui;bundle-version="3.103.0",
org.eclipse.core.runtime
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Import-Package: org.eclipse.osee.framework.logging,
+Import-Package: org.eclipse.osee.framework.core.enums,
+ org.eclipse.osee.framework.logging,
org.eclipse.osee.framework.ui.plugin.util,
org.eclipse.osee.framework.ui.plugin.xnavigate,
org.eclipse.osee.framework.ui.swt,
@@ -14,6 +15,7 @@
org.eclipse.osee.ote.message.data,
org.eclipse.osee.ote.message.elements,
org.eclipse.osee.ote.message.enums,
+ org.eclipse.osee.ote.ui.navigate,
org.eclipse.ote.message.lookup,
org.eclipse.ote.ui.message.util,
org.eclipse.ote.ui.util,
diff --git a/org.eclipse.ote.ui.message.search/plugin.xml b/org.eclipse.ote.ui.message.search/plugin.xml
index 59b8411..dc56048 100644
--- a/org.eclipse.ote.ui.message.search/plugin.xml
+++ b/org.eclipse.ote.ui.message.search/plugin.xml
@@ -16,11 +16,10 @@
restorable="true">
</view>
</extension>
- <extension point="org.eclipse.osee.framework.ui.plugin.XNavigateItem">
- <XNavigateItem
- classname="org.eclipse.ote.ui.message.search.internal.MessageNavigateViewItems"
- category="Messaging"
- viewId="org.eclipse.osee.ote.ui.navigate.OteNavigateView">
- </XNavigateItem>
+ <extension
+ point="org.eclipse.osee.framework.ui.plugin.XNavigateItemProvider">
+ <XNavigateItemProvider
+ classname="org.eclipse.ote.ui.message.search.internal.MessageNavigateViewItems">
+ </XNavigateItemProvider>
</extension>
</plugin>
diff --git a/org.eclipse.ote.ui.message.search/src/org/eclipse/ote/ui/message/search/internal/MessageNavigateViewItems.java b/org.eclipse.ote.ui.message.search/src/org/eclipse/ote/ui/message/search/internal/MessageNavigateViewItems.java
index fb9ab9b..b6ee66f 100644
--- a/org.eclipse.ote.ui.message.search/src/org/eclipse/ote/ui/message/search/internal/MessageNavigateViewItems.java
+++ b/org.eclipse.ote.ui.message.search/src/org/eclipse/ote/ui/message/search/internal/MessageNavigateViewItems.java
@@ -13,20 +13,27 @@
package org.eclipse.ote.ui.message.search.internal;
-import java.util.ArrayList;
import java.util.List;
-import org.eclipse.osee.framework.ui.plugin.xnavigate.IXNavigateContainer;
+
+import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavItemCat;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemAction;
+import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemProvider;
+import org.eclipse.osee.ote.ui.navigate.OteNavigatorTopFolders;
import org.eclipse.ote.ui.message.search.OteMessageViewImage;
-public class MessageNavigateViewItems implements IXNavigateContainer {
+public class MessageNavigateViewItems implements XNavigateItemProvider {
+ private final XNavItemCat navItemCat = new XNavItemCat(OteNavigatorTopFolders.MESSAGING_FOLDER.getName() + ".message_search");
@Override
- public List<XNavigateItem> getNavigateItems() {
- List<XNavigateItem> items = new ArrayList<XNavigateItem>();
- items.add(new XNavigateItemAction(null, new MessageSearchViewAction(), OteMessageViewImage.GLASSES, false));
+ public List<XNavigateItem> getNavigateItems(List<XNavigateItem> items) {
+ items.add(new XNavigateItemAction(new MessageSearchViewAction(), OteMessageViewImage.GLASSES, navItemCat, XNavItemCat.SUBCAT));
return items;
}
+ @Override
+ public boolean isApplicable() {
+ return true;
+ }
+
}
diff --git a/org.eclipse.ote.ui.message/META-INF/MANIFEST.MF b/org.eclipse.ote.ui.message/META-INF/MANIFEST.MF
index 9a40c25..006b35a 100644
--- a/org.eclipse.ote.ui.message/META-INF/MANIFEST.MF
+++ b/org.eclipse.ote.ui.message/META-INF/MANIFEST.MF
@@ -30,6 +30,7 @@
org.eclipse.osee.framework.core.exception,
org.eclipse.osee.framework.core.operation,
org.eclipse.osee.framework.jdk.core.type,
+ org.eclipse.osee.ote.ui.navigate,
org.eclipse.ote.bytemessage,
org.eclipse.ote.message.lookup,
org.eclipse.ote.ui.message.search,
diff --git a/org.eclipse.ote.ui.message/plugin.xml b/org.eclipse.ote.ui.message/plugin.xml
index 02cafe9..67eb309 100644
--- a/org.eclipse.ote.ui.message/plugin.xml
+++ b/org.eclipse.ote.ui.message/plugin.xml
@@ -27,14 +27,6 @@
<run class="org.eclipse.ote.ui.message.watch.recording.xform.RunCSVConversion"/>
</application>
</extension>
- <extension
- point="org.eclipse.osee.framework.ui.plugin.XNavigateItem">
- <XNavigateItem
- classname="org.eclipse.ote.ui.message.navigate.MessageNavigateViewItems"
- category="Messaging"
- viewId="org.eclipse.osee.ote.ui.navigate.OteNavigateView">
- </XNavigateItem>
- </extension>
<extension
id="CsvTransform"
@@ -45,4 +37,10 @@
Label="Csv Transform"
Tooltip="Transform the base CSV format."/>
</extension>
+ <extension
+ point="org.eclipse.osee.framework.ui.plugin.XNavigateItemProvider">
+ <XNavigateItemProvider
+ classname="org.eclipse.ote.ui.message.navigate.MessageNavigateViewItems">
+ </XNavigateItemProvider>
+ </extension>
</plugin>
diff --git a/org.eclipse.ote.ui.message/src/org/eclipse/ote/ui/message/navigate/MessageNavigateViewItems.java b/org.eclipse.ote.ui.message/src/org/eclipse/ote/ui/message/navigate/MessageNavigateViewItems.java
index 2f539cf..f52d45e 100644
--- a/org.eclipse.ote.ui.message/src/org/eclipse/ote/ui/message/navigate/MessageNavigateViewItems.java
+++ b/org.eclipse.ote.ui.message/src/org/eclipse/ote/ui/message/navigate/MessageNavigateViewItems.java
@@ -13,24 +13,31 @@
package org.eclipse.ote.ui.message.navigate;
-import java.util.ArrayList;
import java.util.List;
-import org.eclipse.osee.framework.ui.plugin.xnavigate.IXNavigateContainer;
+
+import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavItemCat;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemAction;
+import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemProvider;
+import org.eclipse.osee.ote.ui.navigate.OteNavigatorTopFolders;
import org.eclipse.ote.ui.message.internal.WatchImages;
import org.eclipse.ote.ui.message.watch.MessageWatchAction;
/**
* @author Donald G. Dunne
*/
-public class MessageNavigateViewItems implements IXNavigateContainer {
+public class MessageNavigateViewItems implements XNavigateItemProvider {
+ private final XNavItemCat navItemCat = new XNavItemCat(OteNavigatorTopFolders.MESSAGING_FOLDER.getName() + ".message_watch");
@Override
- public List<XNavigateItem> getNavigateItems() {
- List<XNavigateItem> items = new ArrayList<XNavigateItem>();
- items.add(new XNavigateItemAction(null, new MessageWatchAction(), WatchImages.BINOCULARS, false));
+ public List<XNavigateItem> getNavigateItems(List<XNavigateItem> items) {
+ items.add(new XNavigateItemAction(new MessageWatchAction(), WatchImages.BINOCULARS, navItemCat, XNavItemCat.SUBCAT));
return items;
}
+ @Override
+ public boolean isApplicable() {
+ return true;
+ }
+
}
diff --git a/org.eclipse.ote.ui.mux/META-INF/MANIFEST.MF b/org.eclipse.ote.ui.mux/META-INF/MANIFEST.MF
index 98746d8..2ba4609 100644
--- a/org.eclipse.ote.ui.mux/META-INF/MANIFEST.MF
+++ b/org.eclipse.ote.ui.mux/META-INF/MANIFEST.MF
@@ -16,7 +16,8 @@
Bundle-ActivationPolicy: lazy
Bundle-Vendor: Eclipse Open System Engineering Environment
Bundle-RequiredExecutionEnvironment: JavaSE-1.8
-Import-Package: org.eclipse.osee.framework.logging,
+Import-Package: org.eclipse.osee.framework.core.enums,
+ org.eclipse.osee.framework.logging,
org.eclipse.osee.framework.ui.plugin.util,
org.eclipse.osee.framework.ui.plugin.xnavigate,
org.eclipse.osee.ote.properties
diff --git a/org.eclipse.ote.ui.mux/plugin.xml b/org.eclipse.ote.ui.mux/plugin.xml
index 53d3217..d37e6b0 100644
--- a/org.eclipse.ote.ui.mux/plugin.xml
+++ b/org.eclipse.ote.ui.mux/plugin.xml
@@ -16,11 +16,9 @@
</view>
</extension>
<extension
- point="org.eclipse.osee.framework.ui.plugin.XNavigateItem">
- <XNavigateItem
- category="Messaging"
- classname="org.eclipse.ote.ui.mux.actions.MuxViewNavigatorItem"
- viewId="org.eclipse.osee.ote.ui.navigate.OteNavigateView">
- </XNavigateItem>
+ point="org.eclipse.osee.framework.ui.plugin.XNavigateItemProvider">
+ <XNavigateItemProvider
+ classname="org.eclipse.ote.ui.mux.actions.MuxViewNavigatorItem">
+ </XNavigateItemProvider>
</extension>
</plugin>
diff --git a/org.eclipse.ote.ui.mux/src/org/eclipse/ote/ui/mux/actions/MuxViewNavigatorItem.java b/org.eclipse.ote.ui.mux/src/org/eclipse/ote/ui/mux/actions/MuxViewNavigatorItem.java
index 6e81650..cfe9e76 100644
--- a/org.eclipse.ote.ui.mux/src/org/eclipse/ote/ui/mux/actions/MuxViewNavigatorItem.java
+++ b/org.eclipse.ote.ui.mux/src/org/eclipse/ote/ui/mux/actions/MuxViewNavigatorItem.java
@@ -13,23 +13,33 @@
package org.eclipse.ote.ui.mux.actions;
-import java.util.Collections;
import java.util.List;
-import org.eclipse.osee.framework.ui.plugin.xnavigate.IXNavigateContainer;
+
+import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavItemCat;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemAction;
+import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItemProvider;
+import org.eclipse.osee.ote.ui.navigate.OteNavigatorTopFolders;
import org.eclipse.ote.ui.mux.OteMuxImage;
-public class MuxViewNavigatorItem implements IXNavigateContainer {
+public class MuxViewNavigatorItem implements XNavigateItemProvider {
+ private final XNavItemCat navItemCat = new XNavItemCat(OteNavigatorTopFolders.MESSAGING_FOLDER.getName() + ".1553_mux");
+
public MuxViewNavigatorItem() {
// TODO Auto-generated constructor stub
}
@Override
- public List<XNavigateItem> getNavigateItems() {
- XNavigateItem action = new XNavigateItemAction(null, new OpenMuxViewAction(), OteMuxImage.MUX, false);
- return Collections.singletonList(action);
+ public List<XNavigateItem> getNavigateItems(List<XNavigateItem> items) {
+ XNavigateItem action = new XNavigateItemAction(new OpenMuxViewAction(), OteMuxImage.MUX, navItemCat, XNavItemCat.SUBCAT);
+ items.add(action);
+ return items;
+ }
+
+ @Override
+ public boolean isApplicable() {
+ return true;
}
}