aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc-Andre Laperle2013-09-24 13:53:17 (EDT)
committerPatrick Tasse2013-10-02 14:25:56 (EDT)
commitc4fac03a09bbe57fb2c3e12f69833f58fbb3cd0e (patch)
tree820554374fc3b68b637a6e254759ef63a99cbd30
parent3bdc32d39608349803f647e491f9d68bc3b3b8d0 (diff)
downloadorg.eclipse.linuxtools-c4fac03a09bbe57fb2c3e12f69833f58fbb3cd0e.zip
org.eclipse.linuxtools-c4fac03a09bbe57fb2c3e12f69833f58fbb3cd0e.tar.gz
org.eclipse.linuxtools-c4fac03a09bbe57fb2c3e12f69833f58fbb3cd0e.tar.bz2
Bug 416316 - New > Tracing Project appears in unrelated perspectivesrefs/changes/30/16730/3
Only enable the wizard in tracing related perspectives. Change-Id: If448514e7edcadde723abe9ca6c53848dc3fb467 Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com> Reviewed-on: https://git.eclipse.org/r/16730 Tested-by: Hudson CI Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com> IP-Clean: Patrick Tasse <patrick.tasse@gmail.com>
-rw-r--r--lttng/org.eclipse.linuxtools.gdbtrace.ui/plugin.xml16
-rw-r--r--lttng/org.eclipse.linuxtools.gdbtrace.ui/src/org/eclipse/linuxtools/internal/gdbtrace/ui/views/GdbPerspectiveFactory.java3
-rw-r--r--lttng/org.eclipse.linuxtools.lttng2.kernel.ui/plugin.xml16
-rw-r--r--lttng/org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/PerspectiveFactory.java3
-rw-r--r--lttng/org.eclipse.linuxtools.tmf.ui/plugin.xml8
5 files changed, 45 insertions, 1 deletions
diff --git a/lttng/org.eclipse.linuxtools.gdbtrace.ui/plugin.xml b/lttng/org.eclipse.linuxtools.gdbtrace.ui/plugin.xml
index a559494..f5eda17 100644
--- a/lttng/org.eclipse.linuxtools.gdbtrace.ui/plugin.xml
+++ b/lttng/org.eclipse.linuxtools.gdbtrace.ui/plugin.xml
@@ -86,5 +86,21 @@
</activeWhen>
</handler>
</extension>
+ <extension
+ point="org.eclipse.ui.navigator.navigatorContent">
+ <commonWizard
+ associatedExtensionId="org.eclipse.linuxtools.tmf.ui.navigator.content"
+ menuGroupId="org.eclipse.linuxtools.tmf.ui.views.ui.wizards.menuGroupId"
+ type="new"
+ wizardId="org.eclipse.linuxtools.tmf.ui.views.ui.wizards.newProject">
+ <enablement>
+ <with variable="activeWorkbenchWindow.activePerspective">
+ <equals
+ value="org.eclipse.linuxtools.gdbtrace.perspective">
+ </equals>
+ </with>
+ </enablement>
+ </commonWizard>
+ </extension>
</plugin>
diff --git a/lttng/org.eclipse.linuxtools.gdbtrace.ui/src/org/eclipse/linuxtools/internal/gdbtrace/ui/views/GdbPerspectiveFactory.java b/lttng/org.eclipse.linuxtools.gdbtrace.ui/src/org/eclipse/linuxtools/internal/gdbtrace/ui/views/GdbPerspectiveFactory.java
index 28b03dc..8bff038 100644
--- a/lttng/org.eclipse.linuxtools.gdbtrace.ui/src/org/eclipse/linuxtools/internal/gdbtrace/ui/views/GdbPerspectiveFactory.java
+++ b/lttng/org.eclipse.linuxtools.gdbtrace.ui/src/org/eclipse/linuxtools/internal/gdbtrace/ui/views/GdbPerspectiveFactory.java
@@ -15,6 +15,7 @@ package org.eclipse.linuxtools.internal.gdbtrace.ui.views;
import org.eclipse.debug.ui.IDebugUIConstants;
import org.eclipse.linuxtools.internal.gdbtrace.ui.GdbTraceUIPlugin;
+import org.eclipse.linuxtools.tmf.ui.project.wizards.NewTmfProjectWizard;
import org.eclipse.ui.IFolderLayout;
import org.eclipse.ui.IPageLayout;
import org.eclipse.ui.IPerspectiveFactory;
@@ -72,5 +73,7 @@ public class GdbPerspectiveFactory implements IPerspectiveFactory {
// Create the middle right folder
IFolderLayout traceControlFolder = layout.createFolder(TraceControlFolder, IPageLayout.RIGHT, 0.50f, DebugFolder);
traceControlFolder.addView(TRACE_CONTROL_VIEW_ID);
+
+ layout.addNewWizardShortcut(NewTmfProjectWizard.ID);
}
}
diff --git a/lttng/org.eclipse.linuxtools.lttng2.kernel.ui/plugin.xml b/lttng/org.eclipse.linuxtools.lttng2.kernel.ui/plugin.xml
index 7734101..98b081b 100644
--- a/lttng/org.eclipse.linuxtools.lttng2.kernel.ui/plugin.xml
+++ b/lttng/org.eclipse.linuxtools.lttng2.kernel.ui/plugin.xml
@@ -45,4 +45,20 @@
</eventsTableType>
</type>
</extension>
+ <extension
+ point="org.eclipse.ui.navigator.navigatorContent">
+ <commonWizard
+ associatedExtensionId="org.eclipse.linuxtools.tmf.ui.navigator.content"
+ menuGroupId="org.eclipse.linuxtools.tmf.ui.views.ui.wizards.menuGroupId"
+ type="new"
+ wizardId="org.eclipse.linuxtools.tmf.ui.views.ui.wizards.newProject">
+ <enablement>
+ <with variable="activeWorkbenchWindow.activePerspective">
+ <equals
+ value="org.eclipse.linuxtools.lttng2.kernel.ui.perspective">
+ </equals>
+ </with>
+ </enablement>
+ </commonWizard>
+ </extension>
</plugin>
diff --git a/lttng/org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/PerspectiveFactory.java b/lttng/org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/PerspectiveFactory.java
index b32a5ce..3dfb9e2 100644
--- a/lttng/org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/PerspectiveFactory.java
+++ b/lttng/org.eclipse.linuxtools.lttng2.kernel.ui/src/org/eclipse/linuxtools/internal/lttng2/kernel/ui/views/PerspectiveFactory.java
@@ -15,6 +15,7 @@ package org.eclipse.linuxtools.internal.lttng2.kernel.ui.views;
import org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.controlflow.ControlFlowView;
import org.eclipse.linuxtools.internal.lttng2.kernel.ui.views.resources.ResourcesView;
import org.eclipse.linuxtools.internal.lttng2.ui.views.control.ControlView;
+import org.eclipse.linuxtools.tmf.ui.project.wizards.NewTmfProjectWizard;
import org.eclipse.linuxtools.tmf.ui.views.histogram.HistogramView;
import org.eclipse.linuxtools.tmf.ui.views.statistics.TmfStatisticsView;
import org.eclipse.ui.IFolderLayout;
@@ -73,6 +74,8 @@ public class PerspectiveFactory implements IPerspectiveFactory {
bottomRightFolder.addView(HISTOGRAM_VIEW_ID);
bottomRightFolder.addView(PROPERTIES_VIEW_ID);
bottomRightFolder.addView(BOOKMARKS_VIEW_ID);
+
+ layout.addNewWizardShortcut(NewTmfProjectWizard.ID);
}
/**
diff --git a/lttng/org.eclipse.linuxtools.tmf.ui/plugin.xml b/lttng/org.eclipse.linuxtools.tmf.ui/plugin.xml
index 9a7e5bc..c0a01ac 100644
--- a/lttng/org.eclipse.linuxtools.tmf.ui/plugin.xml
+++ b/lttng/org.eclipse.linuxtools.tmf.ui/plugin.xml
@@ -256,7 +256,13 @@
menuGroupId="org.eclipse.linuxtools.tmf.ui.views.ui.wizards.menuGroupId"
type="new"
wizardId="org.eclipse.linuxtools.tmf.ui.views.ui.wizards.newProject">
- <enablement></enablement>
+ <enablement>
+ <with variable="activeWorkbenchWindow.activePerspective">
+ <equals
+ value="org.eclipse.linuxtools.tmf.ui.perspective">
+ </equals>
+ </with>
+ </enablement>
</commonWizard>
</navigatorContent>
</extension>