Changeset 2740


Ignore:
Timestamp:
Apr 28, 2007, 5:00:06 AM (14 years ago)
Author:
orlov
Message:
  • Version 1.0.1 of the feature.
  • Remove class-files on cleaning request.
  • Select rf-module to run from the current editor.
Location:
devel-tools/trunk/eclipse
Files:
11 edited

Legend:

Unmodified
Added
Removed
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.comp/META-INF/MANIFEST.MF

    r2538 r2740  
    33Bundle-Name: Refal Plus Compiler (as an Eclipse plugin)
    44Bundle-SymbolicName: org.refal.plus.rfpdt.comp
    5 Bundle-Version: 1.0.0
     5Bundle-Version: 1.0.1
    66Bundle-Localization: plugin
    77Bundle-Vendor: Program Systems Institute, Pereslavl-Zalessky
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.editor/META-INF/MANIFEST.MF

    r2703 r2740  
    33Bundle-Name: Refal PLus Editor Plug-in
    44Bundle-SymbolicName: org.refal.plus.rfpdt.editor; singleton:=true
    5 Bundle-Version: 1.0.0
     5Bundle-Version: 1.0.1
    66Bundle-Activator: org.refal.plus.rfpdt.editor.RfpEditorPlugin
    77Bundle-Vendor: Program Systems Institute, Pereslavl-Zalessky
     
    1414Eclipse-LazyStart: true
    1515Bundle-RequiredExecutionEnvironment: J2SE-1.5
     16Export-Package: org.refal.plus.rfpdt.editor
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.extcomp/META-INF/MANIFEST.MF

    r2717 r2740  
    33Bundle-Name: Refal Plus External Compiler Plug-in
    44Bundle-SymbolicName: org.refal.plus.rfpdt.extcomp
    5 Bundle-Version: 1.0.0
     5Bundle-Version: 1.0.1
    66Bundle-Localization: plugin
    77Export-Package: org.refal.plus,
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.feature/feature.xml

    r2737 r2740  
    33      id="org.refal.plus.rfpdt"
    44      label="Refal Plus Development Tools"
    5       version="1.0.0"
     5      version="1.0.1"
    66      provider-name="Program Systems Institute, Pereslavl-Zalessky">
    77
    88   <description url="http://trac.botik.ru/refal">
    9       Refal Plus Development Tools
     9      This feature provides an environment for programming in Refal Plus language.
    1010   </description>
    1111
     
    1919
    2020   <url>
    21       <update label="Refal Plus development tools for Eclipse" url="http://refal.botik.ru/plus/eclipse/update"/>
     21      <update label="Refal Plus development tools for Eclipse" url="http://refal.botik.ru/plus/eclipse/update/"/>
    2222   </url>
    2323
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.launch/META-INF/MANIFEST.MF

    r2737 r2740  
    33Bundle-Name: Refal Plus Launch Plug-in
    44Bundle-SymbolicName: org.refal.plus.rfpdt.launch;singleton:=true
    5 Bundle-Version: 1.0.0
     5Bundle-Version: 1.0.1
    66Bundle-Activator: org.refal.plus.rfpdt.launch.LaunchingPlugin
    77Bundle-Localization: plugin
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.launch/src/org/refal/plus/rfpdt/launch/ui/RfpLaunchShortcut.java

    r2721 r2740  
    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
     
    3527import org.eclipse.ui.IEditorPart;
    3628import org.eclipse.ui.dialogs.ElementListSelectionDialog;
     29import org.refal.plus.rfpdt.editor.RfpEditor;
    3730import org.refal.plus.rfpdt.launch.IRfpLaunchConfigurationConstants;
    3831import org.refal.plus.rfpdt.launch.LaunchingPlugin;
     
    4538        public void launch(ISelection selection, String mode) {
    4639                IFile module = this.getResourceFromSelection(selection);
    47 //              if (module == null || !CorePlugin.isPyFile(module)) {
    48 //                      MessageDialog.openError(LaunchingPlugin.getShell(), "Cannot Launch Jython",
    49 //                                      "The selection is not a Jython file. Please select one .py file to launch.");
    50 //                      return;
    51 //              }
    52                 this.launch(module, mode);
     40                launch: {
     41                        if (module == null)
     42                                break launch;
     43                        String moduleName = module.getName();
     44                        if (!moduleName.endsWith(".rf") && !moduleName.endsWith(".rfi"))
     45                                break launch;
     46                        this.launch(module, mode);
     47                        return;
     48                }
     49                MessageDialog.openError(LaunchingPlugin.getShell(),
     50                                                "Cannot Launch Refal Plus application",
     51                                                "The selection is not a Refal Plus file. Please select one .rf file to launch.");
    5352        }
    5453
    5554        public void launch(IEditorPart editor, String mode) {
    5655                IFile module = this.getResourceFromEditor(editor);
    57                 if (module == null) {
    58                         MessageDialog.openError(LaunchingPlugin.getShell(), "Cannot Launch Jython",
    59                                         "The selection is not a Jython file. Please select one .py file to launch.");
     56                if (module != null) {
     57                        this.launch(module, mode);
    6058                        return;
    6159                }
    62                 this.launch(module, mode);
     60                MessageDialog.openError(LaunchingPlugin.getShell(),
     61                                                "Cannot Launch Refal Plus application",
     62                                                "The selection is not a Refal Plus file. Please select one .rf file to launch.");
    6363        }
    6464
     
    7575
    7676        protected IFile getResourceFromEditor(IEditorPart part) {
    77 //              if (part == null || !(part instanceof RfpEditor))
    78                         return null;
    79 //              RfpEditor editor = (RfpEditor) part;
    80 //              ((FileDocumentProvider) editor.getDocumentProvider()).getFile();
     77                if (part == null || !(part instanceof RfpEditor))
     78                        return null;
     79                RfpEditor editor = (RfpEditor) part;
     80                return (IFile) editor.getEditorInput().getAdapter(IFile.class);
    8181        }
    8282
     
    146146                        dialog.setMessage("Choose a launch configuration to deb&ug");
    147147                } else {
    148                         dialog.setMessage("hoose a launch configuration to r&un:");
     148                        dialog.setMessage("Choose a launch configuration to r&un:");
    149149                }
    150150                dialog.setMultipleSelection(false);
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.update/features

    • Property svn:ignore
      •  

        old new  
        11org.refal.plus.rfpdt_1.0.0.jar
         2
         3org.refal.plus.rfpdt_1.0.1.jar
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.update/plugins

    • Property svn:ignore
      •  

        old new  
        66
        77org.refal.plus.rfpdt.editor_1.0.0.jar
         8
         9org.refal.plus.rfpdt.launch_1.0.0.jar
         10
         11org.refal.plus.rfpdt.extcomp_1.0.1.jar
         12
         13org.refal.plus.rfpdt.launch_1.0.1.jar
         14
         15org.refal.plus.rfpdt.comp_1.0.1.jar
         16
         17org.refal.plus.rfpdt_1.0.1.jar
         18
         19org.refal.plus.rfpdt.editor_1.0.1.jar
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt.update/site.xml

    r2737 r2740  
    11<?xml version="1.0" encoding="UTF-8"?>
    22<site>
    3    <description url="http://refal.botik.ru/plus/eclipse/update">
     3   <description url="http://refal.botik.ru/plus/eclipse/update/">
    44      Refal Plus development tools for Eclipse
    55   </description>
     6   <feature url="features/org.refal.plus.rfpdt_1.0.1.jar" id="org.refal.plus.rfpdt" version="1.0.1"/>
    67   <feature url="features/org.refal.plus.rfpdt_1.0.0.jar" id="org.refal.plus.rfpdt" version="1.0.0"/>
    78</site>
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt/META-INF/MANIFEST.MF

    r2535 r2740  
    33Bundle-Name: Refal Plus Development Tools Core Plug-in
    44Bundle-SymbolicName: org.refal.plus.rfpdt;singleton:=true
    5 Bundle-Version: 1.0.0
     5Bundle-Version: 1.0.1
    66Bundle-Activator: org.refal.plus.rfpdt.core.RfpCorePlugin
    77Bundle-Vendor: Program Systems Institute, Pereslavl-Zalessky
  • devel-tools/trunk/eclipse/org.refal.plus.rfpdt/src/org/refal/plus/rfpdt/core/builder/RfpBuilder.java

    r2736 r2740  
    77import java.util.Arrays;
    88import java.util.HashMap;
     9import java.util.LinkedList;
     10import java.util.List;
    911import java.util.Map;
    1012import java.util.SortedMap;
     
    9193                                classFile.setDerived(true);
    9294                        } catch (CoreException e) {
    93                                 System.out.println(e.getMessage());
     95                                System.err.println(e.getMessage());
    9496                        }
    9597                }
     
    279281        }
    280282
     283        @Override
     284        protected void clean(IProgressMonitor monitor) throws CoreException {
     285                IProject project = getProject();
     286                project.deleteMarkers(MARKER_TYPE, false, IResource.DEPTH_INFINITE);
     287               
     288                final List<IFile> modules = new LinkedList<IFile>();
     289                project.accept(new IResourceVisitor() {
     290                        public boolean visit(IResource resource) throws CoreException {
     291                                if (isRfFile(resource)) {
     292                                        modules.add((IFile)resource);
     293                                }
     294                                return true;
     295                        }
     296                });
     297                for (IFile file : modules)
     298                        deleteClassFilesForRfFile(file);
     299        }
     300
    281301        void checkAndCompileModuleImplem(IResource resource) {
    282302                if (!isRfFile(resource))
    283303                        return;
    284304                final IFile file = (IFile) resource;
    285                 deleteClassFileForRfFile(file);
     305                deleteClassFilesForRfFile(file);
    286306                CompilerEnvironment environment = new IdeCompilerEnvironment(file);
    287307                final MsgHandler msgHandler = environment.getMsgHandler();
     
    397417        }
    398418
    399         private void deleteClassFileForRfFile(IFile file) {
     419        private void deleteClassFilesForRfFile(IFile file) {
    400420                IPath classFilePath = file.getProjectRelativePath().removeFileExtension();
    401421                IFile classFile = getProject().getFile(classFilePath.addFileExtension("class"));
Note: See TracChangeset for help on using the changeset viewer.