Login | Register
My pages Projects Community openCollabNet

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

antelope
Discussion topic

Back to topic list

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

Author danson
Full name Dale Anson
Date 2004-03-01 20:07:42 PST
Message User: danson
Date: 04/03/01 20:07:42

Modified:
 /antelope/
  build-app.xml, build-plugin-src.xml, build-plugin.xml, build-source.xml,
  build-tasks.xml
 /antelope/src/ise/an​telope/common/
  AntelopePanel.java, version.txt
 /antelope/src/ise/an​telope/common/gui/
  ListTransferHandler.java, ProjectBuilder.java, TargetBuilder.java,
  TreeTransferHandler.java
 /antelope/src/ise/an​telope/plugin/
  AntelopePlugin.java

Log:
 updated build number, minor fixes for plugin
 

File Changes:

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

File [changed]: build-app.xml
Url: http://antelope.tigr​is.org/source/browse​/antelope/build-app.​xml?r1=1.6&r2=1.​7
Delta lines: +2 -2
-------------------
--- build-app.xml 26 Feb 2004 05:09:13 -0000 1.6
+++ build-app.xml 2 Mar 2004 04:07:39 -0000 1.7
@@ -144,7 +144,7 @@
    <target name="run"
            description="Runs Antelope as a standalone app."
            depends="setClasspath, compile, copy_resources">
- <java classname="ise.antel​ope.common.gui.Proje​ctBuilder" fork="true">
+ <java classname="ise.antel​ope.common.builder.P​rojectBuilder" fork="true">
          <classpath refid="classpathref"/>
       </java>
    </target>
@@ -202,7 +202,7 @@
             <fileset dir="${src.dir}/ise​/antelope/tasks" includes="antelope.t​askdefs"/>
             <fileset dir="${src.dir}/ise​/antelope/tasks" includes="antlib.xml"/>
         </copy>
- <copy todir="${classes.di​r}/ise/antelope/comm​on/gui">
+ <copy todir="${classes.di​r}/ise/antelope/comm​on/builder">
             <fileset dir="${src.dir}" includes="ant.dtd" />
         </copy>
     </target>

File [changed]: build-plugin-src.xml
Url: http://antelope.tigr​is.org/source/browse​/antelope/build-plug​in-src.xml?r1=1.1​&r2=1.2
Delta lines: +1 -1
-------------------
--- build-plugin-src.xml 16 Feb 2004 02:28:59 -0000 1.1
+++ build-plugin-src.xml 2 Mar 2004 04:07:39 -0000 1.2
@@ -11,7 +11,7 @@
    <property name="app.name" value="Antelope"/>
    
    <!-- version number, override in build.props if necessary -->
- <property name="build.num" value="3.0.0"/>
+ <property name="build.num" value="3.0.1"/>
     
     <!-- shouldn't need to override the following properties -->
     

File [changed]: build-plugin.xml
Url: http://antelope.tigr​is.org/source/browse​/antelope/build-plug​in.xml?r1=1.1&r2​=1.2
Delta lines: +5 -2
-------------------
--- build-plugin.xml 16 Feb 2004 02:28:59 -0000 1.1
+++ build-plugin.xml 2 Mar 2004 04:07:39 -0000 1.2
@@ -15,7 +15,7 @@
    <property name="install.dir" value=".." />
     
     <!-- version number, override in build.props if necessary -->
- <property name="build.num" value="2.88.2"/>
+ <property name="build.num" value="3.0.1"/>
     
     <!-- shouldn't need to override the following properties -->
     
@@ -89,6 +89,9 @@
          <classpath refid="classpathref" />
          <exclude name="testcases/**/*"/>
          <exclude name="**/app/**/*"/>
+ <!-- this next bit is excluded until it is good -->
+ <exclude name="**/common/gui/*"/>
+ <exclude name="**/common/builder/*"/>
       </javac>
    </target>
     
@@ -102,7 +105,7 @@
    ====================​====================​====================​============= -->
    <target name="dist"
          description="Compiles, jars, puts the jar in the jEdit jars directory."
- depends="init,compil​e,prep_files,copy_re​sources">
+ depends="init,clean,​compile,prep_files,c​opy_resources">
         
         <!-- make the jar file. jEdit standards require just the name of the
         plugin, e.g. Antelope.jar. put it in $prep.dir -->

File [changed]: build-source.xml
Url: http://antelope.tigr​is.org/source/browse​/antelope/build-sour​ce.xml?r1=1.1&r2​=1.2
Delta lines: +1 -1
-------------------
--- build-source.xml 16 Feb 2004 02:47:21 -0000 1.1
+++ build-source.xml 2 Mar 2004 04:07:39 -0000 1.2
@@ -7,7 +7,7 @@
     <property file="build.props"/>
 
     <!-- version number, override in build.props if necessary -->
- <property name="build.num" value="2.88.2"/>
+ <property name="build.num" value="3.0.1"/>
         
     
     <!-- shouldn't need to override the following properties -->

File [changed]: build-tasks.xml
Url: http://antelope.tigr​is.org/source/browse​/antelope/build-task​s.xml?r1=1.1&r2=​1.2
Delta lines: +1 -1
-------------------
--- build-tasks.xml 16 Feb 2004 02:47:21 -0000 1.1
+++ build-tasks.xml 2 Mar 2004 04:07:39 -0000 1.2
@@ -18,7 +18,7 @@
    <property file="build.props"/>
 
     <!-- version number, override in build.props if necessary -->
- <property name="build.num" value="2.88.2"/>
+ <property name="build.num" value="3.0.1"/>
         
     
     <!-- shouldn't need to override the following properties -->

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.1​&r2=1.2
Delta lines: +17 -15
---------------------
--- AntelopePanel.java 15 Feb 2004 22:15:18 -0000 1.1
+++ AntelopePanel.java 2 Mar 2004 04:07:39 -0000 1.2
@@ -1,4 +1,4 @@
-// $Id: AntelopePanel.java,v 1.1 2004/02/15 22:15:18 danson Exp $
+// $Id: AntelopePanel.java,v 1.2 2004/03/02 04:07:39 danson Exp $
 /*
 * Based on the Apache Software License, Version 1.1
 *
@@ -68,7 +68,7 @@
  * progress.
  *
  * @author Dale Anson, danson at germane-software dot com
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
  * @created July 23, 2002
  */
 public class AntelopePanel extends JPanel implements Constants {
@@ -228,6 +228,7 @@
 
 
 
+
       LambdaLayout lal = new LambdaLayout();
       _control_panel = new JPanel( lal );
       Insets ins = new Insets( 1, 1, 1, 1 );
@@ -938,6 +939,7 @@
 
 
 
+
                _unnamed_target = null;
                if ( getAntVersion() == 16 ) {
                   Iterator iter = targets.keySet().iterator();
@@ -1089,27 +1091,27 @@
          // option where the user can specify additional locations. Should
          // Antelope support this? Need a gui in the properties panel if so.
          java.util.List ant_jars = _helper.getAntJarList();
- if (ant_jars != null ){
+ if ( ant_jars != null ) {
             java.util.List cp_list = new ArrayList();
- String classpath = p.getProperty("java.​class.path");
- StringTokenizer st = new StringTokenizer(classpath, File.pathSeparator);
- while(st.hasMoreTokens()) {
- cp_list.add(new File(st.nextToken()));
+ String classpath = p.getProperty( "java.class.path" );
+ StringTokenizer st = new StringTokenizer( classpath, File.pathSeparator );
+ while ( st.hasMoreTokens() ) {
+ cp_list.add( new File( st.nextToken() ) );
             }
             Iterator it = ant_jars.iterator();
- while(it.hasNext()) {
- File f = new File((String)it.next());
- if (!cp_list.contains(f)) {
- cp_list.add(f);
+ while ( it.hasNext() ) {
+ File f = new File( ( String ) it.next() );
+ if ( !cp_list.contains( f ) ) {
+ cp_list.add( f );
                }
             }
             StringBuffer sb = new StringBuffer();
             it = cp_list.iterator();
- while(it.hasNext()) {
- sb.append(((File)it.​next()).getAbsoluteP​ath()).append(File.p​athSeparator);
+ while ( it.hasNext() ) {
+ sb.append( ( ( File ) it.next() ).getAbsolutePath() ).append( File.pathSeparator );
             }
             classpath = sb.toString();
- p.setProperty("java.​class.path", classpath);
+ p.setProperty( "java.class.path", classpath );
          }
          
          // load any saved user properties for this build file. These are properties

File [changed]: version.txt
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/common/versio​n.txt?r1=1.6&r2=​1.7
Delta lines: +1 -1
-------------------
--- version.txt 26 Feb 2004 05:09:14 -0000 1.6
+++ version.txt 2 Mar 2004 04:07:39 -0000 1.7
@@ -1,2 +1,2 @@
 VERSION=3.0.1
-DATE=February 24 2004
\ No newline at end of file
+DATE=March 1 2004
\ No newline at end of file

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

File [changed]: ListTransferHandler.java
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/common/gui/Li​stTransferHandler.ja​va?r1=1.1&r2=1.2​
Delta lines: +1 -1
-------------------
--- ListTransferHandler.java 28 Feb 2004 05:03:34 -0000 1.1
+++ ListTransferHandler.java 2 Mar 2004 04:07:39 -0000 1.2
@@ -7,7 +7,7 @@
 /**
  * Borrowed from Sun's java tutorial.
  */
-public class ListTransferHandler extends StringTransferHandler {
+public class ListTransferHandler /*extends StringTransferHandler*/ {
    private int[] indices = null;
    private int addIndex = -1; //Location where items were added
    private int addCount = 0; //Number of items added.

File [changed]: ProjectBuilder.java
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/common/gui/Pr​ojectBuilder.java?r1​=1.2&r2=1.3
Delta lines: +3 -9
-------------------
--- ProjectBuilder.java 28 Feb 2004 05:02:36 -0000 1.2
+++ ProjectBuilder.java 2 Mar 2004 04:07:39 -0000 1.3
@@ -1,6 +1,7 @@
 package ise.antelope.common.gui;
 
 import java.awt.*;
+import java.awt.datatransfer.*;
 import java.awt.event.*;
 import java.io.*;
 import java.util.*;
@@ -110,14 +111,7 @@
          //project_tree.addMo​useListener( new AttributeViewer( project_tree ) );
          project_tree.setDragEnabled( true );
 
- JPanel project_panel = new JPanel(new LambdaLayout());
- // need to use a DefaultListModel or dnd won't work
- JList list = new JList( new DefaultListModel() );
- list.setSelectionMode( ListSelectionModel.S​INGLE_INTERVAL_SELEC​TION );
- list.setDragEnabled( true );
- list.setTransferHandler( new ListTransferHandler() );
- project_panel.add( new JScrollPane( list ), "0, 0, 1, 1, 0, wh, 3" );
- project_panel.setBorder( new DropShadowBorder() );
+ ProjectPanel project_panel = new ProjectPanel();
          JSplitPane splitpane = new JSplitPane( JSplitPane.HORIZONTAL_SPLIT,
                true,
                new JScrollPane( project_tree ),
@@ -296,7 +290,7 @@
                   ProjectBuilder pb = new ProjectBuilder();
                   pb.setOpaque( true );
                   frame.setContentPane( pb );
- frame.setSize( 400, 600 );
+ frame.setSize( 600, 600 );
                   frame.setVisible( true );
                   frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE );
                }

File [changed]: TargetBuilder.java
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/common/gui/Ta​rgetBuilder.java?r1=​1.2&r2=1.3
Delta lines: +15 -0
--------------------
--- TargetBuilder.java 28 Feb 2004 05:02:36 -0000 1.2
+++ TargetBuilder.java 2 Mar 2004 04:07:39 -0000 1.3
@@ -10,8 +10,15 @@
 public class TargetBuilder extends JPanel {
    private String name = null;
    
+ public TargetBuilder() {
+
+ }
+
    public TargetBuilder(String name) {
       this.name = name;
+ }
+
+ private void init() {
       setLayout(new LambdaLayout());
       setBackground(Color.WHITE);
       setBorder(new DropShadowBorder());
@@ -24,6 +31,14 @@
       
       add(title_panel, "0, 0, 1, 1, 0, wh, 3");
       add(tasks, "0, 1, 1, 1, 0, wh, 3");
+ }
+
+ public void addNotify() {
+ super.addNotify();
+ if (name == null) {
+ name = JOptionPane.showInputDialog( this, "Enter target name:", "Target Name", JOptionPane.QUESTION_MESSAGE );
+ }
+ init();
    }
    
    public String toString() {

File [changed]: TreeTransferHandler.java
Url: http://antelope.tigr​is.org/source/browse​/antelope/src/ise/an​telope/common/gui/Tr​eeTransferHandler.ja​va?r1=1.1&r2=1.2​
Delta lines: +25 -4
--------------------
--- TreeTransferHandler.java 28 Feb 2004 05:03:34 -0000 1.1
+++ TreeTransferHandler.java 2 Mar 2004 04:07:39 -0000 1.2
@@ -8,10 +8,31 @@
 /**
  * Modeled after code from Sun's java tutorial.
  */
-public class TreeTransferHandler extends StringTransferHandler {
- private int[] indices = null;
- private int addIndex = -1; //Location where items were added
- private int addCount = 0; //Number of items added.
+public class TreeTransferHandler extends TransferHandler {
+
+ protected Transferable createTransferable(JComponent c) {
+ TreePath tp = ((JTree)c).getSelectionPath();
+ System.out.println(tp);
+ Object[] steps = tp.getPath();
+ if (steps.length == 0 || steps.length == 1)
+ return null;
+ if (!steps[0].toString(​).equals("project"))​
+ return null;
+ if (steps[1].toString()​.equals("target")) {
+ return new AntTransferable(DNDC​onstants.TARGET_ELEM​ENT);
+ }
+ if (steps[1].toString()​.equals("tasks")) {
+ return new AntTransferable(DNDC​onstants.TASK_ELEMEN​T);
+ }
+ if (steps[1].toString()​.equals("types")) {
+ return new AntTransferable(DNDC​onstants.TYPE_ELEMEN​T);
+ }
+ return null;
+ }
+
+ public int getSourceActions( JComponent c ) {
+ return COPY_OR_MOVE;
+ }
    
    public boolean canImport(JComponent c, DataFlavor[] df) {
       return false;

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.1​&r2=1.2
Delta lines: +38 -15
---------------------
--- AntelopePlugin.java 15 Feb 2004 22:15:18 -0000 1.1
+++ AntelopePlugin.java 2 Mar 2004 04:07:40 -0000 1.2
@@ -1,4 +1,4 @@
-// $Id: AntelopePlugin.java,v 1.1 2004/02/15 22:15:18 danson Exp $
+// $Id: AntelopePlugin.java,v 1.2 2004/03/02 04:07:40 danson Exp $
 /*
 * Based on the Apache Software License, Version 1.1
 *
@@ -72,7 +72,7 @@
 /**
  * This is the AntelopePlugin.
  *
- * @version $Revision: 1.1 $
+ * @version $Revision: 1.2 $
  */
 public class AntelopePlugin extends EBPlugin implements Constants {
    /**
@@ -96,14 +96,17 @@
 
    private static ArrayList _listeners = new ArrayList();
 
+ static {
    // load our preferences handler -- this one doesn't give any problems on
    /// Linux like the default preferences handler does. ??? could this possibly
    /// cause problems with a system preferences factory? Shouldn't there be
    /// delegates?
- static {
       String prefs = System.getProperty( "java.util.prefs.Pre​ferencesFactory" );
       if ( prefs == null || !prefs.equals( "ise.library.UserPre​ferencesFactory" ) )
          System.setProperty( "java.util.prefs.Pre​ferencesFactory", "ise.library.UserPre​ferencesFactory" );
+
+ // also reset the ant jars property
+ jEdit.resetProperty( "plugin.ise.antelope​.plugin.AntelopePlug​in.jars" );
    }
 
    /**
@@ -137,6 +140,8 @@
       MiscUtilities.isTool​sJarAvailable();
 
       Shell.registerShell( SHELL );
+ //Log.log( Log.DEBUG, AntelopePlugin.class, ">>>>​>>>>>​> AntelopePlugin.start()" );
+
    }
 
    /**
@@ -145,6 +150,7 @@
     * jars when it stops so reloading the plugin works correctly.
     */
    public void stop() {
+ //Log.log( Log.DEBUG, AntelopePlugin.class, ">>>>​>>>>>​> AntelopePlugin.stop()" );
       // jEdit keeps a list in a properties, reset it as we'll want to reload it
       // when/if the plugin restarts
       jEdit.resetProperty( "plugin.ise.antelope​.plugin.AntelopePlug​in.jars" );
@@ -159,12 +165,25 @@
          jEdit.removePluginJAR( pj, false );
       }
 
+ if ( panelList != null ) {
+ Iterator it = panelList.values().iterator();
+ while ( it.hasNext() ) {
+ AntelopePluginPanel panel = ( AntelopePluginPanel ) it.next();
+ panel.close();
+ }
+ }
+
       antJars = null;
       panelList = null;
+ Shell.unregisterShell( SHELL );
       SHELL = null;
       _listeners = null;
    }
 
+ protected void finalize() {
+ jEdit.resetProperty( "plugin.ise.antelope​.plugin.AntelopePlug​in.jars" );
+ }
+
    public static void reload() {
       EditPlugin plugin = jEdit.getPlugin( "ise.antelope.plugin​.AntelopePlugin" );
       PluginJAR jar = plugin.getPluginJAR();
@@ -190,6 +209,7 @@
          BufferUpdate msg = ( BufferUpdate ) message;
          if ( msg.getWhat().equals( BufferUpdate.SAVING ) ) {
             String filename = msg.getBuffer().getPath();
+ if ( filename != null ) {
             File f = new File( filename );
             Iterator it = panelList.keySet().iterator();
             while ( it.hasNext() ) {
@@ -203,7 +223,10 @@
             }
          }
       }
+ }
       else if ( message instanceof EditorExiting ) {
+ if ( panelList == null )
+ return ;
          Iterator it = panelList.values().iterator();
          while ( it.hasNext() ) {
             AntelopePluginPanel panel = ( AntelopePluginPanel ) it.next();




--------------------​--------------------​--------------------​---------
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/ise/antelope/common/, /antelope/src/ise/antelope/common/gui/, /antelope/src/ise/antelope/plugin/ danson Dale Anson 2004-03-01 20:07:42 PST
Messages per page: