Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarc Dumais2014-06-19 18:49:37 +0000
committerMarc Dumais2014-08-14 18:25:04 +0000
commit2af299938cc3ed22c00e6e05c13b0be5a4719ce0 (patch)
tree852b4e9f0487431acfe540d171b87b498ff6280f
parente3d302bc1381b4865b358edcf2eefd5d8280352a (diff)
downloadorg.eclipse.cdt-2af299938cc3ed22c00e6e05c13b0be5a4719ce0.tar.gz
org.eclipse.cdt-2af299938cc3ed22c00e6e05c13b0be5a4719ce0.tar.xz
org.eclipse.cdt-2af299938cc3ed22c00e6e05c13b0be5a4719ce0.zip
Bug 436095 - [visualizer] Make cloning of visualizer view possible
Change-Id: Ic77a218c513c7066a3f7300bb76aa85359ce0852 Reviewed-on: https://git.eclipse.org/r/28807 Reviewed-by: Marc Dumais <marc.dumais@ericsson.com> Tested-by: Marc Dumais <marc.dumais@ericsson.com>
-rw-r--r--debug/org.eclipse.cdt.debug.ui/META-INF/MANIFEST.MF4
-rwxr-xr-xvisualizer/org.eclipse.cdt.visualizer.ui/META-INF/MANIFEST.MF2
-rw-r--r--visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/VisualizerView.java19
3 files changed, 20 insertions, 5 deletions
diff --git a/debug/org.eclipse.cdt.debug.ui/META-INF/MANIFEST.MF b/debug/org.eclipse.cdt.debug.ui/META-INF/MANIFEST.MF
index d6e27cdb939..4960b2719bb 100644
--- a/debug/org.eclipse.cdt.debug.ui/META-INF/MANIFEST.MF
+++ b/debug/org.eclipse.cdt.debug.ui/META-INF/MANIFEST.MF
@@ -8,7 +8,7 @@ Bundle-Vendor: %providerName
Bundle-Localization: plugin
Export-Package:
org.eclipse.cdt.debug.internal.ui;x-friends:="org.eclipse.cdt.dsf.ui,org.eclipse.cdt.dsf.gdb.ui",
- org.eclipse.cdt.debug.internal.ui.actions;x-friends:="org.eclipse.cdt.dsf.ui,org.eclipse.cdt.debug.ui.memory.memorybrowser",
+ org.eclipse.cdt.debug.internal.ui.actions;x-friends:="org.eclipse.cdt.dsf.ui,org.eclipse.cdt.debug.ui.memory.memorybrowser,org.eclipse.cdt.visualizer.ui",
org.eclipse.cdt.debug.internal.ui.actions.breakpoints;x-internal:=true,
org.eclipse.cdt.debug.internal.ui.breakpoints;x-friends:="org.eclipse.cdt.dsf.ui,org.eclipse.cdt.dsf.gdb.ui",
org.eclipse.cdt.debug.internal.ui.commands;x-internal:=true,
@@ -22,7 +22,7 @@ Export-Package:
org.eclipse.cdt.debug.internal.ui.editors;x-internal:=true,
org.eclipse.cdt.debug.internal.ui.elements.adapters;x-internal:=true,
org.eclipse.cdt.debug.internal.ui.launch;x-internal:=true,
- org.eclipse.cdt.debug.internal.ui.pinclone;x-friends:="org.eclipse.cdt.dsf.gdb.ui",
+ org.eclipse.cdt.debug.internal.ui.pinclone;x-friends:="org.eclipse.cdt.dsf.gdb.ui,org.eclipse.cdt.visualizer.ui",
org.eclipse.cdt.debug.internal.ui.preferences;x-internal:=true,
org.eclipse.cdt.debug.internal.ui.propertypages;x-internal:=true,
org.eclipse.cdt.debug.internal.ui.sourcelookup;x-friends:="org.eclipse.cdt.dsf.ui",
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/META-INF/MANIFEST.MF b/visualizer/org.eclipse.cdt.visualizer.ui/META-INF/MANIFEST.MF
index 3b1076dbf90..e000583f504 100755
--- a/visualizer/org.eclipse.cdt.visualizer.ui/META-INF/MANIFEST.MF
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/META-INF/MANIFEST.MF
@@ -18,3 +18,5 @@ Export-Package: org.eclipse.cdt.visualizer.ui,
org.eclipse.cdt.visualizer.ui.plugin,
org.eclipse.cdt.visualizer.ui.test,
org.eclipse.cdt.visualizer.ui.util
+Import-Package: org.eclipse.cdt.debug.internal.ui.actions,
+ org.eclipse.cdt.debug.internal.ui.pinclone
diff --git a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/VisualizerView.java b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/VisualizerView.java
index ec5ce2d73db..13711026b94 100644
--- a/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/VisualizerView.java
+++ b/visualizer/org.eclipse.cdt.visualizer.ui/src/org/eclipse/cdt/visualizer/ui/VisualizerView.java
@@ -7,6 +7,7 @@
*
* Contributors:
* William R. Swanson (Tilera Corporation)
+ * Marc Dumais (Ericsson) - bug 436095
*******************************************************************************/
// Package declaration
@@ -18,6 +19,7 @@ import java.util.List;
// SWT/JFace classes
import org.eclipse.jface.action.IMenuListener2;
import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
@@ -25,11 +27,12 @@ import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Menu;
-import org.eclipse.jface.action.IToolBarManager;
+import org.eclipse.ui.IActionBars;
// Eclipse/CDT classes
import org.eclipse.ui.part.ViewPart;
-import org.eclipse.ui.IActionBars;
+import org.eclipse.cdt.debug.internal.ui.actions.OpenNewViewAction;
+import org.eclipse.cdt.debug.internal.ui.pinclone.PinCloneUtils;
// Custom classes
import org.eclipse.cdt.visualizer.ui.events.IVisualizerViewerListener;
@@ -82,12 +85,17 @@ public class VisualizerView
/** Last context menu display location. */
protected Point m_contextMenuLocation = null;
+ /** Open New View action */
+ private OpenNewViewAction m_openNewViewAction = null;
+
// --- constructors/destructors ---
/** Constructor */
public VisualizerView() {
super();
+ m_openNewViewAction = new OpenNewViewAction();
+ m_openNewViewAction.init(this);
}
/** Dispose method */
@@ -319,9 +327,10 @@ public class VisualizerView
if (m_viewer != null) {
name = m_viewer.getVisualizerDisplayName();
description = m_viewer.getVisualizerDescription();
-
}
setTabName(name);
+ // add secondary id to tab name, if the view is a clone
+ PinCloneUtils.setPartTitle(this);
setTabDescription(description);
// Update toolbar & toolbar menu
@@ -332,6 +341,10 @@ public class VisualizerView
IToolBarManager toolBarManager = actionBars.getToolBarManager();
toolBarManager.removeAll();
m_viewer.populateToolBar(toolBarManager);
+
+ // Add the "open new view" button on the Visualizer toolbar,
+ // after any viewer-specific buttons.
+ toolBarManager.add(m_openNewViewAction);
toolBarManager.update(true);
// Allow presentation to set the toolbar's menu content, if any

Back to the top