summaryrefslogtreecommitdiffstatsabout
diff options
context:
space:
mode:
authorCamilo Bernal2013-03-27 15:23:14 (EDT)
committer Alexander Kurtakov2013-03-29 03:10:33 (EDT)
commit3fdf5ccbeca5c39752787289e8d5134e81203479 (patch)
treea75d72465feac647d7022e67ff2e5602c461649d
parentd2269a9b1c96f9bd12126b78974cfec9642efa2c (diff)
downloadorg.eclipse.linuxtools-3fdf5ccbeca5c39752787289e8d5134e81203479.zip
org.eclipse.linuxtools-3fdf5ccbeca5c39752787289e8d5134e81203479.tar.gz
org.eclipse.linuxtools-3fdf5ccbeca5c39752787289e8d5134e81203479.tar.bz2
Clean up o.e.l.callgraph and o.e.l.systemtap.ui.*refs/changes/32/11532/6
* Remove commented out code. * Remove unused field. * Add missing NON-NLS tags. * Externalize message strings. Change-Id: Idae648712ea579a841b47d1113919777236d556e Reviewed-on: https://git.eclipse.org/r/11532 Reviewed-by: Alexander Kurtakov <akurtako@redhat.com> IP-Clean: Alexander Kurtakov <akurtako@redhat.com> Tested-by: Alexander Kurtakov <akurtako@redhat.com>
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/internal/callgraph/core/SystemTapCommandGenerator.java1
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/internal/callgraph/launch/CallgraphLaunchPlugin.java41
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/internal/callgraph/launch/LaunchWizard.java160
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/internal/callgraph/launch/SystemTapLaunchShortcut.java6
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/internal/callgraph/launch/SystemTapOptionsTab.java412
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/graphlisteners/StapGraphMouseListener.java2
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/ScpClient.java2
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/dialogs/Messages.java35
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/dialogs/SelectServerDialog.java43
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/dialogs/messages.properties17
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/preferences/Messages.java2
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/DashboardAdapter.java3
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/ActiveModuleData.java3
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboardextension/actions/CreateModuleHandler.java4
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/row/FilteredRowDataSet.java34
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/table/FilteredTableDataSet.java40
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/datadisplay/DataGrid.java2
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphAxis2.java13
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphComposite.java22
-rw-r--r--systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/LoggingStreamDaemonTest.java1
20 files changed, 345 insertions, 498 deletions
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/internal/callgraph/core/SystemTapCommandGenerator.java b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/internal/callgraph/core/SystemTapCommandGenerator.java
index 1d5ad43..235f5c7 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/internal/callgraph/core/SystemTapCommandGenerator.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.core/src/org/eclipse/linuxtools/internal/callgraph/core/SystemTapCommandGenerator.java
@@ -65,7 +65,6 @@ public class SystemTapCommandGenerator {
ArrayList<String> cmdList = new ArrayList<String>();
String[] script;
- //getImportedTapsets(cmdList);
if (flags.length() > 0){
cmdList.add(flags);
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/internal/callgraph/launch/CallgraphLaunchPlugin.java b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/internal/callgraph/launch/CallgraphLaunchPlugin.java
index acb712b..dc76ce9 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/internal/callgraph/launch/CallgraphLaunchPlugin.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/internal/callgraph/launch/CallgraphLaunchPlugin.java
@@ -4,7 +4,7 @@
* 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
*******************************************************************************/
@@ -19,14 +19,14 @@ import org.osgi.framework.BundleContext;
/**
* The activator class controls the plug-in life cycle
- *
+ *
* This is more or less the default Eclipse plugin-wizard Activator.
*/
public class CallgraphLaunchPlugin extends AbstractUIPlugin {
// The shared instance
private static CallgraphLaunchPlugin plugin;
-
+
/**
* The constructor
*/
@@ -41,9 +41,9 @@ public class CallgraphLaunchPlugin extends AbstractUIPlugin {
public void start(BundleContext context) throws Exception {
super.start(context);
plugin = this;
-
+
}
-
+
/*
* (non-Javadoc)
@@ -55,8 +55,8 @@ public class CallgraphLaunchPlugin extends AbstractUIPlugin {
super.stop(context);
}
-
-
+
+
/**
* Returns the shared instance
*
@@ -81,30 +81,3 @@ public class CallgraphLaunchPlugin extends AbstractUIPlugin {
return getDefault().getWorkbench().getActiveWorkbenchWindow().getShell();
}
}
-
-
-//public String getPluginLocation() {
-//Bundle bundle = getBundle();
-//
-//URL locationUrl = FileLocator.find(bundle,new Path("/"), null);
-//URL fileUrl = null;
-//try {
-// fileUrl = FileLocator.toFileURL(locationUrl);
-//} catch (IOException e) {
-// e.printStackTrace();
-//}
-//return fileUrl.getFile();
-//}
-
-//private void checkRun() {
-////Check if install script has been executed. Install script MUST delete the FirstRun file,
-////this will execute every time!
-//String firstRun = getPluginLocation() + "FirstRun";
-//File firstFile = new File(firstRun);
-//if (firstFile.exists()) {
-// Shell sh = new Shell();
-// String command = "./" + getPluginLocation() + "install.sh " + firstRun;
-// InputDialog id = new InputDialog(sh, "First time startup", "Hi there! Looks like this is your first time running the SystemTap Eclipse plugin. In order for this plugin to work, you will first need to install SystemTap. Then please open a terminal and execute the following command. ", command, null);
-// id.open();
-//}
-//}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/internal/callgraph/launch/LaunchWizard.java b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/internal/callgraph/launch/LaunchWizard.java
index 3bfd9f5..01003a2 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/internal/callgraph/launch/LaunchWizard.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/internal/callgraph/launch/LaunchWizard.java
@@ -4,7 +4,7 @@
* 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
*******************************************************************************/
@@ -45,20 +45,21 @@ import org.eclipse.ui.model.WorkbenchLabelProvider;
import org.eclipse.ui.views.navigator.ResourceComparator;
public class LaunchWizard extends SystemTapLaunchShortcut {
-
+
private Text scriptLocation;
private Text binaryLocation;
private Text argumentsLocation;
private String workspacePath;
private String mode;
-
+
private Shell sh;
private Composite fileComp;
private boolean completed;
-
+
private static final int WIDTH = 670;
private static final int HEIGHT = 630;
- /*
+
+ /**
* The following protected parameters are provided by SystemTapLaunchShortcut:
*
* Optional customization parameters:
@@ -70,7 +71,7 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
* protected String generatedScript;
* protected boolean needToGenerate;
* protected boolean overwrite;
- *
+ *
* Mandatory:
* protected String scriptPath;
* protected ILaunchConfiguration config;
@@ -78,14 +79,14 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
/**
- * Launch method for a generated script that executes on a binary
- *
+ * Launch method for a generated script that executes on a binary
+ *
* MUST specify (String) scriptPath and call config = createConfiguration(bin)!
- *
+ *
* Noteworthy defaults:
* name defaults to "", but please set it (for usability)
* overwrite defaults to true - don't change it unless you really have to.
- *
+ *
* To create new launches:
* -Copy shortcut code in xml, changing class name and label accordingly
* -Create a class that extends SystemTapLaunchShortcut with a function
@@ -94,35 +95,30 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
* -Set name (this is shortcut-specific)
* -If a binary is used, call binName = getName(bin)
* -Call createConfiguration(bin, name)
- *
+ *
* -Specify whichever of the optional parameters you need
* -Set scriptPath
* -Set an ILaunchConfiguration
* -Call finishLaunch or finishLaunchWithoutBinary
*/
-
+
@Override
public void launch(IEditorPart ed, String mode) {
super.initialize();
promptForInputs();
-
+
this.mode = mode;
-
-// finishLaunch(scriptPath + ": " + binName, mode); //$NON-NLS-1$
}
-
+
@Override
public void launch(ISelection selection, String mode) {
super.initialize();
completed = false;
promptForInputs();
-
- this.mode = mode;
-
-// finishLaunch(scriptPath + ": " + binName, mode); //$NON-NLS-1$
+
+ this.mode = mode;
}
-
-
+
private void promptForInputs() {
InputDialog id = new InputDialog(new Shell(), Messages.getString("LaunchWizard.WelcomeWizard"), //$NON-NLS-1$
Messages.getString("LaunchWizard.Text1") + //$NON-NLS-1$
@@ -131,24 +127,24 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
getLaunchManager().generateLaunchConfigurationName(
Messages.getString("LaunchWizard.NamePrefix")), null); //$NON-NLS-1$
id.open();
-
- if (id.getReturnCode() == Window.CANCEL){
+
+ if (id.getReturnCode() == Window.CANCEL){
return;
}
-
+
name = id.getValue();
-
+
IWorkspace workspace = ResourcesPlugin.getWorkspace();
IWorkspaceRoot root = workspace.getRoot();
IPath location = root.getLocation();
workspacePath = location.toString();
-
+
sh = new Shell();
sh.setSize(WIDTH,HEIGHT);
sh.setLayout(new GridLayout(1, false));
sh.setText(name);
-
-
+
+
Image img = new Image(sh.getDisplay(), PluginConstants.getPluginLocation() + "systemtapbanner.png"); //$NON-NLS-1$
Composite imageCmp = new Composite(sh, SWT.BORDER);
imageCmp.setLayout(new FillLayout());
@@ -156,22 +152,22 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
imageData.horizontalAlignment = SWT.CENTER;
imageCmp.setLayoutData(imageData);
imageCmp.setBackgroundImage(img);
-
+
fileComp = new Composite(sh, SWT.NONE);
fileComp.setLayout(new GridLayout(2, false));
fileComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-
+
+
GridDataFactory labelData = GridDataFactory.fillDefaults().grab(true, false)
.span(2,1);
-
+
Label scriptLabel = new Label(fileComp, SWT.HORIZONTAL);
scriptLabel.setText(Messages.getString("LaunchWizard.Script")); //$NON-NLS-1$
labelData.applyTo(scriptLabel);
-
+
GridDataFactory textData = GridDataFactory.fillDefaults().grab( true, false )
.hint(WIDTH, SWT.DEFAULT);
-
+
scriptLocation = new Text(fileComp, SWT.SINGLE | SWT.BORDER);
textData.applyTo(scriptLocation);
Button scriptButton = new Button(fileComp, SWT.PUSH);
@@ -189,13 +185,13 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
}
});
-
+
GridData gd2 = new GridData();
gd2.horizontalSpan = 3;
Label binaryLabel= new Label(fileComp, SWT.HORIZONTAL);
binaryLabel.setText(Messages.getString("LaunchWizard.BinFile")); //$NON-NLS-1$
labelData.applyTo(binaryLabel);
-
+
binaryLocation = new Text(fileComp, SWT.SINGLE | SWT.BORDER);
textData.applyTo(binaryLocation);
Button binaryButton = new Button(fileComp, SWT.PUSH);
@@ -206,7 +202,7 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(sh, new WorkbenchLabelProvider(), new WorkbenchContentProvider());
dialog.setTitle(Messages.getString("SystemTapOptionsTab.SelectResource")); //$NON-NLS-1$
dialog.setMessage(Messages.getString("SystemTapOptionsTab.SelectSuppressions")); //$NON-NLS-1$
- dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
+ dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
if (dialog.open() == IDialogConstants.OK_ID) {
IResource resource = (IResource) dialog.getFirstResult();
@@ -219,11 +215,11 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
Composite argumentsComp = new Composite(sh, SWT.BORDER_DASH);
argumentsComp.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
argumentsComp.setLayout(new GridLayout(2, false));
-
+
Label argumentsLabel= new Label(argumentsComp, SWT.HORIZONTAL);
argumentsLabel.setText(Messages.getString("LaunchWizard.Args")); //$NON-NLS-1$
labelData.applyTo(argumentsLabel);
-
+
argumentsLocation = new Text(argumentsComp, SWT.MULTI | SWT.WRAP | SWT.BORDER);
GridData gd3 = new GridData(GridData.FILL_HORIZONTAL);
gd3.heightHint=200;
@@ -238,13 +234,13 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
+ binaryLocation.getText() + "\").function(\"\")"); //$NON-NLS-1$
}
});
-
-
+
+
//TODO: Don't use blank labels to move button to the right column :P
Label blankLabel2 = new Label(argumentsComp, SWT.HORIZONTAL);
blankLabel2.setText(""); //$NON-NLS-1$
-
-
+
+
Button launch = new Button(sh, SWT.PUSH);
launch.setLayoutData(new GridData(GridData.CENTER, GridData.BEGINNING, false, false));
launch.setText(Messages.getString("LaunchWizard.Launch")); //$NON-NLS-1$
@@ -260,13 +256,13 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
finishLaunch(scriptPath + ": " + binName, mode, wc);//$NON-NLS-1$
} catch (Exception e1) {
e1.printStackTrace();
- }
+ }
completed = true;
sh.dispose();
}
-
+
});
-
+
//TODO: Verify that this works
Display.getCurrent().asyncExec(new Runnable() {
@@ -275,19 +271,19 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
sh.open();
completed = true;
}
-
+
});
-
+
}
-
+
public boolean isCompleted() {
return completed;
}
-
+
@Override
public String setScriptPath() {
- scriptPath = "IMPLEMENT";
+ scriptPath = "IMPLEMENT"; //$NON-NLS-1$
return scriptPath;
}
@@ -300,63 +296,5 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
public String setViewID() {
return null;
}
-
+
}
-
-//
-// public void launch(IBinary bin, String mode) {
-// super.Init();
-// Shell sh = new Shell();
-// MessageDialog.openInformation(sh, "Welcome to SystemTap Wizard",
-// "The SystemTap Wizard will guide you through the process of \n" +
-// "launching a SystemTap script through Eclipse. First, select\n" +
-// "a script to run.");
-//
-//
-//
-// name = Messages.getString("LaunchWizard.WizardName"); //$NON-NLS-1$
-// promptForInputs();
-// binName = getName(bin);
-// binaryPath = dirPath + binName;
-// config = createConfiguration(bin);
-//
-//
-// System.out.println("LaunchCallGraph: launch(IBinary bin, String mode)"); //$NON-NLS-1$
-//
-// finishLaunch(scriptPath + ": " + binName, mode); //$NON-NLS-1$
-// }
-//
-//
-// private void promptForInputs() {
-//
-// Shell sh = new Shell();
-//
-// //Get script
-// MessageDialog.openInformation(sh, "Specify Script", //$NON-NLS-1$
-// "Please specify the location of the SystemTap script to run."); //$NON-NLS-1$
-// FileDialog fd = new FileDialog(sh);
-// scriptPath = fd.open();
-//
-// if (scriptPath == null){
-// scriptPath = ""; //$NON-NLS-1$
-// return;
-// }
-//
-// //Get arguments
-// InputDialog inputDialog = new InputDialog(
-// sh,
-// "Specify Arguments", //$NON-NLS-1$
-// "Specify Arguments separated by a space (eg. arg1 arg2 arg3) or CANCEL to specify no arguments.", //$NON-NLS-1$
-// "", null); //$NON-NLS-1$
-// inputDialog.open();
-// arguments = inputDialog.getValue();
-// inputDialog.close();
-//
-// if (arguments == null || arguments.equals("")){ //$NON-NLS-1$
-// arguments = ""; //$NON-NLS-1$
-// }
-//
-// sh.dispose();
-// }
-//
-//}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/internal/callgraph/launch/SystemTapLaunchShortcut.java b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/internal/callgraph/launch/SystemTapLaunchShortcut.java
index 670afbe..d25d31b 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/internal/callgraph/launch/SystemTapLaunchShortcut.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/internal/callgraph/launch/SystemTapLaunchShortcut.java
@@ -338,11 +338,6 @@ public abstract class SystemTapLaunchShortcut extends ProfileLaunchShortcut {
binName = bin.getPath().toString();
} else {
binName = ""; //$NON-NLS-1$
- // SystemTapUIErrorMessages error = new SystemTapUIErrorMessages(
- // "Null_Binary",
- // "Invalid executable",
- // "An error has occured: a binary/executable file was not given to the launch shortcut.");
- // error.schedule();
}
return binName;
}
@@ -505,7 +500,6 @@ public abstract class SystemTapLaunchShortcut extends ProfileLaunchShortcut {
try {
ArrayList<ICContainer> list = new ArrayList<ICContainer>();
TranslationUnitVisitor v = new TranslationUnitVisitor();
- // ASTTranslationUnitVisitor v = new ASTTranslationUnitVisitor();
for (ICElement b : bin.getCProject().getChildrenOfType(
ICElement.C_CCONTAINER)) {
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/internal/callgraph/launch/SystemTapOptionsTab.java b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/internal/callgraph/launch/SystemTapOptionsTab.java
index 9e05f90..dd6b5ba 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/internal/callgraph/launch/SystemTapOptionsTab.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/internal/callgraph/launch/SystemTapOptionsTab.java
@@ -4,7 +4,7 @@
* 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
*******************************************************************************/
@@ -81,14 +81,14 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
protected Composite top;
protected ScrolledComposite scrollTop;
protected Combo toolsCombo;
-
+
protected TabFolder fileFolder;
protected TabFolder commandFolder;
protected TabFolder argumentsFolder;
protected TabFolder binaryArgumentsFolder;
protected TabFolder parserFolder;
protected TabFolder generatedScriptFolder;
-
+
//Controls
protected Text scriptFile;
protected Text binaryFile;
@@ -99,8 +99,7 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
protected Text binaryArguments;
protected Text parser;
protected Text viewer;
-// protected Text commandFile;
-
+
protected Button fileBrowseButton;
protected Button workspaceBrowseButton;
protected Button parserButton;
@@ -123,15 +122,14 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
protected Button needToGenerateScriptButton;
protected Button button_graphicsMode;
-
+
protected Spinner button_p_Spinner;
protected Spinner button_s_Spinner;
protected Spinner button_x_Spinner;
protected Spinner button_v_Spinner;
-
+
private Button useColourButton;
-// private Button generateScriptButton;
-
+
//Other variables
protected String workspacePath;
protected String[] tools;
@@ -139,23 +137,23 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
protected boolean needsOverwritePermission = false;
protected boolean overwritePermission = false;
private boolean changeOverwrite = false;
-
+
/**
* The code below is very long, but it boils down to this.
- *
- * The main function is createControl. This function prepares
+ *
+ * The main function is createControl. This function prepares
* some space for the various tabs and calls the other create*Option
* functions to create buttons, text fields and spinners.
- *
+ *
* The create*Option functions create their respective sub-tabs.
- *
+ *
* Each of the controls (button, text, spinner) needs to have a listener
* attached so Eclipse knows what to do with them.
- *
+ *
* There are a bunch of functions to update/set defaults/initialize,
- * and a final
+ * and a final
*/
-
+
protected SelectionListener graphicsModeListener = new SelectionAdapter(){
@Override
public void widgetSelected(SelectionEvent e) {
@@ -172,27 +170,27 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
updateLaunchConfigurationDialog();
}
};
-
+
protected SelectionListener selectListener = new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
updateLaunchConfigurationDialog();
}
};
-
+
protected ModifyListener modifyListener = new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
updateLaunchConfigurationDialog();
- }
+ }
};
-
+
protected ModifyListener modifyListenerOutput = new ModifyListener() {
@Override
public void modifyText(ModifyEvent e) {
updateLaunchConfigurationDialog();
output_file_has_changed = true;
- }
+ }
};
protected FocusListener focusListener = new FocusAdapter() {
@@ -204,13 +202,13 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
}
output_file_has_changed = false;
- updateLaunchConfigurationDialog();
- }
+ updateLaunchConfigurationDialog();
+ }
};
-
+
/**
* Convenience method to check if the overwrite permissions are consistent
- *
+ *
* Helps ensure validity of configuration.
*/
public void checkOverwrite() {
@@ -222,16 +220,16 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
if (MessageDialog.openConfirm(sh, Messages.getString("SystemTapOptionsTab.ConfirmOverwriteFileTitle"), //$NON-NLS-1$
Messages.getString("SystemTapOptionsTab.ConfirmOverwriteFileMessage"))) { //$NON-NLS-1$
overwritePermission = true;
- } else {
+ } else {
overwritePermission = false;
}
}
else
needsOverwritePermission = false;
}
-
+
/**
- * This function prepares some space for the various
+ * This function prepares some space for the various
* tabs and calls and sets the other create*Option
* functions to create buttons, text fields and spinners.
*/
@@ -241,12 +239,12 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
scrollTop.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true));
scrollTop.setExpandVertical(true);
scrollTop.setExpandHorizontal(true);
-
+
setControl(scrollTop);
-
+
top = new Composite(scrollTop, SWT.NONE);
top.setLayout(new GridLayout());
-
+
scrollTop.setContent(top);
/*
@@ -254,150 +252,130 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
*/
fileFolder = new TabFolder(top, SWT.BORDER);
fileFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
-
+
TabItem fileTab = new TabItem(fileFolder, SWT.NONE);
fileTab.setText(Messages.getString("SystemTapOptionsTab.FilesTab")); //$NON-NLS-1$
-
+
Composite fileTop = new Composite(fileFolder, SWT.NONE);
fileTop.setLayout(new GridLayout());
fileTop.setLayoutData(new GridData(GridData.FILL_BOTH));
-
+
createFileOption(fileTop);
fileTab.setControl(fileTop);
-
-
+
+
/*
* Commands folder - tab for selecting SystemTap commands
*/
-
+
commandFolder = new TabFolder(top, SWT.BORDER);
commandFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
-
+
TabItem commandTab = new TabItem(fileFolder, SWT.NONE);
commandTab.setText(Messages.getString("SystemTapOptionsTab.CommandsTab")); //$NON-NLS-1$
-
+
Composite commandTop = new Composite(fileFolder, SWT.NONE);
commandTop.setLayout(new GridLayout());
commandTop.setLayoutData(new GridData(GridData.FILL_BOTH));
-
+
createCommandOption(commandTop);
commandTab.setControl(commandTop);
-
+
/*
* Arguments folder - tab for selecting script arguments
*/
argumentsFolder = new TabFolder(top, SWT.BORDER);
argumentsFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
-
+
TabItem argumentsTab = new TabItem(fileFolder, SWT.NONE);
argumentsTab.setText(Messages.getString("SystemTapOptionsTab.Arguments")); //$NON-NLS-1$
-
+
Composite argumentsTop = new Composite(fileFolder, SWT.NONE);
argumentsTop.setLayout(new GridLayout());
argumentsTop.setLayoutData(new GridData(GridData.FILL_BOTH));
-
+
createArgumentsOption(argumentsTop);
argumentsTab.setControl(argumentsTop);
-
-
+
+
/*
* Binary Argument folder - tab for supplying arguments for a binary
*/
binaryArgumentsFolder = new TabFolder(top, SWT.BORDER);
binaryArgumentsFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
-
+
TabItem binaryArgumentsTab = new TabItem(fileFolder, SWT.NONE);
binaryArgumentsTab.setText(Messages.getString("SystemTapOptionsTab.44")); //$NON-NLS-1$
-
+
Composite binaryArgumentsTop = new Composite(fileFolder, SWT.NONE);
binaryArgumentsTop.setLayout(new GridLayout());
binaryArgumentsTop.setLayoutData(new GridData(GridData.FILL_BOTH));
-
+
createBinaryArgumentsOption(binaryArgumentsTop);
binaryArgumentsTab.setControl(binaryArgumentsTop);
-
-
+
+
/*
* Parser folder -- Tab for selecting a parser and viewer to use
*/
parserFolder = new TabFolder(top, SWT.BORDER);
parserFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
-
+
TabItem parserTab = new TabItem(fileFolder, SWT.NONE);
parserTab.setText("Parser"); //$NON-NLS-1$
-
+
Composite parserTop = new Composite(fileFolder, SWT.NONE);
parserTop.setLayout(new GridLayout());
parserTop.setLayoutData(new GridData(GridData.FILL_BOTH));
-
+
createParserOption(parserTop);
parserTab.setControl(parserTop);
-
-// /*
-// * Generated Script folder - tab for selecting script generatedScript
-// */
-// generatedScriptFolder = new TabFolder(top, SWT.BORDER);
-// generatedScriptFolder.setLayoutData(new GridData(GridData.FILL_BOTH));
-//
-// TabItem generatedScriptTab = new TabItem(fileFolder, SWT.NONE);
-// generatedScriptTab.setText(Messages.getString("SystemTapOptionsTab.GeneratedScriptsTab")); //$NON-NLS-1$
-//
-// Composite generatedScriptTop = new Composite(fileFolder, SWT.NONE);
-// generatedScriptTop.setLayout(new GridLayout());
-// generatedScriptTop.setLayoutData(new GridData(GridData.FILL_BOTH));
-//
-// createGeneratedScriptOption(generatedScriptTop);
-// generatedScriptTab.setControl(generatedScriptTop);
-
- /*
- * SystemTap help - contains the stap man page
- */
}
-
+
private void createBinaryArgumentsOption(Composite binaryArgumentsTop) {
- Composite browseTop = new Composite(binaryArgumentsTop, SWT.NONE);
+ Composite browseTop = new Composite(binaryArgumentsTop, SWT.NONE);
browseTop.setLayout(new GridLayout(1, false));
GridData browseData = new GridData(GridData.FILL_HORIZONTAL);
browseTop.setLayoutData(browseData);
-
+
Label suppFileLabel = new Label(browseTop, SWT.NONE);
suppFileLabel.setText(Messages.getString("SystemTapOptionsTab.45")); //$NON-NLS-1$
-
+
binaryArguments = new Text(browseTop,SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd.heightHint = 200;
binaryArguments.setLayoutData(gd);
binaryArguments.addModifyListener(modifyListener);
}
-
+
private void createParserOption(Composite parserTop) {
- Composite browseTop = new Composite(parserTop, SWT.NONE);
+ Composite browseTop = new Composite(parserTop, SWT.NONE);
browseTop.setLayout(new GridLayout(1, false));
GridData browseData = new GridData(GridData.FILL_HORIZONTAL);
browseTop.setLayoutData(browseData);
-
+
Label suppFileLabel = new Label(browseTop, SWT.NONE);
suppFileLabel.setText("Parser"); //$NON-NLS-1$
-
+
parser = new Text(browseTop, SWT.BORDER);
parser.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
parser.addModifyListener(modifyListener);
- parserButton = createPushButton(browseTop,
+ parserButton = createPushButton(browseTop,
"Find parsers", null); //$NON-NLS-1$
parserButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(),
+ ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(),
new ListLabelProvider());
dialog.setTitle("Select parser"); //$NON-NLS-1$
dialog.setMessage("Select parser to use."); //$NON-NLS-1$
IExtensionRegistry reg = Platform.getExtensionRegistry();
IConfigurationElement[] extensions = reg
- .getConfigurationElementsFor(PluginConstants.PARSER_RESOURCE,
+ .getConfigurationElementsFor(PluginConstants.PARSER_RESOURCE,
PluginConstants.PARSER_NAME);
-
+
dialog.setElements(extensions);
if (dialog.open() == IDialogConstants.OK_ID) {
String arg = getUsefulLabel(dialog.getFirstResult());
@@ -405,24 +383,24 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
}
}
});
-
-
+
+
viewer = new Text(browseTop, SWT.BORDER);
viewer.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
viewer.addModifyListener(modifyListener);
- viewerButton = createPushButton(browseTop,
+ viewerButton = createPushButton(browseTop,
"Find viewers", null); //$NON-NLS-1$
viewerButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
- ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(),
+ ElementListSelectionDialog dialog = new ElementListSelectionDialog(getShell(),
new ListLabelProvider());
dialog.setTitle("Select viewer"); //$NON-NLS-1$
dialog.setMessage("Select viewer to use."); //$NON-NLS-1$
IExtensionRegistry reg = Platform.getExtensionRegistry();
IConfigurationElement[] extensions = reg
- .getConfigurationElementsFor(PluginConstants.VIEW_RESOURCE,
+ .getConfigurationElementsFor(PluginConstants.VIEW_RESOURCE,
PluginConstants.VIEW_NAME);
ArrayList<IConfigurationElement> ext = new ArrayList<IConfigurationElement>();
for (IConfigurationElement el : extensions) {
@@ -430,14 +408,14 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
continue;
//TODO: Rough hack to get all the objects. We restrict to id's containing org.eclipse.linuxtools, then see if the class extends SystemTapView
try {
- if (el.createExecutableExtension(PluginConstants.ATTR_CLASS)
+ if (el.createExecutableExtension(PluginConstants.ATTR_CLASS)
instanceof SystemTapView) {
ext.add(el);
}
} catch (CoreException e1) {
}
}
-
+
dialog.setElements(ext.toArray());
if (dialog.open() == IDialogConstants.OK_ID) {
String arg = getUsefulLabel(dialog.getFirstResult());
@@ -445,19 +423,19 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
}
}
});
-
+
}
protected void createGeneratedScriptOption(Composite generatedScriptTop) {
- Composite browseTop = new Composite(generatedScriptTop, SWT.NONE);
+ Composite browseTop = new Composite(generatedScriptTop, SWT.NONE);
browseTop.setLayout(new GridLayout(1, false));
GridData browseData = new GridData(GridData.FILL_HORIZONTAL);
browseTop.setLayoutData(browseData);
-
+
Label suppFileLabel = new Label(browseTop, SWT.NONE);
suppFileLabel.setText(Messages.getString("SystemTapOptionsTab.GeneratedScriptsTitle")); //$NON-NLS-1$
-
+
generatedScript = new Text(browseTop,SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
@@ -469,27 +447,27 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
needToGenerateScriptButton.setText(Messages.getString("SystemTapOptionsTab.GenerateScriptButton")); //$NON-NLS-1$
needToGenerateScriptButton.addSelectionListener(selectListener);
needToGenerateScriptButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-
+
+
}
-
+
protected void createArgumentsOption(Composite argumentsTop) {
- Composite browseTop = new Composite(argumentsTop, SWT.NONE);
+ Composite browseTop = new Composite(argumentsTop, SWT.NONE);
browseTop.setLayout(new GridLayout(1, false));
GridData browseData = new GridData(GridData.FILL_HORIZONTAL);
browseTop.setLayoutData(browseData);
-
+
Label suppFileLabel = new Label(browseTop, SWT.NONE);
suppFileLabel.setText(Messages.getString("SystemTapOptionsTab.SelectArguments")); //$NON-NLS-1$
-
+
arguments = new Text(browseTop,SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL);
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
gd.heightHint = 200;
arguments.setLayoutData(gd);
arguments.addModifyListener(modifyListener);
-
+
Button probeFunctionButton = createPushButton(browseTop, Messages.getString("SystemTapOptionsTab.ProbeFunction"), null); //$NON-NLS-1$
probeFunctionButton.addSelectionListener(new SelectionAdapter() {
@@ -501,13 +479,13 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
}
protected void createFileOption(Composite top) {
- Composite browseTop = new Composite(top, SWT.NONE);
+ Composite browseTop = new Composite(top, SWT.NONE);
browseTop.setLayout(new GridLayout(4, false));
browseTop.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
Label suppFileLabel = new Label(browseTop, SWT.NONE);
suppFileLabel.setText(Messages.getString("SystemTapOptionsTab.ScriptSelector")); //$NON-NLS-1$
-
+
scriptFile = new Text(browseTop, SWT.BORDER);
scriptFile.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
scriptFile.addModifyListener(modifyListener);
@@ -519,7 +497,7 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());
dialog.setTitle(Messages.getString("SystemTapOptionsTab.ResourceButton")); //$NON-NLS-1$
dialog.setMessage(Messages.getString("SystemTapOptionsTab.SuppresionsFile")); //$NON-NLS-1$
- dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
+ dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
if (dialog.open() == IDialogConstants.OK_ID) {
IResource resource = (IResource) dialog.getFirstResult();
@@ -528,7 +506,7 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
}
}
});
-
+
fileBrowseButton = createPushButton(browseTop, Messages.getString("SystemTapOptionsTab.FileSystem"), null); //$NON-NLS-1$
fileBrowseButton.addSelectionListener(new SelectionAdapter() {
@Override
@@ -541,16 +519,16 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
}
}
});
-
-
+
+
Label binaryFileLabel = new Label(browseTop, SWT.NONE);
binaryFileLabel.setText(Messages.getString("SystemTapOptionsTab.SelectBinary")); //$NON-NLS-1$
-
+
binaryFile = new Text(browseTop, SWT.BORDER);
binaryFile.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
binaryFile.addModifyListener(modifyListener);
-
-
+
+
Button workspaceBrowseButton2 = createPushButton(browseTop, Messages.getString("SystemTapOptionsTab.WorkspaceButton2"), null); //$NON-NLS-1$
workspaceBrowseButton2.addSelectionListener(new SelectionAdapter() {
@Override
@@ -558,7 +536,7 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());
dialog.setTitle(Messages.getString("SystemTapOptionsTab.SelectResource")); //$NON-NLS-1$
dialog.setMessage(Messages.getString("SystemTapOptionsTab.SelectSuppressions")); //$NON-NLS-1$
- dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
+ dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
if (dialog.open() == IDialogConstants.OK_ID) {
IResource resource = (IResource) dialog.getFirstResult();
@@ -567,8 +545,8 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
}
}
});
-
-
+
+
Button fileBrowseButton2 = createPushButton(browseTop, Messages.getString("SystemTapOptionsTab.BrowseFiles"), null); //$NON-NLS-1$
fileBrowseButton2.addSelectionListener(new SelectionAdapter() {
@Override
@@ -582,16 +560,16 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
}
}
});
-
-
+
+
Label outputFileLabel = new Label(browseTop, SWT.NONE);
outputFileLabel.setText(Messages.getString("SystemTapOptionsTab.SelectOutput")); //$NON-NLS-1$
-
+
outputFile = new Text(browseTop, SWT.BORDER);
outputFile.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
outputFile.addModifyListener(modifyListenerOutput);
outputFile.addFocusListener(focusListener);
-
+
Button workspaceBrowseButton3 = createPushButton(browseTop, Messages.getString("SystemTapOptionsTab.WorkspaceButton2"), null); //$NON-NLS-1$
workspaceBrowseButton3.addSelectionListener(new SelectionAdapter() {
@Override
@@ -599,19 +577,19 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
ElementTreeSelectionDialog dialog = new ElementTreeSelectionDialog(getShell(), new WorkbenchLabelProvider(), new WorkbenchContentProvider());
dialog.setTitle(Messages.getString("SystemTapOptionsTab.SelectResource")); //$NON-NLS-1$
dialog.setMessage(Messages.getString("SystemTapOptionsTab.SelectSuppressions")); //$NON-NLS-1$
- dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
+ dialog.setInput(ResourcesPlugin.getWorkspace().getRoot());
dialog.setComparator(new ResourceComparator(ResourceComparator.NAME));
if (dialog.open() == IDialogConstants.OK_ID) {
IResource resource = (IResource) dialog.getFirstResult();
String arg = resource.getFullPath().toString();
outputFile.setText(workspacePath + arg);
checkOverwrite();
- updateLaunchConfigurationDialog();
+ updateLaunchConfigurationDialog();
}
}
});
-
+
Button fileBrowseButton3 = createPushButton(browseTop, Messages.getString("SystemTapOptionsTab.BrowseFiles"), null); //$NON-NLS-1$
fileBrowseButton3.addSelectionListener(new SelectionAdapter() {
@Override
@@ -626,48 +604,21 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
}
}
});
-
+
useColourButton = new Button(browseTop, SWT.CHECK);
useColourButton.setText(Messages.getString("SystemTapOptionsTab.ColourCodes")); //$NON-NLS-1$
useColourButton.addSelectionListener(selectListener);
useColourButton.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-
-// generateScriptButton = new Button(browseTop, SWT.PUSH);
-// generateScriptButton.setText("Command");
-// generateScriptButton.addSelectionListener(new SelectionListener() {
-//
-// @Override
-// public void widgetDefaultSelected(SelectionEvent e) {
-// }
-//
-// @Override
-// public void widgetSelected(SelectionEvent e) {
-// SystemTapCommandGenerator gen = new SystemTapCommandGenerator();
-// gen.generateCommand(scrPath, binPath, cmds, needBinary, needsArgs, arg, useColour)
-//
-// }
-//
-// });
-//
}
-
-
-
+
+
+
protected void createCommandOption(Composite top) {
- Composite browseTop = new Composite(top, SWT.NONE);
+ Composite browseTop = new Composite(top, SWT.NONE);
browseTop.setLayout(new GridLayout(3, false));
GridData browseData = new GridData(GridData.FILL_HORIZONTAL);
browseTop.setLayoutData(browseData);
-// Label suppFileLabel = new Label(browseTop, SWT.NONE);
-// suppFileLabel.setText(Messages.getString("SystemTapOptionsTab.CommandsLabel1") + //$NON-NLS-1$
-// Messages.getString("SystemTapOptionsTab.CommandsLabel2")); //$NON-NLS-1$
-//
-// commandFile = new Text(browseTop, SWT.BORDER);
-// commandFile.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
-// commandFile.addModifyListener(modifyListener);
-//
-
Composite buttonsTop = new Composite(top, SWT.NONE);
GridLayout gl = new GridLayout(2, false);
gl.horizontalSpacing = PluginConstants.SYSTEMTAP_OPTIONS_TAB_HORIZONTAL_SPACING;
@@ -676,7 +627,7 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
buttonsData.heightHint = 400;
buttonsTop.setLayoutData(buttonsData);
-
+
button_k = new Button(buttonsTop, SWT.CHECK);
button_k.setText(Messages.getString("SystemTapOptionsTab.20")); //$NON-NLS-1$
button_k.addSelectionListener(selectListener);
@@ -685,7 +636,7 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
Messages.getString("SystemTapOptionsTab.5") + //$NON-NLS-1$
Messages.getString("SystemTapOptionsTab.6") + //$NON-NLS-1$
Messages.getString("SystemTapOptionsTab.7")); //$NON-NLS-1$
-
+
button_g = new Button(buttonsTop, SWT.CHECK);
button_g.setText(Messages.getString("SystemTapOptionsTab.21")); //$NON-NLS-1$
button_g.addSelectionListener(selectListener);
@@ -708,7 +659,7 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
button_u.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
button_u.setToolTipText(
Messages.getString("SystemTapOptionsTab.12")); //$NON-NLS-1$
-
+
button_w = new Button(buttonsTop, SWT.CHECK);
button_w.setText(Messages.getString("SystemTapOptionsTab.24")); //$NON-NLS-1$
button_w.addSelectionListener(selectListener);
@@ -723,7 +674,7 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
button_b.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
button_b.setToolTipText(
Messages.getString("SystemTapOptionsTab.15")); //$NON-NLS-1$
-
+
button_t = new Button(buttonsTop, SWT.CHECK);
button_t.setText(Messages.getString("SystemTapOptionsTab.26")); //$NON-NLS-1$
button_t.addSelectionListener(selectListener);
@@ -740,14 +691,14 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
Messages.getString("SystemTapOptionsTab.27") + //$NON-NLS-1$
Messages.getString("SystemTapOptionsTab.28") + //$NON-NLS-1$
Messages.getString("SystemTapOptionsTab.29")); //$NON-NLS-1$
-
+
button_skip_badvars = new Button(buttonsTop, SWT.CHECK);
button_skip_badvars.setText(Messages.getString("SystemTapOptionsTab.IgnoreBadVars")); //$NON-NLS-1$
button_skip_badvars.addSelectionListener(selectListener);
button_skip_badvars.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
button_skip_badvars.setToolTipText(
Messages.getString("SystemTapOptionsTab.30")); //$NON-NLS-1$
-
+
button_ignore_dwarf = new Button(buttonsTop, SWT.CHECK);
button_ignore_dwarf.setText(Messages.getString("SystemTapOptionsTab.ForTesting")); //$NON-NLS-1$
button_ignore_dwarf.addSelectionListener(selectListener);
@@ -755,50 +706,50 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
button_ignore_dwarf.setToolTipText(
Messages.getString("SystemTapOptionsTab.31") + //$NON-NLS-1$
Messages.getString("SystemTapOptionsTab.32")); //$NON-NLS-1$
-
+
button_q = new Button(buttonsTop, SWT.CHECK);
button_q.setText(Messages.getString("SystemTapOptionsTab.Button_qInfo")); //$NON-NLS-1$
button_q.addSelectionListener(selectListener);
button_q.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
button_q.setToolTipText(Messages.getString("SystemTapOptionsTab.33")); //$NON-NLS-1$
-
+
Composite button_p_Spinner_Top = new Composite(buttonsTop, SWT.NONE);
button_p_Spinner_Top.setLayout(new GridLayout(3, false));
Label button_p_Spinner_Label = new Label(button_p_Spinner_Top, SWT.NONE);
button_p_Spinner_Label.setText(Messages.getString("SystemTapOptionsTab.19")); //$NON-NLS-1$
button_p_Spinner = new Spinner(button_p_Spinner_Top, SWT.BORDER);
button_p_Spinner.setMaximum(Integer.MAX_VALUE);
- button_p_Spinner.addModifyListener(modifyListener);
+ button_p_Spinner.addModifyListener(modifyListener);
button_p_Spinner.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
button_p_Spinner_Label.setToolTipText(
Messages.getString("SystemTapOptionsTab.34") + //$NON-NLS-1$
Messages.getString("SystemTapOptionsTab.35") + //$NON-NLS-1$
Messages.getString("SystemTapOptionsTab.36")); //$NON-NLS-1$
-
+
Composite button_s_Spinner_Top = new Composite(buttonsTop, SWT.NONE);
button_s_Spinner_Top.setLayout(new GridLayout(2, false));
Label button_s_Spinner_Label = new Label(button_s_Spinner_Top, SWT.NONE);
button_s_Spinner_Label.setText(Messages.getString("SystemTapOptionsTab.BufferWith")); //$NON-NLS-1$
button_s_Spinner = new Spinner(button_s_Spinner_Top, SWT.BORDER);
button_s_Spinner.setMaximum(Integer.MAX_VALUE);
- button_s_Spinner.addModifyListener(modifyListener);
+ button_s_Spinner.addModifyListener(modifyListener);
button_s_Spinner.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
button_s_Spinner_Label.setToolTipText(
Messages.getString("SystemTapOptionsTab.37") + //$NON-NLS-1$
Messages.getString("SystemTapOptionsTab.38")); //$NON-NLS-1$
-
+
Composite button_x_Spinner_Top = new Composite(buttonsTop, SWT.NONE);
button_x_Spinner_Top.setLayout(new GridLayout(2, false));
Label button_x_Spinner_Label = new Label(button_x_Spinner_Top, SWT.NONE);
button_x_Spinner_Label.setText(Messages.getString("SystemTapOptionsTab.TargetPID")); //$NON-NLS-1$
button_x_Spinner = new Spinner(button_x_Spinner_Top, SWT.BORDER);
button_x_Spinner.setMaximum(Integer.MAX_VALUE);
- button_x_Spinner.addModifyListener(modifyListener);
+ button_x_Spinner.addModifyListener(modifyListener);
button_x_Spinner.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
button_x_Spinner_Label.setToolTipText(
Messages.getString("SystemTapOptionsTab.39") + //$NON-NLS-1$
Messages.getString("SystemTapOptionsTab.40")); //$NON-NLS-1$
-
+
Composite button_v_Spinner_Top = new Composite(buttonsTop, SWT.NONE);
button_v_Spinner_Top.setLayout(new GridLayout(2, false));
Label button_v_Spinner_Label = new Label(button_v_Spinner_Top, SWT.NONE);
@@ -817,7 +768,7 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
button_graphicsMode.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
button_graphicsMode.setToolTipText(
Messages.getString("SystemTapOptionsTab.41")); //$NON-NLS-1$
-
+
Label button_D_label = new Label(buttonsTop, SWT.NONE);
button_D_label.setText(Messages.getString("SystemTapOptionsTab.PreprocessorDirective")); //$NON-NLS-1$
button_D_text = new Text(buttonsTop, SWT.BORDER);
@@ -826,12 +777,12 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
button_D_label.setToolTipText(
Messages.getString("SystemTapOptionsTab.42") + //$NON-NLS-1$
Messages.getString("SystemTapOptionsTab.43")); //$NON-NLS-1$
-
-
-
+
+
+
}
-
+
@Override
public String getName() {
return Messages.getString("SystemTapOptionsTab.MainTabName"); //$NON-NLS-1$
@@ -905,13 +856,13 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
@Override
public void initializeFrom(ILaunchConfiguration configuration) {
-
-
+
+
IWorkspace workspace = ResourcesPlugin.getWorkspace();
IWorkspaceRoot root = workspace.getRoot();
IPath location = root.getLocation();
workspacePath = location.toString();
-
+
try {
button_k.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_KEEP_TEMPORARY, LaunchConfigurationConstants.DEFAULT_COMMAND_KEEP_TEMPORARY));
button_u.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_NO_CODE_ELISION, LaunchConfigurationConstants.DEFAULT_COMMAND_NO_CODE_ELISION));
@@ -928,35 +879,33 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
button_x_Spinner.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_TARGET_PID, LaunchConfigurationConstants.DEFAULT_COMMAND_TARGET_PID));
button_v_Spinner.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_VERBOSE, LaunchConfigurationConstants.DEFAULT_COMMAND_VERBOSE));
button_p_Spinner.setSelection(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_PASS, LaunchConfigurationConstants.DEFAULT_COMMAND_PASS));
-
+
button_D_text.setText(configuration.getAttribute(LaunchConfigurationConstants.COMMAND_C_DIRECTIVES, LaunchConfigurationConstants.DEFAULT_COMMAND_C_DIRECTIVES));
binaryFile.setText(configuration.getAttribute(LaunchConfigurationConstants.BINARY_PATH, LaunchConfigurationConstants.DEFAULT_BINARY_PATH));
scriptFile.setText(configuration.getAttribute(LaunchConfigurationConstants.SCRIPT_PATH, LaunchConfigurationConstants.DEFAULT_SCRIPT_PATH));
outputFile.setText(configuration.getAttribute(LaunchConfigurationConstants.OUTPUT_PATH, LaunchConfigurationConstants.DEFAULT_OUTPUT_PATH));
arguments.setText(configuration.getAttribute(LaunchConfigurationConstants.ARGUMENTS, LaunchConfigurationConstants.DEFAULT_ARGUMENTS));
binaryArguments.setText(configuration.getAttribute(LaunchConfigurationConstants.BINARY_ARGUMENTS, LaunchConfigurationConstants.DEFAULT_BINARY_ARGUMENTS));
-
+
parser.setText(configuration.getAttribute(LaunchConfigurationConstants.PARSER_CLASS, LaunchConfigurationConstants.DEFAULT_PARSER_CLASS));
viewer.setText(configuration.getAttribute(LaunchConfigurationConstants.VIEW_CLASS, LaunchConfigurationConstants.DEFAULT_VIEW_CLASS));
-
+
if (generatedScript != null){
generatedScript.setText(configuration.getAttribute(LaunchConfigurationConstants.GENERATED_SCRIPT, LaunchConfigurationConstants.DEFAULT_GENERATED_SCRIPT));
- needToGenerateScriptButton.setSelection(configuration.getAttribute(LaunchConfigurationConstants.NEED_TO_GENERATE, LaunchConfigurationConstants.DEFAULT_NEED_TO_GENERATE));
+ needToGenerateScriptButton.setSelection(configuration.getAttribute(LaunchConfigurationConstants.NEED_TO_GENERATE, LaunchConfigurationConstants.DEFAULT_NEED_TO_GENERATE));
}
useColourButton.setSelection(configuration.getAttribute(LaunchConfigurationConstants.USE_COLOUR, LaunchConfigurationConstants.DEFAULT_USE_COLOUR));
-
-// commandFile.setText(ConfigurationOptionsSetter.setOptions(configuration));
-
+
} catch (CoreException e) {
e.printStackTrace();
}
-
+
}
@Override
public void performApply(ILaunchConfigurationWorkingCopy configuration) {
-
+
getControl().setRedraw(false);
configuration.setAttribute(LaunchConfigurationConstants.COMMAND_KEEP_TEMPORARY, button_k.getSelection());
@@ -974,7 +923,7 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
configuration.setAttribute(LaunchConfigurationConstants.COMMAND_BUFFER_BYTES, button_s_Spinner.getSelection());
configuration.setAttribute(LaunchConfigurationConstants.COMMAND_TARGET_PID, button_x_Spinner.getSelection());
configuration.setAttribute(LaunchConfigurationConstants.COMMAND_VERBOSE, button_v_Spinner.getSelection());
-
+
configuration.setAttribute(LaunchConfigurationConstants.PARSER_CLASS, parser.getText());
configuration.setAttribute(LaunchConfigurationConstants.VIEW_CLASS, viewer.getText());
@@ -984,26 +933,25 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
configuration.setAttribute(LaunchConfigurationConstants.ARGUMENTS, arguments.getText());
configuration.setAttribute(LaunchConfigurationConstants.BINARY_ARGUMENTS, binaryArguments.getText());
configuration.setAttribute(LaunchConfigurationConstants.OUTPUT_PATH, outputFile.getText());
-// configuration.setAttribute(LaunchConfigurationConstants.COMMAND_LIST, commandFile.getText());
-
+
if (generatedScript != null){
configuration.setAttribute(LaunchConfigurationConstants.GENERATED_SCRIPT, generatedScript.getText());
configuration.setAttribute(LaunchConfigurationConstants.NEED_TO_GENERATE, needToGenerateScriptButton.getSelection());
}
-
+
configuration.setAttribute(LaunchConfigurationConstants.USE_COLOUR, useColourButton.getSelection());
-
+
if (button_graphicsMode.getSelection()){
scriptFile.setEnabled(false);
workspaceBrowseButton.setEnabled(false);
fileBrowseButton.setEnabled(false);
-
+
}else{
scriptFile.setEnabled(true);
workspaceBrowseButton.setEnabled(true);
fileBrowseButton.setEnabled(true);
}
-
+
if (changeOverwrite) {
if (needsOverwritePermission && overwritePermission || !needsOverwritePermission) {
configuration.setAttribute(LaunchConfigurationConstants.OVERWRITE, true);
@@ -1019,26 +967,26 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
@Override
public void setDefaults(ILaunchConfigurationWorkingCopy configuration) {
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_VERBOSE,LaunchConfigurationConstants.DEFAULT_COMMAND_VERBOSE);
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_KEEP_TEMPORARY,LaunchConfigurationConstants.DEFAULT_COMMAND_KEEP_TEMPORARY);
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_GURU,LaunchConfigurationConstants.DEFAULT_COMMAND_GURU);
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_PROLOGUE_SEARCH,LaunchConfigurationConstants.DEFAULT_COMMAND_PROLOGUE_SEARCH);
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_NO_CODE_ELISION,LaunchConfigurationConstants.DEFAULT_COMMAND_NO_CODE_ELISION);
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_DISABLE_WARNINGS,LaunchConfigurationConstants.DEFAULT_COMMAND_DISABLE_WARNINGS);
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_BULK_MODE,LaunchConfigurationConstants.DEFAULT_COMMAND_BULK_MODE);
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_TIMING_INFO,LaunchConfigurationConstants.DEFAULT_COMMAND_TIMING_INFO);
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_SKIP_BADVARS,LaunchConfigurationConstants.DEFAULT_COMMAND_SKIP_BADVARS);
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_IGNORE_DWARF,LaunchConfigurationConstants.DEFAULT_COMMAND_IGNORE_DWARF);
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_VERBOSE,LaunchConfigurationConstants.DEFAULT_COMMAND_VERBOSE);
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_KEEP_TEMPORARY,LaunchConfigurationConstants.DEFAULT_COMMAND_KEEP_TEMPORARY);
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_GURU,LaunchConfigurationConstants.DEFAULT_COMMAND_GURU);
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_PROLOGUE_SEARCH,LaunchConfigurationConstants.DEFAULT_COMMAND_PROLOGUE_SEARCH);
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_NO_CODE_ELISION,LaunchConfigurationConstants.DEFAULT_COMMAND_NO_CODE_ELISION);
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_DISABLE_WARNINGS,LaunchConfigurationConstants.DEFAULT_COMMAND_DISABLE_WARNINGS);
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_BULK_MODE,LaunchConfigurationConstants.DEFAULT_COMMAND_BULK_MODE);
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_TIMING_INFO,LaunchConfigurationConstants.DEFAULT_COMMAND_TIMING_INFO);
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_SKIP_BADVARS,LaunchConfigurationConstants.DEFAULT_COMMAND_SKIP_BADVARS);
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_IGNORE_DWARF,LaunchConfigurationConstants.DEFAULT_COMMAND_IGNORE_DWARF);
configuration.setAttribute(LaunchConfigurationConstants.COMMAND_TAPSET_COVERAGE,LaunchConfigurationConstants.DEFAULT_COMMAND_TAPSET_COVERAGE);
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_LEAVE_RUNNING,LaunchConfigurationConstants.DEFAULT_COMMAND_LEAVE_RUNNING);
- configuration.setAttribute(LaunchConfigurationConstants.COMMAND_PASS,LaunchConfigurationConstants.DEFAULT_COMMAND_PASS);
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_LEAVE_RUNNING,LaunchConfigurationConstants.DEFAULT_COMMAND_LEAVE_RUNNING);
+ configuration.setAttribute(LaunchConfigurationConstants.COMMAND_PASS,LaunchConfigurationConstants.DEFAULT_COMMAND_PASS);
configuration.setAttribute(LaunchConfigurationConstants.COMMAND_BUFFER_BYTES,LaunchConfigurationConstants.DEFAULT_COMMAND_BUFFER_BYTES);
configuration.setAttribute(LaunchConfigurationConstants.COMMAND_TARGET_PID,LaunchConfigurationConstants.DEFAULT_COMMAND_TARGET_PID);
-
+
configuration.setAttribute(LaunchConfigurationConstants.COMMAND_C_DIRECTIVES,LaunchConfigurationConstants.DEFAULT_COMMAND_C_DIRECTIVES);
- configuration.setAttribute(LaunchConfigurationConstants.BINARY_PATH,LaunchConfigurationConstants.DEFAULT_BINARY_PATH);
- configuration.setAttribute(LaunchConfigurationConstants.SCRIPT_PATH,LaunchConfigurationConstants.DEFAULT_SCRIPT_PATH);
- configuration.setAttribute(LaunchConfigurationConstants.OUTPUT_PATH,LaunchConfigurationConstants.DEFAULT_OUTPUT_PATH);
+ configuration.setAttribute(LaunchConfigurationConstants.BINARY_PATH,LaunchConfigurationConstants.DEFAULT_BINARY_PATH);
+ configuration.setAttribute(LaunchConfigurationConstants.SCRIPT_PATH,LaunchConfigurationConstants.DEFAULT_SCRIPT_PATH);
+ configuration.setAttribute(LaunchConfigurationConstants.OUTPUT_PATH,LaunchConfigurationConstants.DEFAULT_OUTPUT_PATH);
configuration.setAttribute(LaunchConfigurationConstants.ARGUMENTS,LaunchConfigurationConstants.DEFAULT_ARGUMENTS);
configuration.setAttribute(LaunchConfigurationConstants.BINARY_ARGUMENTS,LaunchConfigurationConstants.DEFAULT_BINARY_ARGUMENTS);
@@ -1048,11 +996,11 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
configuration.setAttribute(LaunchConfigurationConstants.VIEW_CLASS, LaunchConfigurationConstants.DEFAULT_VIEW_CLASS);
-
+
configuration.setAttribute(LaunchConfigurationConstants.USE_COLOUR, LaunchConfigurationConstants.DEFAULT_USE_COLOUR);
-
+
configuration.setAttribute(LaunchConfigurationConstants.COMMAND_LIST, ConfigurationOptionsSetter.setOptions(configuration));
-
+
ICElement cElement = null;
cElement = getContext(configuration, getPlatform(configuration));
@@ -1075,53 +1023,43 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
launch.launch(bin, "", configuration); //$NON-NLS-1$
}
}
-
+
@Override
public boolean isValid(ILaunchConfiguration launchConfig) {
// Check that the major options are sane
boolean valid = true;
-
-// try {
-// if (!launchConfig.getAttribute(LaunchConfigurationConstants.OVERWRITE, LaunchConfigurationConstants.DEFAULT_OVERWRITE)) {
-// valid = false;
-// }
-// } catch (CoreException e1) {
-// e1.printStackTrace();
-// }
-//
-//
- try {
+ try {
String sPath = launchConfig.getAttribute(
- LaunchConfigurationConstants.SCRIPT_PATH,
+ LaunchConfigurationConstants.SCRIPT_PATH,
LaunchConfigurationConstants.DEFAULT_SCRIPT_PATH);
-
+
File script = new File(sPath);
-
+
if (sPath.equals(LaunchConfigurationConstants.DEFAULT_SCRIPT_PATH) || !script.exists()) {
- //No script path specified or no such script exists
+ //No script path specified or no such script exists
valid = false;
}
-
+
} catch (CoreException e) {
e.printStackTrace();
}
-
+
return valid;
}
-
+
private String getUsefulLabel(Object element) {
if (element instanceof IConfigurationElement) {
Object o = ((IConfigurationElement) element).getParent();
if (o instanceof IExtension) {
IExtension e = (IExtension) ((IConfigurationElement) element).getParent();
return e.getUniqueIdentifier();
- }
+ }
}
return Messages.getString("SystemTapOptionsTab.1"); //$NON-NLS-1$
}
-
+
private static class ListLabelProvider implements ILabelProvider {
@Override
@@ -1141,13 +1079,13 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
IConfigurationElement e = (IConfigurationElement) ((IConfigurationElement) element).getParent();
return e.getName();
}
-
+
}
return Messages.getString("SystemTapOptionsTab.46"); } //$NON-NLS-1$
@Override
public void addListener(ILabelProviderListener listener) {
-
+
}
@Override
@@ -1162,6 +1100,6 @@ public class SystemTapOptionsTab extends CLaunchConfigurationTab{
@Override
public void removeListener(ILabelProviderListener listener) {
}
-
+
}
}
diff --git a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/graphlisteners/StapGraphMouseListener.java b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/graphlisteners/StapGraphMouseListener.java
index ee28025..5c3f551 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/graphlisteners/StapGraphMouseListener.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph/src/org/eclipse/linuxtools/internal/callgraph/graphlisteners/StapGraphMouseListener.java
@@ -24,13 +24,11 @@ import org.eclipse.zest.core.widgets.GraphNode;
public class StapGraphMouseListener implements MouseListener {
private StapGraph graph;
private StapGraphMouseMoveListener listener;
- private StapGraphFocusListener focus;
private StapGraphMouseExitListener exitListener;
public StapGraphMouseListener(StapGraph g) {
this.graph = g;
listener = new StapGraphMouseMoveListener(graph);
- focus = new StapGraphFocusListener(listener);
exitListener = new StapGraphMouseExitListener(listener);
}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/ScpClient.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/ScpClient.java
index 3a98c42..e8876f8 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/ScpClient.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/ScpClient.java
@@ -90,7 +90,7 @@ public class ScpClient {
int len = fis.read(buf, 0, buf.length);
if (len <= 0)
break;
- out.write(buf, 0, len); // out.flush();
+ out.write(buf, 0, len);
}
fis.close();
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/dialogs/Messages.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/dialogs/Messages.java
new file mode 100644
index 0000000..e5a2d3a
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/dialogs/Messages.java
@@ -0,0 +1,35 @@
+/*******************************************************************************
+ * 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, Inc. - initial API and implementation
+ *******************************************************************************/
+package org.eclipse.linuxtools.systemtap.ui.consolelog.dialogs;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * @since 2.0
+ */
+public class Messages {
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.systemtap.ui.consolelog.dialogs"; //$NON-NLS-1$
+ public static String SelectServerDialog_RemoteServerDetails;
+ public static String SelectServerDialog_Host;
+ public static String SelectServerDialog_User;
+ public static String SelectServerDialog_Password;
+ public static String SelectServerDialog_AlwaysConnectToHost;
+ public static String SelectServerDialog_Cancel;
+ public static String SelectServerDialog_Connect;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+
+}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/dialogs/SelectServerDialog.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/dialogs/SelectServerDialog.java
index fbb94f4..0f0731b 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/dialogs/SelectServerDialog.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/dialogs/SelectServerDialog.java
@@ -24,73 +24,72 @@ public class SelectServerDialog extends Dialog {
private Button connectButton;
private Button cancelButton;
private boolean result;
-
+
public SelectServerDialog(Shell parent) {
super(parent);
}
-
+
public boolean open() {
if (ConsoleLogPlugin.getDefault().getPreferenceStore().getBoolean(ConsoleLogPreferenceConstants.REMEMBER_SERVER)) {
return true;
}
result = false;
-
+
Shell parent = getParent();
final Shell shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.APPLICATION_MODAL);
- shell.setText("Remote Server Details");
+ shell.setText(Messages.SelectServerDialog_RemoteServerDetails);
shell.pack();
- //shell.setSize(350, 220);
-
+
GridLayout layout = new GridLayout();
layout.numColumns = 2;
layout.makeColumnsEqualWidth = false;
shell.setLayout(layout);
-
+
GridData dataLeft = new GridData();
dataLeft.grabExcessHorizontalSpace = false;
dataLeft.horizontalAlignment = SWT.LEFT;
Label hostLabel = new Label(shell, SWT.NONE);
- hostLabel.setText("Host: ");
+ hostLabel.setText(Messages.SelectServerDialog_Host);
hostLabel.setLayoutData(dataLeft);
-
+
GridData dataFill = new GridData();
dataFill.grabExcessHorizontalSpace = true;
dataFill.horizontalAlignment = SWT.FILL;
hostText = new Text(shell, SWT.SINGLE | SWT.BORDER);
hostText.setLayoutData(dataFill);
hostText.setText(ConsoleLogPlugin.getDefault().getPreferenceStore().getString(ConsoleLogPreferenceConstants.HOST_NAME));
-
+
Label userLabel = new Label(shell, SWT.NONE);
- userLabel.setText("User: ");
+ userLabel.setText(Messages.SelectServerDialog_User);
userLabel.setLayoutData(dataLeft);
-
+
userText = new Text(shell, SWT.SINGLE | SWT.BORDER);
userText.setLayoutData(dataFill);
userText.setText(ConsoleLogPlugin.getDefault().getPreferenceStore().getString(ConsoleLogPreferenceConstants.SCP_USER));
-
+
Label passwordLabel = new Label(shell, SWT.NONE);
- passwordLabel.setText("Password: ");
+ passwordLabel.setText(Messages.SelectServerDialog_Password);
passwordLabel.setLayoutData(dataLeft);
-
+
passwordText = new Text(shell, SWT.SINGLE | SWT.BORDER);
passwordText.setEchoChar('*');
passwordText.setLayoutData(dataFill);
passwordText.setText(ConsoleLogPlugin.getDefault().getPreferenceStore().getString(ConsoleLogPreferenceConstants.SCP_PASSWORD));
-
-
+
+
GridData data = new GridData();
data.horizontalAlignment = SWT.LEFT;
data.horizontalSpan = 2;
rememberButton = new Button(shell, SWT.CHECK);
rememberButton.setLayoutData(data);
- rememberButton.setText("Always connect to this host.");
-
+ rememberButton.setText(Messages.SelectServerDialog_AlwaysConnectToHost);
+
data = new GridData();
data.horizontalAlignment = SWT.RIGHT;
cancelButton = new Button(shell, SWT.PUSH);
cancelButton.setLayoutData(data);
cancelButton.setSize(50, 100);
- cancelButton.setText("Cancel");
+ cancelButton.setText(Messages.SelectServerDialog_Cancel);
cancelButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
@@ -98,13 +97,13 @@ public class SelectServerDialog extends Dialog {
shell.dispose();
}
});
-
+
data = new GridData();
data.horizontalAlignment = SWT.RIGHT;
connectButton = new Button(shell, SWT.PUSH);
connectButton.setLayoutData(data);
connectButton.setSize(50, 100);
- connectButton.setText("Connect");
+ connectButton.setText(Messages.SelectServerDialog_Connect);
connectButton.addSelectionListener(new SelectionAdapter() {
@Override
public void widgetSelected(SelectionEvent e) {
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/dialogs/messages.properties b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/dialogs/messages.properties
new file mode 100644
index 0000000..ce7dbcd
--- /dev/null
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/dialogs/messages.properties
@@ -0,0 +1,17 @@
+###############################################################################
+# 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, Inc. - initial API and implementation
+###############################################################################
+SelectServerDialog_RemoteServerDetails=Remote Server Details
+SelectServerDialog_Host=Host:
+SelectServerDialog_User=User:
+SelectServerDialog_Password=Password:
+SelectServerDialog_AlwaysConnectToHost=Always connect to this host.
+SelectServerDialog_Cancel=Cancel
+SelectServerDialog_Connect=Connect
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/preferences/Messages.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/preferences/Messages.java
index eeb163d..6122a30 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/preferences/Messages.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.consolelog/src/org/eclipse/linuxtools/systemtap/ui/consolelog/preferences/Messages.java
@@ -12,7 +12,7 @@ package org.eclipse.linuxtools.systemtap.ui.consolelog.preferences;
import org.eclipse.osgi.util.NLS;
public class Messages extends NLS {
- private static final String BUNDLE_NAME = "org.eclipse.linuxtools.systemtap.ui.consolelog.preferences.messages"; //$NON-NLS-1$
+ private static final String BUNDLE_NAME = "org.eclipse.linuxtools.systemtap.ui.consolelog.preferences"; //$NON-NLS-1$
public static String ConsoleLogPreferencePage_AlwaysConnectToHost;
public static String ConsoleLogPreferencePage_Host;
public static String ConsoleLogPreferencePage_Password;
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/DashboardAdapter.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/DashboardAdapter.java
index 8e2146a..317b8ac 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/DashboardAdapter.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/DashboardAdapter.java
@@ -74,7 +74,6 @@ public class DashboardAdapter {
folder.setLayoutData(folder);
folder.setLayout(new FormLayout());
- //folder.setTabHeight(0);
ToolBar toolBar = new ToolBar (folder, SWT.FLAT | SWT.BORDER);
min = new ToolItem(toolBar, SWT.PUSH);
@@ -101,7 +100,6 @@ public class DashboardAdapter {
//Setup canvas
CTabItem item = new CTabItem(folder, SWT.NONE);
Composite c = new Composite(folder, SWT.NONE);
- //c.setExpan
FormData data = new FormData();
data.left = new FormAttachment(0,0);
data.top = new FormAttachment(0,0);
@@ -110,7 +108,6 @@ public class DashboardAdapter {
c.setLayoutData(data);
c.setLayout(new FormLayout());
item.setControl(c);
- //item.setText(gd.title);
folder.setSelection(item);
//Create graph
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/ActiveModuleData.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/ActiveModuleData.java
index 4464c26..5fe47ac 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/ActiveModuleData.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboard/src/org/eclipse/linuxtools/systemtap/ui/dashboard/structures/ActiveModuleData.java
@@ -13,10 +13,9 @@ package org.eclipse.linuxtools.systemtap.ui.dashboard.structures;
import org.eclipse.linuxtools.systemtap.ui.consolelog.structures.ScriptConsole;
import org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui.datasets.IDataSet;
-//import org.eclipse.linuxtools.systemtap.ui.structures.runnable.LoggedCommand;
/**
- * This is a basic structure to contain all the important information for a
+ * This is a basic structure to contain all the important information for a
* running Dashboard script.
* @author Ryan Morse
*/
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboardextension/actions/CreateModuleHandler.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboardextension/actions/CreateModuleHandler.java
index 04f5c1c..9f2384a 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboardextension/actions/CreateModuleHandler.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.dashboardextension/src/org/eclipse/linuxtools/internal/systemtap/ui/dashboardextension/actions/CreateModuleHandler.java
@@ -118,7 +118,6 @@ public class CreateModuleHandler extends AbstractHandler {
buildArchive(archiveName, new File(script), meta);
cleanupFiles(new String[] { archiveName, meta.getAbsolutePath() });
updateDashboard();
- // }
}
}
return null;
@@ -285,9 +284,6 @@ public class CreateModuleHandler extends AbstractHandler {
PlatformUI.getWorkbench().getActiveWorkbenchWindow());
IViewPart ivp = p.findView(DashboardModuleBrowserView.ID);
((DashboardModuleBrowserView) ivp).refresh();
-
- // p = PlatformUI.getWorkbench().showPerspective(IDEPerspective.ID,
- // PlatformUI.getWorkbench().getActiveWorkbenchWindow());
} catch (WorkbenchException we) {
}
}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/row/FilteredRowDataSet.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/row/FilteredRowDataSet.java
index aebc966..3e6cc3b 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/row/FilteredRowDataSet.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/row/FilteredRowDataSet.java
@@ -29,28 +29,28 @@ public class FilteredRowDataSet extends RowDataSet implements IFilteredDataSet {
topData = null;
dataCount = data.getRowCount();
}
-
+
public FilteredRowDataSet(String[] titles) {
this(new RowDataSet(titles));
}
-
+
//Overwrite methods to insure data is removed from the original DataSet
@Override
public void append(IDataEntry entry) {
original.append(entry);
}
-
+
@Override
public boolean remove(IDataEntry entry) {
return original.remove(entry);
}
-
+
@Override
public boolean remove(int entry) {
return original.remove(entry);
}
//End overwrite methods to insure data is removed from the original DataSet
-
+
//Overwrite to ensure the data returned has all the filters applied
@Override
public Object[] getColumn(int col, int start, int end) {
@@ -63,21 +63,19 @@ public class FilteredRowDataSet extends RowDataSet implements IFilteredDataSet {
rebuildDataSet();
return super.getRow(row);
}
-
- //public int getRowCount() - calls getEntryCount();
-
+
@Override
public Object[] getHistoricalData(String key, int col, int start, int end) {
rebuildDataSet();
return super.getHistoricalData(key, col, start, end);
}
-
+
@Override
public int getEntryCount() {
rebuildDataSet();
return super.getEntryCount();
}
-
+
@Override
public IDataEntry getEntry(int entry) {
rebuildDataSet();
@@ -91,19 +89,19 @@ public class FilteredRowDataSet extends RowDataSet implements IFilteredDataSet {
filters.add(filter);
filtersChanged = true;
}
-
+
@Override
public boolean removeFilter(IDataSetFilter filter) {
filtersChanged = filters.remove(filter);
return filtersChanged;
}
-
+
@Override
public void clearFilters() {
filters.clear();
filtersChanged = true;
}
-
+
@Override
public IDataSetFilter[] getFilters() {
IDataSetFilter[] f = new IDataSetFilter[filters.size()];
@@ -111,7 +109,7 @@ public class FilteredRowDataSet extends RowDataSet implements IFilteredDataSet {
return f;
}
//End IFilteredDataSet Methods
-
+
private void rebuildDataSet() {
IDataEntry top = original.getEntry(original.getEntryCount()-1);
@@ -125,7 +123,7 @@ public class FilteredRowDataSet extends RowDataSet implements IFilteredDataSet {
setFilteredData(filterData);
}
}
-
+
private ArrayList<Object>[] getFilterData() {
ArrayList<Object>[] data = GraphingAPINonUIPlugin.createArrayList(original.getColCount(), new Object());
for(int i=0; i<data.length; i++)
@@ -137,13 +135,13 @@ public class FilteredRowDataSet extends RowDataSet implements IFilteredDataSet {
for(j=0; j<data.length; j++)
data[j].add(row[j]);
}
-
+
return data;
}
-
+
private void setFilteredData(ArrayList<?>[] data) {
this.data = new ArrayList<IDataEntry>();
-
+
RowEntry entry;
Object[] row;
for(int j,i=0; i<data[0].size(); i++) {
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/table/FilteredTableDataSet.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/table/FilteredTableDataSet.java
index d4d143c..8b51c6e 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/table/FilteredTableDataSet.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.nonui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/nonui/datasets/table/FilteredTableDataSet.java
@@ -32,7 +32,7 @@ public class FilteredTableDataSet extends TableDataSet implements IFilteredDataS
topData = null;
dataCount = data.getRowCount();
}
-
+
public FilteredTableDataSet(String[] titles) {
this(new TableDataSet(titles));
}
@@ -42,18 +42,18 @@ public class FilteredTableDataSet extends TableDataSet implements IFilteredDataS
public void append(IDataEntry entry) {
original.append(entry);
}
-
+
@Override
public boolean remove(IDataEntry entry) {
return original.remove(entry);
}
-
+
@Override
public boolean remove(int entry) {
return original.remove(entry);
}
//End overwrite methods to insure data is removed from the original DataSet
-
+
//Overwrite to ensure the data returned has all the filters applied
@Override
public Object[] getColumn(int col, int start, int end) {
@@ -66,7 +66,7 @@ public class FilteredTableDataSet extends TableDataSet implements IFilteredDataS
rebuildDataSet();
return super.getRow(row);
}
-
+
@Override
public int getRowCount() {
rebuildDataSet();
@@ -76,22 +76,16 @@ public class FilteredTableDataSet extends TableDataSet implements IFilteredDataS
@Override
public Object[] getHistoricalData(String key, int col, int start, int end) {
return original.getHistoricalData(key, col, start, end);
- //rebuildHistoricalDataSet();
- //return super.getHistoricalData(key, col, start, end);
}
-
+
@Override
public int getEntryCount() {
return original.getEntryCount();
- //rebuildHistoricalDataSet();
- //return super.getEntryCount();
}
-
+
@Override
public IDataEntry getEntry(int entry) {
return original.getEntry(entry);
- //rebuildHistoricalDataSet();
- //return super.getEntry(entry);
}
@Override
@@ -107,19 +101,19 @@ public class FilteredTableDataSet extends TableDataSet implements IFilteredDataS
filters.add(filter);
filtersChanged = true;
}
-
+
@Override
public boolean removeFilter(IDataSetFilter filter) {
filtersChanged = filters.remove(filter);
return filtersChanged;
}
-
+
@Override
public void clearFilters() {
filters.clear();
filtersChanged = true;
}
-
+
@Override
public IDataSetFilter[] getFilters() {
IDataSetFilter[] f = new IDataSetFilter[filters.size()];
@@ -127,15 +121,15 @@ public class FilteredTableDataSet extends TableDataSet implements IFilteredDataS
return f;
}
//End IFilteredDataSet Methods
-
+
private void rebuildDataSet() {
IDataEntry top = original.getEntry(original.getEntryCount()-1);
-
+
if(filtersChanged || dataCount != original.getRowCount() || topData != top || historical) {
dataCount = original.getRowCount();
topData = top;
historical = false;
-
+
ArrayList<Object>[] filterData = getFilterData();
for(int i=0; i<filters.size(); i++)
filterData = filters.get(i).filter(filterData);
@@ -147,19 +141,19 @@ public class FilteredTableDataSet extends TableDataSet implements IFilteredDataS
ArrayList<Object>[] data = GraphingAPINonUIPlugin.createArrayList(original.getColCount(), new Object());
for(int i=0; i<data.length; i++)
data[i] = new ArrayList<Object>();
-
+
Object[][] table = original.getData();
for(int j,i=0; i<original.getRowCount(); i++) {
for(j=0; j<data.length; j++)
data[j].add(table[i][j]);
}
-
+
return data;
}
-
+
private void setFilteredData(ArrayList<Object>[] data) {
this.data = new ArrayList<TableEntry>();
-
+
TableEntry entry = new TableEntry();
Object[] row;
for(int j,i=0; i<data[0].size(); i++) {
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/datadisplay/DataGrid.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/datadisplay/DataGrid.java
index ce393cb..1d00eb8 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/datadisplay/DataGrid.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/datadisplay/DataGrid.java
@@ -112,7 +112,6 @@ public class DataGrid implements IUpdateListener {
item.setText(Localization.getString("DataGrid.FormatAs")); //$NON-NLS-1$
item.setMenu(formatMenu);
- //if(dataSet instanceof IFilteredDataSet) {
filterMenu = new Menu(menu);
item = new MenuItem(menu, SWT.CASCADE);
item.setText(Localization.getString("DataGrid.AddFilter")); //$NON-NLS-1$
@@ -131,7 +130,6 @@ public class DataGrid implements IUpdateListener {
item.addSelectionListener(new RemoveFilterSelection());
}
}
- //}
item = new MenuItem(menu, SWT.CHECK);
item.setText(Localization.getString("DataGrid.ManualyResize")); //$NON-NLS-1$
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphAxis2.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphAxis2.java
index f84fe30..5493b39 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphAxis2.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphAxis2.java
@@ -86,7 +86,7 @@ public class GraphAxis2 extends GraphAxis {
if(HIDE_GRID_LINES != (HIDE_GRID_LINES&type))
super.drawGridLine(gc, x1, y1, x2, y2);
}
-
+
@Override
protected void drawTick(GC gc, int x, int y, String val) {
if(HIDE_TICKS != (HIDE_TICKS&type))
@@ -98,19 +98,12 @@ public class GraphAxis2 extends GraphAxis {
if(HIDE_TITLE != (HIDE_TITLE&type))
super.drawTitle(gc);
}
- /*TODO: This should be reimplemented for viewing true values when normalized
- protected String getLabel(double val, int range) {
- if(UNNORMALIZED == (UNNORMALIZED&type))
- val = graph.unscaleValue(val);
-
- return super.getLabel(val, range);
- }
- */
+
public static final int ALIGN_LEFT = VERTICAL; //0
public static final int ALIGN_TOP = HORIZONTAL; //1
public static final int ALIGN_RIGHT = VERTICAL | 2; //2
public static final int ALIGN_BOTTOM = HORIZONTAL | 2; //3
-
+
public static final int HIDE_GRID_LINES = 4;
public static final int HIDE_TITLE = 8;
public static final int HIDE_TICKS = 16;
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphComposite.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphComposite.java
index b192a7d..9c31457 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphComposite.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.graphingapi.ui/src/org/eclipse/linuxtools/systemtap/ui/graphingapi/ui/widgets/GraphComposite.java
@@ -50,10 +50,8 @@ public class GraphComposite extends Composite {
label = new Label(this, SWT.HORIZONTAL | SWT.BORDER | SWT.BOLD | SWT.CENTER);
scale = scales[7];
- //label.setText(scale + Localization.getString("GraphComposite.ScaleValue"));
label.setText("-"); //$NON-NLS-1$
FormData data = new FormData();
- // data.top = new FormAttachment(0,0);
data.bottom = new FormAttachment(100,-4);
data.left = new FormAttachment(0, 2);
data.width = 15;
@@ -65,7 +63,7 @@ public class GraphComposite extends Composite {
zoomScale.setIncrement(1);
zoomScale.setPageIncrement(1);
zoomScale.setSelection(7);
- zoomScale.setToolTipText("Increase/Decrease the no of X axis ticks");
+ zoomScale.setToolTipText("Increase/Decrease the no of X axis ticks"); //$NON-NLS-1$
data = new FormData();
data.left = new FormAttachment(label,2);
data.bottom = new FormAttachment(100, -4);
@@ -76,7 +74,6 @@ public class GraphComposite extends Composite {
pluslabel.setText("+"); //$NON-NLS-1$
pluslabel.setFont(new Font(parent.getDisplay(), "Arial", 10, SWT.BOLD)); //$NON-NLS-1$
data = new FormData();
-// data.top = new FormAttachment(0,0);
data.left = new FormAttachment(zoomScale,2);
data.bottom = new FormAttachment(100,-4);
data.width = 15;
@@ -86,7 +83,6 @@ public class GraphComposite extends Composite {
data = new FormData();
data.top = new FormAttachment(0,0);
data.bottom = new FormAttachment(label,-5);
- //data.right = new FormAttachment(label,-10);
data.right = new FormAttachment(100,0);
data.left = new FormAttachment(0,0);
builder.build();
@@ -95,9 +91,6 @@ public class GraphComposite extends Composite {
builder.setLayoutData(data);
- //builder.setBackground(this.getDisplay().getSystemColor(SWT.COLOR_CYAN));
- //builder.setForeground(this.getDisplay().getSystemColor(SWT.COLOR_CYAN));
- //this.setBackground(getDisplay().getSystemColor(SWT.COLOR_BLUE));
zoomScale.addSelectionListener(scaleListener);
//The scale zoom scrool doesn't make sense for charts without axis
@@ -121,11 +114,9 @@ public class GraphComposite extends Composite {
FormData data = new FormData();
data.top = new FormAttachment(0,0);
- //data.bottom = new FormAttachment(100,0);
data.bottom = (withSidebar ? new FormAttachment(label,-7) : new FormAttachment(100, 0));
data.left = new FormAttachment(0,0);
data.right = new FormAttachment(100,0);
-// data.right = (withSidebar ? new FormAttachment(label,-10) : new FormAttachment(100, 0));
builder.setLayoutData(data);
layout(true, true);
@@ -172,13 +163,6 @@ public class GraphComposite extends Composite {
/**
* Returns the graph that is rendering to this composite.
*/
-/* public IGraph getGraph() {
- return graph;
- }*/
-
- /**
- * Returns the graph that is rendering to this composite.
- */
public AbstractChartBuilder getCanvas() {
return builder;
}
@@ -205,7 +189,7 @@ public class GraphComposite extends Composite {
super.dispose();
}
- /*
+ /**
* Listeners are below:
* scaleListener - detects movement in the Scale widget and rescales the graph on change
* titleListener - A SelectionListener for the title button
@@ -222,9 +206,7 @@ public class GraphComposite extends Composite {
int index = scaler.getSelection();
if(scale != scales[index]) {
scale = scales[index];
- // label.setText(scale + Localization.getString("GraphComposite.ScaleValue"));
builder.setScale(scale);
- //graph.setScale(scale);
}
}
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/LoggingStreamDaemonTest.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/LoggingStreamDaemonTest.java
index 99dcf10..f15009c 100644
--- a/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/LoggingStreamDaemonTest.java
+++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.structures.tests/src/org/eclipse/linuxtools/systemtap/ui/structures/LoggingStreamDaemonTest.java
@@ -40,7 +40,6 @@ public class LoggingStreamDaemonTest {
daemon.handleDataEvent("test");
assertTrue(daemon.saveLog(f));
- //assertTrue("test".equals(daemon.getOutput()));
f.delete();
f = new File("/root/");