Changeset 2721


Ignore:
Timestamp:
Apr 20, 2007, 8:50:37 AM (14 years ago)
Author:
orlov
Message:
  • Usable version of launch configurator.
Location:
devel-tools/trunk/eclipse/org.refal.plus.rfpdt.launch
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.launch/plugin.xml

    r2695 r2721  
    33<plugin>
    44   <extension
    5          id="org.refal.plus.rfpdt.launch.refal_plus"
    6          name="Refal Plus"
    75         point="org.eclipse.debug.core.launchConfigurationTypes">
    86      <launchConfigurationType
    97            delegate="org.refal.plus.rfpdt.launch.RfpLaunchConfigurationDelegate"
    10             id="org.refal.plus.rfpdt.launch.launchConfigurationType"
    11             modes="run,debug"
    12             name="Refal Plus Application"/>
     8            id="org.refal.plus.rfpdt.launch.refal_plus"
     9            modes="run, debug"
     10            name="Refal Plus Application">
     11      </launchConfigurationType>
    1312   </extension>
    1413   <extension
     
    1716            class="org.refal.plus.rfpdt.launch.ui.RfpTabGroup"
    1817            id="org.refal.plus.rfpdt.launch.launchConfigurationTabGroup"
    19             type="org.refal.plus.rfpdt.launch.launchConfigurationType"/>
     18            type="org.refal.plus.rfpdt.launch.refal_plus"/>
     19   </extension>
     20   <extension
     21         point="org.eclipse.jdt.launching.classpathProviders">
     22      <classpathProvider
     23            class="org.refal.plus.rfpdt.launch.RfpClasspathProvider"
     24            id="org.refal.plus.rfpdt.launch.rfp_classpath"/>
     25   </extension>
     26   <extension
     27         point="org.eclipse.debug.ui.launchShortcuts">
     28      <shortcut
     29            class="org.refal.plus.rfpdt.launch.ui.RfpLaunchShortcut"
     30            id="org.refal.plus.rfpdt.launch.shortcut"
     31            label="Refal Plus"
     32            modes="run">
     33         <contextualLaunch>
     34            <enablement>
     35               <with variable="selection">
     36                  <count value="1"/>
     37                  <iterate>
     38                     <or>
     39                        <test
     40                              property="org.eclipse.debug.ui.matchesPattern"
     41                              value="*.rf*"/>
     42                     </or>
     43                  </iterate>
     44               </with>
     45            </enablement>
     46         </contextualLaunch>
     47         <perspective
     48            id="org.eclipse.jdt.ui.JavaPerspective">
     49         </perspective>
     50      </shortcut>
    2051   </extension>
    2152
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.launch/src/org/refal/plus/rfpdt/launch/IRfpLaunchConfigurationConstants.java

    r2719 r2721  
    1414        public static final String ATTR_MODULE_NAME = IJavaLaunchConfigurationConstants.ATTR_MAIN_TYPE_NAME;
    1515
     16        public static final String PLUGIN_ID = "org.refal.plus.rfpdt.launch";
     17
     18        public static final String LAUNCH_CONFIGURATION_TYPE = "org.refal.plus.rfpdt.launch.refal_plus";
     19
     20        public static final String CLASSPATH_PROVIDER = "org.refal.plus.rfpdt.launch.rfp_classpath";
     21
    1622}
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.launch/src/org/refal/plus/rfpdt/launch/LaunchingPlugin.java

    r2691 r2721  
    1 /*******************************************************************************
    2  * This program and the accompanying materials are made available under the
    3  * terms of the Common Public License v1.0 which accompanies this distribution,
    4  * and is available at http://www.opensource.org/licenses/cpl1.0.php
    5  *
    6  * Contributors:
    7  *     Red Robin - initial API and implementation
    8  *******************************************************************************/
    91package org.refal.plus.rfpdt.launch;
    102
     
    1911
    2012public class LaunchingPlugin extends AbstractUIPlugin {
    21 
    22         public static final String PLUGIN_ID = "org.refal.plus.rfpdt.launch";
    23 
    24         public static String LAUNCH_CONFIGURATION_TYPE = "org.refal.plus.rfpdt.launch.refal_plus";
    2513
    2614        // The shared instance.
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.launch/src/org/refal/plus/rfpdt/launch/RfpClasspathProvider.java

    r2719 r2721  
    1414import java.util.List;
    1515
     16import org.eclipse.core.resources.ResourcesPlugin;
    1617import org.eclipse.core.runtime.CoreException;
    1718import org.eclipse.core.runtime.FileLocator;
     
    2324import org.eclipse.jdt.core.IClasspathEntry;
    2425import org.eclipse.jdt.core.JavaCore;
    25 import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
    2626import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
    2727import org.eclipse.jdt.launching.IVMInstall;
     
    4343        }
    4444
    45         protected List defaultUserClassPath(ILaunchConfiguration configuration) throws CoreException {
    46                 List paths = new ArrayList();
    47                 //String projectName = configuration.getAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, (String) null);
    48 //              if (projectName != null) {
    49 //                      JythonProject project = JythonProject.forProject(CorePlugin.getWorkspace().getRoot().getProject(projectName));
    50 //                      paths.addAll(project.getClassPath().getComposedPath());
    51 //              }
    52                 //paths.add(new Path(projectName));
     45        protected List<IRuntimeClasspathEntry> defaultUserClassPath(ILaunchConfiguration configuration) throws CoreException {
     46                List<IPath> paths = new ArrayList<IPath>();
     47                String projectName = configuration.getAttribute(IRfpLaunchConfigurationConstants.ATTR_PROJECT_NAME, "");
     48                if (projectName.length() > 0) {
     49                        paths.add(ResourcesPlugin.getWorkspace().getRoot().getProject(projectName).getFullPath());
     50                }
    5351                Bundle b = Platform.getBundle("org.refal.plus.rfpdt.extcomp");
    5452                try {
     
    5654                } catch (IOException _) {
    5755                }
    58                 List classpathEntries = new ArrayList();
     56                List<IRuntimeClasspathEntry> classpathEntries = new ArrayList<IRuntimeClasspathEntry>();
    5957                for (Iterator iter = paths.iterator(); iter.hasNext();) {
    6058                        IClasspathEntry entry = JavaCore.newLibraryEntry((IPath) iter.next(), null, null);
     
    9896
    9997        public IRuntimeClasspathEntry[] computeUnresolvedClasspath(ILaunchConfiguration configuration) throws CoreException {
    100                 List entries = defaultUserClassPath(configuration);
     98                List<IRuntimeClasspathEntry> entries = defaultUserClassPath(configuration);
    10199                // Ignore the default flag of the configuration. We do not want to use
    102100                // the default class path.
     
    107105                // superclass has the correct implementation.
    108106                entries.add(computeJRELibraryEntry(configuration));
    109                 return (IRuntimeClasspathEntry[]) entries.toArray(new IRuntimeClasspathEntry[entries.size()]);
     107                return entries.toArray(new IRuntimeClasspathEntry[entries.size()]);
    110108        }
    111109
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.launch/src/org/refal/plus/rfpdt/launch/RfpLaunchConfigurationDelegate.java

    r2719 r2721  
    1 /*******************************************************************************
    2  * This program and the accompanying materials are made available under the
    3  * terms of the Common Public License v1.0 which accompanies this distribution,
    4  * and is available at http://www.opensource.org/licenses/cpl1.0.php
    5  *
    6  * Contributors:
    7  *     Red Robin - initial API and implementation
    8  *******************************************************************************/
    91package org.refal.plus.rfpdt.launch;
    102
     
    1810import org.eclipse.jdt.launching.JavaLaunchDelegate;
    1911
    20 /**
    21  * The launch configuration delegate for Jython. It is a specialization of a
    22  * Java launch configuration delegate, as running Jython is running a Java
    23  * application. A nasty detail of the implementation of this class is the
    24  * cancellation of two methods that require the project to be a Java project.
    25  * getVMInstall returns a default VMInstall object. setDefaultSourceLocator does
    26  * nothing as (until further notice) no sourcelocator is required for Jython
    27  * files.
    28  */
    2912public class RfpLaunchConfigurationDelegate extends JavaLaunchDelegate {
    3013
    31 //      public IVMInstall getVMInstall(ILaunchConfiguration configuration) throws CoreException {
    32 //              // To avoid error on non-existing Java project:
    33 //              return JavaRuntime.getDefaultVMInstall();
    34 //      }
    35 
     14        /**
     15         * Implementation from LaunchConfigurationDelegate (avoiding java-specific
     16         * checks from JavaLaunchDelegate).
     17         */
    3618        public boolean preLaunchCheck(ILaunchConfiguration configuration, String mode, IProgressMonitor monitor) throws CoreException {
    3719                if (!saveBeforeLaunch(configuration, mode, monitor)) {
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.launch/src/org/refal/plus/rfpdt/launch/ui/RfpLaunchShortcut.java

    r2719 r2721  
    1414
    1515import org.eclipse.core.resources.IFile;
     16import org.eclipse.core.resources.IProject;
    1617import org.eclipse.core.runtime.CoreException;
    1718import org.eclipse.debug.core.DebugPlugin;
     
    2526import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
    2627import org.eclipse.jdt.launching.IRuntimeClasspathEntry;
     28import org.eclipse.jdt.launching.JavaRuntime;
    2729import org.eclipse.jface.dialogs.ErrorDialog;
    2830import org.eclipse.jface.dialogs.MessageDialog;
     
    3537import org.refal.plus.rfpdt.launch.IRfpLaunchConfigurationConstants;
    3638import org.refal.plus.rfpdt.launch.LaunchingPlugin;
    37 import org.refal.plus.rfpdt.launch.RfpClasspathProvider;
    3839
    3940/**
    40 //import net.redrobin.eclipse.jydt.core.CorePlugin;
    41 //import net.redrobin.eclipse.jydt.core.JyDTPreferences;
    42 //import net.redrobin.eclipse.jydt.core.project.JythonProject;
    43 //import net.redrobin.eclipse.jydt.launching.IJythonLaunchConfigurationConstants;
    44 //import net.redrobin.eclipse.jydt.launching.JythonClasspathProvider;
    45 //import net.redrobin.eclipse.jydt.launching.LaunchingPlugin;
    46 //import net.redrobin.eclipse.jydt.ui.editor.Editor;
    47 
    48  * Performs single click launching for Jython applications.
     41 * Performs single click launching for Refal applications.
    4942 */
    5043public class RfpLaunchShortcut implements ILaunchShortcut {
     
    7366                if (selection.isEmpty())
    7467                        return null;
    75                 if (!(selection instanceof IStructuredSelection))
    76                         return null;
    77                 IStructuredSelection structuredSelection = (IStructuredSelection) selection;
    78                 Object selectedObject = structuredSelection.getFirstElement();
     68                if(!(selection instanceof IStructuredSelection))
     69                        return null;
     70                Object selectedObject = ((IStructuredSelection)selection).getFirstElement();
    7971                if (selectedObject instanceof IFile)
    8072                        return (IFile) selectedObject;
     
    9789        protected ILaunchConfiguration findLaunchConfiguration(IFile module, String mode) {
    9890                ILaunchConfigurationType configType = this.getLaunchConfigType();
    99                 List candidateConfigs = Collections.EMPTY_LIST;
     91                List<ILaunchConfiguration> candidateConfigs = Collections.emptyList();
    10092                try {
    10193                        ILaunchConfiguration[] configs = DebugPlugin.getDefault().getLaunchManager().getLaunchConfigurations(configType);
    102                         candidateConfigs = new ArrayList(configs.length);
     94                        candidateConfigs = new ArrayList<ILaunchConfiguration>(configs.length);
    10395                        for (int i = 0; i < configs.length; i++) {
    10496                                ILaunchConfiguration config = configs[i];
    105 //                              if (config.getAttribute(IRfpLaunchConfigurationConstants.ATTR_MODULE, "").equals(module.getName())
    106 //                                              && config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, "").equals(this.getWorkingDirectory(module))) {
    107 //                                      candidateConfigs.add(config);
    108 //                              }
     97                                if (config.getAttribute(IRfpLaunchConfigurationConstants.ATTR_MODULE_NAME, "").equals(
     98                                                                module.getFullPath().removeFileExtension().lastSegment())
     99                                                && config.getAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, "").equals(
     100                                                                                this.getWorkingDirectory(module)))
     101                                {
     102                                        candidateConfigs.add(config);
     103                                }
    109104                        }
    110105                } catch (CoreException e) {
     106                        System.err.println(e);
    111107                        //CorePlugin.log(e);
    112108                }
     
    171167        }
    172168
    173         public void setClasspathDefaults(ILaunchConfigurationWorkingCopy configuration/*, RfpCorePlugin project*/) {
    174                 try {
    175                         //if (project != null)
    176                                 configuration.setAttribute(IRfpLaunchConfigurationConstants.ATTR_PROJECT_NAME, ""/*RfpCorePlugin.getPluginId()*//*getProject().getName()*/);
    177                         IRuntimeClasspathEntry[] entries = new RfpClasspathProvider().computeUnresolvedClasspath(configuration);
     169        public void setClasspathDefaults(ILaunchConfigurationWorkingCopy configuration) {
     170                try {
     171                        IRuntimeClasspathEntry[] entries = JavaRuntime.computeUnresolvedRuntimeClasspath(configuration);
    178172                        // Set ATTR_DEFAULT_CLASSPATH to false here, because we want to use
    179173                        // a custom class path.
     
    189183
    190184        protected List asMementos(IRuntimeClasspathEntry[] entries) throws CoreException {
    191                 List mementos = new ArrayList(entries.length);
    192                 for (int i = 0; i < entries.length; i++) {
    193                         mementos.add(entries[i].getMemento());
     185                List<String> mementos = new ArrayList<String>(entries.length);
     186                for (IRuntimeClasspathEntry entry : entries) {
     187                        mementos.add(entry.getMemento());
    194188                }
    195189                return mementos;
     
    210204                        return null;
    211205                }
    212                 // TODO do not hardcode the string in 2 places (see JythonJavaMainTab)
    213                 wc.setAttribute(IRfpLaunchConfigurationConstants.ATTR_PROJECT_NAME, "");
    214                 wc.setAttribute(IRfpLaunchConfigurationConstants.ATTR_MODULE_NAME, "");
    215                 //wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, module.getProject().getName());
    216 //              wc.setAttribute(IRfpLaunchConfigurationConstants.ATTR_MODULE, module.getName());
    217                 wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_PROGRAM_ARGUMENTS, module.getName());
    218                 //JythonProject project = JythonProject.forProject(module.getProject());
    219                 setClasspathDefaults(wc/*, project*/);
    220 //              String jythonHome = JyDTPreferences.current().getJythonHomeString();
    221                 String vmArguments = "";
    222 //              if (jythonHome.length() > 0) {
    223 //                      vmArguments = "\"-Dpython.home=" + jythonHome + "\"";
    224 //              }
    225 //              if (project != null) {
    226 //                      if (vmArguments.length() > 0)
    227 //                              vmArguments += " ";
    228 //                      vmArguments += "\"-Dpython.path=" + project.getPythonPathProperty() + "\"";
    229 //              }
    230                 if (vmArguments.length() > 0)
    231                         wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS, vmArguments);
     206                IProject project = module.getProject();
     207                // TODO do not hardcode the attributes in 2 places (see RfpTabGroup)
     208                wc.setAttribute(IRfpLaunchConfigurationConstants.ATTR_PROJECT_NAME, project.getName());
     209                wc.setAttribute(IRfpLaunchConfigurationConstants.ATTR_MODULE_NAME,
     210                                module.getFullPath().removeFileExtension().lastSegment());
     211                wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH_PROVIDER,
     212                                IRfpLaunchConfigurationConstants.CLASSPATH_PROVIDER);
     213                setClasspathDefaults(wc);
    232214                wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY, this.getWorkingDirectory(module));
    233215                try {
     
    239221        }
    240222
    241         protected String getWorkingDirectory(IFile pyFile) {
    242                 return pyFile.getParent().getFullPath().makeRelative().toString();
     223        protected String getWorkingDirectory(IFile rfFile) {
     224                return rfFile.getParent().getFullPath().makeRelative().toString();
    243225        }
    244226
     
    256238         */
    257239        protected ILaunchConfigurationType getLaunchConfigType() {
    258                 return this.getLaunchManager().getLaunchConfigurationType(LaunchingPlugin.LAUNCH_CONFIGURATION_TYPE);
     240                return this.getLaunchManager().getLaunchConfigurationType(IRfpLaunchConfigurationConstants.LAUNCH_CONFIGURATION_TYPE);
    259241        }
    260242
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.launch/src/org/refal/plus/rfpdt/launch/ui/RfpRefalMainTab.java

    r2719 r2721  
    55import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
    66import org.eclipse.debug.ui.AbstractLaunchConfigurationTab;
    7 import org.eclipse.jdt.launching.IJavaLaunchConfigurationConstants;
    87import org.eclipse.jdt.ui.ISharedImages;
    98import org.eclipse.jdt.ui.JavaUI;
     
    9190                Font font= parent.getFont();
    9291                Group group= new Group(parent, SWT.NONE);
    93                 group.setText("Refal module (qualified name)");
     92                group.setText("Refal main module (qualified name)");
    9493                GridData gd = new GridData(GridData.FILL_HORIZONTAL);
    9594                group.setLayoutData(gd);
     
    123122                fModuleText.setText(moduleName);       
    124123        }
    125                
     124
    126125        public void performApply(ILaunchConfigurationWorkingCopy config) {
    127                 config.setAttribute(IRfpLaunchConfigurationConstants.ATTR_PROJECT_NAME, (String)fProjectText.getText());
    128                 config.setAttribute(IRfpLaunchConfigurationConstants.ATTR_MODULE_NAME, (String)fModuleText.getText());
     126                config.setAttribute(IRfpLaunchConfigurationConstants.ATTR_PROJECT_NAME, fProjectText.getText().trim());
     127                config.setAttribute(IRfpLaunchConfigurationConstants.ATTR_MODULE_NAME, fModuleText.getText().trim());
    129128        }
    130                        
     129
    131130        public void dispose() {
    132131        }
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.launch/src/org/refal/plus/rfpdt/launch/ui/RfpTabGroup.java

    r2719 r2721  
    1 /*******************************************************************************
    2  * This program and the accompanying materials are made available under the
    3  * terms of the Common Public License v1.0 which accompanies this distribution,
    4  * and is available at http://www.opensource.org/licenses/cpl1.0.php
    5  *
    6  * Contributors:
    7  *     Red Robin - initial API and implementation
    8  *******************************************************************************/
    91package org.refal.plus.rfpdt.launch.ui;
    102
    113
    124import org.eclipse.core.resources.IFile;
     5import org.eclipse.core.resources.IProject;
    136import org.eclipse.debug.core.ILaunchConfigurationWorkingCopy;
    147import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
     
    1710import org.eclipse.debug.ui.ILaunchConfigurationDialog;
    1811import org.eclipse.debug.ui.ILaunchConfigurationTab;
    19 import org.eclipse.debug.ui.sourcelookup.SourceLookupTab;
    2012import org.eclipse.jdt.debug.ui.launchConfigurations.JavaArgumentsTab;
    2113import org.eclipse.jdt.debug.ui.launchConfigurations.JavaClasspathTab;
     
    2517import org.eclipse.jface.viewers.IStructuredSelection;
    2618import org.eclipse.ui.IWorkbenchPage;
     19import org.refal.plus.rfpdt.launch.IRfpLaunchConfigurationConstants;
    2720import org.refal.plus.rfpdt.launch.LaunchingPlugin;
    2821
    29 /**
    30 import net.redrobin.eclipse.jydt.core.CorePlugin;
    31 import net.redrobin.eclipse.jydt.core.JyDTPreferences;
    32 import net.redrobin.eclipse.jydt.core.project.JythonProject;
    33 import net.redrobin.eclipse.jydt.launching.LaunchingPlugin;
    34  * The tab group for editing a Jython launch configuration. The tab group is
    35  * visible when a Jython launch configuration is selected in the Launch
    36  * Configuration Dialog. The group mixed Jython-specific tabs with standard Java
    37  * tabs and adapted Java tabs. This class does most of the defaults setting, as
    38  * multiple tabs require the information.
    39  */
    4022public class RfpTabGroup extends AbstractLaunchConfigurationTabGroup {
    4123
     
    4426                                new RfpRefalMainTab(),
    4527                                new JavaArgumentsTab(), new JavaJRETab(),
    46                                 new JavaClasspathTab(), new SourceLookupTab(),
     28                                new JavaClasspathTab(), /*new SourceLookupTab(),*/
    4729                                new EnvironmentTab(), new CommonTab() };
    4830                this.setTabs(tabs);
     
    5234                super.setDefaults(config);
    5335                RfpLaunchShortcut helper = new RfpLaunchShortcut();
    54 //              RfpCorePlugin project = null;
     36                IProject project = null;
    5537                IFile resource = this.getResource();
    56                 String pyFilename = "";
    57 //              if (resource == null || !CorePlugin.isPyFile(resource)) {
    58 //                      pyFilename = "";
    59 //                      project = null;
    60 //              } else {
    61 //                      pyFilename = resource.getName();
    62 //                      project = getProject(resource);
    63 //              }
    64                 helper.setClasspathDefaults(config/*, project*/);
    65                 //This is tricky: without setting ATTR_PROJECT_NAME to the empty
    66                 // string, the project is
    67                 //expected to be a Java project, which in our case is not necessarily
    68                 // so, and some
    69                 // methods validate on the existance of a Java project with that name.
    70                 config.setAttribute(
    71                                 IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, "");
    72                 //TODO next attribute will be set in the future when unit test modules
    73                 // are run
    74                 String moduleArguments = "";
    75                 //TODO remove code duplication. See JythonLaunchShortcut#createConfiguration
    76 //              String jythonHome = JyDTPreferences.current().getJythonHomeString();
    77                 String vmArguments = "";
    78 //              if (jythonHome.length() > 0) {
    79 //                      vmArguments = "\"-Dpython.home=" + jythonHome + "\"";
    80 //              }
    81 //              if (project != null) {
    82 //                      if (vmArguments.length() > 0)
    83 //                              vmArguments += " ";
    84 //                      vmArguments += "\"-Dpython.path=" + project.getPythonPathProperty() + "\"";
    85 //              }
    86                 if (vmArguments.length() > 0)
    87                         config.setAttribute(
    88                                         IJavaLaunchConfigurationConstants.ATTR_VM_ARGUMENTS,
    89                                         vmArguments);
    90                 if (resource != null)
     38                if (resource != null) {
     39                        project = resource.getProject();
     40                        config.setAttribute(IRfpLaunchConfigurationConstants.ATTR_PROJECT_NAME,
     41                                        project.getName());
     42                        config.setAttribute(IRfpLaunchConfigurationConstants.ATTR_MODULE_NAME,
     43                                        resource.getFullPath().removeFileExtension().lastSegment());
    9144                        config.setAttribute(
    9245                                        IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
    9346                                        helper.getWorkingDirectory(resource));
     47                }
     48                config.setAttribute(IJavaLaunchConfigurationConstants.ATTR_CLASSPATH_PROVIDER,
     49                                IRfpLaunchConfigurationConstants.CLASSPATH_PROVIDER);
     50                helper.setClasspathDefaults(config);
     51                // This is tricky: without setting ATTR_PROJECT_NAME to the empty
     52                // string, the project is expected to be a Java project, which in our
     53                // case is not necessarily so, and some methods validate on the
     54                // existance of a Java project with that name.
     55                config.setAttribute(
     56                                IJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME, "");
    9457        }
    9558
    96 //      protected JythonProject getProject(IResource resource) {
    97 //              return JythonProject.forProject(resource.getProject());
    98 //      }
    99 
    100         protected IFile getResource() {
     59        private IFile getResource() {
    10160                IWorkbenchPage page = LaunchingPlugin.getActivePage();
    10261                if (page == null)
Note: See TracChangeset for help on using the changeset viewer.