Login | Register
My pages Projects Community openCollabNet

Discussions > cvs > CVS update: /antelope/, /antelope/src/ise/antelope/app/jedit/, /antelope/src/ise/antelope/common/, /antelope/src/ise/antelope/common/builder/

antelope
Discussion topic

Back to topic list

CVS update: /antelope/, /antelope/src/ise/antelope/app/jedit/, /antelope/src/ise/antelope/common/, /antelope/src/ise/antelope/common/builder/

Author danson
Full name Dale Anson
Date 2004-03-21 21:18:06 PST
Message User: danson Date: 04/03/21 21:18:06 Modified: /antelope/ build.props, build.xml /antelope/src/ise/antelope/app/jedit/ JEditTextArea.java, TextAreaPainter.java /antelope/src/ise/antelope/common/ AntProgressListener.java, AntProject.java, AntelopePanel.java, version.txt /antelope/src/ise/antelope/common/builder/ ElementPanel.java, MutableTreeTransferHandler.java, ProjectBuilder.java, ProjectTreePanel.java Log: fixed some deprecations. File Changes: Directory: /antelope/ ===================== File [changed]: build.props Url: http://antelope.tigris.org/source/browse/antelope/build.props?r1=1.6&r2=1.7 Delta lines: +4 -4 ------------------- --- build.props 22 Mar 2004 02:40:14 -0000 1.6 +++ build.props 22 Mar 2004 05:18:04 -0000 1.7 @@ -1,11 +1,11 @@ # required settings -#jedit.install.dir=${user.home}/apps/jedit/4.2pre8 -jedit.install.dir=c:/jEdit +jedit.install.dir=${user.home}/apps/jedit/4.2pre8 +#jedit.install.dir=c:/jEdit install.dir=${user.home}/.jedit/jars build.num=3.0.3 -#docbook.xsl=/usr/share/sgml/docbook/xsl-stylesheets-1.60.1 -docbook.xsl=file:///C:/cygwin/usr/share/docbook-xsl +docbook.xsl=file:///usr/share/sgml/docbook/xsl-stylesheets-1.60.1 +#docbook.xsl=file:///C:/cygwin/usr/share/docbook-xsl # optional settings, remove if you don't use jikes #build.compiler=jikes File [changed]: build.xml Url: http://antelope.tigris.org/source/browse/antelope/build.xml?r1=1.3&r2=1.4 Delta lines: +0 -4 ------------------- --- build.xml 22 Mar 2004 02:40:14 -0000 1.3 +++ build.xml 22 Mar 2004 05:18:04 -0000 1.4 @@ -128,10 +128,6 @@ destdir="${doc.dir}/manual" includes="userguide.xml"> - - - Directory: /antelope/src/ise/antelope/app/jedit/ ================================================ File [changed]: JEditTextArea.java Url: http://antelope.tigris.org/source/browse/antelope/src/ise/antelope/app/jedit/JEditTextArea.java?r1=1.1&r2=1.2 Delta lines: +3 -2 ------------------- --- JEditTextArea.java 16 Feb 2004 02:39:39 -0000 1.1 +++ JEditTextArea.java 22 Mar 2004 05:18:04 -0000 1.2 @@ -47,7 +47,7 @@ * + "}"); * * @author Slava Pestov - * @version $Id: JEditTextArea.java,v 1.1 2004/02/16 02:39:39 danson Exp $ + * @version $Id: JEditTextArea.java,v 1.2 2004/03/22 05:18:04 danson Exp $ */ public class JEditTextArea extends JComponent { /** @@ -111,7 +111,8 @@ /** * Returns if this component can be traversed by pressing - * the Tab key. This returns false. + * the Tab key. This returns true. + * @deprecated */ public final boolean isManagingFocus() { return true; File [changed]: TextAreaPainter.java Url: http://antelope.tigris.org/source/browse/antelope/src/ise/antelope/app/jedit/TextAreaPainter.java?r1=1.1&r2=1.2 Delta lines: +3 -1 ------------------- --- TextAreaPainter.java 16 Feb 2004 02:39:39 -0000 1.1 +++ TextAreaPainter.java 22 Mar 2004 05:18:04 -0000 1.2 @@ -19,7 +19,7 @@ * The text area repaint manager. It performs double buffering and paints * lines of text. * @author Slava Pestov - * @version $Id: TextAreaPainter.java,v 1.1 2004/02/16 02:39:39 danson Exp $ + * @version $Id: TextAreaPainter.java,v 1.2 2004/03/22 05:18:04 danson Exp $ */ public class TextAreaPainter extends JComponent implements TabExpander { @@ -64,6 +64,7 @@ /** * Returns if this component can be traversed by pressing the * Tab key. This returns false. + * @deprecated */ public final boolean isManagingFocus() { @@ -344,6 +345,7 @@ * Sets the font for this component. This is overridden to update the * cached font metrics and to recalculate which lines are visible. * @param font The font + * @deprecated */ public void setFont(Font font) { Directory: /antelope/src/ise/antelope/common/ ============================================= File [changed]: AntProgressListener.java Url: http://antelope.tigris.org/source/browse/antelope/src/ise/antelope/common/AntProgressListener.java?r1=1.1&r2=1.2 Delta lines: +14 -11 --------------------- --- AntProgressListener.java 15 Feb 2004 22:15:18 -0000 1.1 +++ AntProgressListener.java 22 Mar 2004 05:18:04 -0000 1.2 @@ -265,20 +265,21 @@ String task_name = task.getTaskName(); if ( task instanceof TaskContainer ) { RuntimeConfigurable rc = task.getRuntimeConfigurableWrapper(); - org.xml.sax.AttributeList attrs = rc.getAttributes(); + Hashtable attrs = rc.getAttributeMap(); if ( attrs == null ) continue; - task_count += attrs.getLength(); + task_count += attrs.size(); } else if ( task_name.equals( "antcall" ) || task_name.equals( "call" ) ) { // count the tasks in the target specified by an 'antcall' task RuntimeConfigurable rc = task.getRuntimeConfigurableWrapper(); - org.xml.sax.AttributeList attrs = rc.getAttributes(); + Hashtable attrs = rc.getAttributeMap(); if ( attrs == null ) continue; - for ( int j = 0; j < attrs.getLength(); j++ ) { - String name = attrs.getName( j ); - String value = attrs.getValue( j ); + Iterator it = attrs.keySet().iterator(); + while ( it.hasNext() ) { + String name = (String)it.next();; + String value = (String)attrs.get( name ); if ( name.equals( "target" ) ) { Hashtable targets = target.getProject().getTargets(); Target subtarget = ( Target ) targets.get( value ); @@ -291,15 +292,16 @@ // be in another build file, so need to grab the build file name // and directory and load a project from it. RuntimeConfigurable rc = task.getRuntimeConfigurableWrapper(); - org.xml.sax.AttributeList attrs = rc.getAttributes(); + Hashtable attrs = rc.getAttributeMap(); if ( attrs == null ) continue; String antfile = "build.xml"; String dir = ""; String subtarget = ""; - for ( int j = 0; j < attrs.getLength(); j++ ) { - String name = attrs.getName( j ); - String value = attrs.getValue( j ); + Iterator it = attrs.keySet().iterator(); + while(it.hasNext()) { + String name = (String)it.next(); + String value = (String)attrs.get(name); if ( name.equals( "antfile" ) ) antfile = value; if ( name.equals( "dir" ) ) @@ -391,7 +393,8 @@ Project p = new Project(); try { p.init(); // this takes as much as 9 seconds the first time, less than 1/2 second later - ProjectHelper.configureProject( p, build_file ); + ProjectHelper ph = ProjectHelper.getProjectHelper(); + ph.parse( p, build_file ); p.setUserProperty( "ant.file", build_file.getAbsolutePath() ); // copy the inherited properties File [changed]: AntProject.java Url: http://antelope.tigris.org/source/browse/antelope/src/ise/antelope/common/AntProject.java?r1=1.1&r2=1.2 Delta lines: +6 -3 ------------------- --- AntProject.java 15 Feb 2004 22:15:18 -0000 1.1 +++ AntProject.java 22 Mar 2004 05:18:04 -0000 1.2 @@ -1,4 +1,4 @@ -// $Id: AntProject.java,v 1.1 2004/02/15 22:15:18 danson Exp $ +// $Id: AntProject.java,v 1.2 2004/03/22 05:18:04 danson Exp $ /* * The Apache Software License, Version 1.1 * @@ -97,7 +97,7 @@ * manipulation that I want to do. * * @author duncan@x180.com; Dale Anson, danson@germane-software.com - * @version $Revision: 1.1 $ + * @version $Revision: 1.2 $ */ public class AntProject extends Project { @@ -431,7 +431,10 @@ */ public String replaceProperties( String value ) throws BuildException { - return ProjectHelper.replaceProperties( this, value, properties ); + /// this means Ant 1.6 is required... + ///PropertyHelper ph = PropertyHelper.getPropertyHelper(this); + ///return ph.replaceProperties( this, value, properties ); + return ProjectHelper.replaceProperties(this, value, properties); } File [changed]: AntelopePanel.java Url: http://antelope.tigris.org/source/browse/antelope/src/ise/antelope/common/AntelopePanel.java?r1=1.4&r2=1.5 Delta lines: +4 -3 ------------------- --- AntelopePanel.java 17 Mar 2004 00:03:37 -0000 1.4 +++ AntelopePanel.java 22 Mar 2004 05:18:04 -0000 1.5 @@ -1,4 +1,4 @@ -// $Id: AntelopePanel.java,v 1.4 2004/03/17 00:03:37 danson Exp $ +// $Id: AntelopePanel.java,v 1.5 2004/03/22 05:18:04 danson Exp $ /* * Based on the Apache Software License, Version 1.1 * @@ -68,7 +68,7 @@ * progress. * * @author Dale Anson, danson@germane-software.com - * @version $Revision: 1.4 $ + * @version $Revision: 1.5 $ * @created July 23, 2002 */ public class AntelopePanel extends JPanel implements Constants { @@ -1082,7 +1082,8 @@ // ProjectHelper is captured p.addBuildListener( _build_logger ); - ProjectHelper.configureProject( p, build_file ); + ProjectHelper ph = ProjectHelper.getProjectHelper(); + ph.parse(p, build_file); p.setProperty( "ant.file", build_file.getAbsolutePath() ); p.setProperty( "ant.version", Main.getAntVersion() ); File [changed]: version.txt Url: http://antelope.tigris.org/source/browse/antelope/src/ise/antelope/common/version.txt?r1=1.12&r2=1.13 Delta lines: +2 -2 ------------------- --- version.txt 22 Mar 2004 02:40:15 -0000 1.12 +++ version.txt 22 Mar 2004 05:18:04 -0000 1.13 @@ -1,2 +1,2 @@ VERSION=3.0.3 -DATE=March 16 2004 \ No newline at end of file +DATE=March 21 2004 \ No newline at end of file Directory: /antelope/src/ise/antelope/common/builder/ ===================================================== File [changed]: ElementPanel.java Url: http://antelope.tigris.org/source/browse/antelope/src/ise/antelope/common/builder/ElementPanel.java?r1=1.6&r2=1.7 Delta lines: +5 -2 ------------------- --- ElementPanel.java 22 Mar 2004 02:40:15 -0000 1.6 +++ ElementPanel.java 22 Mar 2004 05:18:04 -0000 1.7 @@ -43,7 +43,6 @@ // get display name if target NodeAttribute na = (NodeAttribute)attributes.get("name"); - System.out.println(na); if ((na == null || na.getValue().equals("")) && element.getName().equals(DNDConstants.TARGET)) { String rtn = JOptionPane.showInputDialog(null, "Enter name for target:"); if (rtn != null){ @@ -56,6 +55,10 @@ } } + // do some specific checking + if ( element_name.equals( DNDConstants.TARGET ) ) { + element_name = JOptionPane.showInputDialog( null, "Enter target name:" ); + } setLayout( new BorderLayout() ); setBorder( new DropShadowBorder() ); @@ -92,7 +95,7 @@ doPopup( me ); } private void doPopup( MouseEvent me ) { - if ( me.isPopupTrigger()) { + if ( me.isPopupTrigger() ) { GUIUtils.showPopupMenu( pm, me.getComponent(), me.getX(), me.getY() ); } } File [changed]: MutableTreeTransferHandler.java Url: http://antelope.tigris.org/source/browse/antelope/src/ise/antelope/common/builder/MutableTreeTransferHandler.java?r1=1.3&r2=1.4 Delta lines: +32 -28 --------------------- --- MutableTreeTransferHandler.java 22 Mar 2004 02:40:15 -0000 1.3 +++ MutableTreeTransferHandler.java 22 Mar 2004 05:18:04 -0000 1.4 @@ -5,7 +5,10 @@ import java.awt.datatransfer.*; import javax.swing.tree.*; - +/** + * Handles dropping nodes on a tree. + * @author Dale Anson + */ public class MutableTreeTransferHandler extends TransferHandler { protected Transferable createTransferable( JComponent c ) { @@ -14,7 +17,7 @@ if ( tp == null ) return null; String leaf = tp.getLastPathComponent().toString(); - if (leaf.equals(DNDConstants.TASK) || leaf.equals(DNDConstants.TYPE)) + if ( leaf.equals( DNDConstants.TASK ) || leaf.equals( DNDConstants.TYPE ) ) return null; return new TreeTransferable( tp ); } @@ -28,9 +31,9 @@ } public boolean canImport( JComponent c, DataFlavor[] df ) { - if (c instanceof JTree) { - for (int i = 0; i < df.length; i++) { - if (df[i] instanceof TreePathFlavor) + if ( c instanceof JTree ) { + for ( int i = 0; i < df.length; i++ ) { + if ( df[ i ] instanceof TreePathFlavor ) return true; } } @@ -43,25 +46,26 @@ * @return true if the data was inserted into the component */ public boolean importData( JComponent c, Transferable t ) { + System.out.println("new"); try { // get the data, no point in doing anything else if it's not available - TreePath src_tp = (TreePath)t.getTransferData(new TreePathFlavor()); - if (src_tp == null) - throw new Exception("no data available"); + TreePath src_tp = ( TreePath ) t.getTransferData( new TreePathFlavor() ); + if ( src_tp == null ) + throw new Exception( "no data available" ); // get the destination tree and model - JTree tree = (JTree)c; - DefaultTreeModel model = (DefaultTreeModel)tree.getModel(); + JTree tree = ( JTree ) c; + DefaultTreeModel model = ( DefaultTreeModel ) tree.getModel(); // keep track of the nodes that were expanded in the destination tree // so that the visual state of the tree can be restored after a drop - boolean[] expanded_model = new boolean[tree.getRowCount()]; - for (int i = 0; i < expanded_model.length; i++) { - expanded_model[i] = tree.isExpanded(i); + boolean[] expanded_model = new boolean[ tree.getRowCount() ]; + for ( int i = 0; i < expanded_model.length; i++ ) { + expanded_model[ i ] = tree.isExpanded( i ); } // handle the drop -- get the source - DroppableTreeNode src_leaf = (DroppableTreeNode)src_tp.getLastPathComponent(); + DroppableTreeNode src_leaf = ( DroppableTreeNode ) src_tp.getLastPathComponent(); Object o = src_leaf.getUserObject(); ElementPanel src_ep; if (o instanceof ElementPanel) { @@ -76,26 +80,26 @@ // get the destination TreePath dest_tp = tree.getSelectionPath(); - DroppableTreeNode dest_node = (DroppableTreeNode)dest_tp.getLastPathComponent(); - ElementPanel dest_ep = (ElementPanel)dest_node.getUserObject(); - if (!dest_ep.canAccept(dest_tp)) + DroppableTreeNode dest_node = ( DroppableTreeNode ) dest_tp.getLastPathComponent(); + ElementPanel dest_ep = ( ElementPanel ) dest_node.getUserObject(); + if ( !dest_ep.canAccept( dest_tp ) ) return false; dest_node.add(new DroppableTreeNode(src_ep, true)); // nodeStructureChanged may collapse expanded rows, so expand rows // that were expanded before the drop - model.nodeStructureChanged(dest_node); - for(int i = 0; i < expanded_model.length; i++) { - if(expanded_model[i]) { - tree.expandRow(i); + model.nodeStructureChanged( dest_node ); + for ( int i = 0; i < expanded_model.length; i++ ) { + if ( expanded_model[ i ] ) { + tree.expandRow( i ); } } // then expand the node that just received the drop - tree.expandPath(dest_tp); + tree.expandPath( dest_tp ); return true; } - catch(Exception e) { + catch ( Exception e ) { e.printStackTrace(); return false; } File [changed]: ProjectBuilder.java Url: http://antelope.tigris.org/source/browse/antelope/src/ise/antelope/common/builder/ProjectBuilder.java?r1=1.3&r2=1.4 Delta lines: +15 -5 -------------------- --- ProjectBuilder.java 8 Mar 2004 01:52:45 -0000 1.3 +++ ProjectBuilder.java 22 Mar 2004 05:18:04 -0000 1.4 @@ -19,6 +19,9 @@ private String defaultTarget = ""; private String basedir = "."; + private JSplitPane splitpane = null; + private JSplitPane right_pane = null; + public ProjectBuilder() { init(); } @@ -104,16 +107,17 @@ //project_tree.addMouseListener( new AttributeViewer( project_tree ) ); project_tree.setDragEnabled( true ); - ElementPanel project_panel = new ElementPanel(project_tree.getPathForRow(0)); + ElementPanel project_panel = new ElementPanel( project_tree.getPathForRow( 0 ) ); ProjectTreePanel project_tree_panel = new ProjectTreePanel(); - JSplitPane splitpane = new JSplitPane( JSplitPane.HORIZONTAL_SPLIT, + right_pane = new JSplitPane( JSplitPane.HORIZONTAL_SPLIT, true, new JScrollPane( project_tree_panel ), new JScrollPane( project_panel ) ); + splitpane = new JSplitPane( JSplitPane.HORIZONTAL_SPLIT, true, new JScrollPane( project_tree ), - new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, new JScrollPane(project_tree_panel), new JScrollPane( project_panel )) ); + right_pane ); setLayout( new LambdaLayout() ); add( splitpane, "0, 0, 1, 1, 0, wh, 3" ); - project_tree.setDragEnabled(true); - project_tree.setTransferHandler(new TreeTransferHandler()); + project_tree.setDragEnabled( true ); + project_tree.setTransferHandler( new TreeTransferHandler() ); } catch ( Exception e ) { e.printStackTrace(); @@ -121,6 +125,11 @@ } + public void initSplitters() { + right_pane.setDividerLocation( 0.33 ); + splitpane.setDividerLocation( 0.25 ); + } + private void addChildren( DefaultMutableTreeNode node ) { String name = node.toString(); DTDElement element = ( DTDElement ) DNDConstants.ANT_DTD.elements.get( name ); @@ -245,6 +254,7 @@ frame.setSize( 600, 600 ); frame.setVisible( true ); frame.setDefaultCloseOperation( JFrame.EXIT_ON_CLOSE ); + pb.initSplitters(); } } ); File [changed]: ProjectTreePanel.java Url: http://antelope.tigris.org/source/browse/antelope/src/ise/antelope/common/builder/ProjectTreePanel.java?r1=1.2&r2=1.3 Delta lines: +0 -1 ------------------- --- ProjectTreePanel.java 22 Mar 2004 02:40:15 -0000 1.2 +++ ProjectTreePanel.java 22 Mar 2004 05:18:04 -0000 1.3 @@ -47,7 +47,6 @@ } else { project_tree.setSelectionPath(tp); - System.out.println("selection path is " + tp); } } } --------------------------------------------------------------------- To unsubscribe, e-mail: cvs-unsubscribe@antelope.tigris.org For additional commands, e-mail: cvs-help@antelope.tigris.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/app/jedit/, /antelope/src/ise/antelope/common/, /antelope/src/ise/antelope/common/builder/ danson Dale Anson 2004-03-21 21:18:06 PST
Messages per page: