Login | Register
My pages Projects Community openCollabNet

Discussions > issues > [Issue 37] New - fixes build-plugin.xml + gets rid of enum as identifier

antelope
Discussion topic

Back to topic list

[Issue 37] New - fixes build-plugin.xml + gets rid of enum as identifier

Author aezust
Full name DUPLICATE USER
Date 2005-09-11 00:21:00 PDT
Message http://antelope.tigr​is.org/issues/show_b​ug.cgi?id=37
                 Issue #|37
                 Summary|fixes build-plugin.xml + gets rid of enum as identifie
                        |r
               Component|antelope
                 Version|current
                Platform|All
              OS/Version|All
                     URL|
                  Status|NEW
       Status whiteboard|
                Keywords|
              Resolution|
              Issue type|PATCH
                Priority|P3
            Subcomponent|www
             Assigned to|issues@antelope
             Reported by|aezust






------- Additional comments from aezust at tigris dot org Sun Sep 11 00:21:00 -0700 2005 -------
i just wanted to build a more recent plugin so I made some changes to the
build files to make it easier in the future [the <style> is deprecated
and I am currently using xsltproc so i added an extra target].

Also changed enum to itr wherever I saw it.

? .classpath
? .project
? .settings
? antelope.diff
? antelope.patch
? bin
? classes
? dist
? prep
Index: build-plugin.xml
====================​====================​====================​=======
RCS file: /cvs/antelope/build-​plugin.xml,v
retrieving revision 1.12
diff -u -3 -p -r1.12 build-plugin.xml
--- build-plugin.xml 12 Jun 2005 04:19:38 -0000 1.12
+++ build-plugin.xml 11 Sep 2005 07:15:54 -0000
@@ -3,8 +3,10 @@
    <description>
        This build file creates Antelope as a jEdit plugin.
     </description>
-
+
+
     <!-- read build.props to override properties set below -->
+ <property file="../build.properties" />
    <property file="build.props"/>
 
     <!-- default location of jedit.jar, override in build.props if necessary -->
@@ -115,7 +117,8 @@
    ====================​====================​====================​============= -->
    <target name="dist"
          description="Compiles, jars, puts the jar in the jEdit jars directory."
- depends="init,clean,​compile,prep_files,c​opy_resources">
+ depends="docs-xslt,c​ompile,prep_files,co​py_resources" >
+
         
         <!-- make the jar file. jEdit standards require just the name of the
         plugin, e.g. Antelope.jar. put it in $prep.dir -->
@@ -169,7 +172,7 @@
 
    <target name="dist_new"
          description="Compiles, jars, puts the jar in the jEdit jars directory."
- depends="clean,compi​le,prep_files,copy_r​esources">
+ depends="clean,compi​le,docs-xslt,prep_fi​les,copy_resources"​>
         
         <!-- make the jar file. jEdit standards require just the name of the
         plugin, e.g. Antelope.jar. put it in $prep.dir -->
@@ -250,12 +253,8 @@
       files in ${src.dir}/docs and puts the finished files in ${prep.dir}/docs.
       The files are NOT ready for distribution until after prep_files is ran.
    ====================​====================​====================​============= -->
- <target name="docs-xalan"
- description="Generate user documentation in hmtl format with xalan"
- depends="init,setCla​sspath,prep_files"​>
-
- <fail unless="docbook.xsl" message="Please set docbook.xsl property."/>
 
+ <target name="preparedoc" depends="init,setClasspath">
       <delete>
          <fileset dir="${doc.dir}" includes="manual/**/*" />
       </delete>
@@ -264,8 +263,9 @@
          <fileset dir="${src.dir}/docs/manual" includes="**/*.gif" />
          <fileset dir="${src.dir}/docs/manual" includes="**/*.css" />
       </copy>
-
- <property name="docbook-wrapper" location="${doc.dir​}/docbook-wrapper.xs​l"/>
+
+ <property name="docbook-wrapper" location="${doc.dir​}/docbook-wrapper.xs​l"
+ />
       <delete file="${docbook-wrapper}" />
       <echo file="${docbook-wrapper}"
             message="&lt;xsl​:stylesheet"/>
@@ -277,6 +277,27 @@
             message="&lt;xsl:import href='${docbook.xsl​}/html/chunk.xsl'/​&gt;"/>
       <echo file="${docbook-wrapper}" append="true"
             message="&lt;/xs​l:stylesheet&gt;​"/>
+
+ </target>
+
+ <target name="docs-xslt" depends="preparedoc"
+ description="generate user documentation in HTML format with xsltproc">
+ <fail unless="docbook.xsl" message="Please set docbook.xsl property."/>
+ <exec dir="${doc.dir}/manual" executable="xsltproc">
+ <arg line="--stringparam html.stylesheet ./style.css"/>
+ <arg line="${docbook-wrapper}"/>
+ <arg value="${src.dir}/d​ocs/manual/userguide​.xml"/>
+ </exec>
+
+ </target>
+
+ <target name="docs-xalan"
+ description="Generate user documentation in hmtl format with xalan"
+ depends="preparedoc">
+
+ <fail unless="docbook.xsl" message="Please set docbook.xsl property."/>
+
+
 
       <style basedir="${src.dir}​/docs/manual"
             style="${docbook-wrapper}"
@@ -328,10 +349,10 @@
 
         <!-- insert the build number into the documentation and configuration
         files -->
- <replace dir="${prep.dir}" token="@@build.num@@"
+ <replace dir="${prep.dir}" token="@@build.num@@" includes="**/*.*"
             value="${build.num}" />
       <tstamp/>
- <replace dir="${prep.dir}" token="@@tstamp@@"
+ <replace dir="${prep.dir}" token="@@tstamp@@" includes="**/*.xml"
             value="${TODAY}" />
 
       <!-- insert the build number into the version file -->
Index: build.xml
====================​====================​====================​=======
RCS file: /cvs/antelope/build.xml,v
retrieving revision 1.11
diff -u -3 -p -r1.11 build.xml
--- build.xml 12 Jun 2005 04:19:38 -0000 1.11
+++ build.xml 11 Sep 2005 07:15:54 -0000
@@ -16,6 +16,7 @@
       Property definition
    ====================​====================​====================​============= -->
    <!-- read build.props to override default property values set below -->
+ <property file="../build.properties" />
    <property file="build.props"/>
     
    <!-- source code directory, this is where the .java files live -->
Index: src/ise/antelope/com​mon/version.txt
====================​====================​====================​=======
RCS file: /cvs/antelope/src/is​e/antelope/common/ve​rsion.txt,v
retrieving revision 1.38
diff -u -3 -p -r1.38 version.txt
--- src/ise/antelope/com​mon/version.txt 12 Jun 2005 04:21:10 -0000 1.38
+++ src/ise/antelope/com​mon/version.txt 11 Sep 2005 07:15:54 -0000
@@ -1,2 +1,2 @@
-VERSION=3.2.6
-DATE=June 11 2005
\ No newline at end of file
+VERSION=3.2.6
+DATE=September 11 2005
\ No newline at end of file
Index: src/ise/antelope/lau​ncher/KappaLayout.ja​va
====================​====================​====================​=======
RCS file: /cvs/antelope/src/is​e/antelope/launcher/​KappaLayout.java,v
retrieving revision 1.1
diff -u -3 -p -r1.1 KappaLayout.java
--- src/ise/antelope/lau​ncher/KappaLayout.ja​va 27 Dec 2004 14:35:40 -0000 1.1
+++ src/ise/antelope/lau​ncher/KappaLayout.ja​va 11 Sep 2005 07:15:54 -0000
@@ -247,9 +247,9 @@ public class KappaLayout implements Layo
       if ( _constraints != null ) {
          sb.append( "\ncomponent count=" + _constraints.size() );
          sb.append( "\ncomponents (no order):\n" );
- Enumeration enum = _constraints.keys();
- while ( enum.hasMoreElements() )
- sb.append( enum.nextElement() + "\n" );
+ Enumeration itr = _constraints.keys();
+ while ( itr.hasMoreElements() )
+ sb.append( itr.nextElement() + "\n" );
       }
       sb.append( "-------------------​------------\n" );
       return sb.toString();
@@ -576,11 +576,11 @@ public class KappaLayout implements Layo
          // turn tokens into a Constraints. Default Constraints values are used
          // for missing or non-specified values
          Constraints q = new Constraints();
- Enumeration enum = tokens.elements();
+ Enumeration itr = tokens.elements();
 
          // get column
- if ( enum.hasMoreElements() ) {
- token = enum.nextElement().toString();
+ if ( itr.hasMoreElements() ) {
+ token = itr.nextElement().toString();
             try {
                q.x = Integer.parseInt( token );
                if ( q.x < 0 )
@@ -592,8 +592,8 @@ public class KappaLayout implements Layo
          }
 
          // get row
- if ( enum.hasMoreElements() ) {
- token = enum.nextElement().toString();
+ if ( itr.hasMoreElements() ) {
+ token = itr.nextElement().toString();
             try {
                q.y = Integer.parseInt( token );
                if ( q.y < 0 )
@@ -605,8 +605,8 @@ public class KappaLayout implements Layo
          }
 
          // get column span (width)
- if ( enum.hasMoreElements() ) {
- token = enum.nextElement().toString();
+ if ( itr.hasMoreElements() ) {
+ token = itr.nextElement().toString();
             if ( token.equalsIgnoreCase( "R" ) ) {
                q.w = R;
             }
@@ -623,8 +623,8 @@ public class KappaLayout implements Layo
          }
 
          // get row span (height)
- if ( enum.hasMoreElements() ) {
- token = enum.nextElement().toString();
+ if ( itr.hasMoreElements() ) {
+ token = itr.nextElement().toString();
             if ( token.equalsIgnoreCase( "R" ) ) {
                q.h = R;
             }
@@ -641,8 +641,8 @@ public class KappaLayout implements Layo
          }
 
          // get alignment
- if ( enum.hasMoreElements() ) {
- token = enum.nextElement().t​oString().trim();
+ if ( itr.hasMoreElements() ) {
+ token = itr.nextElement().to​String().trim();
             if ( token.equalsIgnoreCase( "N" ) || token.equals( "1" ) )
                q.a = N;
             else if ( token.equalsIgnoreCase( "NE" ) || token.equals( "2" ) )
@@ -664,8 +664,8 @@ public class KappaLayout implements Layo
          }
 
          // get component stretch
- if ( enum.hasMoreElements() ) {
- token = enum.nextElement().t​oString().trim().toL​owerCase();
+ if ( itr.hasMoreElements() ) {
+ token = itr.nextElement().to​String().trim().toLo​werCase();
             if ( token.equals( "w" ) || token.equals( "h" ) || token.equals(
"wh" ) || token.equals( "hw" ) ) {
                q.s = token;
             }
@@ -674,8 +674,8 @@ public class KappaLayout implements Layo
          }
 
          // get component padding
- if ( enum.hasMoreElements() ) {
- token = enum.nextElement().toString();
+ if ( itr.hasMoreElements() ) {
+ token = itr.nextElement().toString();
             try {
                q.p = Integer.parseInt( token );
                if ( q.p < 0 )
@@ -795,9 +795,9 @@ public class KappaLayout implements Layo
       }
 
       // get the constraints
- Enumeration enum = _constraints.keys();
- while ( enum.hasMoreElements() ) {
- Component c = ( Component ) enum.nextElement();
+ Enumeration itr = _constraints.keys();
+ while ( itr.hasMoreElements() ) {
+ Component c = ( Component ) itr.nextElement();
          Constraints q = ( Constraints ) _constraints.get( c );
          if ( q.w == R )
             q.w = _col_count - q.x;
@@ -845,9 +845,9 @@ public class KappaLayout implements Layo
 
       // adjust for same width columns
       if ( _same_width_cols != null ) {
- enum = _same_width_cols.elements();
- while ( enum.hasMoreElements() ) {
- int[] same = ( int[] ) enum.nextElement();
+ itr = _same_width_cols.elements();
+ while ( itr.hasMoreElements() ) {
+ int[] same = ( int[] ) itr.nextElement();
             // find widest column of this group
             int widest = same[ 0 ];
             for ( int i = 0; i < same.length; i++ ) {
@@ -887,9 +887,9 @@ public class KappaLayout implements Layo
 
       // adjust for same height rows
       if ( _same_height_rows != null ) {
- enum = _same_height_rows.elements();
- while ( enum.hasMoreElements() ) {
- int[] same = ( int[] ) enum.nextElement();
+ itr = _same_height_rows.elements();
+ while ( itr.hasMoreElements() ) {
+ int[] same = ( int[] ) itr.nextElement();
             // find tallest row of this group
             int tallest = same[ 0 ];
             for ( int i = 0; i < same.length; i++ ) {
@@ -916,9 +916,9 @@ public class KappaLayout implements Layo
       Hashtable rows = new Hashtable();
 
       // get the constraints
- Enumeration enum = _constraints.elements();
- while ( enum.hasMoreElements() ) {
- Constraints q = ( Constraints ) enum.nextElement();
+ Enumeration itr = _constraints.elements();
+ while ( itr.hasMoreElements() ) {
+ Constraints q = ( Constraints ) itr.nextElement();
 
          // figure out which columns this component spans. The BitSet represents
          // a row, and for each non-empty column in the row, a bit is set. The
@@ -938,9 +938,9 @@ public class KappaLayout implements Layo
       // calculate the number of columns by going through each BitSet and
       // counting the number of set bits. The highest bit is the number of
       // columns.
- enum = rows.elements();
- while ( enum.hasMoreElements() ) {
- BitSet row = ( BitSet ) enum.nextElement();
+ itr = rows.elements();
+ while ( itr.hasMoreElements() ) {
+ BitSet row = ( BitSet ) itr.nextElement();
          for ( int i = 0; i < row.size(); i++ ) {
             if ( row.get( i ) )
                _col_count = Math.max( _col_count, i + 1 ); // add 1 as column
index is 0-based
@@ -957,9 +957,9 @@ public class KappaLayout implements Layo
       _row_count = 0;
       Hashtable cols = new Hashtable();
 
- Enumeration enum = _constraints.elements();
- while ( enum.hasMoreElements() ) {
- Constraints q = ( Constraints ) enum.nextElement();
+ Enumeration itr = _constraints.elements();
+ while ( itr.hasMoreElements() ) {
+ Constraints q = ( Constraints ) itr.nextElement();
          BitSet col = null;
          String x = String.valueOf( q.x );
          if ( !cols.containsKey( x ) ) {
@@ -972,9 +972,9 @@ public class KappaLayout implements Layo
             col.set( i );
          }
       }
- enum = cols.elements();
- while ( enum.hasMoreElements() ) {
- BitSet col = ( BitSet ) enum.nextElement();
+ itr = cols.elements();
+ while ( itr.hasMoreElements() ) {
+ BitSet col = ( BitSet ) itr.nextElement();
          for ( int i = 0; i < col.size(); i++ ) {
             if ( col.get( i ) ) {
                _row_count = Math.max( _row_count, i + 1 );
Index: src/ise/antelope/plu​gin/AntelopePlugin.j​ava
====================​====================​====================​=======
RCS file: /cvs/antelope/src/is​e/antelope/plugin/An​telopePlugin.java,v
retrieving revision 1.13
diff -u -3 -p -r1.13 AntelopePlugin.java
--- src/ise/antelope/plu​gin/AntelopePlugin.j​ava 11 Apr 2005 03:07:20 -0000 1.13
+++ src/ise/antelope/plu​gin/AntelopePlugin.j​ava 11 Sep 2005 07:15:54 -0000
@@ -48,32 +48,52 @@
 package ise.antelope.plugin;
 
 
-import java.awt.event.ActionEvent;
-import java.awt.event.ActionListener;
-import java.io.*;
-import java.net.*;
-import java.util.*;
-import javax.swing.*;
-import console.*;
-import errorlist.*;
-import ise.antelope.common.​AntelopePanel;
 import ise.antelope.common.AntUtils;
+import ise.antelope.common.​AntelopePanel;
 import ise.antelope.common.Constants;
 import ise.library.Os;
-import org.gjt.sp.jedit.*;
-import org.gjt.sp.jedit.gui​.DockableWindowManag​er;
-import org.gjt.sp.jedit.gui​.OptionsDialog;
-import org.gjt.sp.util.Log;
+
+import java.awt.event.ActionEvent;
+import java.awt.event.ActionListener;
+import java.io.File;
+import java.io.FileFilter;
+import java.util.ArrayList;
+import java.util.Enumeration;
+import java.util.HashMap;
+import java.util.Hashtable;
+import java.util.Iterator;
+import java.util.List;
+import java.util.StringTokenizer;
+import java.util.Vector;
+
+import javax.swing.JFileChooser;
+import javax.swing.JLabel;
+import javax.swing.JOptionPane;
+
+import org.apache.tools.ant.Project;
+import org.apache.tools.ant​.ProjectHelper;
+import org.gjt.sp.jedit.EBMessage;
+import org.gjt.sp.jedit.EBPlugin;
+import org.gjt.sp.jedit.EditBus;
+import org.gjt.sp.jedit.EditPlugin;
+import org.gjt.sp.jedit.GUIUtilities;
+import org.gjt.sp.jedit.MiscUtilities;
+import org.gjt.sp.jedit.PluginJAR;
+import org.gjt.sp.jedit.View;
+import org.gjt.sp.jedit.jEdit;
 import org.gjt.sp.jedit.msg​.BufferUpdate;
 import org.gjt.sp.jedit.msg​.EditorExiting;
 import org.gjt.sp.jedit.msg​.ViewUpdate;
-import org.apache.tools.ant.Project;
-import org.apache.tools.ant​.ProjectHelper;
+import org.gjt.sp.util.Log;
+
+import console.Shell;
+import errorlist.DefaultErrorSource;
+import errorlist.ErrorSource;
 
 /**
  * This is the AntelopePlugin.
  *
- * @version $Revision: 1.13 $
+ * @version $Revision: 1.14 $
  */
 public class AntelopePlugin extends EBPlugin implements Constants {
     /**
@@ -565,9 +585,7 @@ public class AntelopePlugin extends EBPl
             }
         }
         catch ( NumberFormatException e ) {}
- finally {
- return version;
- }
+ return version;
     }
 
     public static List getAntJarList() {

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

Messages

Show all messages in topic

[Issue 37] New - fixes build-plugin.xml + gets rid of enum as identifier aezust DUPLICATE USER 2005-09-11 00:21:00 PDT
Messages per page: