Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: /antelope/, /antelope/src/config/, /antelope/src/ise/antelope/common/, /antelope/src/ise/antelope/plugin/

antelope
Discussion topic

Back to topic list

CVS update: /antelope/, /antelope/src/config/, /antelope/src/ise/antelope/common/, /antelope/src/ise/antelope/plugin/

Author danson
Full name Dale Anson
Date 2004-04-15 21:49:17 PDT
Message User: danson
Date: 04/04/15 21:49:17

Modified:
 /antelope/
  build-app.xml, build-plugin-src.xml, build-source.xml, run.xml
 /antelope/src/config/
  AntelopePlugin.props, actions.xml
 /antelope/src/ise/an​telope/common/
  AntelopePanel.java, version.txt
 /antelope/src/ise/an​telope/plugin/
  AntelopePlugin.java

Log:
 general commit
 
 Issue number:
 Obtained from:
 Submitted by:
 Reviewed by:

File Changes:

Directory: /antelope/
=====================

File [changed]: build-app.xml
Url: http://antelope.tigr​is.org/source/browse​/antelope/build-app.​xml?r1=1.13&r2=1​.14
Delta lines: +3 -0
-------------------
--- build-app.xml 14 Apr 2004 13:10:21 -0000 1.13
+++ build-app.xml 16 Apr 2004 04:49:10 -0000 1.14
@@ -146,6 +146,9 @@
               <include name="install.txt"/>
               <include name="ChangeLog.txt"/>
            </zipfileset>
+ <zipfileset prefix="${ant.proje​ct.name}_${build.nu​m}/lib" dir="${lib.dir}">
+ <include name="**/*.jar"/>
+ </zipfileset>
            <zipfileset prefix="${ant.proje​ct.name}_${build.nu​m}" dir="${basedir}">
               <include name="run.xml"/>
            </zipfileset>

File [changed]: build-plugin-src.xml
Url: http://antelope.tigr​is.org/source/browse​/antelope/build-plug​in-src.xml?r1=1.2​&r2=1.3
Delta lines: +5 -0
-------------------
--- build-plugin-src.xml 2 Mar 2004 04:07:39 -0000 1.2
+++ build-plugin-src.xml 16 Apr 2004 04:49:11 -0000 1.3
@@ -18,6 +18,8 @@
     <!-- source code directory, this is where the .java files live -->
    <property name="src.dir" location="src" />
     
+ <property name="lib.dir" location="lib"/>
+
     <!-- build directory, all files contained in the src directory are copied
     to this directory for processing (tag substitution, mostly) -->
    <property name="prep.dir" location="prep"/>
@@ -40,6 +42,9 @@
          </zipfileset>
          <zipfileset dir="${basedir}" includes="build-plugin.xml" fullpath="${app.nam​e}/build.xml"/>
          <zipfileset prefix="${app.name}" dir="${basedir}" includes="build.props"/>
+ <zipfileset prefix="${app.name}/lib" dir="${lib.dir}">
+ <include name="**/*.jar"/>
+ </zipfileset>
          <zipfileset prefix="${app.name}/src" dir="${src.dir}">
             <include name="**/common/*"/>
             <include name="**/tasks/*"/>

File [changed]: build-source.xml
Url: http://antelope.tigr​is.org/source/browse​/antelope/build-sour​ce.xml?r1=1.2&r2​=1.3
Delta lines: +5 -0
-------------------
--- build-source.xml 2 Mar 2004 04:07:39 -0000 1.2
+++ build-source.xml 16 Apr 2004 04:49:11 -0000 1.3
@@ -15,6 +15,8 @@
     <!-- source code directory, this is where the .java files live -->
     <property name="src.dir" location="src" />
     
+ <property name="lib.dir" location="lib" />
+
     <!-- build directory, all files contained in the src directory are copied
     to this directory for processing (tag substitution, mostly) -->
     <property name="prep.dir" location="prep"/>
@@ -46,6 +48,9 @@
         <zip destfile="${dist.di​r}/${ant.project.na​me}_${build.num}.zi​p">
            <zipfileset prefix="${ant.proje​ct.name}_${build.nu​m}" dir="${basedir}">
               <include name="src/**/*"/>
+ </zipfileset>
+ <zipfileset prefix="${ant.proje​ct.name}_${build.nu​m}" dir="${lib.dir}">
+ <include name="**/*.jar"/>
            </zipfileset>
            <zipfileset prefix="${ant.proje​ct.name}_${build.nu​m}" dir="${prep.dir}">
               <include name="docs/manual/**/*"/>

File [changed]: run.xml
Url: http://antelope.tigr​is.org/source/browse​/antelope/run.xml?r1​=1.1&r2=1.2
Delta lines: +3 -0
-------------------
--- run.xml 16 Feb 2004 02:47:21 -0000 1.1
+++ run.xml 16 Apr 2004 04:49:11 -0000 1.2
@@ -44,6 +44,9 @@
          <fileset dir="${basedir}">
             <include name="*.jar"/>
          </fileset>
+ <fileset dir="${basedir}/lib">
+ <include name="**/*.jar"/>
+ </fileset>
          <pathelement path="${java.class.path}"/>
          <pathelement location="${tools.jar}"/>
       </path>

Directory: /antelope/src/config/
====================​============

File [changed]: AntelopePlugin.props
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/config​/AntelopePlugin.prop​s?r1=1.2&r2=1.3
Delta lines: +2 -1
-------------------
--- AntelopePlugin.props 14 Apr 2004 13:10:21 -0000 1.2
+++ AntelopePlugin.props 16 Apr 2004 04:49:12 -0000 1.3
@@ -52,7 +52,7 @@
 # menu separator to be inserted. This line also must start with the string
 # passed to the GUIUtilities.loadMenu method in createMenuItems. The items
 # are the action names as set in the actions.xml file.
-plugin.ise.antelope​.plugin.AntelopePlug​in.menu=antelope.sho​w - antelope.hide - antelope.toggle - antelope.default
+plugin.ise.antelope​.plugin.AntelopePlug​in.menu=antelope.sho​w - antelope.hide - antelope.toggle - antelope.default antelope.lastran
 
 # the next three items are the labels to add to a submenu on
 # the plugins menu for the AntelopePlugin. The plugins menu will have
@@ -63,6 +63,7 @@
 antelope.hide.label=Hide
 antelope.toggle.label=Toggle
 antelope.default.label=Run Default Target
+antelope.lastran.label=Rerun last target
 
 #-----------------------
 # option pane settings

File [changed]: actions.xml
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/config​/actions.xml?r1=1.2​&r2=1.3
Delta lines: +12 -0
--------------------
--- actions.xml 14 Apr 2004 13:10:21 -0000 1.2
+++ actions.xml 16 Apr 2004 04:49:14 -0000 1.3
@@ -40,6 +40,18 @@
          });
       </CODE>
    </ACTION>
+
+ <ACTION NAME="antelope.lastran">
+ <CODE>
+ ise.antelope.plugin.​AntelopePlugin plugin = jEdit.getPlugin("ise​.antelope.plugin.Ant​elopePlugin");
+ final View myview = view;
+ SwingUtilities.invokeLater(new Runnable(){
+ public void run() {
+ plugin.executeLastRa​nTargets(myview);
+ }
+ });
+ </CODE>
+ </ACTION>
   
 </ACTIONS>
 

Directory: /antelope/src/ise/an​telope/common/
====================​====================​=====

File [changed]: AntelopePanel.java
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/common/Antelo​pePanel.java?r1=1.11​&r2=1.12
Delta lines: +39 -30
---------------------
--- AntelopePanel.java 14 Apr 2004 13:10:22 -0000 1.11
+++ AntelopePanel.java 16 Apr 2004 04:49:14 -0000 1.12
@@ -1,4 +1,4 @@
-// $Id: AntelopePanel.java,v 1.11 2004/04/14 13:10:22 danson Exp $
+// $Id: AntelopePanel.java,v 1.12 2004/04/16 04:49:14 danson Exp $
 /*
 * Based on the Apache Software License, Version 1.1
 *
@@ -69,7 +69,7 @@
  * progress.
  *
  * @author Dale Anson, danson at germane-software dot com
- * @version $Revision: 1.11 $
+ * @version $Revision: 1.12 $
  * @created July 23, 2002
  */
 public class AntelopePanel extends JPanel implements Constants {
@@ -78,11 +78,9 @@
 
    private OptionSettings _settings = null;
 
- /** Description of the Field */
    private AntLogger _build_logger = null;
    private AntPerformanceListener _performance_listener = null;
 
- /** Description of the Field */
    private AntProject _project = null;
    private HashMap _property_files = null;
 
@@ -92,11 +90,9 @@
     */
    private Target _unnamed_target = null;
 
- /** Description of the Field */
    private TreeMap _targets = null; // key is a String, value is a Target
    private ArrayList _buttons = null;
    private ArrayList _execute_targets = null;
- /** Description of the Field */
    private DeckPanel _center_panel = null;
    private JPanel _button_panel = null;
    private JTabbedPane _tabs = null;
@@ -112,41 +108,35 @@
    private JCheckBox _multi = new JCheckBox( "Multiple targets" );
    private AbstractButton _default_btn = null;
 
- /** Description of the Field */
    private JScrollPane _scroller = null; // for the button panel
    private JPanel _btn_container = null;
 
- /** Description of the Field */
    private JTextField _project_name = null;
- /** Description of the Field */
    private File _last_directory = null; // for the file chooser
- /** Description of the Field */
    private File _build_file = null; // the current Ant build file
- /** Description of the Field */
+
+ // enable trace mode?
    private boolean _trace = false; // trace or execute mode
 
- /** Description of the Field */
+ // enable edit mode?
    private boolean _edit = false; // edit mode
 
- /** Description of the Field */
+ // target running threads
    private Thread _runner = null;
    private Thread _target_runner = null;
 
+ private ArrayList _last_ran_targets = null;
+
    // option settings
- /** Description of the Field */
    private AntelopeOptions _options = null; // to adjust the options
- /** Description of the Field */
    private JMenu _recent = null;
 
- /** Description of the Field */
+ // should the internal menu be used? Antelope (app) uses it's own menus.
    private boolean _use_internal_menu = true;
 
    // basic logger settings
- /** Description of the Field */
    private Logger _logger = null;
- /** Description of the Field */
    private Handler _console = null;
- /** Description of the Field */
    private Level _log_level = Level.ALL;
 
    /** Description of the Field */
@@ -686,6 +676,8 @@
     * @exception Exception Description of Exception
     */
    private void executeTargets( Thread runner, ArrayList targets ) throws Exception {
+ _last_ran_targets = targets;
+
       // maybe prep the error source
       clearErrorSource();
 
@@ -728,6 +720,20 @@
       }
    }
 
+ /**
+ * Reruns the last ran target(s).
+ */
+ public void executeLastRanTargets() {
+ if ( _last_ran_targets != null ) {
+ if ( _unnamed_target != null )
+ _last_ran_targets.remove( _unnamed_target.getName() );
+ Iterator it = _last_ran_targets.iterator();
+ while ( it.hasNext() ) {
+ executeTarget( ( String ) it.next() );
+ }
+ }
+ }
+
    /** Saves jEdit buffers before running target. */
    private void saveBeforeRun() {
       if ( _helper != null && _settings.getSaveBeforeRun() )
@@ -844,6 +850,8 @@
          Iterator it = _property_files.keyS​et().iterator();
          while ( it.hasNext() ) {
             Object o = it.next();
+ if (o == null)
+ continue;
             File f = null;
             if ( o instanceof File ) {
                f = ( File ) o;
@@ -853,26 +861,26 @@
             else if ( _project != null ) {
                String value = o.toString();
                String filename = value;
- if (value.startsWith("${") && value.endsWith("}")) {
- filename = filename.substring(2, filename.length() - 1);
+ if ( value.startsWith( "${" ) && value.endsWith( "}" ) ) {
+ filename = filename.substring( 2, filename.length() - 1 );
                }
                filename = _project.getProperty( filename );
- if (filename != null)
+ if ( filename != null )
                   f = new File( filename );
- if ( !f.exists() ) {
+ if ( f != null && !f.exists() ) {
                   f = new File( _project.getBaseDir(), filename );
                }
- if ( f.exists() ) {
- filelist.put( f, new Long(f.lastModified()) );
- resolved.add(value);
+ if ( f != null && f.exists() ) {
+ filelist.put( f, new Long( f.lastModified() ) );
+ resolved.add( value );
                }
                else
- _logger.warning("Unable to find property file " + filename);
+ _logger.warning( "Unable to find property file for " + value );
             }
          }
          it = resolved.iterator();
- while(it.hasNext()) {
- filelist.remove(it.next());
+ while ( it.hasNext() ) {
+ filelist.remove( it.next() );
          }
          _property_files = filelist;
       }
@@ -885,7 +893,7 @@
       while ( it.hasNext() ) {
          File f = ( File ) it.next();
          Long lastModified = ( Long ) _property_files.get( f );
- if ( lastModified != null && lastModified.longValue() != f.lastModified() ){
+ if ( lastModified != null && lastModified.longValue() != f.lastModified() ) {
             return true;
          }
       }
@@ -1018,6 +1026,7 @@
 
                // Ant 1.6 has an un-named target to hold project-level tasks, so
                // find it and save it for later.
+
 
                _unnamed_target = null;
                if ( getAntVersion() == 16 ) {

File [changed]: version.txt
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/common/versio​n.txt?r1=1.25&r2​=1.26
Delta lines: +2 -2
-------------------
--- version.txt 14 Apr 2004 13:10:22 -0000 1.25
+++ version.txt 16 Apr 2004 04:49:14 -0000 1.26
@@ -1,2 +1,2 @@
-VERSION=3.1.3
-DATE=April 13 2004
\ No newline at end of file
+VERSION=3.1.4
+DATE=April 15 2004
\ No newline at end of file

Directory: /antelope/src/ise/an​telope/plugin/
====================​====================​=====

File [changed]: AntelopePlugin.java
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/plugin/Antelo​pePlugin.java?r1=1.7​&r2=1.8
Delta lines: +17 -2
--------------------
--- AntelopePlugin.java 14 Apr 2004 13:10:22 -0000 1.7
+++ AntelopePlugin.java 16 Apr 2004 04:49:14 -0000 1.8
@@ -1,4 +1,4 @@
-// $Id: AntelopePlugin.java,v 1.7 2004/04/14 13:10:22 danson Exp $
+// $Id: AntelopePlugin.java,v 1.8 2004/04/16 04:49:14 danson Exp $
 /*
 * Based on the Apache Software License, Version 1.1
 *
@@ -72,7 +72,7 @@
 /**
  * This is the AntelopePlugin.
  *
- * @version $Revision: 1.7 $
+ * @version $Revision: 1.8 $
  */
 public class AntelopePlugin extends EBPlugin implements Constants {
    /**
@@ -351,6 +351,21 @@
 
    }
 
+ public static void executeLastRanTargets( View view ) {
+ try {
+ AntelopePluginPanel app = ( AntelopePluginPanel ) panelList.get( view );
+ if ( app != null ) {
+ AntelopePanel panel = app.getAntelopePanel();
+ panel.executeLastRanTargets();
+ return ;
+ }
+ }
+ catch ( Exception e ) {
+ Log.log( Log.DEBUG, AntelopePlugin.class, "EXCEPTION: " + e.getMessage() );
+ e.printStackTrace();
+ }
+
+ }
 
 
    /**




--------------------​--------------------​--------------------​---------
To unsubscribe, e-mail: cvs-unsubscribe@ante​lope.tigris.org
For additional commands, e-mail: cvs-help at antelope dot tigris dot org

« Previous message in topic | 1 of 1 | Next message in topic »

Messages

Show all messages in topic

CVS update: /antelope/, /antelope/src/config/, /antelope/src/ise/antelope/common/, /antelope/src/ise/antelope/plugin/ danson Dale Anson 2004-04-15 21:49:17 PDT
Messages per page: