Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/LaunchWizard.java')
-rw-r--r--systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/LaunchWizard.java56
1 files changed, 39 insertions, 17 deletions
diff --git a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/LaunchWizard.java b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/LaunchWizard.java
index 68a240e98b..d3be5c27bf 100644
--- a/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/LaunchWizard.java
+++ b/systemtap/org.eclipse.linuxtools.callgraph.launch/src/org/eclipse/linuxtools/callgraph/launch/LaunchWizard.java
@@ -22,7 +22,6 @@ import org.eclipse.jface.dialogs.InputDialog;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.linuxtools.callgraph.core.PluginConstants;
-import org.eclipse.linuxtools.callgraph.core.ShellOpener;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
@@ -32,6 +31,7 @@ import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
+import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
@@ -101,7 +101,7 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
@Override
public void launch(IEditorPart ed, String mode) {
- super.Init();
+ super.initialize();
promptForInputs();
this.mode = mode;
@@ -111,7 +111,7 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
@Override
public void launch(ISelection selection, String mode) {
- super.Init();
+ super.initialize();
completed = false;
promptForInputs();
@@ -122,12 +122,12 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
private void promptForInputs() {
- InputDialog id = new InputDialog(new Shell(), Messages.getString("LaunchWizard.0"), //$NON-NLS-1$
- Messages.getString("LaunchWizard.1") + //$NON-NLS-1$
- Messages.getString("LaunchWizard.2") + //$NON-NLS-1$
- Messages.getString("LaunchWizard.3"), //$NON-NLS-1$
+ InputDialog id = new InputDialog(new Shell(), Messages.getString("LaunchWizard.WelcomeWizard"), //$NON-NLS-1$
+ Messages.getString("LaunchWizard.Text1") + //$NON-NLS-1$
+ Messages.getString("LaunchWizard.Text2") + //$NON-NLS-1$
+ Messages.getString("LaunchWizard.Text3"), //$NON-NLS-1$
getLaunchManager().generateUniqueLaunchConfigurationNameFrom(
- Messages.getString("LaunchWizard.4")), null); //$NON-NLS-1$
+ Messages.getString("LaunchWizard.NamePrefix")), null); //$NON-NLS-1$
id.open();
if (id.getReturnCode() == InputDialog.CANCEL){
@@ -147,7 +147,7 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
sh.setText(name);
- Image img = new Image(sh.getDisplay(), PluginConstants.PLUGIN_LOCATION + "systemtapbanner.png"); //$NON-NLS-1$
+ Image img = new Image(sh.getDisplay(), PluginConstants.getPluginLocation() + "systemtapbanner.png"); //$NON-NLS-1$
Composite imageCmp = new Composite(sh, SWT.BORDER);
imageCmp.setLayout(new FillLayout());
GridData imageData = new GridData(650, 157);
@@ -164,7 +164,7 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
.span(2,1);
Label scriptLabel = new Label(fileComp, SWT.HORIZONTAL);
- scriptLabel.setText(Messages.getString("LaunchWizard.19")); //$NON-NLS-1$
+ scriptLabel.setText(Messages.getString("LaunchWizard.Script")); //$NON-NLS-1$
labelData.applyTo(scriptLabel);
GridDataFactory textData = GridDataFactory.fillDefaults().grab( true, false )
@@ -190,7 +190,7 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
GridData gd2 = new GridData();
gd2.horizontalSpan = 3;
Label binaryLabel= new Label(fileComp, SWT.HORIZONTAL);
- binaryLabel.setText(Messages.getString("LaunchWizard.20")); //$NON-NLS-1$
+ binaryLabel.setText(Messages.getString("LaunchWizard.BinFile")); //$NON-NLS-1$
labelData.applyTo(binaryLabel);
binaryLocation = new Text(fileComp, SWT.SINGLE | SWT.BORDER);
@@ -217,7 +217,7 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
argumentsComp.setLayout(new GridLayout(2, false));
Label argumentsLabel= new Label(argumentsComp, SWT.HORIZONTAL);
- argumentsLabel.setText(Messages.getString("LaunchWizard.21")); //$NON-NLS-1$
+ argumentsLabel.setText(Messages.getString("LaunchWizard.Args")); //$NON-NLS-1$
labelData.applyTo(argumentsLabel);
argumentsLocation = new Text(argumentsComp, SWT.MULTI | SWT.WRAP | SWT.BORDER);
@@ -225,7 +225,7 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
gd3.heightHint=200;
argumentsLocation.setLayoutData(gd3);
Button argumentsButton = new Button(argumentsComp, SWT.PUSH);
- argumentsButton.setText(Messages.getString("LaunchWizard.22")); //$NON-NLS-1$
+ argumentsButton.setText(Messages.getString("LaunchWizard.Func")); //$NON-NLS-1$
argumentsButton.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
argumentsLocation.setText(
@@ -242,7 +242,7 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
Button launch = new Button(sh, SWT.PUSH);
launch.setLayoutData(new GridData(GridData.CENTER, GridData.BEGINNING, false, false));
- launch.setText(Messages.getString("LaunchWizard.24")); //$NON-NLS-1$
+ launch.setText(Messages.getString("LaunchWizard.Launch")); //$NON-NLS-1$
launch.addSelectionListener(new SelectionAdapter() {
public void widgetSelected(SelectionEvent e) {
scriptPath = scriptLocation.getText();
@@ -260,10 +260,17 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
});
- ShellOpener so = new ShellOpener(Messages.getString("LaunchWizard.23"), sh); //$NON-NLS-1$
- so.schedule();
+ //TODO: Verify that this works
+ Display.getCurrent().asyncExec(new Runnable() {
+
+ @Override
+ public void run() {
+ sh.open();
+ completed = true;
+ }
+
+ });
- completed = true;
}
@@ -271,6 +278,21 @@ public class LaunchWizard extends SystemTapLaunchShortcut {
return completed;
}
+ public String setScriptPath() {
+ scriptPath = "IMPLEMENT";
+ return scriptPath;
+ }
+
+ @Override
+ public String setParserID() {
+ return null;
+ }
+
+ @Override
+ public String setViewID() {
+ return null;
+ }
+
}
//

Back to the top