avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oberh...@apache.org
Subject svn commit: rev 37408 - in avalon/trunk/central/laboratory/studio/eclipse/launch: . src/org/apache/metro/studio/eclipse/launch/builder src/org/apache/metro/studio/eclipse/launch/config
Date Thu, 02 Sep 2004 19:37:36 GMT
Author: oberhack
Date: Thu Sep  2 12:37:36 2004
New Revision: 37408

Modified:
   avalon/trunk/central/laboratory/studio/eclipse/launch/plugin.xml
   avalon/trunk/central/laboratory/studio/eclipse/launch/src/org/apache/metro/studio/eclipse/launch/builder/MerlinTypeBuilder.java
   avalon/trunk/central/laboratory/studio/eclipse/launch/src/org/apache/metro/studio/eclipse/launch/config/MetroLaunchShortcut.java
Log:


Modified: avalon/trunk/central/laboratory/studio/eclipse/launch/plugin.xml
==============================================================================
--- avalon/trunk/central/laboratory/studio/eclipse/launch/plugin.xml	(original)
+++ avalon/trunk/central/laboratory/studio/eclipse/launch/plugin.xml	Thu Sep  2 12:37:36 2004
@@ -61,14 +61,6 @@
       </launchConfigurationType>
    </extension>
    <extension
-         point="org.eclipse.debug.ui.launchConfigurationTabGroups">
-      <launchConfigurationTabGroup
-            type="org.apache.avalon.MerlinDeveloperLaunch.merlinLaunchConfigurationDelegate"
-            class="org.apache.avalon.ide.eclipse.merlin.launch.ui.MerlinServerTabGroup"
-            id="org.apache.avalon.MerlinDeveloper.merlinServerTabGroup">
-      </launchConfigurationTabGroup>
-   </extension>
-   <extension
          point="org.eclipse.debug.ui.launchConfigurationTypeImages">
       <launchConfigurationTypeImage
             icon="icons/merlin_light.gif"

Modified: avalon/trunk/central/laboratory/studio/eclipse/launch/src/org/apache/metro/studio/eclipse/launch/builder/MerlinTypeBuilder.java
==============================================================================
--- avalon/trunk/central/laboratory/studio/eclipse/launch/src/org/apache/metro/studio/eclipse/launch/builder/MerlinTypeBuilder.java
(original)
+++ avalon/trunk/central/laboratory/studio/eclipse/launch/src/org/apache/metro/studio/eclipse/launch/builder/MerlinTypeBuilder.java
Thu Sep  2 12:37:36 2004
@@ -272,7 +272,7 @@
                 //
 
                 final String classname = javaClass.getFullyQualifiedName();
-                final File source = javaClass.getParentSource().getFile();
+                final File source = new File(javaClass.getParentSource().getURL().getFile());
                 final File dest = getOutputFileForService(classname);
 
                 if (!m_force)
@@ -311,7 +311,7 @@
 
                 final String classname = javaClass.getFullyQualifiedName();
                 final JavaSource src = javaClass.getParentSource();
-                final File source = src.getFile();
+                final File source = new File(src.getURL().getFile());
                 final File dest = getOutputFileForClass(classname);
 
                 if (!m_force)

Modified: avalon/trunk/central/laboratory/studio/eclipse/launch/src/org/apache/metro/studio/eclipse/launch/config/MetroLaunchShortcut.java
==============================================================================
--- avalon/trunk/central/laboratory/studio/eclipse/launch/src/org/apache/metro/studio/eclipse/launch/config/MetroLaunchShortcut.java
(original)
+++ avalon/trunk/central/laboratory/studio/eclipse/launch/src/org/apache/metro/studio/eclipse/launch/config/MetroLaunchShortcut.java
Thu Sep  2 12:37:36 2004
@@ -21,6 +21,7 @@
 import org.apache.metro.studio.eclipse.launch.MetroStudioLaunch;
 import org.eclipse.core.resources.IProject;
 import org.eclipse.core.resources.IProjectNature;
+import org.eclipse.core.resources.IResource;
 import org.eclipse.core.runtime.CoreException;
 import org.eclipse.debug.core.DebugPlugin;
 import org.eclipse.debug.core.ILaunchConfiguration;
@@ -29,7 +30,9 @@
 import org.eclipse.debug.core.ILaunchManager;
 import org.eclipse.debug.ui.DebugUITools;
 import org.eclipse.debug.ui.ILaunchShortcut;
+import org.eclipse.jdt.core.ICompilationUnit;
 import org.eclipse.jdt.core.IJavaProject;
+import org.eclipse.jdt.core.IPackageFragment;
 import org.eclipse.jface.viewers.ISelection;
 import org.eclipse.jface.viewers.IStructuredSelection;
 import org.eclipse.ui.IEditorInput;
@@ -63,11 +66,20 @@
         {
             Object sel = ((IStructuredSelection) selection).getFirstElement();
             IProject project = null;
-            if (sel instanceof IJavaProject)
+            if (sel instanceof IJavaProject) // project selected
             {
                 project = ((IJavaProject) sel).getProject();
+            } else if (sel instanceof IResource) // a file selected
+            {
+                project = ((IResource) sel).getProject();
+            } else if (sel instanceof IPackageFragment) // a package selected
+            {
+                project = ((IPackageFragment) sel).getJavaProject().getProject();
+            } else if (sel instanceof ICompilationUnit) // a java file selected
+            {
+                project = ((ICompilationUnit) sel).getJavaProject().getProject();
             }
-            // TODO: extract file selections too
+
             launch(project, mode);
         }
     }

---------------------------------------------------------------------
To unsubscribe, e-mail: cvs-unsubscribe@avalon.apache.org
For additional commands, e-mail: cvs-help@avalon.apache.org


Mime
View raw message