diff options
author | Alexander Kurtakov | 2013-05-21 08:49:03 +0000 |
---|---|---|
committer | Camilo Bernal | 2013-05-21 18:34:52 +0000 |
commit | b1a96557a9079af0b46e5855b38260c4b257478c (patch) | |
tree | 433f3b8c44104fb7dc063fd01224e7382e7f2d73 /gprof | |
parent | 5bacb4a82c842d38d8b47f06addbb4148ed5961a (diff) | |
download | org.eclipse.linuxtools-b1a96557a9079af0b46e5855b38260c4b257478c.tar.gz org.eclipse.linuxtools-b1a96557a9079af0b46e5855b38260c4b257478c.tar.xz org.eclipse.linuxtools-b1a96557a9079af0b46e5855b38260c4b257478c.zip |
gprof: fix LAUNCH_ID to be gprofLaunch and not gcovLaunch.
Also took the change to make the constants class internal, make it
interface and drop useless modifiers.
Change-Id: Ib7a8a08c0cfcda5a061b382196f22a19d628dbfc
Reviewed-on: https://git.eclipse.org/r/13009
Tested-by: Hudson CI
Reviewed-by: Camilo Bernal <cabernal@redhat.com>
IP-Clean: Camilo Bernal <cabernal@redhat.com>
Tested-by: Camilo Bernal <cabernal@redhat.com>
Diffstat (limited to 'gprof')
-rw-r--r-- | gprof/org.eclipse.linuxtools.gprof.launch/META-INF/MANIFEST.MF | 3 | ||||
-rw-r--r-- | gprof/org.eclipse.linuxtools.gprof.launch/src/org/eclipse/linuxtools/internal/gprof/launch/GprofLaunch.java (renamed from gprof/org.eclipse.linuxtools.gprof.launch/src/org/eclipse/linuxtools/gprof/launch/GprofLaunchPlugin.java) | 13 | ||||
-rw-r--r-- | gprof/org.eclipse.linuxtools.gprof.launch/src/org/eclipse/linuxtools/internal/gprof/launch/GprofLaunchConfigurationDelegate.java | 41 | ||||
-rw-r--r-- | gprof/org.eclipse.linuxtools.gprof.launch/src/org/eclipse/linuxtools/internal/gprof/launch/GprofLaunchShortcut.java | 5 |
4 files changed, 29 insertions, 33 deletions
diff --git a/gprof/org.eclipse.linuxtools.gprof.launch/META-INF/MANIFEST.MF b/gprof/org.eclipse.linuxtools.gprof.launch/META-INF/MANIFEST.MF index bb11bbbb87..1352cf5036 100644 --- a/gprof/org.eclipse.linuxtools.gprof.launch/META-INF/MANIFEST.MF +++ b/gprof/org.eclipse.linuxtools.gprof.launch/META-INF/MANIFEST.MF @@ -17,6 +17,5 @@ Require-Bundle: org.eclipse.linuxtools.profiling.launch;bundle-version="1.2.0", org.eclipse.cdt.managedbuilder.core;bundle-version="8.1.0", org.eclipse.core.filesystem;bundle-version="1.3.200" Import-Package: org.eclipse.linuxtools.internal.gprof.view -Export-Package: org.eclipse.linuxtools.gprof.launch, - org.eclipse.linuxtools.internal.gprof.launch;x-friends:="org.eclipse.linuxtools.gprof.test" +Export-Package: org.eclipse.linuxtools.internal.gprof.launch;x-friends:="org.eclipse.linuxtools.gprof.test" Bundle-Vendor: %bundleProvider diff --git a/gprof/org.eclipse.linuxtools.gprof.launch/src/org/eclipse/linuxtools/gprof/launch/GprofLaunchPlugin.java b/gprof/org.eclipse.linuxtools.gprof.launch/src/org/eclipse/linuxtools/internal/gprof/launch/GprofLaunch.java index 2c7c334660..65310405db 100644 --- a/gprof/org.eclipse.linuxtools.gprof.launch/src/org/eclipse/linuxtools/gprof/launch/GprofLaunchPlugin.java +++ b/gprof/org.eclipse.linuxtools.gprof.launch/src/org/eclipse/linuxtools/internal/gprof/launch/GprofLaunch.java @@ -7,14 +7,13 @@ * * Contributors: * Red Hat Inc. - initial API and implementation - *******************************************************************************/ -package org.eclipse.linuxtools.gprof.launch; + *******************************************************************************/ +package org.eclipse.linuxtools.internal.gprof.launch; /** - * The main plugin class to be used in the desktop. + * Constants for the Gprof launcher. */ -public class GprofLaunchPlugin { - public static final String PLUGIN_ID = "org.eclipse.linuxtools.gprof.launch"; //$NON-NLS-1$ - public static final String ID_GCOV_VIEW = "org.eclipse.linuxtools.gcov.view"; //$NON-NLS-1$ - public static final String LAUNCH_ID = PLUGIN_ID + ".gcovLaunch"; //$NON-NLS-1$ +public interface GprofLaunch { + String PLUGIN_ID = "org.eclipse.linuxtools.gprof.launch"; //$NON-NLS-1$ + String LAUNCH_ID = PLUGIN_ID + ".gprofLaunch"; //$NON-NLS-1$ } diff --git a/gprof/org.eclipse.linuxtools.gprof.launch/src/org/eclipse/linuxtools/internal/gprof/launch/GprofLaunchConfigurationDelegate.java b/gprof/org.eclipse.linuxtools.gprof.launch/src/org/eclipse/linuxtools/internal/gprof/launch/GprofLaunchConfigurationDelegate.java index 8cea345516..afd79106e8 100644 --- a/gprof/org.eclipse.linuxtools.gprof.launch/src/org/eclipse/linuxtools/internal/gprof/launch/GprofLaunchConfigurationDelegate.java +++ b/gprof/org.eclipse.linuxtools.gprof.launch/src/org/eclipse/linuxtools/internal/gprof/launch/GprofLaunchConfigurationDelegate.java @@ -7,12 +7,12 @@ * * Contributors: * Kent Sebastian <ksebasti@redhat.com> - initial API and implementation - * Keith Seitz <keiths@redhat.com> - setup code in launch the method, initially + * Keith Seitz <keiths@redhat.com> - setup code in launch the method, initially * written in the now-defunct OprofileSession class - * QNX Software Systems and others - the section of code marked in the launch + * QNX Software Systems and others - the section of code marked in the launch * method, and the exec method * Red Hat Inc. - modification of OProfileLaunchConfigurationDelegate to here - *******************************************************************************/ + *******************************************************************************/ package org.eclipse.linuxtools.internal.gprof.launch; import java.net.URI; @@ -30,7 +30,6 @@ import org.eclipse.debug.core.ILaunchConfiguration; import org.eclipse.debug.core.ILaunchManager; import org.eclipse.debug.core.ILaunchesListener2; import org.eclipse.jface.dialogs.MessageDialog; -import org.eclipse.linuxtools.gprof.launch.GprofLaunchPlugin; import org.eclipse.linuxtools.internal.gprof.view.GmonView; import org.eclipse.linuxtools.profiling.launch.IRemoteCommandLauncher; import org.eclipse.linuxtools.profiling.launch.IRemoteFileProxy; @@ -42,14 +41,14 @@ import org.eclipse.ui.PlatformUI; public class GprofLaunchConfigurationDelegate extends ProfileLaunchConfigurationDelegate { protected ILaunchConfiguration config; - + @Override public void launch(ILaunchConfiguration config, String mode, ILaunch launch, IProgressMonitor monitor) throws CoreException { this.config = config; IPath exePath = getExePath(config); - /* - * this code written by QNX Software Systems and others and was + /* + * this code written by QNX Software Systems and others and was * originally in the CDT under LocalCDILaunchDelegate::RunLocalApplication */ //set up and launch the local c/c++ program @@ -58,39 +57,39 @@ public class GprofLaunchConfigurationDelegate extends ProfileLaunchConfiguration URI workingDirURI = getProject().getLocationURI(); IPath workingDirPath = new Path(workingDirURI.getPath()); String arguments[] = getProgramArgumentsArray( config ); - + //add a listener for termination of the launch ILaunchManager lmgr = DebugPlugin.getDefault().getLaunchManager(); lmgr.addLaunchListener(new LaunchTerminationWatcher(launch, exePath)); - + Process process = launcher.execute(exePath, arguments, getEnvironment(config), workingDirPath, monitor); DebugPlugin.newProcess( launch, process, renderProcessLabel( exePath.toOSString() ) ); } - - //A class used to listen for the termination of the current launch, and - // run some functions when it is finished. + + //A class used to listen for the termination of the current launch, and + // run some functions when it is finished. class LaunchTerminationWatcher implements ILaunchesListener2 { private ILaunch launch; private IPath exePath; - + class LaunchTerminationWatcherRunnable implements Runnable { private String exePath; private String gmonPath; - + public LaunchTerminationWatcherRunnable(String exePath, String gmonPath) { this.exePath = exePath; this.gmonPath = gmonPath; } - + @Override public void run() { GmonView.displayGprofView(exePath, gmonPath, getProject()); } } - + public LaunchTerminationWatcher(ILaunch il, IPath exePath) { launch = il; this.exePath = exePath; @@ -112,7 +111,7 @@ public class GprofLaunchConfigurationDelegate extends ProfileLaunchConfiguration @Override public void run() { try { - String s = exePath.toOSString(); + String s = exePath.toOSString(); URI workingDirURI = getProject().getLocationURI(); RemoteProxyManager rpmgr = RemoteProxyManager.getInstance(); IRemoteFileProxy proxy = rpmgr.getFileProxy(getProject()); @@ -157,14 +156,14 @@ public class GprofLaunchConfigurationDelegate extends ProfileLaunchConfiguration public void launchesRemoved(ILaunch[] launches) { /* dont care */ } } - + @Override protected String getPluginID() { - return GprofLaunchPlugin.PLUGIN_ID; + return GprofLaunch.PLUGIN_ID; } - + /* all these functions exist to be overridden by the test class in order to allow launch testing */ - + protected IProject getProject(){ try{ IProject project = CDebugUtils.verifyCProject(config).getProject(); diff --git a/gprof/org.eclipse.linuxtools.gprof.launch/src/org/eclipse/linuxtools/internal/gprof/launch/GprofLaunchShortcut.java b/gprof/org.eclipse.linuxtools.gprof.launch/src/org/eclipse/linuxtools/internal/gprof/launch/GprofLaunchShortcut.java index ea1e4bf858..3515aeb50a 100644 --- a/gprof/org.eclipse.linuxtools.gprof.launch/src/org/eclipse/linuxtools/internal/gprof/launch/GprofLaunchShortcut.java +++ b/gprof/org.eclipse.linuxtools.gprof.launch/src/org/eclipse/linuxtools/internal/gprof/launch/GprofLaunchShortcut.java @@ -8,12 +8,11 @@ * Contributors: * Elliott Baron <ebaron@redhat.com> - initial API and implementation * Red Hat Inc. - modification to use code in this plug-in - *******************************************************************************/ + *******************************************************************************/ package org.eclipse.linuxtools.internal.gprof.launch; import org.eclipse.debug.core.ILaunchConfigurationType; import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy; -import org.eclipse.linuxtools.gprof.launch.GprofLaunchPlugin; import org.eclipse.linuxtools.profiling.launch.ProfileLaunchShortcut; public class GprofLaunchShortcut extends ProfileLaunchShortcut { @@ -30,7 +29,7 @@ public class GprofLaunchShortcut extends ProfileLaunchShortcut { */ @Override protected ILaunchConfigurationType getLaunchConfigType() { - return getLaunchManager().getLaunchConfigurationType(GprofLaunchPlugin.LAUNCH_ID); + return getLaunchManager().getLaunchConfigurationType(GprofLaunch.LAUNCH_ID); } } |