Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew Ferrazzutti2014-05-13 15:20:08 -0400
committerAlexander Kurtakov2014-05-14 02:04:02 -0400
commit36c5063895834b1113394a9a58c32ee8d29fe95b (patch)
treeee182ce563c97f93e811e95868a469a97716d932
parent5cf131f41006c3714ddf95c0317c792f8a8ab2f6 (diff)
downloadorg.eclipse.linuxtools-36c5063895834b1113394a9a58c32ee8d29fe95b.tar.gz
org.eclipse.linuxtools-36c5063895834b1113394a9a58c32ee8d29fe95b.tar.xz
org.eclipse.linuxtools-36c5063895834b1113394a9a58c32ee8d29fe95b.zip
Systemtap: Clean UI plugin; organize packages.
-Remove/replace unused strings in .ui.ide/lugin.properties. -Move all Handlers in .ui.ide.actions to .ui.ide.handlers. Change-Id: Ic95d825a991f775be9161ef72d01a9a3e53046a1 Signed-off-by: Andrew Ferrazzutti <aferrazz@redhat.com> Reviewed-on: https://git.eclipse.org/r/26482 Tested-by: Hudson CI Reviewed-by: Alexander Kurtakov <akurtako@redhat.com> Tested-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/src/org/eclipse/linuxtools/systemtap/ui/ide/test/editors/stp/STPToggleCommentTest.java2
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.properties70
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.xml38
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/KernelSourceAction.java2
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/Messages.java40
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/messages.properties24
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/ExportDataSetHandler.java (renamed from systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/ExportDataSetHandler.java)8
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/ImportDataSetHandler.java (renamed from systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/ImportDataSetHandler.java)10
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/ImportTapsetHandler.java (renamed from systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/ImportTapsetHandler.java)2
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/IndentHandler.java (renamed from systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/IndentHandler.java)2
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/Messages.java9
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/RunScriptChartHandler.java (renamed from systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/RunScriptChartHandler.java)4
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/RunScriptHandler.java (renamed from systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/RunScriptHandler.java)13
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/ToggleCommentHandler.java (renamed from systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/ToggleCommentHandler.java)2
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/messages.properties11
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/launcher/SystemTapScriptLaunchConfigurationDelegate.java4
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/localization.properties1
17 files changed, 84 insertions, 158 deletions
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/src/org/eclipse/linuxtools/systemtap/ui/ide/test/editors/stp/STPToggleCommentTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/src/org/eclipse/linuxtools/systemtap/ui/ide/test/editors/stp/STPToggleCommentTest.java
index 8349c816d0..fcd464729a 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/src/org/eclipse/linuxtools/systemtap/ui/ide/test/editors/stp/STPToggleCommentTest.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide.tests/src/org/eclipse/linuxtools/systemtap/ui/ide/test/editors/stp/STPToggleCommentTest.java
@@ -18,8 +18,8 @@ import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITextSelection;
import org.eclipse.jface.text.Region;
-import org.eclipse.linuxtools.internal.systemtap.ui.ide.actions.ToggleCommentHandler;
import org.eclipse.linuxtools.internal.systemtap.ui.ide.editors.stp.STPDocumentProvider;
+import org.eclipse.linuxtools.internal.systemtap.ui.ide.handlers.ToggleCommentHandler;
import org.junit.BeforeClass;
import org.junit.Test;
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.properties
index d4905469a1..83e6bc165d 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.properties
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.properties
@@ -8,7 +8,6 @@ view.kernel.name=Kernel Source
editor.stp.name=SystemTap STP Editor
editor.simple.name=Simple Editor
-editor.c.name=C Editor
preference.ide.name=IDE
preference.editor.name=Editor
@@ -16,27 +15,10 @@ preference.codeAssist.name=Code Assist
preference.conditionalFilter.name=Conditional Filters
preference.syntaxColor.name=Syntax Coloring
preference.path.name=Kernel Source Path
-preference.stap.name=Stap
-preference.stapOptions.name=Stap Options
preference.tapsets.name=Tapsets
preference.envVars.name=Environment Variables
preference.systemTap.name=SystemTap
-command.import.name=Import Tapset...
-command.import.desc=Import tapset directory
-command.stop.name=Stop
-command.stop.desc=Stop running script
-command.runOptions.name=Run w/Options
-command.runOptions.desc=Run the Script w/Options
-command.run.name=Run
-command.run.desc=Run the Script
-command.insertProbe.name=Insert Probe
-command.insertProbe.desc=Insert this probe
-command.insertFunction.name=Insert Function
-command.insertFunction.desc=Insert this function
-command.runChart.name=Run w/Chart
-command.runChart.desc=Run the Script w/Chart
-
category.file.name=File
category.file.desc=SystemTap file operations
category.run.name=Run
@@ -48,40 +30,12 @@ category.tapset.desc=Tapset content actions
category.cfiles.name=C Actions
category.cfiles.desc=Actions applied to C/C++ files
-toolbar.actions.name=SystemTap Actions
-
-action.import.name=Import Tapset...
-action.import.desc=Import tapset directory
-action.runOptions.name=Run w/Options
-action.runOptions.desc=Run the Script w/Options
-action.run.name=SystemTap: Simple Run
-action.run.desc=Run the script without options/charts
-
-launch.run.name=SystemTap Script
-launch.run.desc=Run SystemTap script with project launch options
-
-action.runChart.name=Run w/Chart
-action.runChart.desc=Run the Script w/Chart
-action.stop.name=Stop
-action.stop.desc=Stop running script
-action.insertProbe.name=Insert Probe
-action.insertProbe.desc=Insert this probe
-action.insertFunction.name=Insert Function
-action.insertFunction.desc=Insert this function
-action.viewDefinition.name=View Definition
-action.viewDefinition.desc=Open the tapset file that defines this element.
-
-action.dataExport.name=SystemTap: Export Data Set
-action.dataExport.desc=Export graph contents to an external file
-action.dataImport.name=SystemTap: Import Data Set
-action.dataImport.desc=Import previously-saved graph contents
-
-
-category.name=SystemTap
-wizard.name=SystemTap Script
-
-command.runChart.name=Run w/C&hart
-command.runChart.desc=Run the Script w/Chart
+command.import.name=Import Tapset...
+command.import.desc=Import tapset directory
+command.run.name=SystemTap: Simple Run
+command.run.desc=Run the script without options/charts
+command.viewDefinition.name=View Definition
+command.viewDefinition.desc=Open the tapset file that defines this element.
command.toggleComment.name=Toggle Comment
command.toggleComment.desc=Toggle Single Line SystemTap Comment
command.toggleComment.mne=Tog&gle Comment
@@ -91,6 +45,18 @@ command.indent.mne=Correct &Indentation
command.addStapProbe.name=Add SystemTap Probe
command.addStapProbe.desc=Probe the current C file at the designated line.
command.addStapProbe.mne=Add SystemTap &Probe
+command.dataExport.name=SystemTap: Export Data Set
+command.dataExport.desc=Export graph contents to an external file
+command.dataImport.name=SystemTap: Import Data Set
+command.dataImport.desc=Import previously-saved graph contents
+
+toolbar.actions.name=SystemTap Actions
+
+launch.run.name=SystemTap Script
+launch.run.desc=Run SystemTap script with project launch options
+
+category.name=SystemTap
+wizard.name=SystemTap Script
editor.context.name=SystemTap Editor
editor.context.desc=Editor for SystemTap Scripts
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.xml
index a181613143..c9deb14649 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.xml
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.xml
@@ -83,7 +83,7 @@
<command
commandId="org.eclipse.linuxtools.systemtap.ui.ide.commands.ImportTapset"
icon="icons/actions/import_wiz.gif"
- label="%action.import.name"
+ label="%command.import.name"
style="push">
<visibleWhen
checkEnabled="true">
@@ -97,7 +97,7 @@
<command
commandId="org.eclipse.linuxtools.systemtap.ui.ide.RunScriptCommand"
icon="icons/actions/run/run_exc.gif"
- label="%action.run.desc"
+ label="%command.run.desc"
style="push">
<visibleWhen
checkEnabled="true">
@@ -111,7 +111,7 @@
<command
commandId="org.eclipse.linuxtools.systemtap.ui.ide.ExportDataSetCommand"
icon="icons/actions/exportpref_obj.gif"
- label="%action.dataExport.name"
+ label="%command.dataExport.name"
style="push">
<visibleWhen
checkEnabled="true">
@@ -120,7 +120,7 @@
<command
commandId="org.eclipse.linuxtools.systemtap.ui.ide.ImportDataSetCommand"
icon="icons/actions/importpref_obj.gif"
- label="%action.dataImport.name"
+ label="%command.dataImport.name"
style="push">
<visibleWhen
checkEnabled="true">
@@ -281,8 +281,8 @@
id="org.eclipse.linuxtools.systemtap.ui.ide.category.run">
</category>
<command
- name="%action.run.name"
- description="%action.run.desc"
+ name="%command.run.name"
+ description="%command.run.desc"
categoryId="org.eclipse.linuxtools.systemtap.ui.ide.category.run"
id="org.eclipse.linuxtools.systemtap.ui.ide.RunScriptCommand">
</command>
@@ -293,14 +293,14 @@
id="org.eclipse.linuxtools.systemtap.ui.ide.category.data">
</category>
<command
- name="%action.dataExport.name"
- description="%action.dataExport.desc"
+ name="%command.dataExport.name"
+ description="%command.dataExport.desc"
categoryId="org.eclipse.linuxtools.systemtap.ui.ide.category.data"
id="org.eclipse.linuxtools.systemtap.ui.ide.ExportDataSetCommand">
</command>
<command
- name="%action.dataImport.name"
- description="%action.dataImport.desc"
+ name="%command.dataImport.name"
+ description="%command.dataImport.desc"
categoryId="org.eclipse.linuxtools.systemtap.ui.ide.category.data"
id="org.eclipse.linuxtools.systemtap.ui.ide.ImportDataSetCommand">
</command>
@@ -315,14 +315,14 @@
categoryId="org.eclipse.linuxtools.systemtap.ui.ide.category.source"
description="%command.toggleComment.desc"
id="org.eclipse.linuxtools.systemtap.ui.ide.toggleComment"
- defaultHandler="org.eclipse.linuxtools.internal.systemtap.ui.ide.actions.ToggleCommentHandler">
+ defaultHandler="org.eclipse.linuxtools.internal.systemtap.ui.ide.handlers.ToggleCommentHandler">
</command>
<command
name="%command.indent.name"
description="%command.indent.desc"
categoryId="org.eclipse.linuxtools.systemtap.ui.ide.category.source"
id="org.eclipse.linuxtools.systemtap.ui.ide.indent"
- defaultHandler="org.eclipse.linuxtools.internal.systemtap.ui.ide.actions.IndentHandler">
+ defaultHandler="org.eclipse.linuxtools.internal.systemtap.ui.ide.handlers.IndentHandler">
</command>
<category
@@ -331,8 +331,8 @@
id="org.eclipse.linuxtools.systemtap.ui.ide.category.tapset">
</category>
<command
- name="%action.viewDefinition.name"
- description="%action.viewDefinition.desc"
+ name="%command.viewDefinition.name"
+ description="%command.viewDefinition.desc"
categoryId="org.eclipse.linuxtools.systemtap.ui.ide.category.tapset"
id="org.eclipse.linuxtools.systemtap.ui.ide.definitionMenu">
</command>
@@ -354,7 +354,7 @@
<extension
point="org.eclipse.ui.handlers">
<handler
- class="org.eclipse.linuxtools.internal.systemtap.ui.ide.actions.RunScriptHandler"
+ class="org.eclipse.linuxtools.internal.systemtap.ui.ide.handlers.RunScriptHandler"
commandId="org.eclipse.linuxtools.systemtap.ui.ide.RunScriptCommand">
<activeWhen>
<with
@@ -366,7 +366,7 @@
</activeWhen>
</handler>
<handler
- class="org.eclipse.linuxtools.internal.systemtap.ui.ide.actions.ImportTapsetHandler"
+ class="org.eclipse.linuxtools.internal.systemtap.ui.ide.handlers.ImportTapsetHandler"
commandId="org.eclipse.linuxtools.systemtap.ui.ide.commands.ImportTapset">
<activeWhen>
<reference
@@ -375,7 +375,7 @@
</activeWhen>
</handler>
<handler
- class="org.eclipse.linuxtools.internal.systemtap.ui.ide.actions.ImportDataSetHandler"
+ class="org.eclipse.linuxtools.internal.systemtap.ui.ide.handlers.ImportDataSetHandler"
commandId="org.eclipse.linuxtools.systemtap.ui.ide.ImportDataSetCommand">
<activeWhen>
<reference
@@ -384,7 +384,7 @@
</activeWhen>
</handler>
<handler
- class="org.eclipse.linuxtools.internal.systemtap.ui.ide.actions.ExportDataSetHandler"
+ class="org.eclipse.linuxtools.internal.systemtap.ui.ide.handlers.ExportDataSetHandler"
commandId="org.eclipse.linuxtools.systemtap.ui.ide.ExportDataSetCommand">
<activeWhen>
<reference
@@ -485,7 +485,7 @@
value="org.eclipse.linuxtools.internal.systemtap.ui.ide.editors.stp.STPEditor">
</equals>
</with>
- </and>
+ </and>
</or>
</iterate>
</with>
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/KernelSourceAction.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/KernelSourceAction.java
index e0d3ba090c..abb6c5ed77 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/KernelSourceAction.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/KernelSourceAction.java
@@ -79,7 +79,7 @@ public class KernelSourceAction extends BrowserViewAction {
try {
wb.getActiveWorkbenchWindow().getActivePage().openEditor(input, CDT_EDITOR_ID);
} catch (PartInitException e) {
- ExceptionErrorDialog.openError(Messages.ScriptRunAction_errorDialogTitle, e);
+ ExceptionErrorDialog.openError(Localization.getString("KernelSourceAction.CantOpenEditor"), e); //$NON-NLS-1$
}
}
} else {
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/Messages.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/Messages.java
deleted file mode 100644
index f9d168a4d9..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/Messages.java
+++ /dev/null
@@ -1,40 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2012 IBM Corporation.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * IBM Corporation - initial API and implementation
- *******************************************************************************/
-
-package org.eclipse.linuxtools.internal.systemtap.ui.ide.actions;
-
-import org.eclipse.osgi.util.NLS;
-
-/**
- * @since 2.0
- */
-public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.systemtap.ui.ide.actions.messages"; //$NON-NLS-1$
- public static String ScriptRunAction_InvalidScriptTitle;
- public static String ScriptRunAction_InvalidScriptMessage;
- public static String ScriptRunAction_errorDialogTitle;
- public static String RunScriptAction_alreadyRunningDialogTitle;
- public static String RunScriptAction_alreadyRunningDialogMessage;
- public static String RunScriptChartAction_couldNotSwitchToGraphicPerspective;
- public static String DataSetFileExtension;
- public static String ExportDataSetAction_DialogTitle;
- public static String ImportDataSetAction_DialogTitle;
- public static String ImportDataSetAction_FileInvalid;
- public static String ImportDataSetAction_FileNotFound;
-
- static {
- // initialize resource bundle
- NLS.initializeMessages(BUNDLE_NAME, Messages.class);
- }
-
- private Messages() {
- }
-}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/messages.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/messages.properties
deleted file mode 100644
index a4e4312444..0000000000
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/messages.properties
+++ /dev/null
@@ -1,24 +0,0 @@
-###############################################################################
-# Copyright (c) 2009 Red Hat, Inc.
-# All rights reserved. This program and the accompanying materials
-# are made available under the terms of the Eclipse Public License v1.0
-# which accompanies this distribution, and is available at
-# http://www.eclipse.org/legal/epl-v10.html
-#
-# Contributors:
-# Red Hat - initial API and implementation
-###############################################################################
-
-ScriptRunAction_InvalidScriptTitle=Invalid Script Name
-ScriptRunAction_InvalidScriptMessage=Script name must only contain characters 'a'-'z','A'-'Z', '0'-'9' and '_'
-ScriptRunAction_errorDialogTitle=Unable to open editor
-
-RunScriptAction_alreadyRunningDialogTitle=Script Already Running
-RunScriptAction_alreadyRunningDialogMessage=An instance of {0} is already running, and multiple instances cannot be running at the same time. Would you like to terminate it and start a new run?
-RunScriptChartAction_couldNotSwitchToGraphicPerspective=Could not open the Graph Selector Editor.
-
-DataSetFileExtension=*.set
-ExportDataSetAction_DialogTitle=Save Data Set of "{0}"
-ImportDataSetAction_DialogTitle=Import Data Set
-ImportDataSetAction_FileInvalid=Error with chosen file: the file is invalid.
-ImportDataSetAction_FileNotFound=Error with chosen file: the file is invalid.
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/ExportDataSetHandler.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/ExportDataSetHandler.java
index f42953ee4b..c81a7d6af6 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/ExportDataSetHandler.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/ExportDataSetHandler.java
@@ -1,12 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat.
+ * Copyright (c) 2013 Red Hat, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
*******************************************************************************/
-package org.eclipse.linuxtools.internal.systemtap.ui.ide.actions;
+package org.eclipse.linuxtools.internal.systemtap.ui.ide.handlers;
import java.io.File;
import java.text.MessageFormat;
@@ -23,7 +26,6 @@ import org.eclipse.ui.handlers.HandlerUtil;
/**
* This <code>Action</code> exports all data in the currently-active {@link GraphSelectorEditor}
* into an external file, which can be imported back in later with {@link ImportDataSetHandler}.
- * @author Andrew Ferrazzutti
*/
public class ExportDataSetHandler extends AbstractHandler {
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/ImportDataSetHandler.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/ImportDataSetHandler.java
index 040830657d..5540e71f3c 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/ImportDataSetHandler.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/ImportDataSetHandler.java
@@ -1,12 +1,15 @@
/*******************************************************************************
- * Copyright (c) 2013 Red Hat.
+ * Copyright (c) 2013 Red Hat, Inc.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat - initial API and implementation
*******************************************************************************/
-package org.eclipse.linuxtools.internal.systemtap.ui.ide.actions;
+package org.eclipse.linuxtools.internal.systemtap.ui.ide.handlers;
import java.io.BufferedReader;
import java.io.File;
@@ -38,7 +41,6 @@ import org.eclipse.ui.WorkbenchException;
* This <code>Action</code> imports data from an external file to populate
* a {@link GraphSelectorEditor}.
* into an external file, which can be imported back in later.
- * @author Andrew Ferrazzutti
*/
public class ImportDataSetHandler extends AbstractHandler {
@@ -79,7 +81,7 @@ public class ImportDataSetHandler extends AbstractHandler {
} catch (IOException ioe) {
ExceptionErrorDialog.openError(Messages.ImportDataSetAction_FileInvalid, ioe);
} catch (WorkbenchException we) {
- ExceptionErrorDialog.openError(Messages.RunScriptChartAction_couldNotSwitchToGraphicPerspective, we);
+ ExceptionErrorDialog.openError(Messages.RunScriptChartHandler_couldNotSwitchToGraphicPerspective, we);
}
return null;
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/ImportTapsetHandler.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/ImportTapsetHandler.java
index 3f912c3c0e..de7e9f5191 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/ImportTapsetHandler.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/ImportTapsetHandler.java
@@ -10,7 +10,7 @@
* Red Hat - migration to Handler implementation
*******************************************************************************/
-package org.eclipse.linuxtools.internal.systemtap.ui.ide.actions;
+package org.eclipse.linuxtools.internal.systemtap.ui.ide.handlers;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/IndentHandler.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/IndentHandler.java
index 5684166c8f..129e8022cf 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/IndentHandler.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/IndentHandler.java
@@ -11,7 +11,7 @@
* Anton Leherbauer (Wind River Systems)
* Red Hat Inc. - modified for use in SystemTap
*******************************************************************************/
-package org.eclipse.linuxtools.internal.systemtap.ui.ide.actions;
+package org.eclipse.linuxtools.internal.systemtap.ui.ide.handlers;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/Messages.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/Messages.java
index e8a4c102ed..5adb922c70 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/Messages.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/Messages.java
@@ -17,6 +17,15 @@ import org.eclipse.osgi.util.NLS;
*/
public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.linuxtools.internal.systemtap.ui.ide.handlers.messages"; //$NON-NLS-1$
+ public static String RunScriptHandler_InvalidScriptMessage;
+ public static String RunScriptHandler_AlreadyRunningDialogTitle;
+ public static String RunScriptHandler_AlreadyRunningDialogMessage;
+ public static String RunScriptChartHandler_couldNotSwitchToGraphicPerspective;
+ public static String DataSetFileExtension;
+ public static String ExportDataSetAction_DialogTitle;
+ public static String ImportDataSetAction_DialogTitle;
+ public static String ImportDataSetAction_FileInvalid;
+ public static String ImportDataSetAction_FileNotFound;
public static String AddStapProbe_editorError;
public static String AddStapProbe_unableToInsertProbe;
public static String CEditor_probeInsertFailed;
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/handlers/RunScriptChartHandler.java
index fcf6508625..5c7b990c79 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/handlers/RunScriptChartHandler.java
@@ -9,7 +9,7 @@
* IBM Corporation - Jeff Briggs, Henry Hughes, Ryan Morse, Anithra P J
*******************************************************************************/
-package org.eclipse.linuxtools.internal.systemtap.ui.ide.actions;
+package org.eclipse.linuxtools.internal.systemtap.ui.ide.handlers;
import java.util.LinkedList;
import java.util.List;
@@ -69,7 +69,7 @@ public class RunScriptChartHandler extends RunScriptHandler {
}
}
} catch (WorkbenchException we) {
- ExceptionErrorDialog.openError(Messages.RunScriptChartAction_couldNotSwitchToGraphicPerspective, we);
+ ExceptionErrorDialog.openError(Messages.RunScriptChartHandler_couldNotSwitchToGraphicPerspective, we);
}
super.scriptConsoleInitialized(console);
}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/RunScriptHandler.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/RunScriptHandler.java
index e657fbe3a6..f7b094fcbc 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/RunScriptHandler.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/RunScriptHandler.java
@@ -8,7 +8,7 @@
* Jeff Briggs, Henry Hughes, Ryan Morse, Roland Grunberg, Anithra P J
*******************************************************************************/
-package org.eclipse.linuxtools.internal.systemtap.ui.ide.actions;
+package org.eclipse.linuxtools.internal.systemtap.ui.ide.handlers;
import java.io.File;
import java.io.FileNotFoundException;
@@ -36,7 +36,6 @@ import org.eclipse.jface.window.Window;
import org.eclipse.jface.wizard.ProgressMonitorPart;
import org.eclipse.linuxtools.internal.systemtap.ui.ide.IDEPlugin;
import org.eclipse.linuxtools.internal.systemtap.ui.ide.Localization;
-import org.eclipse.linuxtools.internal.systemtap.ui.ide.editors.stp.STPEditor;
import org.eclipse.linuxtools.internal.systemtap.ui.ide.launcher.SystemTapScriptLaunch;
import org.eclipse.linuxtools.internal.systemtap.ui.ide.preferences.EnvironmentVariablesPreferencePage;
import org.eclipse.linuxtools.internal.systemtap.ui.ide.preferences.IDEPreferenceConstants;
@@ -175,8 +174,8 @@ public class RunScriptHandler extends AbstractHandler {
if (ScriptConsole.instanceIsRunning(name)) {
MessageDialog dialog = new MessageDialog(
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell(),
- Messages.RunScriptAction_alreadyRunningDialogTitle, null,
- MessageFormat.format(Messages.RunScriptAction_alreadyRunningDialogMessage, fileName),
+ Messages.RunScriptHandler_AlreadyRunningDialogTitle, null,
+ MessageFormat.format(Messages.RunScriptHandler_AlreadyRunningDialogMessage, fileName),
MessageDialog.QUESTION, new String[]{"Yes", "No"}, 0); //$NON-NLS-1$ //$NON-NLS-2$
if (dialog.open() != Window.OK) {
if (launch != null) {
@@ -412,7 +411,7 @@ public class RunScriptHandler extends AbstractHandler {
Matcher modNameMatch = validModName.matcher(modname);
if (!modNameMatch.matches()) {
continueRun = false;
- throw new ExecutionException(Messages.ScriptRunAction_InvalidScriptMessage);
+ throw new ExecutionException(Messages.RunScriptHandler_InvalidScriptMessage);
}
String[] script = new String[cmdList.size() + 4];
@@ -433,9 +432,9 @@ public class RunScriptHandler extends AbstractHandler {
return dotIndex != -1 ? fileName.substring(0, dotIndex) : fileName;
}
- @Override
+ /*@Override
public boolean isEnabled() {
return (PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().getActiveEditor() instanceof STPEditor);
- }
+ }*/
}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/ToggleCommentHandler.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/ToggleCommentHandler.java
index d1021ceae7..c18e6bb993 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/actions/ToggleCommentHandler.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/ToggleCommentHandler.java
@@ -8,7 +8,7 @@
* Contributors:
* Red Hat Inc. - initial API and implementation
*******************************************************************************/
-package org.eclipse.linuxtools.internal.systemtap.ui.ide.actions;
+package org.eclipse.linuxtools.internal.systemtap.ui.ide.handlers;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/messages.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/messages.properties
index 76e97e6adc..b5857d3adf 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/messages.properties
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/handlers/messages.properties
@@ -9,6 +9,17 @@
# Red Hat - initial API and implementation
###############################################################################
+RunScriptHandler_InvalidScriptMessage=Script name must only contain characters 'a'-'z','A'-'Z', '0'-'9' and '_'
+RunScriptHandler_AlreadyRunningDialogTitle=Script Already Running
+RunScriptHandler_AlreadyRunningDialogMessage=An instance of {0} is already running, and multiple instances cannot be running at the same time. Would you like to terminate it and start a new run?
+RunScriptChartHandler_couldNotSwitchToGraphicPerspective=Could not open the Graph Selector Editor.
+
+DataSetFileExtension=*.set
+ExportDataSetAction_DialogTitle=Save Data Set of "{0}"
+ImportDataSetAction_DialogTitle=Import Data Set
+ImportDataSetAction_FileInvalid=Error with chosen file: the file is invalid.
+ImportDataSetAction_FileNotFound=Error with chosen file: the file cannot be found.
+
AddStapProbe_editorError=Invalid editor type for probe addition.
AddStapProbe_unableToInsertProbe=Unable to Insert Probe
CEditor_probeInsertFailed=Probe Insertion Failure
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/launcher/SystemTapScriptLaunchConfigurationDelegate.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/launcher/SystemTapScriptLaunchConfigurationDelegate.java
index 1f40271e80..c3eb692257 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/launcher/SystemTapScriptLaunchConfigurationDelegate.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/launcher/SystemTapScriptLaunchConfigurationDelegate.java
@@ -32,8 +32,8 @@ import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
import org.eclipse.debug.core.ILaunchManager;
import org.eclipse.debug.core.model.LaunchConfigurationDelegate;
import org.eclipse.linuxtools.internal.systemtap.ui.ide.IDEPlugin;
-import org.eclipse.linuxtools.internal.systemtap.ui.ide.actions.RunScriptChartHandler;
-import org.eclipse.linuxtools.internal.systemtap.ui.ide.actions.RunScriptHandler;
+import org.eclipse.linuxtools.internal.systemtap.ui.ide.handlers.RunScriptChartHandler;
+import org.eclipse.linuxtools.internal.systemtap.ui.ide.handlers.RunScriptHandler;
import org.eclipse.linuxtools.internal.systemtap.ui.ide.preferences.IDEPreferenceConstants;
import org.eclipse.linuxtools.systemtap.graphing.core.datasets.IDataSetParser;
import org.eclipse.linuxtools.systemtap.graphing.core.datasets.IFilteredDataSet;
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/localization.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/localization.properties
index f1f822d9c1..ac40b9e232 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/localization.properties
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/localization.properties
@@ -9,6 +9,7 @@ RunScriptHandler.fileIOError=Error reading script file.
KernelSourceAction.Insert=&Insert
KernelSourceAction.InsertSelectedFunction=Insert the Selected Function
+KernelSourceAction.CantOpenEditor=Unable to open editor
ProbeAliasAction.Insert=&Insert
ProbeAliasAction.InsertSelectedProbe=Insert the Selected Probe

Back to the top