summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid W. Miller2012-04-19 19:34:39 (EDT)
committerRoberto E. Escobar2012-04-19 19:34:39 (EDT)
commit17b1d17ea4d3df54d4c84ee91b949131da6fda2b (patch)
tree6329a1373cb98e5f935e5a403743436ae1595bf3
parent028b4e8bcbafba99607438490376e1dd1ce58890 (diff)
downloadorg.eclipse.osee-17b1d17ea4d3df54d4c84ee91b949131da6fda2b.zip
org.eclipse.osee-17b1d17ea4d3df54d4c84ee91b949131da6fda2b.tar.gz
org.eclipse.osee-17b1d17ea4d3df54d4c84ee91b949131da6fda2b.tar.bz2
refinement[bgz_377038]: Categorize and de-conflict keyboard shortcut for reveal artifact
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/navigate/NavigateView.java6
-rw-r--r--plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/review/ReviewNavigateView.java6
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/editor/CoverageEditor.java10
-rw-r--r--plugins/org.eclipse.osee.coverage/src/org/eclipse/osee/coverage/navigate/CoverageNavigateView.java12
-rw-r--r--plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/navigate/DefineNavigateView.java11
-rw-r--r--plugins/org.eclipse.osee.framework.ui.admin/src/org/eclipse/osee/framework/ui/admin/AdminView.java12
-rw-r--r--plugins/org.eclipse.osee.framework.ui.service.control/META-INF/MANIFEST.MF1
-rw-r--r--plugins/org.eclipse.osee.framework.ui.service.control/src/org/eclipse/osee/framework/ui/service/control/view/ServiceManagerView.java10
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/plugin.xml23
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/ArtifactExplorer.java12
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/AbstractArtifactEditor.java4
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/blam/BlamEditor.java11
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/change/view/ChangeReportEditor.java11
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/group/GroupExplorer.java15
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/user/perspective/UserNavigateView.java6
-rw-r--r--plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/GenericViewPart.java12
16 files changed, 104 insertions, 58 deletions
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 04d961e..367b135 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
@@ -71,6 +71,7 @@ import org.eclipse.ui.IViewSite;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.contexts.IContextService;
import org.eclipse.ui.part.ViewPart;
import org.eclipse.ui.progress.UIJob;
@@ -290,6 +291,11 @@ public class NavigateView extends ViewPart implements IXNavigateEventListener {
@Override
public void init(IViewSite site, IMemento memento) throws PartInitException {
super.init(site, memento);
+
+ // set the context (org.eclipse.ui.contexts) to be osee to make the osee hotkeys available
+ IContextService contextService = (IContextService) getSite().getService(IContextService.class);
+ contextService.activateContext("org.eclipse.osee.contexts.window");
+
try {
if (memento != null) {
memento = memento.getChild(INPUT);
diff --git a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/review/ReviewNavigateView.java b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/review/ReviewNavigateView.java
index 6518dba..b452c05 100644
--- a/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/review/ReviewNavigateView.java
+++ b/plugins/org.eclipse.osee.ats/src/org/eclipse/osee/ats/review/ReviewNavigateView.java
@@ -57,6 +57,7 @@ import org.eclipse.ui.IViewSite;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.contexts.IContextService;
import org.eclipse.ui.part.ViewPart;
import org.eclipse.ui.progress.UIJob;
@@ -236,6 +237,11 @@ public class ReviewNavigateView extends ViewPart implements IXNavigateEventListe
@Override
public void init(IViewSite site, IMemento memento) throws PartInitException {
super.init(site, memento);
+
+ // set the context (org.eclipse.ui.contexts) to osee to make the osee hotkeys available
+ IContextService contextService = (IContextService) getSite().getService(IContextService.class);
+ contextService.activateContext("org.eclipse.osee.contexts.window");
+
try {
if (memento != null) {
memento = memento.getChild(INPUT);
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 df1392c..deff6c7 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
@@ -43,9 +43,11 @@ import org.eclipse.osee.framework.ui.swt.Displays;
import org.eclipse.osee.framework.ui.swt.ImageManager;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorReference;
+import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.contexts.IContextService;
import org.eclipse.ui.forms.editor.FormEditor;
import org.eclipse.ui.forms.editor.FormPage;
import org.eclipse.ui.part.MultiPageEditorPart;
@@ -354,4 +356,12 @@ public class CoverageEditor extends FormEditor {
}
return null;
}
+
+ @Override
+ public void init(IEditorSite site, IEditorInput input) throws PartInitException {
+ super.init(site, input);
+ // set the context (org.eclipse.ui.contexts) to osee to make the osee hotkeys available
+ IContextService contextService = (IContextService) getSite().getService(IContextService.class);
+ contextService.activateContext("org.eclipse.osee.contexts.window");
+ }
}
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 013c928..5337d74 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
@@ -25,6 +25,7 @@ import org.eclipse.osee.framework.ui.plugin.util.HelpUtil;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite;
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.GenericViewPart;
import org.eclipse.osee.framework.ui.skynet.widgets.XBranchSelectWidget;
import org.eclipse.osee.framework.ui.swt.ALayout;
import org.eclipse.osee.framework.ui.swt.Displays;
@@ -36,12 +37,11 @@ import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
-import org.eclipse.ui.part.ViewPart;
/**
* @author Donald G. Dunne
*/
-public class CoverageNavigateView extends ViewPart {
+public class CoverageNavigateView extends GenericViewPart {
public static final String VIEW_ID = "org.eclipse.osee.coverage.navigate.CoverageNavigateView";
private XNavigateComposite xNavComp;
@@ -50,13 +50,6 @@ public class CoverageNavigateView extends ViewPart {
private Composite comp;
@Override
- public void setFocus() {
- if (comp != null) {
- comp.setFocus();
- }
- }
-
- @Override
public void createPartControl(Composite parent) {
if (!DbConnectionExceptionComposite.dbConnectionIsOk(parent)) {
return;
@@ -128,6 +121,7 @@ public class CoverageNavigateView extends ViewPart {
parent.layout(true);
OseeStatusContributionItemFactory.addTo(this, false);
+ setFocusWidget(comp);
}
private String getWhoAmI() {
diff --git a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/navigate/DefineNavigateView.java b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/navigate/DefineNavigateView.java
index 5d8390f..657661e 100644
--- a/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/navigate/DefineNavigateView.java
+++ b/plugins/org.eclipse.osee.define/src/org/eclipse/osee/define/navigate/DefineNavigateView.java
@@ -24,6 +24,7 @@ import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateComposite;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateEventManager;
import org.eclipse.osee.framework.ui.plugin.xnavigate.XNavigateItem;
import org.eclipse.osee.framework.ui.skynet.util.DbConnectionExceptionComposite;
+import org.eclipse.osee.framework.ui.skynet.widgets.GenericViewPart;
import org.eclipse.osee.framework.ui.swt.ImageManager;
import org.eclipse.osee.framework.ui.swt.Widgets;
import org.eclipse.swt.SWT;
@@ -35,19 +36,12 @@ import org.eclipse.ui.part.ViewPart;
*
* @see ViewPart
*/
-public class DefineNavigateView extends ViewPart implements IXNavigateEventListener {
+public class DefineNavigateView extends GenericViewPart implements IXNavigateEventListener {
public static final String VIEW_ID = "org.eclipse.osee.define.DefineNavigateView";
private XNavigateComposite xNavComp;
@Override
- public void setFocus() {
- if (xNavComp != null) {
- xNavComp.setFocus();
- }
- }
-
- @Override
public void refresh(XNavigateItem item) {
if (xNavComp != null && Widgets.isAccessible(xNavComp.getFilteredTree()) && Widgets.isAccessible(xNavComp.getFilteredTree().getViewer().getTree())) {
xNavComp.getFilteredTree().getViewer().refresh(item);
@@ -69,6 +63,7 @@ public class DefineNavigateView extends ViewPart implements IXNavigateEventListe
createActions();
xNavComp.refresh();
addExtensionPointListenerBecauseOfWorkspaceLoading();
+ setFocusWidget(xNavComp);
}
private void addExtensionPointListenerBecauseOfWorkspaceLoading() {
diff --git a/plugins/org.eclipse.osee.framework.ui.admin/src/org/eclipse/osee/framework/ui/admin/AdminView.java b/plugins/org.eclipse.osee.framework.ui.admin/src/org/eclipse/osee/framework/ui/admin/AdminView.java
index 4ab3052..58beee1 100644
--- a/plugins/org.eclipse.osee.framework.ui.admin/src/org/eclipse/osee/framework/ui/admin/AdminView.java
+++ b/plugins/org.eclipse.osee.framework.ui.admin/src/org/eclipse/osee/framework/ui/admin/AdminView.java
@@ -29,6 +29,7 @@ import org.eclipse.osee.framework.ui.admin.dbtabletab.SiteGssflRpcr;
import org.eclipse.osee.framework.ui.plugin.PluginUiImage;
import org.eclipse.osee.framework.ui.plugin.util.AWorkbench;
import org.eclipse.osee.framework.ui.skynet.FrameworkImage;
+import org.eclipse.osee.framework.ui.skynet.widgets.GenericViewPart;
import org.eclipse.osee.framework.ui.skynet.widgets.dialog.EntryDialog;
import org.eclipse.osee.framework.ui.swt.Displays;
import org.eclipse.osee.framework.ui.swt.ImageManager;
@@ -38,7 +39,6 @@ import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.TabFolder;
-import org.eclipse.ui.part.ViewPart;
/**
* Allows administration of access for OSEE environment <li>Database tables <li>OSEE user permissions
@@ -46,7 +46,7 @@ import org.eclipse.ui.part.ViewPart;
* @author Jeff C. Phillips
*/
-public class AdminView extends ViewPart {
+public class AdminView extends GenericViewPart {
public static final String VIEW_ID = "org.eclipse.osee.framework.ui.admin.AdminView";
private static Action saveAction;
private TabFolder tabFolder;
@@ -66,13 +66,6 @@ public class AdminView extends ViewPart {
handCursor.dispose();
}
- @Override
- public void setFocus() {
- if (parentComp != null) {
- parentComp.setFocus();
- }
- }
-
protected void createActions() throws OseeCoreException {
saveAction = new Action("Save") {
@@ -128,6 +121,7 @@ public class AdminView extends ViewPart {
if (AccessControlManager.isOseeAdmin()) {
toolbarManager.add(pingAction);
}
+ setFocusWidget(parentComp);
}
public void handleBroadcastMessage() {
diff --git a/plugins/org.eclipse.osee.framework.ui.service.control/META-INF/MANIFEST.MF b/plugins/org.eclipse.osee.framework.ui.service.control/META-INF/MANIFEST.MF
index eda7f96..0074169 100644
--- a/plugins/org.eclipse.osee.framework.ui.service.control/META-INF/MANIFEST.MF
+++ b/plugins/org.eclipse.osee.framework.ui.service.control/META-INF/MANIFEST.MF
@@ -39,4 +39,5 @@ Import-Package: com.jcraft.jsch,
org.eclipse.osee.framework.ui.plugin,
org.eclipse.osee.framework.ui.plugin.io,
org.eclipse.osee.framework.ui.plugin.util,
+ org.eclipse.osee.framework.ui.skynet.widgets,
org.eclipse.osee.framework.ui.swt
diff --git a/plugins/org.eclipse.osee.framework.ui.service.control/src/org/eclipse/osee/framework/ui/service/control/view/ServiceManagerView.java b/plugins/org.eclipse.osee.framework.ui.service.control/src/org/eclipse/osee/framework/ui/service/control/view/ServiceManagerView.java
index 8e7464a..d1cc2dc 100644
--- a/plugins/org.eclipse.osee.framework.ui.service.control/src/org/eclipse/osee/framework/ui/service/control/view/ServiceManagerView.java
+++ b/plugins/org.eclipse.osee.framework.ui.service.control/src/org/eclipse/osee/framework/ui/service/control/view/ServiceManagerView.java
@@ -18,16 +18,16 @@ import org.eclipse.osee.framework.ui.service.control.actions.OpenLaunchWizard;
import org.eclipse.osee.framework.ui.service.control.actions.RefreshDataStore;
import org.eclipse.osee.framework.ui.service.control.menu.MenuBuilder;
import org.eclipse.osee.framework.ui.service.control.widgets.ManagerMain;
+import org.eclipse.osee.framework.ui.skynet.widgets.GenericViewPart;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
-import org.eclipse.ui.part.ViewPart;
/**
* @author Roberto E. Escobar
*/
-public class ServiceManagerView extends ViewPart {
+public class ServiceManagerView extends GenericViewPart {
public static final String VIEW_ID = "org.eclipse.osee.framework.ui.service.control.view.ServiceManagerView";
private ManagerMain managerMain;
@@ -46,6 +46,8 @@ public class ServiceManagerView extends ViewPart {
this.setContentDescription("Jini Groups { " + StringUtils.join(JiniLookupGroupConfig.getOseeJiniServiceGroups(),
",") + " }");
+ setFocusWidget(managerMain);
+
}
private void createServicesViewerPopUp() {
@@ -73,8 +75,4 @@ public class ServiceManagerView extends ViewPart {
}
- @Override
- public void setFocus() {
- managerMain.setFocus();
- }
} \ No newline at end of file
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/plugin.xml b/plugins/org.eclipse.osee.framework.ui.skynet/plugin.xml
index e043dd3..98f818d 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/plugin.xml
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/plugin.xml
@@ -1626,25 +1626,25 @@
<key
commandId="org.eclipse.osee.framework.ui.skynet.revealArtifactInExplorer.command"
- contextId="org.eclipse.ui.contexts.window"
+ contextId="org.eclipse.osee.contexts.window"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+R">
+ sequence="M1+R">
</key>
<key
commandId="org.eclipse.osee.framework.ui.skynet.resource.command"
- contextId="org.eclipse.ui.contexts.window"
+ contextId="org.eclipse.osee.contexts.window"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+H">
+ sequence="M1+T">
</key>
<key
commandId="org.eclipse.osee.framework.ui.skynet.skywalker.command"
- contextId="org.eclipse.ui.contexts.window"
+ contextId="org.eclipse.osee.contexts.window"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
- sequence="CTRL+W">
+ sequence="M1+O">
</key>
<key
commandId="org.eclipse.osee.framework.ui.skynet.expandTree.command"
- contextId="org.eclipse.ui.contexts.window"
+ contextId="org.eclipse.osee.contexts.window"
schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
sequence="M1++">
</key>
@@ -1706,4 +1706,13 @@
</action>
</actionSet>
</extension>
+ <extension
+ point="org.eclipse.ui.contexts">
+ <context
+ description="A context supporting key bindings for osee"
+ id="org.eclipse.osee.contexts.window"
+ name="OSEE Context"
+ parentId="org.eclipse.ui.contexts.window">
+ </context>
+ </extension>
</plugin>
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 7573590..8f59273 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
@@ -101,6 +101,7 @@ import org.eclipse.osee.framework.ui.skynet.util.ArtifactClipboard;
import org.eclipse.osee.framework.ui.skynet.util.ArtifactPasteConfiguration;
import org.eclipse.osee.framework.ui.skynet.util.DbConnectionExceptionComposite;
import org.eclipse.osee.framework.ui.skynet.util.SkynetViews;
+import org.eclipse.osee.framework.ui.skynet.widgets.GenericViewPart;
import org.eclipse.osee.framework.ui.skynet.widgets.XBranchSelectWidget;
import org.eclipse.osee.framework.ui.skynet.widgets.dialog.ArtifactTypeFilteredTreeEntryDialog;
import org.eclipse.osee.framework.ui.swt.Displays;
@@ -144,13 +145,12 @@ import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.ExportResourcesAction;
import org.eclipse.ui.actions.ImportResourcesAction;
-import org.eclipse.ui.part.ViewPart;
import org.eclipse.ui.progress.UIJob;
/**
* @author Ryan D. Brooks
*/
-public class ArtifactExplorer extends ViewPart implements IArtifactExplorerEventHandler, IRebuildMenuListener, IAccessControlEventListener, IBranchEventListener, ISelectionProvider, IBranchProvider {
+public class ArtifactExplorer extends GenericViewPart implements IArtifactExplorerEventHandler, IRebuildMenuListener, IAccessControlEventListener, IBranchEventListener, ISelectionProvider, IBranchProvider {
public static final String VIEW_ID = "org.eclipse.osee.framework.ui.skynet.ArtifactExplorer";
private static final String ROOT_GUID = "artifact.explorer.last.root_guid";
private static final String ROOT_BRANCH = "artifact.explorer.last.root_branch";
@@ -366,6 +366,7 @@ public class ArtifactExplorer extends ViewPart implements IArtifactExplorerEvent
refreshBranchWarning();
getViewSite().getActionBars().updateActionBars();
+ setFocusWidget(treeViewer.getControl());
} catch (Exception ex) {
OseeLog.log(Activator.class, OseeLevel.SEVERE_POPUP, ex);
@@ -1015,13 +1016,6 @@ public class ArtifactExplorer extends ViewPart implements IArtifactExplorerEvent
}
}
- @Override
- public void setFocus() {
- if (treeViewer != null) {
- treeViewer.getControl().setFocus();
- }
- }
-
public void explore(Artifact artifact) throws OseeCoreException {
if (artifact == null) {
throw new IllegalArgumentException("Can not explore a null artifact.");
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/AbstractArtifactEditor.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/AbstractArtifactEditor.java
index 1c86123..e91f9c9 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/AbstractArtifactEditor.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/artifact/editor/AbstractArtifactEditor.java
@@ -21,6 +21,7 @@ import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.contexts.IContextService;
import org.eclipse.ui.forms.editor.FormEditor;
/**
@@ -74,6 +75,9 @@ public abstract class AbstractArtifactEditor extends FormEditor implements IDirt
Object[] selected = artifact != null ? new Object[] {artifact} : EMPTY_ARRAY;
defaultSelectionProvider.setSelection(new StructuredSelection(selected));
getSite().setSelectionProvider(defaultSelectionProvider);
+ // set the context (org.eclipse.ui.contexts) to osee to make the osee hotkeys available
+ IContextService contextService = (IContextService) getSite().getService(IContextService.class);
+ contextService.activateContext("org.eclipse.osee.contexts.window");
}
public ISelectionProvider getDefaultSelectionProvider() {
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 ae30579..38b5d03 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
@@ -21,7 +21,10 @@ import org.eclipse.osee.framework.ui.skynet.OseeStatusContributionItemFactory;
import org.eclipse.osee.framework.ui.skynet.internal.Activator;
import org.eclipse.osee.framework.ui.swt.Displays;
import org.eclipse.osee.framework.ui.swt.IDirtiableEditor;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.contexts.IContextService;
import org.eclipse.ui.forms.editor.FormEditor;
/**
@@ -139,4 +142,12 @@ public class BlamEditor extends FormEditor implements IDirtiableEditor {
public void onDirtied() {
// do nothing
}
+
+ @Override
+ public void init(IEditorSite site, IEditorInput input) throws PartInitException {
+ super.init(site, input);
+ // set the context (org.eclipse.ui.contexts) to osee to make the osee hotkeys available
+ IContextService contextService = (IContextService) getSite().getService(IContextService.class);
+ contextService.activateContext("org.eclipse.osee.contexts.window");
+ }
} \ No newline at end of file
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 3515f99..fbd4f2b 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
@@ -31,7 +31,10 @@ import org.eclipse.osee.framework.ui.skynet.change.ChangeReportEditorInput;
import org.eclipse.osee.framework.ui.skynet.change.ChangeUiData;
import org.eclipse.osee.framework.ui.skynet.change.IChangeReportView;
import org.eclipse.osee.framework.ui.skynet.internal.Activator;
+import org.eclipse.ui.IEditorInput;
+import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.contexts.IContextService;
import org.eclipse.ui.forms.editor.FormEditor;
public class ChangeReportEditor extends FormEditor implements IChangeReportView {
@@ -169,4 +172,12 @@ public class ChangeReportEditor extends FormEditor implements IChangeReportView
return null;
}
}
+
+ @Override
+ public void init(IEditorSite site, IEditorInput input) throws PartInitException {
+ super.init(site, input);
+ // set the context (org.eclipse.ui.contexts) to osee to make the osee hotkeys available
+ IContextService contextService = (IContextService) getSite().getService(IContextService.class);
+ contextService.activateContext("org.eclipse.osee.contexts.window");
+ }
}
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 3f591ea..63a278d 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
@@ -48,6 +48,7 @@ import org.eclipse.osee.framework.ui.skynet.OseeStatusContributionItemFactory;
import org.eclipse.osee.framework.ui.skynet.internal.Activator;
import org.eclipse.osee.framework.ui.skynet.listener.IRebuildMenuListener;
import org.eclipse.osee.framework.ui.skynet.util.DbConnectionExceptionComposite;
+import org.eclipse.osee.framework.ui.skynet.widgets.GenericViewPart;
import org.eclipse.osee.framework.ui.skynet.widgets.XBranchSelectWidget;
import org.eclipse.osee.framework.ui.skynet.widgets.dialog.EntryDialog;
import org.eclipse.osee.framework.ui.swt.Displays;
@@ -67,12 +68,11 @@ import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.IViewSite;
import org.eclipse.ui.PartInitException;
-import org.eclipse.ui.part.ViewPart;
/**
* @author Donald G. Dunne
*/
-public class GroupExplorer extends ViewPart implements IArtifactEventListener, IRebuildMenuListener {
+public class GroupExplorer extends GenericViewPart implements IArtifactEventListener, IRebuildMenuListener {
public static final String VIEW_ID = "org.eclipse.osee.framework.ui.skynet.group.GroupExplorer";
private GroupTreeViewer treeViewer;
private Artifact rootArt;
@@ -146,6 +146,7 @@ public class GroupExplorer extends ViewPart implements IArtifactEventListener, I
getViewSite().getActionBars().updateActionBars();
rebuildMenu();
refresh();
+ setFocusWidget(parentComp);
}
@Override
@@ -267,7 +268,8 @@ public class GroupExplorer extends ViewPart implements IArtifactEventListener, I
if (MessageDialog.openConfirm(Displays.getActiveShell(), "Remove From Group",
"Remove From Group - (Artifacts will not be deleted)\n\nAre you sure?")) {
try {
- SkynetTransaction transaction = TransactionManager.createTransaction(branch, "Artifacts removed from group");
+ SkynetTransaction transaction =
+ TransactionManager.createTransaction(branch, "Artifacts removed from group");
for (GroupExplorerItem item : items) {
item.getArtifact().deleteRelation(CoreRelationTypes.Universal_Grouping__Group,
item.getParentItem().getArtifact());
@@ -360,13 +362,6 @@ public class GroupExplorer extends ViewPart implements IArtifactEventListener, I
}
}
- @Override
- public void setFocus() {
- if (parentComp != null) {
- parentComp.setFocus();
- }
- }
-
public void refresh() {
if (rootItem != null) {
rootItem.dispose();
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/user/perspective/UserNavigateView.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/user/perspective/UserNavigateView.java
index 64300f9..fb165ee 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/user/perspective/UserNavigateView.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/user/perspective/UserNavigateView.java
@@ -53,6 +53,7 @@ import org.eclipse.ui.IViewSite;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
+import org.eclipse.ui.contexts.IContextService;
import org.eclipse.ui.part.ViewPart;
import org.eclipse.ui.progress.UIJob;
@@ -229,6 +230,11 @@ public class UserNavigateView extends ViewPart implements IXNavigateEventListene
@Override
public void init(IViewSite site, IMemento memento) throws PartInitException {
super.init(site, memento);
+
+ // set the context (org.eclipse.ui.contexts) to osee to make the osee hotkeys available
+ IContextService contextService = (IContextService) getSite().getService(IContextService.class);
+ contextService.activateContext("org.eclipse.osee.contexts.window");
+
try {
if (memento != null) {
memento = memento.getChild(INPUT);
diff --git a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/GenericViewPart.java b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/GenericViewPart.java
index fde650f..28f8a53 100644
--- a/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/GenericViewPart.java
+++ b/plugins/org.eclipse.osee.framework.ui.skynet/src/org/eclipse/osee/framework/ui/skynet/widgets/GenericViewPart.java
@@ -11,6 +11,9 @@
package org.eclipse.osee.framework.ui.skynet.widgets;
import org.eclipse.swt.widgets.Control;
+import org.eclipse.ui.IViewSite;
+import org.eclipse.ui.PartInitException;
+import org.eclipse.ui.contexts.IContextService;
import org.eclipse.ui.part.ViewPart;
/**
@@ -35,4 +38,13 @@ public abstract class GenericViewPart extends ViewPart {
protected void setFocusWidget(Control widget) {
focusWidget = widget;
}
+
+ @Override
+ public void init(IViewSite site) throws PartInitException {
+ super.init(site);
+
+ // set the context (org.eclipse.ui.contexts) to osee to make the osee hotkeys available
+ IContextService contextService = (IContextService) getSite().getService(IContextService.class);
+ contextService.activateContext("org.eclipse.osee.contexts.window");
+ }
}