You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@wicket.apache.org by jd...@apache.org on 2007/07/06 07:24:04 UTC

svn commit: r553737 - in /incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup: Markup.java MarkupStream.java

Author: jdonnerstag
Date: Thu Jul  5 22:24:03 2007
New Revision: 553737

URL: http://svn.apache.org/viewvc?view=rev&rev=553737
Log:
comment out currently not used source code

Modified:
    incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/Markup.java
    incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/MarkupStream.java

Modified: incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/Markup.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/Markup.java?view=diff&rev=553737&r1=553736&r2=553737
==============================================================================
--- incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/Markup.java (original)
+++ incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/Markup.java Thu Jul  5 22:24:03 2007
@@ -51,7 +51,7 @@
 	/** The list of markup elements */
 	private/* final */List markupElements;
 
-	/** The associate markup */
+	/** The associated markup */
 	private final MarkupResourceData markupResourceData;
 
 	/**
@@ -181,57 +181,57 @@
 	{
 		this.markupElements = new ArrayList();
 	}
-
-	/**
-	 * Create an iterator for the markup elements
-	 * 
-	 * @return Iterator
-	 */
-	public final Iterator iterator()
-	{
-		return iterator(0, null);
-	}
-
-	/**
-	 * Create an iterator for the tags being an istance of 'matchClass'
-	 * 
-	 * @param startIndex
-	 *            The index to start with
-	 * @param matchClass
-	 *            Iterate over elements matching the class
-	 * @return Iterator
-	 */
-	public final Iterator iterator(final int startIndex, final Class matchClass)
-	{
-		return new Iterator()
-		{
-			int index = startIndex - 1;
-
-			public boolean hasNext()
-			{
-				while (++index < size())
-				{
-					MarkupElement element = get(index);
-					if ((matchClass == null) || matchClass.isInstance(element))
-					{
-						return true;
-					}
-				}
-				return false;
-			}
-
-			public Object next()
-			{
-				return get(index);
-			}
-
-			public void remove()
-			{
-				markupElements.remove(index);
-				index -= 1;
-			}
-		};
-	}
+//
+//	/**
+//	 * Create an iterator for the markup elements
+//	 * 
+//	 * @return Iterator
+//	 */
+//	public final Iterator iterator()
+//	{
+//		return iterator(0, null);
+//	}
+//
+//	/**
+//	 * Create an iterator for the tags being an istance of 'matchClass'
+//	 * 
+//	 * @param startIndex
+//	 *            The index to start with
+//	 * @param matchClass
+//	 *            Iterate over elements matching the class
+//	 * @return Iterator
+//	 */
+//	public final Iterator iterator(final int startIndex, final Class matchClass)
+//	{
+//		return new Iterator()
+//		{
+//			int index = startIndex - 1;
+//
+//			public boolean hasNext()
+//			{
+//				while (++index < size())
+//				{
+//					MarkupElement element = get(index);
+//					if ((matchClass == null) || matchClass.isInstance(element))
+//					{
+//						return true;
+//					}
+//				}
+//				return false;
+//			}
+//
+//			public Object next()
+//			{
+//				return get(index);
+//			}
+//
+//			public void remove()
+//			{
+//				markupElements.remove(index);
+//				index -= 1;
+//			}
+//		};
+//	}
 
 	/**
 	 * Add the tag to the local cache if open or open-close and if wicket:id is
@@ -336,20 +336,20 @@
 
 		return this.currentPath;
 	}
-
-	/**
-	 * Create an iterator for the component tags in the markup.
-	 * 
-	 * @param startIndex
-	 *            The index to start with
-	 * @param matchClass
-	 *            Iterate over elements matching the class
-	 * @return ComponentTagIterator
-	 */
-	public Iterator componentTagIterator(final int startIndex, final Class matchClass)
-	{
-		return iterator(startIndex, matchClass);
-	}
+//
+//	/**
+//	 * Create an iterator for the component tags in the markup.
+//	 * 
+//	 * @param startIndex
+//	 *            The index to start with
+//	 * @param matchClass
+//	 *            Iterate over elements matching the class
+//	 * @return ComponentTagIterator
+//	 */
+//	public Iterator componentTagIterator(final int startIndex, final Class matchClass)
+//	{
+//		return iterator(startIndex, matchClass);
+//	}
 	
 	/**
 	 * Find the markup element index of the component with 'path'

Modified: incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/MarkupStream.java
URL: http://svn.apache.org/viewvc/incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/MarkupStream.java?view=diff&rev=553737&r1=553736&r2=553737
==============================================================================
--- incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/MarkupStream.java (original)
+++ incubator/wicket/trunk/jdk-1.4/wicket/src/main/java/org/apache/wicket/markup/MarkupStream.java Thu Jul  5 22:24:03 2007
@@ -16,8 +16,6 @@
  */
 package org.apache.wicket.markup;
 
-import java.util.Iterator;
-
 import org.apache.wicket.util.resource.IResourceStream;
 import org.apache.wicket.util.string.Strings;
 
@@ -60,14 +58,14 @@
 	/**
 	 * Constructor
 	 * 
-	 * @param markupFragment
+	 * @param markup
 	 *            List of markup elements
 	 */
-	public MarkupStream(final Markup markupFragment)
+	public MarkupStream(final Markup markup)
 	{
-		this.markup = markupFragment;
+		this.markup = markup;
 
-		if (markupFragment.size() > 0)
+		if (markup.size() > 0)
 		{
 			current = get(currentIndex);
 		}
@@ -126,19 +124,19 @@
 	{
 		return current instanceof ComponentTag;
 	}
-
-	/**
-	 * Create an iterator for the component tags in the stream.
-	 * <p>
-	 * Note: it will not modify the current index of the underlying markup
-	 * stream
-	 * 
-	 * @return ComponentTagIterator
-	 */
-	public final Iterator componentTagIterator()
-	{
-		return markup.componentTagIterator(0, ComponentTag.class);
-	}
+//
+//	/**
+//	 * Create an iterator for the component tags in the stream.
+//	 * <p>
+//	 * Note: it will not modify the current index of the underlying markup
+//	 * stream
+//	 * 
+//	 * @return ComponentTagIterator
+//	 */
+//	public final Iterator componentTagIterator()
+//	{
+//		return markup.componentTagIterator(0, ComponentTag.class);
+//	}
 
 	/**
 	 * Compare this markup stream with another one
@@ -229,6 +227,16 @@
 	}
 
 	/**
+	 * @param index
+	 *            The index of a markup element
+	 * @return The MarkupElement element
+	 */
+	private MarkupElement get(final int index)
+	{
+		return markup.get(index);
+	}
+
+	/**
 	 * Get the component/container's Class which is directly associated with the
 	 * stream.
 	 * 
@@ -417,6 +425,30 @@
 	}
 
 	/**
+	 * Renders markup until a closing tag for openTag is reached.
+	 * 
+	 * @param openTag
+	 *            The open tag
+	 */
+	public void skipToMatchingCloseTag(final ComponentTag openTag)
+	{
+		// Loop through the markup in this container
+		while (hasMore())
+		{
+			// If the current markup tag closes the openTag
+			if (get().closes(openTag))
+			{
+				// Done!
+				return;
+			}
+
+			// Skip element
+			next();
+		}
+		throwMarkupException("Expected close tag for " + openTag);
+	}
+
+	/**
 	 * Throws a new markup exception
 	 * 
 	 * @param message
@@ -463,39 +495,5 @@
 	{
 		return "[markup = " + String.valueOf(markup) + ", index = " + currentIndex + ", current = "
 				+ ((current == null) ? "null" : current.toUserDebugString()) + "]";
-	}
-
-	/**
-	 * @param index
-	 *            The index of a markup element
-	 * @return The MarkupElement element
-	 */
-	private MarkupElement get(final int index)
-	{
-		return markup.get(index);
-	}
-
-	/**
-	 * Renders markup until a closing tag for openTag is reached.
-	 * 
-	 * @param openTag
-	 *            The open tag
-	 */
-	private void skipToMatchingCloseTag(final ComponentTag openTag)
-	{
-		// Loop through the markup in this container
-		while (hasMore())
-		{
-			// If the current markup tag closes the openTag
-			if (get().closes(openTag))
-			{
-				// Done!
-				return;
-			}
-
-			// Skip element
-			next();
-		}
-		throwMarkupException("Expected close tag for " + openTag);
 	}
 }