diff options
author | Sami Wagiaalla | 2012-10-15 17:52:03 +0000 |
---|---|---|
committer | Roland Grunberg | 2012-10-22 20:19:39 +0000 |
commit | 93c69939a6412edfcc5e221518ef9c625b0fc735 (patch) | |
tree | 6f5c1b1dcdda2177a215e45a6efbffff5e5f464f /systemtap/org.eclipse.linuxtools.systemtap.ui.ide | |
parent | 9eab93e80fdddf38445529f5b61ed0a83c8e3d93 (diff) | |
download | org.eclipse.linuxtools-93c69939a6412edfcc5e221518ef9c625b0fc735.tar.gz org.eclipse.linuxtools-93c69939a6412edfcc5e221518ef9c625b0fc735.tar.xz org.eclipse.linuxtools-93c69939a6412edfcc5e221518ef9c625b0fc735.zip |
Create a skeleton SystemTap run configuration implementation
Change-Id: I95c263f1a54d74725eb2fa6f519954009afe91d9
Reviewed-on: https://git.eclipse.org/r/8287
Reviewed-by: Roland Grunberg <rgrunber@redhat.com>
IP-Clean: Roland Grunberg <rgrunber@redhat.com>
Tested-by: Roland Grunberg <rgrunber@redhat.com>
Diffstat (limited to 'systemtap/org.eclipse.linuxtools.systemtap.ui.ide')
4 files changed, 204 insertions, 0 deletions
diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.xml b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.xml index 7da709bf84..ecb7540ad2 100644 --- a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.xml +++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/plugin.xml @@ -314,4 +314,30 @@ type="java.util.Arrays$ArrayList"> </propertyTester> </extension> + <extension + point="org.eclipse.debug.core.launchConfigurationTypes"> + <launchConfigurationType + delegate="org.eclipse.linuxtools.internal.systemtap.ui.ide.launcher.SystemTapScriptLaunchConfigurationDelegate" + id="org.eclipse.linuxtools.systemtap.ui.ide.SystemTapLaunchConfigurationType" + modes="run" + name="SystemTap" + public="true"> + </launchConfigurationType> + </extension> + <extension + point="org.eclipse.debug.ui.launchConfigurationTypeImages"> + <launchConfigurationTypeImage + configTypeID="org.eclipse.linuxtools.systemtap.ui.ide.SystemTapLaunchConfigurationType" + icon="icons/smileytap.gif" + id="org.eclipse.linuxtools.systemtap.ui.ide.systemtapLaunchConfigurationTypeImage"> + </launchConfigurationTypeImage> + </extension> + <extension + point="org.eclipse.debug.ui.launchConfigurationTabGroups"> + <launchConfigurationTabGroup + class="org.eclipse.linuxtools.internal.systemtap.ui.ide.launcher.SystemTapScriptLaunchConfigurationTabGroup" + id="org.eclipse.linuxtools.systemtap.ui.ide.systemTapLaunchConfigurationTabGroup" + type="org.eclipse.linuxtools.systemtap.ui.ide.SystemTapLaunchConfigurationType"> + </launchConfigurationTabGroup> + </extension> </plugin> diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/launcher/SystemTapScriptLaunchConfigurationDelegate.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/launcher/SystemTapScriptLaunchConfigurationDelegate.java new file mode 100644 index 0000000000..d69386b3e2 --- /dev/null +++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/launcher/SystemTapScriptLaunchConfigurationDelegate.java @@ -0,0 +1,27 @@ +/******************************************************************************* + * Copyright (c) 2012 Red Hat. + * 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 - Sami Wagiaalla + *******************************************************************************/ + +package org.eclipse.linuxtools.internal.systemtap.ui.ide.launcher; + +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.debug.core.ILaunch; +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.model.ILaunchConfigurationDelegate; + +public class SystemTapScriptLaunchConfigurationDelegate implements + ILaunchConfigurationDelegate { + + public void launch(ILaunchConfiguration configuration, String mode, + ILaunch launch, IProgressMonitor monitor) throws CoreException { + } + +} diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/launcher/SystemTapScriptLaunchConfigurationTab.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/launcher/SystemTapScriptLaunchConfigurationTab.java new file mode 100644 index 0000000000..95af9357e2 --- /dev/null +++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/launcher/SystemTapScriptLaunchConfigurationTab.java @@ -0,0 +1,120 @@ +/******************************************************************************* + * Copyright (c) 2012 Red Hat. + * 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 - Sami Wagiaalla + *******************************************************************************/ + +package org.eclipse.linuxtools.internal.systemtap.ui.ide.launcher; + +import org.eclipse.debug.core.ILaunchConfiguration; +import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; +import org.eclipse.debug.ui.AbstractLaunchConfigurationTab; +import org.eclipse.swt.SWT; +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.Group; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Text; + +public class SystemTapScriptLaunchConfigurationTab extends + AbstractLaunchConfigurationTab { + + public void createControl(Composite parent) { + + GridLayout layout = new GridLayout(); + Composite top = new Composite(parent, SWT.NONE); + setControl(top); + top.setLayout(layout); + top.setLayoutData( new GridData(SWT.FILL, SWT.FILL, true, true)); + + // Script path + Group scriptSettingsGroup = new Group(top, SWT.SHADOW_ETCHED_IN); + scriptSettingsGroup.setText("Systemtap Script:"); + scriptSettingsGroup.setLayoutData( new GridData(SWT.FILL, SWT.FILL, true, false)); + layout = new GridLayout(); + layout.numColumns = 2; + scriptSettingsGroup.setLayout(layout); + Text scriptPathText = new Text(scriptSettingsGroup, SWT.SINGLE | SWT.BORDER); + scriptPathText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); + + Button selectScriptButon = new Button(scriptSettingsGroup, 0); + GridData gridData = new GridData(); + gridData.widthHint = 110; + selectScriptButon.setLayoutData(gridData); + selectScriptButon.setText("Browse..."); + + // User Settings + Group userSettingsGroup = new Group(top, SWT.SHADOW_ETCHED_IN); + layout = new GridLayout(); + userSettingsGroup.setLayout(layout); + layout.numColumns = 2; + userSettingsGroup.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); + + Button currentUserCheckButton = new Button(userSettingsGroup, SWT.CHECK); + currentUserCheckButton.setText("Execute script as current user."); + currentUserCheckButton.setSelection(true); + gridData = new GridData(); + gridData.horizontalSpan = 2; + currentUserCheckButton.setLayoutData(gridData); + + Label label = new Label(userSettingsGroup, SWT.NONE); + label.setText("User Name:"); + Text userNameText = new Text(userSettingsGroup, SWT.SINGLE | SWT.BORDER); + userNameText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); + + label = new Label(userSettingsGroup, SWT.NONE); + label.setText("Password:"); + Text userPasswordText = new Text(userSettingsGroup, SWT.SINGLE | SWT.BORDER | SWT.PASSWORD); + userPasswordText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); + + userSettingsGroup.setLayoutData( new GridData(SWT.FILL, SWT.FILL, true, false)); + userSettingsGroup.setText("User:"); + + // Host settings + Group hostSettingsGroup = new Group(top, SWT.SHADOW_ETCHED_IN); + hostSettingsGroup.setLayoutData( new GridData(SWT.FILL, SWT.FILL, true, false)); + hostSettingsGroup.setText("Host:"); + layout = new GridLayout(); + hostSettingsGroup.setLayout(layout); + layout.numColumns = 2; + + Button localHostCheckButton = new Button(hostSettingsGroup, SWT.CHECK); + localHostCheckButton.setText("Run script on localhost."); + localHostCheckButton.setSelection(true); + gridData = new GridData(); + gridData.horizontalSpan = 2; + localHostCheckButton.setLayoutData(gridData); + + label = new Label(hostSettingsGroup, SWT.NONE); + label.setText("Host Name:"); + Text hostNameText = new Text(hostSettingsGroup, SWT.SINGLE | SWT.BORDER); + hostNameText.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false)); + } + + public void setDefaults(ILaunchConfigurationWorkingCopy configuration) { + // TODO Auto-generated method stub + + } + + public void initializeFrom(ILaunchConfiguration configuration) { + // TODO Auto-generated method stub + + } + + public void performApply(ILaunchConfigurationWorkingCopy configuration) { + // TODO Auto-generated method stub + + } + + public String getName() { + return "Settings"; + } + +} diff --git a/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/launcher/SystemTapScriptLaunchConfigurationTabGroup.java b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/launcher/SystemTapScriptLaunchConfigurationTabGroup.java new file mode 100644 index 0000000000..0031d8a93a --- /dev/null +++ b/systemtap/org.eclipse.linuxtools.systemtap.ui.ide/src/org/eclipse/linuxtools/internal/systemtap/ui/ide/launcher/SystemTapScriptLaunchConfigurationTabGroup.java @@ -0,0 +1,31 @@ +/******************************************************************************* + * Copyright (c) 2012 Red Hat. + * 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 - Sami Wagiaalla + *******************************************************************************/ + +package org.eclipse.linuxtools.internal.systemtap.ui.ide.launcher; + +import org.eclipse.debug.ui.AbstractLaunchConfigurationTab; +import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup; +import org.eclipse.debug.ui.CommonTab; +import org.eclipse.debug.ui.ILaunchConfigurationDialog; + +public class SystemTapScriptLaunchConfigurationTabGroup extends + AbstractLaunchConfigurationTabGroup { + + public SystemTapScriptLaunchConfigurationTabGroup() { + } + + public void createTabs(ILaunchConfigurationDialog dialog, String mode) { + AbstractLaunchConfigurationTab[] tabs = new AbstractLaunchConfigurationTab[] { + new SystemTapScriptLaunchConfigurationTab(), new CommonTab() }; + setTabs(tabs); + } + +} |