Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Ferrazzutti2013-11-25 12:24:48 -0500
committerAndrew Ferrazzutti2013-11-28 09:49:49 -0500
commit43e1ab2fac42f029638f935cf9f0399759d2749b (patch)
tree7f9c22fb93f3eddf62953146d8e147fafd444279
parent2d16d92270989ea35a958ba310535fe1ae2654ae (diff)
downloadorg.eclipse.linuxtools-43e1ab2fac42f029638f935cf9f0399759d2749b.tar.gz
org.eclipse.linuxtools-43e1ab2fac42f029638f935cf9f0399759d2749b.tar.xz
org.eclipse.linuxtools-43e1ab2fac42f029638f935cf9f0399759d2749b.zip
Systemtap: assign non-null title to graphing view.
Assign a non-null title to GraphSelectorEditorInput instances where graphs of script output are displayed. Resolves RHBZ bug 421762. Change-Id: Ie1f917f68985f6fc048b64c293560ccb520bfe5e Signed-off-by: Andrew Ferrazzutti <aferrazz@redhat.com> Reviewed-on: https://git.eclipse.org/r/19013 Tested-by: Hudson CI
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/internal/systemtap/ui/graphing/views/Messages.java1
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/internal/systemtap/ui/graphing/views/messages.properties1
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/views/GraphSelectorEditorInput.java17
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/RunScriptChartHandler.java5
4 files changed, 22 insertions, 2 deletions
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/internal/systemtap/ui/graphing/views/Messages.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/internal/systemtap/ui/graphing/views/Messages.java
index fccb628659..5e96f3fbe1 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/internal/systemtap/ui/graphing/views/Messages.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/internal/systemtap/ui/graphing/views/Messages.java
@@ -16,6 +16,7 @@ import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.systemtap.ui.graphing.views.messages"; //$NON-NLS-1$
public static String GraphSelectorEditor_graphsEditorTitle;
+ public static String GraphSelectorEditor_graphsEditorDefaultTitle;
static {
// initialize resource bundle
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/internal/systemtap/ui/graphing/views/messages.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/internal/systemtap/ui/graphing/views/messages.properties
index 6b88e3b5cd..d6f9fb5ccf 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/internal/systemtap/ui/graphing/views/messages.properties
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/internal/systemtap/ui/graphing/views/messages.properties
@@ -1 +1,2 @@
GraphSelectorEditor_graphsEditorTitle={0} Graphs
+GraphSelectorEditor_graphsEditorDefaultTitle=Systemtap Graphs \ No newline at end of file
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/views/GraphSelectorEditorInput.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/views/GraphSelectorEditorInput.java
index 35d50cda2f..3efa0889ae 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/views/GraphSelectorEditorInput.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphing/src/org/eclipse/linuxtools/systemtap/ui/graphing/views/GraphSelectorEditorInput.java
@@ -11,6 +11,8 @@
package org.eclipse.linuxtools.systemtap.ui.graphing.views;
import org.eclipse.jface.resource.ImageDescriptor;
+import org.eclipse.linuxtools.internal.systemtap.ui.graphing.views.Messages;
+import org.eclipse.osgi.util.NLS;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IPersistableElement;
@@ -19,6 +21,19 @@ import org.eclipse.ui.IPersistableElement;
*/
public class GraphSelectorEditorInput implements IEditorInput {
+ private String title = null;
+
+ public GraphSelectorEditorInput() {
+ title = Messages.GraphSelectorEditor_graphsEditorDefaultTitle;
+ }
+
+ /**
+ * @since 2.1
+ */
+ public GraphSelectorEditorInput(String scriptTitle) {
+ title = NLS.bind(Messages.GraphSelectorEditor_graphsEditorTitle, scriptTitle);
+ }
+
@Override
public Object getAdapter(@SuppressWarnings("rawtypes") Class adapter) {
return null;
@@ -46,7 +61,7 @@ public class GraphSelectorEditorInput implements IEditorInput {
@Override
public String getToolTipText() {
- return null;
+ return title;
}
}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/RunScriptChartHandler.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/RunScriptChartHandler.java
index f81a143a3f..36c6379e88 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/RunScriptChartHandler.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/RunScriptChartHandler.java
@@ -54,8 +54,11 @@ public class RunScriptChartHandler extends RunScriptHandler {
console.getCommand().addInputStreamListener(new ChartStreamDaemon(dataSets.get(i), parsers.get(i)));
}
try {
+ String name = console.getName();
+ String title = name.substring(name.lastIndexOf('/')+1);
+
IWorkbenchPage p = PlatformUI.getWorkbench().showPerspective(IDEPerspective.ID, PlatformUI.getWorkbench().getActiveWorkbenchWindow());
- GraphSelectorEditor ivp = (GraphSelectorEditor)p.openEditor(new GraphSelectorEditorInput(), GraphSelectorEditor.ID);
+ GraphSelectorEditor ivp = (GraphSelectorEditor)p.openEditor(new GraphSelectorEditorInput(title), GraphSelectorEditor.ID);
String scriptName = console.getName();
ivp.createScriptSets(scriptName, names, dataSets);

Back to the top