Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

revert back to old launch system, using shortcuts for launching stanz…

…as directly
  • Loading branch information...
commit 1f4106081ab590dfe56962eb4189dd2e9ae18041 1 parent de18274
@JPMoresmau authored
Showing with 531 additions and 252 deletions.
  1. +37 −2 net.sf.eclipsefp.haskell.debug.core/plugin.xml
  2. +1 −0  net.sf.eclipsefp.haskell.debug.ui/META-INF/MANIFEST.MF
  3. +205 −39 net.sf.eclipsefp.haskell.debug.ui/plugin.xml
  4. +1 −0  net.sf.eclipsefp.haskell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/HaskellDebugUI.java
  5. +17 −10 ...skell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/{young → }/AbstractRunAction.java
  6. +3 −2 ...psefp.haskell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/ExecutableLaunchOperation.java
  7. +3 −2 ...ipsefp.haskell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/ExecutableLaunchShortcut.java
  8. +31 −12 ...ll.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/ExecutableOrTestSuiteLaunchOperation.java
  9. +3 −2 ...kell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/ExecutableProfilingLaunchOperation.java
  10. +3 −2 ...skell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/ExecutableProfilingLaunchShortcut.java
  11. +34 −7 ...skell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/ExecutableTestSuiteLaunchShortcut.java
  12. +2 −1  ...ell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/IExecutableTestSuiteLaunchOperation.java
  13. +174 −0 net.sf.eclipsefp.haskell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/RunActionProvider.java
  14. +5 −4 ...ipsefp.haskell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/TestSuiteLaunchOperation.java
  15. +3 −2 ...lipsefp.haskell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/TestSuiteLaunchShortcut.java
  16. +1 −0  ....haskell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/young/ExecutableLaunchTabGroup.java
  17. +1 −1  ...ell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/young/GhciInteractiveLaunchDelegate.java
  18. +1 −1  ...ell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/young/GhciInteractiveLaunchShortcut.java
  19. +1 −0  ...skell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/young/GhciLaunchOperationDelegate.java
  20. +1 −0  ...psefp.haskell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/young/HaskellArgumentsTab.java
  21. +1 −1  ...sefp.haskell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/young/HaskellAutomationTab.java
  22. +1 −0  ...haskell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/young/InteractiveLaunchShortcut.java
  23. +1 −0  ...haskell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/young/InteractiveLaunchTabGroup.java
  24. +1 −0  ...eclipsefp.haskell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/young/LaunchOperation.java
  25. +0 −164 ...lipsefp.haskell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/young/RunActionProvider.java
View
39 net.sf.eclipsefp.haskell.debug.core/plugin.xml
@@ -3,6 +3,41 @@
<plugin>
<extension
+ point="org.eclipse.debug.core.launchConfigurationTypes">
+ <launchConfigurationType
+ delegate="net.sf.eclipsefp.haskell.debug.core.internal.launch.HaskellLaunchDelegate"
+ id="net.sf.eclipsefp.haskell.debug.core.internal.launch.HaskellLaunchDelegate"
+ modes="run, debug"
+ name="%haskellInteractiveLaunchType_name"
+ sourceLocatorId="net.sf.eclipsefp.haskell.debug.core.sourceLookupDirector"
+ sourcePathComputerId="net.sf.eclipsefp.haskell.debug.core.sourcePathComputer">
+ </launchConfigurationType>
+ <launchConfigurationType
+ delegate="net.sf.eclipsefp.haskell.debug.core.internal.launch.ExecutableHaskellLaunchDelegate"
+ id="net.sf.eclipsefp.haskell.debug.core.internal.launch.ExecutableHaskellLaunchDelegate"
+ modes="run"
+ name="%haskellApplicationLaunchType_name"
+ sourceLocatorId="net.sf.eclipsefp.haskell.debug.core.sourceLookupDirector"
+ sourcePathComputerId="net.sf.eclipsefp.haskell.debug.core.sourcePathComputer">
+ </launchConfigurationType>
+ <launchConfigurationType
+ delegate="net.sf.eclipsefp.haskell.debug.core.internal.launch.TestSuiteHaskellLaunchDelegate"
+ id="net.sf.eclipsefp.haskell.debug.core.internal.launch.TestSuiteHaskellLaunchDelegate"
+ modes="run"
+ name="%testSuiteLaunchType_name"
+ sourceLocatorId="net.sf.eclipsefp.haskell.debug.core.sourceLookupDirector"
+ sourcePathComputerId="net.sf.eclipsefp.haskell.debug.core.sourcePathComputer">
+ </launchConfigurationType>
+ <launchConfigurationType
+ delegate="net.sf.eclipsefp.haskell.debug.core.internal.launch.ExecutableProfilingHaskellLaunchDelegate"
+ id="net.sf.eclipsefp.haskell.debug.core.internal.launch.ExecutableProfilingHaskellLaunchDelegate"
+ modes="run"
+ name="%haskellProfilingLaunchType_name"
+ sourceLocatorId="net.sf.eclipsefp.haskell.debug.core.sourceLookupDirector"
+ sourcePathComputerId="net.sf.eclipsefp.haskell.debug.core.sourcePathComputer">
+ </launchConfigurationType>
+ </extension>
+ <extension
point="org.eclipse.debug.core.breakpoints">
<breakpoint
class="net.sf.eclipsefp.haskell.debug.core.internal.debug.HaskellBreakpoint"
@@ -35,7 +70,7 @@
id="net.sf.eclipsefp.haskell.debug.core.sourcePathComputer">
</sourcePathComputer>
</extension>
- <extension
+<!-- <extension
point="org.eclipse.debug.core.launchConfigurationTypes">
<launchConfigurationType
delegate="net.sf.eclipsefp.haskell.debug.core.internal.launch.young.BaseExecutableLaunchDelegate"
@@ -69,5 +104,5 @@
sourceLocatorId="net.sf.eclipsefp.haskell.debug.core.sourceLookupDirector"
sourcePathComputerId="net.sf.eclipsefp.haskell.debug.core.sourcePathComputer">
</launchConfigurationType>
- </extension>
+ </extension>-->
</plugin>
View
1  net.sf.eclipsefp.haskell.debug.ui/META-INF/MANIFEST.MF
@@ -26,3 +26,4 @@ Export-Package: net.sf.eclipsefp.haskell.debug.ui.internal;x-friends:="net.sf.ec
net.sf.eclipsefp.haskell.debug.ui.internal.launch;x-friends:="net.sf.eclipsefp.haskell.hugs",
net.sf.eclipsefp.haskell.debug.ui.internal.launch.ghci;x-friends:="net.sf.eclipsefp.haskell.debug.ui.test",
net.sf.eclipsefp.haskell.debug.ui.internal.launch.young
+Bundle-ActivationPolicy: lazy
View
244 net.sf.eclipsefp.haskell.debug.ui/plugin.xml
@@ -78,7 +78,7 @@
debugModel="net.sf.eclipsefp.haskell.debug"
delegateClass="net.sf.eclipsefp.haskell.debug.ui.internal.debug.HaskellWatchExpressionDelegate"/>
</extension>
- <extension
+ <!-- <extension
point="org.eclipse.debug.ui.launchConfigurationTypeImages">
<launchConfigurationTypeImage
configTypeID="net.sf.eclipsefp.haskell.debug.ui.internal.launch.young.GhciInteractiveLaunchDelegate"
@@ -123,46 +123,211 @@
id="net.sf.eclipsefp.haskell.debug.ui.internal.launch.young.TestSuiteLaunchTabGroup"
type="net.sf.eclipsefp.haskell.debug.core.internal.launch.young.TestSuiteLaunchDelegate">
</launchConfigurationTabGroup>
- </extension>
- <extension
- point="org.eclipse.debug.ui.launchShortcuts">
- <shortcut
- class="net.sf.eclipsefp.haskell.debug.ui.internal.launch.young.GhciInteractiveLaunchShortcut"
- icon="icons/etool16/ghci16.gif"
- id="net.sf.eclipsefp.haskell.debug.ui.internal.launch.young.GhciInteractiveLaunchShortcut"
- label="%ghciShortcut_label"
- modes="run, debug">
- <contextualLaunch>
- <enablement>
- <with
- variable="selection">
- <count
- value="1">
- </count>
- <iterate>
- <adapt
- type="org.eclipse.core.resources.IResource">
- <test
- property="net.sf.eclipsefp.haskell.core.isHaskellFile">
- </test>
- </adapt>
- </iterate>
- </with>
- </enablement>
- <contextLabel
- label="%ghciContextLabel_label"
- mode="run">
- </contextLabel>
- </contextualLaunch>
- </shortcut>
- </extension>
- <extension
+ </extension> -->
+ <extension
+ point="org.eclipse.debug.ui.launchConfigurationTypeImages">
+ <launchConfigurationTypeImage
+ icon="icons/etool16/ghci16.gif"
+ configTypeID="net.sf.eclipsefp.haskell.debug.core.internal.launch.HaskellLaunchDelegate"
+ id="net.sf.eclipsefp.haskell.ui.launch.launchIcon">
+ </launchConfigurationTypeImage>
+ <launchConfigurationTypeImage
+ icon="icons/etool16/hsexe16.gif"
+ configTypeID="net.sf.eclipsefp.haskell.debug.core.internal.launch.ExecutableHaskellLaunchDelegate"
+ id="net.sf.eclipsefp.haskell.ui.launch.launchExecutableIcon">
+ </launchConfigurationTypeImage>
+ <launchConfigurationTypeImage
+ configTypeID="net.sf.eclipsefp.haskell.debug.core.internal.launch.ExecutableProfilingHaskellLaunchDelegate"
+ icon="icons/etool16/hsexe16.gif"
+ id="net.sf.eclipsefp.haskell.ui.launch.launchExecutableProfilingIcon">
+ </launchConfigurationTypeImage>
+ <launchConfigurationTypeImage
+ configTypeID="net.sf.eclipsefp.haskell.debug.core.internal.launch.TestSuiteHaskellLaunchDelegate"
+ icon="icons/etool16/hsexe16.gif"
+ id="net.sf.eclipsefp.haskell.ui.launch.launchTestSuiteIcon">
+ </launchConfigurationTypeImage>
+ </extension>
+ <extension
+ point="org.eclipse.debug.ui.launchConfigurationTabGroups">
+ <launchConfigurationTabGroup
+ type="net.sf.eclipsefp.haskell.debug.core.internal.launch.HaskellLaunchDelegate"
+ class="net.sf.eclipsefp.haskell.debug.ui.internal.launch.HaskellLaunchTabGroup"
+ id="net.sf.eclipsefp.haskell.debug.ui.internal.launch.HaskellLaunchTabGroup">
+ </launchConfigurationTabGroup>
+ <launchConfigurationTabGroup
+ type="net.sf.eclipsefp.haskell.debug.core.internal.launch.ExecutableHaskellLaunchDelegate"
+ class="net.sf.eclipsefp.haskell.debug.ui.internal.launch.ExecutableTestSuiteHaskellLaunchTabGroup"
+ id="net.sf.eclipsefp.haskell.debug.ui.internal.launch.ExecutableHaskellLaunchTabGroup">
+ </launchConfigurationTabGroup>
+ <launchConfigurationTabGroup
+ class="net.sf.eclipsefp.haskell.debug.ui.internal.launch.ExecutableTestSuiteHaskellLaunchTabGroup"
+ id="net.sf.eclipsefp.haskell.debug.ui.internal.launch.ExecutableHaskellLaunchTabGroup"
+ type="net.sf.eclipsefp.haskell.debug.core.internal.launch.TestSuiteHaskellLaunchDelegate">
+ </launchConfigurationTabGroup>
+ <launchConfigurationTabGroup
+ class="net.sf.eclipsefp.haskell.debug.ui.internal.launch.ExecutableTestSuiteHaskellLaunchTabGroup"
+ id="net.sf.eclipsefp.haskell.debug.ui.internal.launch.ExecutableHaskellLaunchTabGroup"
+ type="net.sf.eclipsefp.haskell.debug.core.internal.launch.ExecutableProfilingHaskellLaunchDelegate">
+ </launchConfigurationTabGroup>
+ </extension>
+ <extension
+ point="org.eclipse.debug.ui.launchShortcuts">
+ <shortcut
+ label="%appLaunchShortcut_label"
+ icon="icons/etool16/hsexe16.gif"
+ class="net.sf.eclipsefp.haskell.debug.ui.internal.launch.ExecutableLaunchShortcut"
+ modes="run"
+ id="net.sf.eclipsefp.haskell.debug.ui.internal.launch.ExecutableLaunchShortcut">
+ <contextualLaunch>
+ <enablement>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <or>
+ <test
+ property="net.sf.eclipsefp.haskell.core.isProjectExecutable">
+ </test>
+ <instanceof value="net.sf.eclipsefp.haskell.ui.internal.views.projectexplorer.ProjectExplorerStanza"/>
+ </or>
+ </iterate>
+ </with>
+ </enablement>
+ <contextLabel
+ label="%appLaunchContextLabel_label"
+ mode="run">
+ </contextLabel>
+ </contextualLaunch>
+ </shortcut>
+ <shortcut
+ label="%ghciShortcut_label"
+ icon="icons/etool16/ghci16.gif"
+ class="net.sf.eclipsefp.haskell.debug.ui.internal.launch.ghci.GhciLaunchShortcut"
+ modes="run, debug"
+ id="net.sf.eclipsefp.haskell.debug.ui.internal.launch.ghci.GhciLaunchShortcut">
+ <contextualLaunch>
+ <enablement>
+ <with variable="selection">
+ <count value="1" />
+ <iterate>
+ <adapt type="org.eclipse.core.resources.IResource">
+ <test property="net.sf.eclipsefp.haskell.core.isHaskellFile"/>
+ </adapt>
+ </iterate>
+ </with>
+ </enablement>
+ <contextLabel
+ label="%ghciContextLabel_label"
+ mode="run">
+ </contextLabel>
+ </contextualLaunch>
+ </shortcut>
+ <shortcut
+ class="net.sf.eclipsefp.haskell.debug.ui.internal.launch.TestSuiteLaunchShortcut"
+ icon="icons/etool16/hsexe16.gif"
+ id="net.sf.eclipsefp.haskell.debug.ui.internal.launch.TestSuiteLaunchShortcut"
+ label="%testSuiteLaunchShortcut_label"
+ modes="run">
+ <contextualLaunch>
+ <enablement>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <test
+ property="net.sf.eclipsefp.haskell.core.isProjectTestSuite">
+ </test>
+ </iterate>
+ </with>
+ </enablement>
+ <contextLabel
+ label="%testSuiteLaunchContextLabel_label"
+ mode="run">
+ </contextLabel>
+ </contextualLaunch>
+ </shortcut>
+ <shortcut
+ class="net.sf.eclipsefp.haskell.debug.ui.internal.launch.ExecutableProfilingLaunchShortcut"
+ icon="icons/etool16/hsexe16.gif"
+ id="net.sf.eclipsefp.haskell.debug.ui.internal.launch.ExecutableProfilingLaunchShortcut"
+ label="%appLaunchProfilingShortcut_label"
+ modes="run">
+ <contextualLaunch>
+ <enablement>
+ <with
+ variable="selection">
+ <count
+ value="1">
+ </count>
+ <iterate>
+ <test
+ property="net.sf.eclipsefp.haskell.core.isProjectExecutable">
+ </test>
+ </iterate>
+ </with>
+ </enablement>
+ <contextLabel
+ label="%appLaunchProfilingContextLabel_label"
+ mode="run">
+ </contextLabel>
+ </contextualLaunch>
+ </shortcut>
+ </extension>
+ <extension point="org.eclipse.ui.commands">
+ <command
+ name="%runGHCiShortcut_name"
+ description="%runGHCiShortcut_desc"
+ categoryId="org.eclipse.debug.ui.category.run"
+ id="net.sf.eclipsefp.haskell.debug.ui.internal.launch.ghci.GhciLaunchShortcut.run">
+ </command>
+ <command
+ name="%runHaskellShortcut_name"
+ description="%runHaskellShortcut_desc"
+ categoryId="org.eclipse.debug.ui.category.run"
+ id="net.sf.eclipsefp.haskell.debug.ui.internal.launch.ExecutableLaunchShortcut.run">
+ </command>
+ <command
+ categoryId="org.eclipse.debug.ui.category.run"
+ description="%runTestSuiteShortcut_desc"
+ id="net.sf.eclipsefp.haskell.debug.ui.internal.launch.TestSuiteLaunchShortcut.run"
+ name="%runTestSuiteShortcut_name">
+ </command>
+ <command
+ categoryId="org.eclipse.debug.ui.category.run"
+ description="%runHaskellProfilingShortcut_desc"
+ id="net.sf.eclipsefp.haskell.debug.ui.internal.launch.ExecutableProfilingLaunchShortcut.run"
+ name="%runHaskellProfilingShortcut_name">
+ </command>
+ </extension>
+ <extension point="org.eclipse.ui.bindings">
+ <key sequence="M3+M2+X G"
+ commandId="net.sf.eclipsefp.haskell.debug.ui.internal.launch.ghci.GhciLaunchShortcut.run"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
+ <key sequence="M3+M2+X H"
+ commandId="net.sf.eclipsefp.haskell.debug.ui.internal.launch.ExecutableLaunchShortcut.run"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"/>
+ <key
+ commandId="net.sf.eclipsefp.haskell.debug.ui.internal.launch.TestSuiteLaunchShortcut.run"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M3+M2+X F">
+ </key>
+ <key
+ commandId="net.sf.eclipsefp.haskell.debug.ui.internal.launch.ExecutableProfilingLaunchShortcut.run"
+ schemeId="org.eclipse.ui.defaultAcceleratorConfiguration"
+ sequence="M3+M2+X R">
+ </key>
+ </extension>
+ <extension
point="org.eclipse.ui.navigator.viewer">
<viewerActionBinding
viewerId="org.eclipse.ui.navigator.ProjectExplorer">
<includes>
<actionExtension
- pattern="net.sf.eclipsefp.haskell.debug.ui.internal.launch.young.RunActionProvider">
+ pattern="net.sf.eclipsefp.haskell.debug.ui.internal.launch.RunActionProvider">
</actionExtension>
</includes>
</viewerActionBinding>
@@ -170,8 +335,8 @@
<extension
point="org.eclipse.ui.navigator.navigatorContent">
<actionProvider
- class="net.sf.eclipsefp.haskell.debug.ui.internal.launch.young.RunActionProvider"
- id="net.sf.eclipsefp.haskell.debug.ui.internal.launch.young.RunActionProvider">
+ class="net.sf.eclipsefp.haskell.debug.ui.internal.launch.RunActionProvider"
+ id="net.sf.eclipsefp.haskell.debug.ui.internal.launch.RunActionProvider">
<enablement>
<instanceof
value="net.sf.eclipsefp.haskell.ui.internal.views.projectexplorer.ProjectExplorerStanza">
@@ -179,6 +344,7 @@
</enablement>
</actionProvider>
</extension>
+ <!--
<extension
point="org.eclipse.debug.core.launchConfigurationTypes">
<launchConfigurationType
@@ -189,6 +355,6 @@
sourceLocatorId="net.sf.eclipsefp.haskell.debug.core.sourceLookupDirector"
sourcePathComputerId="net.sf.eclipsefp.haskell.debug.core.sourcePathComputer">
</launchConfigurationType>
- </extension>
+ </extension>-->
</plugin>
View
1  net.sf.eclipsefp.haskell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/HaskellDebugUI.java
@@ -19,6 +19,7 @@ public static HaskellDebugUI getDefault() {
}
+
// interface methods of Activator
/////////////////////////////////
View
27 ...g/ui/internal/launch/young/AbstractRunAction.java → ...l/debug/ui/internal/launch/AbstractRunAction.java
@@ -1,20 +1,20 @@
/**
*
*/
-package net.sf.eclipsefp.haskell.debug.ui.internal.launch.young;
+package net.sf.eclipsefp.haskell.debug.ui.internal.launch;
-import java.util.List;
import net.sf.eclipsefp.haskell.core.cabalmodel.CabalSyntax;
+import net.sf.eclipsefp.haskell.debug.ui.internal.HaskellDebugUI;
import net.sf.eclipsefp.haskell.ui.internal.views.projectexplorer.ProjectExplorerStanza;
import org.eclipse.core.resources.IProject;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfiguration;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.ui.ILaunchShortcut2;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
+import org.eclipse.jface.viewers.StructuredSelection;
+import org.eclipse.ui.plugin.AbstractUIPlugin;
/**
@@ -29,18 +29,24 @@
protected AbstractRunAction( final String title,
final ISelectionProvider selProvider ) {
- super( title );
+ super( title ,AbstractUIPlugin.imageDescriptorFromPlugin( HaskellDebugUI.getDefault().getBundle().getSymbolicName(), "icons/etool16/hsexe16.gif" ) ); //$NON-NLS-1$
this.selectionProvider = selProvider;
}
protected abstract CabalSyntax getTargetSection();
- protected abstract String getLaunchConfigName();
+ protected String getLaunchMode() {
+ return ILaunchManager.RUN_MODE;
+ }
+
+ /* protected abstract String getLaunchConfigName();
protected abstract ILaunchConfigurationWorkingCopy createLaunchConfig()
throws CoreException;
protected abstract String getLaunchMode();
+*/
+ protected abstract ILaunchShortcut2 getShortcut();
@Override
public boolean isEnabled() {
@@ -63,7 +69,7 @@ public boolean isEnabled() {
@Override
public void run() {
try {
- ILaunchConfigurationType type = LaunchOperation
+ /*ILaunchConfigurationType type = LaunchOperation
.getConfigType( getLaunchConfigName() );
List<ILaunchConfiguration> launches = LaunchOperation
.getConfigurationsForProject( type, project.getName() );
@@ -76,7 +82,8 @@ public void run() {
wc.doSave();
launch = wc;
}
- launch.launch( getLaunchMode(), null );
+ launch.launch( getLaunchMode(), null );*/
+ getShortcut().launch( new StructuredSelection(stanza), getLaunchMode() );
} catch( Exception e ) {
// Do nothing
}
View
5 ...fp.haskell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/ExecutableLaunchOperation.java
@@ -4,6 +4,7 @@
package net.sf.eclipsefp.haskell.debug.ui.internal.launch;
import java.util.List;
+import net.sf.eclipsefp.haskell.core.cabalmodel.PackageDescriptionStanza;
import net.sf.eclipsefp.haskell.debug.core.internal.launch.ExecutableHaskellLaunchDelegate;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
@@ -54,9 +55,9 @@ protected String getConfigTypeName() {
}
- public static List<ILaunchConfiguration> findConfiguration( final IProject project )
+ public static List<ILaunchConfiguration> findConfiguration( final IProject project,final PackageDescriptionStanza stanza )
throws CoreException {
- return ExecutableOrTestSuiteLaunchOperation.findConfiguration( project, EXECUTABLE_CONFIG_TYPE );
+ return ExecutableOrTestSuiteLaunchOperation.findConfiguration( project, EXECUTABLE_CONFIG_TYPE,stanza );
}
View
5 ...efp.haskell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/ExecutableLaunchShortcut.java
@@ -4,6 +4,7 @@
package net.sf.eclipsefp.haskell.debug.ui.internal.launch;
import java.util.List;
+import net.sf.eclipsefp.haskell.core.cabalmodel.PackageDescriptionStanza;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.ILaunchConfiguration;
@@ -16,8 +17,8 @@
public class ExecutableLaunchShortcut extends ExecutableTestSuiteLaunchShortcut {
@Override
- public List<ILaunchConfiguration> findConfiguration( final IProject project ) throws CoreException {
- return ExecutableLaunchOperation.findConfiguration(project);
+ public List<ILaunchConfiguration> findConfiguration( final IProject project,final PackageDescriptionStanza stanza ) throws CoreException {
+ return ExecutableLaunchOperation.findConfiguration(project,stanza);
}
@Override
View
43 ...debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/ExecutableOrTestSuiteLaunchOperation.java
@@ -8,6 +8,7 @@
import java.util.List;
import java.util.Set;
import net.sf.eclipsefp.haskell.compat.ILaunchManagerCompat;
+import net.sf.eclipsefp.haskell.core.cabalmodel.PackageDescriptionStanza;
import net.sf.eclipsefp.haskell.core.project.HaskellNature;
import net.sf.eclipsefp.haskell.core.util.ResourceUtil;
import net.sf.eclipsefp.haskell.debug.core.internal.launch.ILaunchAttributes;
@@ -30,13 +31,13 @@
*/
public abstract class ExecutableOrTestSuiteLaunchOperation extends LaunchOperation {
- public void launch( final IResource resource, final IProgressMonitor monitor )
+ public void launch( final IResource resource, final IProgressMonitor monitor,final PackageDescriptionStanza stanza )
throws CoreException {
if( resource != null ) {
IProject project = resource.getProject();
if( project.hasNature( HaskellNature.NATURE_ID ) ) {
List<IFile> executables=ResourceUtil.getProjectExecutables( project );
- ILaunchConfiguration configuration = getConfiguration( project,executables );
+ ILaunchConfiguration configuration = getConfiguration( project,executables,stanza );
if( configuration != null ) {
configuration.launch( ILaunchManager.RUN_MODE, monitor );
}
@@ -45,8 +46,8 @@ public void launch( final IResource resource, final IProgressMonitor monitor )
}
protected ILaunchConfiguration getConfiguration( final IProject project,
- final List<IFile> executables ) throws CoreException {
- List<ILaunchConfiguration> configurations = findConfiguration( project,getConfigTypeName() );
+ final List<IFile> executables ,final PackageDescriptionStanza stanza) throws CoreException {
+ List<ILaunchConfiguration> configurations = findConfiguration( project,getConfigTypeName(),stanza );
// match existing configurations with executables
Set<String> exesExisting=new HashSet<String> ();
for (Iterator<ILaunchConfiguration> it=configurations.iterator();it.hasNext();){
@@ -59,10 +60,17 @@ protected ILaunchConfiguration getConfiguration( final IProject project,
}
}
ILaunchConfiguration result = null;
+ IFile exe=null;
+ if (stanza!=null){
+ exe=ResourceUtil.getExecutableLocation( project, stanza.getName() );
+ }
+
for( IFile f: executables ) {
- String exe=getExePath( f );
- if (!exesExisting.contains(exe)){
- configurations.add( createConfiguration( f,exe ) );
+ String exe1=getExePath( f );
+ if(exe==null || exe.getLocation().toOSString().equals( exe1 )){
+ if (!exesExisting.contains(exe1)){
+ configurations.add( createConfiguration( f,exe1 ) );
+ }
}
}
@@ -106,20 +114,31 @@ private String getExePath( final IFile executable ) {
}
public static List<ILaunchConfiguration> findConfiguration(
- final IProject project,final String configTypeName ) throws CoreException {
+ final IProject project,final String configTypeName,final PackageDescriptionStanza stanza ) throws CoreException {
List<ILaunchConfiguration> result = new LinkedList<ILaunchConfiguration>();
ILaunchConfiguration[] configurations = LaunchOperation
.getConfigurations( LaunchOperation
.getConfigType( configTypeName ) );
+
+ IFile exe=null;
+ if (stanza!=null){
+ exe=ResourceUtil.getExecutableLocation( project, stanza.getName() );
+ }
result = new ArrayList<ILaunchConfiguration>( configurations.length );
for( int i = 0; i < configurations.length; i++ ) {
ILaunchConfiguration configuration = configurations[ i ];
// String exePath = getExePath( file );
String projectName = project.getName();
- if( getExePath( configuration ).startsWith(
- project.getLocation().toOSString() )
- && getProjectName( configuration ).equals( projectName ) ) {
- result.add( configuration );
+ if (exe!=null){
+ if (getExePath( configuration ).equals( exe.getLocation().toOSString() )){
+ result.add( configuration );
+ }
+ } else {
+ if( getExePath( configuration ).startsWith(
+ project.getLocation().toOSString() )
+ && getProjectName( configuration ).equals( projectName ) ) {
+ result.add( configuration );
+ }
}
}
return result;
View
5 ...l.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/ExecutableProfilingLaunchOperation.java
@@ -6,6 +6,7 @@
import java.util.List;
import net.sf.eclipsefp.haskell.compat.ILaunchManagerCompat;
+import net.sf.eclipsefp.haskell.core.cabalmodel.PackageDescriptionStanza;
import net.sf.eclipsefp.haskell.debug.core.internal.launch.ExecutableProfilingHaskellLaunchDelegate;
import net.sf.eclipsefp.haskell.debug.ui.internal.util.UITexts;
import org.eclipse.core.resources.IFile;
@@ -31,9 +32,9 @@ protected String getConfigTypeName() {
return EXECUTABLE_PROF_CONFIG_TYPE;
}
- public static List<ILaunchConfiguration> findConfiguration( final IProject project )
+ public static List<ILaunchConfiguration> findConfiguration( final IProject project,final PackageDescriptionStanza stanza )
throws CoreException {
- return ExecutableOrTestSuiteLaunchOperation.findConfiguration( project, EXECUTABLE_PROF_CONFIG_TYPE );
+ return ExecutableOrTestSuiteLaunchOperation.findConfiguration( project, EXECUTABLE_PROF_CONFIG_TYPE,stanza );
}
@Override
View
5 ...ll.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/ExecutableProfilingLaunchShortcut.java
@@ -5,6 +5,7 @@
package net.sf.eclipsefp.haskell.debug.ui.internal.launch;
import java.util.List;
+import net.sf.eclipsefp.haskell.core.cabalmodel.PackageDescriptionStanza;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.ILaunchConfiguration;
@@ -17,8 +18,8 @@
public class ExecutableProfilingLaunchShortcut extends ExecutableTestSuiteLaunchShortcut {
@Override
- public List<ILaunchConfiguration> findConfiguration( final IProject project ) throws CoreException {
- return ExecutableProfilingLaunchOperation.findConfiguration(project);
+ public List<ILaunchConfiguration> findConfiguration( final IProject project,final PackageDescriptionStanza stanza ) throws CoreException {
+ return ExecutableProfilingLaunchOperation.findConfiguration(project,stanza);
}
@Override
View
41 ...ll.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/ExecutableTestSuiteLaunchShortcut.java
@@ -5,8 +5,10 @@
package net.sf.eclipsefp.haskell.debug.ui.internal.launch;
import java.util.List;
+import net.sf.eclipsefp.haskell.core.cabalmodel.PackageDescriptionStanza;
import net.sf.eclipsefp.haskell.core.util.ResourceUtil;
import net.sf.eclipsefp.haskell.ui.HaskellUIPlugin;
+import net.sf.eclipsefp.haskell.ui.internal.views.projectexplorer.ProjectExplorerStanza;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
@@ -23,7 +25,7 @@
*/
public abstract class ExecutableTestSuiteLaunchShortcut implements ILaunchShortcut2 {
- public abstract List<ILaunchConfiguration> findConfiguration(IProject project) throws CoreException;
+ public abstract List<ILaunchConfiguration> findConfiguration(IProject project,final PackageDescriptionStanza stanza) throws CoreException;
public abstract IExecutableTestSuiteLaunchOperation getLaunchOperation();
@@ -34,23 +36,28 @@ public void launch( final ISelection selection, final String mode ) {
// launched from workbench selection
if( selection instanceof IStructuredSelection ) {
Object element = ( ( IStructuredSelection )selection ).getFirstElement();
- launch( ResourceUtil.findResource( element ) );
+ if (element instanceof ProjectExplorerStanza){
+ ProjectExplorerStanza st=(ProjectExplorerStanza)element;
+ launch(st.getOwner(),st.getStanza());
+ } else {
+ launch( ResourceUtil.findResource( element ),null );
+ }
}
}
public void launch( final IEditorPart editor, final String mode ) {
// launched from editor part
- launch( ResourceUtil.findResource( editor.getEditorInput() ) );
+ launch( ResourceUtil.findResource( editor.getEditorInput() ),null );
}
// helping methods
//////////////////
- private void launch( final IResource resource ) {
+ private void launch( final IResource resource, final PackageDescriptionStanza stanza ) {
// TODO put this in a Job and use the progress monitor
try {
- getLaunchOperation().launch( resource, null );
+ getLaunchOperation().launch( resource, null,stanza );
} catch( CoreException cex ) {
// TODO show msg box
String msg = "Could not launch Haskell application."; //$NON-NLS-1$
@@ -68,7 +75,7 @@ public IResource getLaunchableResource( final ISelection paramISelection ) {
final IEditorPart paramIEditorPart ) {
IResource resource = ResourceUtil.findResource( paramIEditorPart.getEditorInput() );
try {
- List<ILaunchConfiguration> cs=findConfiguration( resource.getProject() );
+ List<ILaunchConfiguration> cs=findConfiguration( resource.getProject(),null );
return cs.toArray( new ILaunchConfiguration[cs.size()] );
} catch (CoreException cex){
HaskellUIPlugin.log( cex );
@@ -82,9 +89,10 @@ public IResource getLaunchableResource( final ISelection paramISelection ) {
public ILaunchConfiguration[] getLaunchConfigurations(
final ISelection paramISelection ) {
try {
+ PackageDescriptionStanza stanza=findStanza( paramISelection );
IResource[] res=ResourceUtil.getResourcesFromSelection( paramISelection ) ;
if (res.length>0){
- List<ILaunchConfiguration> cs=findConfiguration(res[0].getProject());
+ List<ILaunchConfiguration> cs=findConfiguration(res[0].getProject(),stanza);
return cs.toArray( new ILaunchConfiguration[cs.size()] );
}
} catch (CoreException cex){
@@ -93,4 +101,23 @@ public IResource getLaunchableResource( final ISelection paramISelection ) {
return null;
}
+ private static PackageDescriptionStanza findStanza(final ISelection paramISelection){
+ if (paramISelection instanceof IStructuredSelection){
+ IStructuredSelection sel=(IStructuredSelection)paramISelection;
+ if (sel.size()==1){
+ return findStanza( sel.getFirstElement() );
+ }
+ }
+ return null;
+ }
+
+ private static PackageDescriptionStanza findStanza(final Object o){
+ if (o instanceof ProjectExplorerStanza){
+ return ((ProjectExplorerStanza)o).getStanza();
+ }
+ if (o instanceof PackageDescriptionStanza){
+ return (PackageDescriptionStanza)o;
+ }
+ return null;
+ }
}
View
3  ....debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/IExecutableTestSuiteLaunchOperation.java
@@ -1,5 +1,6 @@
package net.sf.eclipsefp.haskell.debug.ui.internal.launch;
+import net.sf.eclipsefp.haskell.core.cabalmodel.PackageDescriptionStanza;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
@@ -10,6 +11,6 @@
*
*/
public interface IExecutableTestSuiteLaunchOperation {
- void launch( final IResource resource, final IProgressMonitor monitor )
+ void launch( final IResource resource, final IProgressMonitor monitor ,final PackageDescriptionStanza stanza )
throws CoreException;
}
View
174 ....eclipsefp.haskell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/RunActionProvider.java
@@ -0,0 +1,174 @@
+package net.sf.eclipsefp.haskell.debug.ui.internal.launch;
+
+import net.sf.eclipsefp.haskell.core.cabalmodel.CabalSyntax;
+import net.sf.eclipsefp.haskell.debug.ui.internal.util.UITexts;
+import org.eclipse.debug.core.ILaunchManager;
+import org.eclipse.debug.ui.ILaunchShortcut2;
+import org.eclipse.jface.action.IMenuManager;
+import org.eclipse.jface.viewers.ISelectionProvider;
+import org.eclipse.ui.navigator.CommonActionProvider;
+import org.eclipse.ui.navigator.ICommonActionExtensionSite;
+import org.eclipse.ui.navigator.ICommonMenuConstants;
+import org.eclipse.ui.navigator.ICommonViewerSite;
+import org.eclipse.ui.navigator.ICommonViewerWorkbenchSite;
+
+
+public class RunActionProvider extends CommonActionProvider {
+
+ private RunExecutableAction execAction;
+ private RunProfilingAction profAction;
+ private RunTestSuiteAction testAction;
+
+ @Override
+ public void init( final ICommonActionExtensionSite aSite ) {
+ super.init( aSite );
+ ICommonViewerSite viewSite = aSite.getViewSite();
+ if( viewSite instanceof ICommonViewerWorkbenchSite ) {
+ ICommonViewerWorkbenchSite wSite = ( ICommonViewerWorkbenchSite )viewSite;
+ execAction = new RunExecutableAction( wSite.getSelectionProvider() );
+ profAction = new RunProfilingAction( wSite.getSelectionProvider() );
+ testAction = new RunTestSuiteAction( wSite.getSelectionProvider() );
+ }
+ }
+
+ @Override
+ public void fillContextMenu( final IMenuManager menu ) {
+ if( execAction != null && execAction.isEnabled() ) {
+ menu.appendToGroup( ICommonMenuConstants.GROUP_OPEN, execAction );
+ }
+ if( profAction != null && profAction.isEnabled() ) {
+ menu.appendToGroup( ICommonMenuConstants.GROUP_OPEN, profAction );
+ }
+ if( testAction != null && testAction.isEnabled() ) {
+ menu.appendToGroup( ICommonMenuConstants.GROUP_OPEN, testAction );
+ }
+ }
+
+ private static class RunExecutableAction extends AbstractRunAction {
+
+ private RunExecutableAction( final ISelectionProvider selProvider ) {
+ super( UITexts.runExecutable, selProvider );
+ }
+
+ @Override
+ protected CabalSyntax getTargetSection() {
+ return CabalSyntax.SECTION_EXECUTABLE;
+ }
+
+ @Override
+ protected ILaunchShortcut2 getShortcut() {
+ return new ExecutableLaunchShortcut();
+ }
+
+// @Override
+// protected String getLaunchConfigName() {
+// return BaseExecutableLaunchDelegate.class.getName();
+// }
+//
+// @Override
+// protected ILaunchConfigurationWorkingCopy createLaunchConfig() throws CoreException {
+// ILaunchConfigurationType type = LaunchOperation
+// .getConfigType( getLaunchConfigName() );
+// String id = LaunchOperation.createConfigId( project.getName()
+// + "/" + stanza.getStanza().getName() ); //$NON-NLS-1$
+// ILaunchConfigurationWorkingCopy wc = type.newInstance( null, id );
+// wc.setAttribute( ILaunchAttributes.PROJECT_NAME, project.getName() );
+// wc.setAttribute( ILaunchAttributes.STANZA, stanza.getStanza().getName() );
+// wc.setAttribute( ILaunchAttributes.WORKING_DIRECTORY, project
+// .getLocation().toOSString() );
+// wc.setAttribute( ILaunchAttributes.SYNC_STREAMS, true );
+// return wc;
+// }
+
+ @Override
+ protected String getLaunchMode() {
+ return ILaunchManager.RUN_MODE;
+ }
+ }
+
+ private static class RunProfilingAction extends AbstractRunAction {
+
+ private RunProfilingAction( final ISelectionProvider selProvider ) {
+ super( UITexts.runProfiling, selProvider );
+ }
+
+ @Override
+ protected CabalSyntax getTargetSection() {
+ return CabalSyntax.SECTION_EXECUTABLE;
+ }
+
+ @Override
+ protected ILaunchShortcut2 getShortcut() {
+ return new ExecutableProfilingLaunchShortcut();
+ }
+
+//
+// @Override
+// protected String getLaunchConfigName() {
+// return ProfilingLaunchDelegate.class.getName();
+// }
+//
+// @Override
+// protected ILaunchConfigurationWorkingCopy createLaunchConfig() throws CoreException {
+// ILaunchConfigurationType type = LaunchOperation
+// .getConfigType( getLaunchConfigName() );
+// String id = LaunchOperation.createConfigId( project.getName()
+// + "/" + stanza.getStanza().getName() ); //$NON-NLS-1$
+// ILaunchConfigurationWorkingCopy wc = type.newInstance( null, id );
+// wc.setAttribute( ILaunchAttributes.PROJECT_NAME, project.getName() );
+// wc.setAttribute( ILaunchAttributes.STANZA, stanza.getStanza().getName() );
+// wc.setAttribute( ILaunchAttributes.WORKING_DIRECTORY, project
+// .getLocation().toOSString() );
+// wc.setAttribute( ILaunchAttributes.SYNC_STREAMS, true );
+// return wc;
+// }
+
+ @Override
+ protected String getLaunchMode() {
+ return ILaunchManager.RUN_MODE;
+ }
+ }
+
+ private static class RunTestSuiteAction extends AbstractRunAction {
+
+ private RunTestSuiteAction( final ISelectionProvider selProvider ) {
+ super( UITexts.runTestSuite, selProvider );
+ }
+
+ @Override
+ protected CabalSyntax getTargetSection() {
+ return CabalSyntax.SECTION_TESTSUITE;
+ }
+
+ @Override
+ protected ILaunchShortcut2 getShortcut() {
+ return new TestSuiteLaunchShortcut();
+ }
+
+// @Override
+// protected String getLaunchConfigName() {
+// return TestSuiteLaunchDelegate.class.getName();
+// }
+//
+// @Override
+// protected ILaunchConfigurationWorkingCopy createLaunchConfig() throws CoreException {
+// ILaunchConfigurationType type = LaunchOperation
+// .getConfigType( getLaunchConfigName() );
+// String id = LaunchOperation.createConfigId( project.getName()
+// + "/" + stanza.getStanza().getName() ); //$NON-NLS-1$
+// ILaunchConfigurationWorkingCopy wc = type.newInstance( null, id );
+// wc.setAttribute( ILaunchAttributes.PROJECT_NAME, project.getName() );
+// wc.setAttribute( ILaunchAttributes.STANZA, stanza.getStanza().getName() );
+// wc.setAttribute( ILaunchAttributes.WORKING_DIRECTORY, project
+// .getLocation().toOSString() );
+// wc.setAttribute( ILaunchAttributes.SYNC_STREAMS, true );
+// return wc;
+// }
+
+ @Override
+ protected String getLaunchMode() {
+ return ILaunchManager.RUN_MODE;
+ }
+ }
+
+}
View
9 ...efp.haskell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/TestSuiteLaunchOperation.java
@@ -5,6 +5,7 @@
package net.sf.eclipsefp.haskell.debug.ui.internal.launch;
import java.util.List;
+import net.sf.eclipsefp.haskell.core.cabalmodel.PackageDescriptionStanza;
import net.sf.eclipsefp.haskell.core.project.HaskellNature;
import net.sf.eclipsefp.haskell.core.util.ResourceUtil;
import net.sf.eclipsefp.haskell.debug.core.internal.launch.TestSuiteHaskellLaunchDelegate;
@@ -28,13 +29,13 @@
public static final String TEST_SUITE_CONFIG_TYPE = TestSuiteHaskellLaunchDelegate.class.getName();
@Override
- public void launch( final IResource resource, final IProgressMonitor monitor )
+ public void launch( final IResource resource, final IProgressMonitor monitor,final PackageDescriptionStanza stanza )
throws CoreException {
if( resource != null ) {
IProject project = resource.getProject();
if( project.hasNature( HaskellNature.NATURE_ID ) ) {
List<IFile> executables=ResourceUtil.getProjectTestSuites( project );
- ILaunchConfiguration configuration = getConfiguration( project,executables );
+ ILaunchConfiguration configuration = getConfiguration( project,executables,stanza );
if( configuration != null ) {
configuration.launch( ILaunchManager.RUN_MODE, monitor );
}
@@ -71,9 +72,9 @@ protected String getConfigTypeName() {
return TEST_SUITE_CONFIG_TYPE;
}
- public static List<ILaunchConfiguration> findConfiguration( final IProject project )
+ public static List<ILaunchConfiguration> findConfiguration( final IProject project,final PackageDescriptionStanza stanza )
throws CoreException {
- return ExecutableOrTestSuiteLaunchOperation.findConfiguration( project, TEST_SUITE_CONFIG_TYPE );
+ return ExecutableOrTestSuiteLaunchOperation.findConfiguration( project, TEST_SUITE_CONFIG_TYPE,stanza );
}
View
5 ...sefp.haskell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/TestSuiteLaunchShortcut.java
@@ -5,6 +5,7 @@
package net.sf.eclipsefp.haskell.debug.ui.internal.launch;
import java.util.List;
+import net.sf.eclipsefp.haskell.core.cabalmodel.PackageDescriptionStanza;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.debug.core.ILaunchConfiguration;
@@ -17,8 +18,8 @@
public class TestSuiteLaunchShortcut extends ExecutableTestSuiteLaunchShortcut {
@Override
- public List<ILaunchConfiguration> findConfiguration( final IProject project ) throws CoreException {
- return TestSuiteLaunchOperation.findConfiguration(project);
+ public List<ILaunchConfiguration> findConfiguration( final IProject project,final PackageDescriptionStanza stanza ) throws CoreException {
+ return TestSuiteLaunchOperation.findConfiguration(project,stanza);
}
@Override
View
1  ...skell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/young/ExecutableLaunchTabGroup.java
@@ -12,6 +12,7 @@
* applications.</p>
*
* @author Leif Frenzel
+ * @deprecated
*/
public class ExecutableLaunchTabGroup extends AbstractLaunchConfigurationTabGroup {
View
2  ....debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/young/GhciInteractiveLaunchDelegate.java
@@ -8,7 +8,7 @@
/**
* @author Alejandro Serrano
- *
+ *@deprecated
*/
public class GhciInteractiveLaunchDelegate extends InteractiveLaunchDelegate {
// Nothing to add
View
2  ....debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/young/GhciInteractiveLaunchShortcut.java
@@ -8,7 +8,7 @@
/**
* @author Alejandro Serrano
- *
+ *@deprecated
*/
public class GhciInteractiveLaunchShortcut extends InteractiveLaunchShortcut {
View
1  ...ll.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/young/GhciLaunchOperationDelegate.java
@@ -24,6 +24,7 @@
/** <p>implements a delegate for launching GHCi.</p>
*
* @author Leif Frenzel
+ * @deprecated
*/
public class GhciLaunchOperationDelegate
implements IInteractiveLaunchOperationDelegate {
View
1  ...fp.haskell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/young/HaskellArgumentsTab.java
@@ -40,6 +40,7 @@
*
* @author Leif Frenzel
* @author Alejandro Serrano
+ * @deprecated
*/
public class HaskellArgumentsTab extends AbstractLaunchConfigurationTab {
View
2  ...p.haskell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/young/HaskellAutomationTab.java
@@ -28,7 +28,7 @@
/**
*
* @author JP Moresmau
- *
+ *@deprecated
*/
public class HaskellAutomationTab extends AbstractLaunchConfigurationTab {
View
1  ...kell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/young/InteractiveLaunchShortcut.java
@@ -31,6 +31,7 @@
*
* @author Leif Frenzel
* @author Alejandro Serrano
+ * @deprecated
*/
public abstract class InteractiveLaunchShortcut implements ILaunchShortcut {
View
1  ...kell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/young/InteractiveLaunchTabGroup.java
@@ -12,6 +12,7 @@
* applications.</p>
*
* @author Leif Frenzel
+ * @deprecated
*/
public class InteractiveLaunchTabGroup extends AbstractLaunchConfigurationTabGroup {
View
1  ...ipsefp.haskell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/young/LaunchOperation.java
@@ -23,6 +23,7 @@
*
* @author Leif Frenzel
* @author Alejandro Serrano
+ * @deprecated
*/
public abstract class LaunchOperation {
View
164 ...sefp.haskell.debug.ui/src/net/sf/eclipsefp/haskell/debug/ui/internal/launch/young/RunActionProvider.java
@@ -1,164 +0,0 @@
-package net.sf.eclipsefp.haskell.debug.ui.internal.launch.young;
-
-import net.sf.eclipsefp.haskell.core.cabalmodel.CabalSyntax;
-import net.sf.eclipsefp.haskell.debug.core.internal.launch.young.BaseExecutableLaunchDelegate;
-import net.sf.eclipsefp.haskell.debug.core.internal.launch.young.ILaunchAttributes;
-import net.sf.eclipsefp.haskell.debug.core.internal.launch.young.ProfilingLaunchDelegate;
-import net.sf.eclipsefp.haskell.debug.core.internal.launch.young.TestSuiteLaunchDelegate;
-import net.sf.eclipsefp.haskell.debug.ui.internal.util.UITexts;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.debug.core.ILaunchConfigurationType;
-import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
-import org.eclipse.debug.core.ILaunchManager;
-import org.eclipse.jface.action.IMenuManager;
-import org.eclipse.jface.viewers.ISelectionProvider;
-import org.eclipse.ui.navigator.CommonActionProvider;
-import org.eclipse.ui.navigator.ICommonActionExtensionSite;
-import org.eclipse.ui.navigator.ICommonMenuConstants;
-import org.eclipse.ui.navigator.ICommonViewerSite;
-import org.eclipse.ui.navigator.ICommonViewerWorkbenchSite;
-
-
-public class RunActionProvider extends CommonActionProvider {
-
- private RunExecutableAction execAction;
- private RunProfilingAction profAction;
- private RunTestSuiteAction testAction;
-
- @Override
- public void init( final ICommonActionExtensionSite aSite ) {
- super.init( aSite );
- ICommonViewerSite viewSite = aSite.getViewSite();
- if( viewSite instanceof ICommonViewerWorkbenchSite ) {
- ICommonViewerWorkbenchSite wSite = ( ICommonViewerWorkbenchSite )viewSite;
- execAction = new RunExecutableAction( wSite.getSelectionProvider() );
- profAction = new RunProfilingAction( wSite.getSelectionProvider() );
- testAction = new RunTestSuiteAction( wSite.getSelectionProvider() );
- }
- }
-
- @Override
- public void fillContextMenu( final IMenuManager menu ) {
- if( execAction != null && execAction.isEnabled() ) {
- menu.appendToGroup( ICommonMenuConstants.GROUP_OPEN, execAction );
- }
- if( profAction != null && profAction.isEnabled() ) {
- menu.appendToGroup( ICommonMenuConstants.GROUP_OPEN, profAction );
- }
- if( testAction != null && testAction.isEnabled() ) {
- menu.appendToGroup( ICommonMenuConstants.GROUP_OPEN, testAction );
- }
- }
-
- private static class RunExecutableAction extends AbstractRunAction {
-
- private RunExecutableAction( final ISelectionProvider selProvider ) {
- super( UITexts.runExecutable, selProvider );
- }
-
- @Override
- protected CabalSyntax getTargetSection() {
- return CabalSyntax.SECTION_EXECUTABLE;
- }
-
- @Override
- protected String getLaunchConfigName() {
- return BaseExecutableLaunchDelegate.class.getName();
- }
-
- @Override
- protected ILaunchConfigurationWorkingCopy createLaunchConfig() throws CoreException {
- ILaunchConfigurationType type = LaunchOperation
- .getConfigType( getLaunchConfigName() );
- String id = LaunchOperation.createConfigId( project.getName()
- + "/" + stanza.getStanza().getName() ); //$NON-NLS-1$
- ILaunchConfigurationWorkingCopy wc = type.newInstance( null, id );
- wc.setAttribute( ILaunchAttributes.PROJECT_NAME, project.getName() );
- wc.setAttribute( ILaunchAttributes.STANZA, stanza.getStanza().getName() );
- wc.setAttribute( ILaunchAttributes.WORKING_DIRECTORY, project
- .getLocation().toOSString() );
- wc.setAttribute( ILaunchAttributes.SYNC_STREAMS, true );
- return wc;
- }
-
- @Override
- protected String getLaunchMode() {
- return ILaunchManager.RUN_MODE;
- }
- }
-
- private static class RunProfilingAction extends AbstractRunAction {
-
- private RunProfilingAction( final ISelectionProvider selProvider ) {
- super( UITexts.runProfiling, selProvider );
- }
-
- @Override
- protected CabalSyntax getTargetSection() {
- return CabalSyntax.SECTION_EXECUTABLE;
- }
-
- @Override
- protected String getLaunchConfigName() {
- return ProfilingLaunchDelegate.class.getName();
- }
-
- @Override
- protected ILaunchConfigurationWorkingCopy createLaunchConfig() throws CoreException {
- ILaunchConfigurationType type = LaunchOperation
- .getConfigType( getLaunchConfigName() );
- String id = LaunchOperation.createConfigId( project.getName()
- + "/" + stanza.getStanza().getName() ); //$NON-NLS-1$
- ILaunchConfigurationWorkingCopy wc = type.newInstance( null, id );
- wc.setAttribute( ILaunchAttributes.PROJECT_NAME, project.getName() );
- wc.setAttribute( ILaunchAttributes.STANZA, stanza.getStanza().getName() );
- wc.setAttribute( ILaunchAttributes.WORKING_DIRECTORY, project
- .getLocation().toOSString() );
- wc.setAttribute( ILaunchAttributes.SYNC_STREAMS, true );
- return wc;
- }
-
- @Override
- protected String getLaunchMode() {
- return ILaunchManager.RUN_MODE;
- }
- }
-
- private static class RunTestSuiteAction extends AbstractRunAction {
-
- private RunTestSuiteAction( final ISelectionProvider selProvider ) {
- super( UITexts.runTestSuite, selProvider );
- }
-
- @Override
- protected CabalSyntax getTargetSection() {
- return CabalSyntax.SECTION_TESTSUITE;
- }
-
- @Override
- protected String getLaunchConfigName() {
- return TestSuiteLaunchDelegate.class.getName();
- }
-
- @Override
- protected ILaunchConfigurationWorkingCopy createLaunchConfig() throws CoreException {
- ILaunchConfigurationType type = LaunchOperation
- .getConfigType( getLaunchConfigName() );
- String id = LaunchOperation.createConfigId( project.getName()
- + "/" + stanza.getStanza().getName() ); //$NON-NLS-1$
- ILaunchConfigurationWorkingCopy wc = type.newInstance( null, id );
- wc.setAttribute( ILaunchAttributes.PROJECT_NAME, project.getName() );
- wc.setAttribute( ILaunchAttributes.STANZA, stanza.getStanza().getName() );
- wc.setAttribute( ILaunchAttributes.WORKING_DIRECTORY, project
- .getLocation().toOSString() );
- wc.setAttribute( ILaunchAttributes.SYNC_STREAMS, true );
- return wc;
- }
-
- @Override
- protected String getLaunchMode() {
- return ILaunchManager.RUN_MODE;
- }
- }
-
-}
Please sign in to comment.
Something went wrong with that request. Please try again.