You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by di...@apache.org on 2004/09/08 06:27:59 UTC

cvs commit: jakarta-commons/jelly/src/java/org/apache/commons/jelly/impl TagScript.java

dion        2004/09/07 21:27:59

  Modified:    jelly/src/java/org/apache/commons/jelly JellyException.java
                        jelly.properties TagSupport.java
               jelly/src/java/org/apache/commons/jelly/impl TagScript.java
  Log:
  detab
  
  Revision  Changes    Path
  1.16      +8 -8      jakarta-commons/jelly/src/java/org/apache/commons/jelly/JellyException.java
  
  Index: JellyException.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/JellyException.java,v
  retrieving revision 1.15
  retrieving revision 1.16
  diff -u -r1.15 -r1.16
  --- JellyException.java	24 Feb 2004 14:15:40 -0000	1.15
  +++ JellyException.java	8 Sep 2004 04:27:59 -0000	1.16
  @@ -173,12 +173,12 @@
           }
       }
   
  -	public void printStackTrace() {
  -		super.printStackTrace();
  -		if (cause != null) {
  -			System.out.println("Root cause");
  -			cause.printStackTrace();
  -		}
  -	}
  +    public void printStackTrace() {
  +        super.printStackTrace();
  +        if (cause != null) {
  +            System.out.println("Root cause");
  +            cause.printStackTrace();
  +        }
  +    }
   
   }
  
  
  
  1.41      +13 -13    jakarta-commons/jelly/src/java/org/apache/commons/jelly/jelly.properties
  
  Index: jelly.properties
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/jelly.properties,v
  retrieving revision 1.40
  retrieving revision 1.41
  diff -u -r1.40 -r1.41
  --- jelly.properties	25 Feb 2004 04:28:09 -0000	1.40
  +++ jelly.properties	8 Sep 2004 04:27:59 -0000	1.41
  @@ -20,37 +20,37 @@
   # optional taglibs
   ant         = org.apache.commons.jelly.tags.ant.AntTagLibrary
   antlr       = org.apache.commons.jelly.tags.antlr.AntlrTagLibrary
  -bean		= org.apache.commons.jelly.tags.bean.BeanTagLibrary
  +bean        = org.apache.commons.jelly.tags.bean.BeanTagLibrary
   beanshell   = org.apache.commons.jelly.tags.beanshell.BeanShellTagLibrary
  -betwixt		= org.apache.commons.jelly.tags.betwixt.BetwixtTagLibrary
  +betwixt     = org.apache.commons.jelly.tags.betwixt.BetwixtTagLibrary
   bsf         = org.apache.commons.jelly.tags.bsf.BSFTagLibrary
   define      = org.apache.commons.jelly.tags.define.DefineTagLibrary
  -dynabean	= org.apache.commons.jelly.tags.dynabean.DynabeanTagLibrary
  -email 		= org.apache.commons.jelly.tags.email.EmailTagLibrary
  -fmt			= org.apache.commons.jelly.tags.fmt.FmtTagLibrary
  -html		= org.apache.commons.jelly.tags.html.HTMLTagLibrary
  +dynabean    = org.apache.commons.jelly.tags.dynabean.DynabeanTagLibrary
  +email       = org.apache.commons.jelly.tags.email.EmailTagLibrary
  +fmt         = org.apache.commons.jelly.tags.fmt.FmtTagLibrary
  +html        = org.apache.commons.jelly.tags.html.HTMLTagLibrary
   http        = org.apache.commons.jelly.tags.http.HttpTagLibrary
   interaction = org.apache.commons.jelly.tags.interaction.InteractionTagLibrary
   javascript  = org.apache.commons.jelly.tags.bsf.JavaScriptTagLibrary
  -jface		= org.apache.commons.jelly.tags.jface.JFaceTagLibrary
  +jface       = org.apache.commons.jelly.tags.jface.JFaceTagLibrary
   jetty       = org.apache.commons.jelly.tags.jetty.JettyTagLibrary
   jms         = org.apache.commons.jelly.tags.jms.JMSTagLibrary
   jmx         = org.apache.commons.jelly.tags.jmx.JMXTagLibrary
   jpython     = org.apache.commons.jelly.tags.bsf.JPythonTagLibrary
   jython      = org.apache.commons.jelly.tags.bsf.JythonTagLibrary
   jsl         = org.apache.commons.jelly.tags.jsl.JSLTagLibrary
  -junit 	    = org.apache.commons.jelly.tags.junit.JUnitTagLibrary
  +junit       = org.apache.commons.jelly.tags.junit.JUnitTagLibrary
   log         = org.apache.commons.jelly.tags.log.LogTagLibrary
   ojb         = org.apache.commons.jelly.tags.ojb.OjbTagLibrary
   pnuts       = org.apache.commons.jelly.tags.bsf.PNutsTagLibrary
   quartz      = org.apache.commons.jelly.tags.quartz.QuartzTagLibrary
  -soap		= org.apache.commons.jelly.tags.soap.SoapTagLibrary
  +soap        = org.apache.commons.jelly.tags.soap.SoapTagLibrary
   sql         = org.apache.commons.jelly.tags.sql.SqlTagLibrary
  -swing	    = org.apache.commons.jelly.tags.swing.SwingTagLibrary
  -swt		    = org.apache.commons.jelly.tags.swt.SwtTagLibrary
  -threads  	= org.apache.commons.jelly.tags.threads.ThreadsTagLibrary
  +swing       = org.apache.commons.jelly.tags.swing.SwingTagLibrary
  +swt         = org.apache.commons.jelly.tags.swt.SwtTagLibrary
  +threads     = org.apache.commons.jelly.tags.threads.ThreadsTagLibrary
   util        = org.apache.commons.jelly.tags.util.UtilTagLibrary
   validate    = org.apache.commons.jelly.tags.validate.ValidateTagLibrary
   velocity    = org.apache.commons.jelly.tags.velocity.VelocityTagLibrary
   xml         = org.apache.commons.jelly.tags.xml.XMLTagLibrary
  -xmlunit		= org.apache.commons.jelly.tags.xmlunit.XMLUnitTagLibrary
  +xmlunit     = org.apache.commons.jelly.tags.xmlunit.XMLUnitTagLibrary
  
  
  
  1.32      +47 -47    jakarta-commons/jelly/src/java/org/apache/commons/jelly/TagSupport.java
  
  Index: TagSupport.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/TagSupport.java,v
  retrieving revision 1.31
  retrieving revision 1.32
  diff -u -r1.31 -r1.32
  --- TagSupport.java	5 Sep 2004 12:00:24 -0000	1.31
  +++ TagSupport.java	8 Sep 2004 04:27:59 -0000	1.32
  @@ -245,53 +245,53 @@
        */
       protected void trimBody() {
           synchronized(body) {
  -			// #### should refactor this code into
  -			// #### trimWhitespace() methods on the Script objects
  +            // #### should refactor this code into
  +            // #### trimWhitespace() methods on the Script objects
   
  -			if ( body instanceof CompositeTextScriptBlock ) {
  -				CompositeTextScriptBlock block = (CompositeTextScriptBlock) body;
  -				List list = block.getScriptList();
  -				int size = list.size();
  -				if ( size > 0 ) {
  -					Script script = (Script) list.get(0);
  -					if ( script instanceof TextScript ) {
  -						TextScript textScript = (TextScript) script;
  -						textScript.trimStartWhitespace();
  -					}
  -					if ( size > 1 ) {
  -						script = (Script) list.get(size - 1);
  -						if ( script instanceof TextScript ) {
  -							TextScript textScript = (TextScript) script;
  -							textScript.trimEndWhitespace();
  -						}
  -					}
  -				}
  -			}
  -			else
  -			if ( body instanceof ScriptBlock ) {
  -				ScriptBlock block = (ScriptBlock) body;
  -				List list = block.getScriptList();
  -				for ( int i = list.size() - 1; i >= 0; i-- ) {
  -					Script script = (Script) list.get(i);
  -					if ( script instanceof TextScript ) {
  -						TextScript textScript = (TextScript) script;
  -						String text = textScript.getText();
  -						text = text.trim();
  -						if ( text.length() == 0 ) {
  -							list.remove(i);
  -						}
  -						else {
  -							textScript.setText(text);
  -						}
  -					}
  -				}
  -			}
  -			else if ( body instanceof TextScript ) {
  -				TextScript textScript = (TextScript) body;
  -				textScript.trimWhitespace();
  -			}
  -		}
  -	}
  +            if ( body instanceof CompositeTextScriptBlock ) {
  +                CompositeTextScriptBlock block = (CompositeTextScriptBlock) body;
  +                List list = block.getScriptList();
  +                int size = list.size();
  +                if ( size > 0 ) {
  +                    Script script = (Script) list.get(0);
  +                    if ( script instanceof TextScript ) {
  +                        TextScript textScript = (TextScript) script;
  +                        textScript.trimStartWhitespace();
  +                    }
  +                    if ( size > 1 ) {
  +                        script = (Script) list.get(size - 1);
  +                        if ( script instanceof TextScript ) {
  +                            TextScript textScript = (TextScript) script;
  +                            textScript.trimEndWhitespace();
  +                        }
  +                    }
  +                }
  +            }
  +            else
  +            if ( body instanceof ScriptBlock ) {
  +                ScriptBlock block = (ScriptBlock) body;
  +                List list = block.getScriptList();
  +                for ( int i = list.size() - 1; i >= 0; i-- ) {
  +                    Script script = (Script) list.get(i);
  +                    if ( script instanceof TextScript ) {
  +                        TextScript textScript = (TextScript) script;
  +                        String text = textScript.getText();
  +                        text = text.trim();
  +                        if ( text.length() == 0 ) {
  +                            list.remove(i);
  +                        }
  +                        else {
  +                            textScript.setText(text);
  +                        }
  +                    }
  +                }
  +            }
  +            else if ( body instanceof TextScript ) {
  +                TextScript textScript = (TextScript) body;
  +                textScript.trimWhitespace();
  +            }
  +        }
  +    }
   
       /**
        * Returns whether the body of this tag will be escaped or not.
  
  
  
  1.42      +31 -31    jakarta-commons/jelly/src/java/org/apache/commons/jelly/impl/TagScript.java
  
  Index: TagScript.java
  ===================================================================
  RCS file: /home/cvs/jakarta-commons/jelly/src/java/org/apache/commons/jelly/impl/TagScript.java,v
  retrieving revision 1.41
  retrieving revision 1.42
  diff -u -r1.41 -r1.42
  --- TagScript.java	12 Aug 2004 03:51:48 -0000	1.41
  +++ TagScript.java	8 Sep 2004 04:27:59 -0000	1.42
  @@ -267,7 +267,7 @@
                   tagHolder.set(tag);
               }
           }
  -		configureTag(tag);
  +        configureTag(tag);
           return tag;
       }
   
  @@ -408,35 +408,35 @@
       }
   
   
  -	/**
  -	 * Returns the namespace context of this tag. This is all the prefixes
  -	 * in scope in the document where this tag is used which are mapped to
  -	 * their namespace URIs.
  -	 * 
  -	 * @return a Map with the keys are namespace prefixes and the values are
  -	 * namespace URIs.
  -	 */
  -	public synchronized Map getNamespaceContext() {
  -		if (namespaceContext == null) {
  -			if (parent != null) {
  -				namespaceContext = getParent().getNamespaceContext();
  -				if (tagNamespacesMap != null && !tagNamespacesMap.isEmpty()) {
  -					// create a new child context
  -					Hashtable newContext = new Hashtable(namespaceContext.size()+1);
  -					newContext.putAll(namespaceContext);
  -					newContext.putAll(tagNamespacesMap);
  -					namespaceContext = newContext;
  -				}
  -			}
  -			else {
  -				namespaceContext = tagNamespacesMap;
  -				if (namespaceContext == null) {
  -					namespaceContext = new Hashtable();
  -				}
  -			}
  -		}
  -		return namespaceContext;
  -	}
  +    /**
  +     * Returns the namespace context of this tag. This is all the prefixes
  +     * in scope in the document where this tag is used which are mapped to
  +     * their namespace URIs.
  +     * 
  +     * @return a Map with the keys are namespace prefixes and the values are
  +     * namespace URIs.
  +     */
  +    public synchronized Map getNamespaceContext() {
  +        if (namespaceContext == null) {
  +            if (parent != null) {
  +                namespaceContext = getParent().getNamespaceContext();
  +                if (tagNamespacesMap != null && !tagNamespacesMap.isEmpty()) {
  +                    // create a new child context
  +                    Hashtable newContext = new Hashtable(namespaceContext.size()+1);
  +                    newContext.putAll(namespaceContext);
  +                    newContext.putAll(tagNamespacesMap);
  +                    namespaceContext = newContext;
  +                }
  +            }
  +            else {
  +                namespaceContext = tagNamespacesMap;
  +                if (namespaceContext == null) {
  +                    namespaceContext = new Hashtable();
  +                }
  +            }
  +        }
  +        return namespaceContext;
  +    }
       
       // Implementation methods
       //-------------------------------------------------------------------------      
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org