You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by hl...@apache.org on 2011/05/22 21:08:40 UTC
svn commit: r1126161 - in /tapestry/tapestry5/trunk: ./
tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/
tapestry-javadoc/ tapestry-javadoc/src/ tapestry-javadoc/src/main/
tapestry-javadoc/src/main/java/ tapestry-javadoc/src/main/ja...
Author: hlship
Date: Sun May 22 19:08:40 2011
New Revision: 1126161
URL: http://svn.apache.org/viewvc?rev=1126161&view=rev
Log:
TAP5-1528: Add skelton of Tapestry JavaDoc taglet
Added:
tapestry/tapestry5/trunk/tapestry-javadoc/
tapestry/tapestry5/trunk/tapestry-javadoc/build.gradle
tapestry/tapestry5/trunk/tapestry-javadoc/src/
tapestry/tapestry5/trunk/tapestry-javadoc/src/main/
tapestry/tapestry5/trunk/tapestry-javadoc/src/main/java/
tapestry/tapestry5/trunk/tapestry-javadoc/src/main/java/org/
tapestry/tapestry5/trunk/tapestry-javadoc/src/main/java/org/apache/
tapestry/tapestry5/trunk/tapestry-javadoc/src/main/java/org/apache/tapestry5/
tapestry/tapestry5/trunk/tapestry-javadoc/src/main/java/org/apache/tapestry5/javadoc/
tapestry/tapestry5/trunk/tapestry-javadoc/src/main/java/org/apache/tapestry5/javadoc/TapestryDocTaglet.java
Modified:
tapestry/tapestry5/trunk/build.gradle
tapestry/tapestry5/trunk/settings.gradle
tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Zone.java
Modified: tapestry/tapestry5/trunk/build.gradle
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/build.gradle?rev=1126161&r1=1126160&r2=1126161&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/build.gradle (original)
+++ tapestry/tapestry5/trunk/build.gradle Sun May 22 19:08:40 2011
@@ -91,6 +91,14 @@ subprojects {
}
}
+configurations {
+ javadoc
+}
+
+dependencies {
+ javadoc project(':tapestry-javadoc')
+}
+
subprojects.each { evaluationDependsOn(it.name) }
// Cribbed from https://github.com/hibernate/hibernate-core/blob/master/release/release.gradle#L19
@@ -109,6 +117,8 @@ task aggregateJavadoc(type: Javadoc) {
bottom = "Copyright © 2003-2011 <a href=\"http://tapestry.apache.org\">The Apache Software Foundation</a>."
use = true
links = [ 'http://download.oracle.com/javase/6/docs/api/', 'http://download.oracle.com/javaee/6/api/' ]
+ addStringOption "tagletpath", configurations.javadoc.asPath
+ addStringOption "taglet", "org.apache.tapestry5.javadoc.TapestryDocTaglet"
}
subprojects.each { subProject->
Modified: tapestry/tapestry5/trunk/settings.gradle
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/settings.gradle?rev=1126161&r1=1126160&r2=1126161&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/settings.gradle (original)
+++ tapestry/tapestry5/trunk/settings.gradle Sun May 22 19:08:40 2011
@@ -1,5 +1,5 @@
include "plastic", "tapestry-annotations", "tapestry-test", "tapestry-func", "tapestry-ioc", "tapestry-json", "tapestry-core"
include "tapestry-hibernate-core", "tapestry-hibernate", "tapestry-jmx", "tapestry-upload", "tapestry-spring"
-include "tapestry-beanvalidator", "tapestry-yuicompressor", "tapestry-jpa"
+include "tapestry-beanvalidator", "tapestry-yuicompressor", "tapestry-jpa", "tapestry-javadoc"
// TODO (LATER): tapestry-component-report, quickstart
Modified: tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Zone.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Zone.java?rev=1126161&r1=1126160&r2=1126161&view=diff
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Zone.java (original)
+++ tapestry/tapestry5/trunk/tapestry-core/src/main/java/org/apache/tapestry5/corelib/components/Zone.java Sun May 22 19:08:40 2011
@@ -1,4 +1,4 @@
-// Copyright 2007, 2008, 2009, 2010 The Apache Software Foundation
+// Copyright 2007, 2008, 2009, 2010, 2011 The Apache Software Foundation
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
@@ -78,6 +78,8 @@ import org.slf4j.Logger;
* <p/>
* After the client-side content is updated, a client-side event is fired on the zone's element. The constant
* Tapestry.ZONE_UPDATED_EVENT can be used to listen to the event.
+ *
+ * @tapestrydoc
*/
@SupportsInformalParameters
public class Zone implements ClientBodyElement
Added: tapestry/tapestry5/trunk/tapestry-javadoc/build.gradle
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-javadoc/build.gradle?rev=1126161&view=auto
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-javadoc/build.gradle (added)
+++ tapestry/tapestry5/trunk/tapestry-javadoc/build.gradle Sun May 22 19:08:40 2011
@@ -0,0 +1,8 @@
+description = "JavaDoc Plugin for Tapestry that generates component reference documentation for component classes"
+
+dependencies {
+ compile project(':tapestry5-annotations')
+
+ provided "javax.servlet:servlet-api:$servletAPIVersion"
+
+}
\ No newline at end of file
Added: tapestry/tapestry5/trunk/tapestry-javadoc/src/main/java/org/apache/tapestry5/javadoc/TapestryDocTaglet.java
URL: http://svn.apache.org/viewvc/tapestry/tapestry5/trunk/tapestry-javadoc/src/main/java/org/apache/tapestry5/javadoc/TapestryDocTaglet.java?rev=1126161&view=auto
==============================================================================
--- tapestry/tapestry5/trunk/tapestry-javadoc/src/main/java/org/apache/tapestry5/javadoc/TapestryDocTaglet.java (added)
+++ tapestry/tapestry5/trunk/tapestry-javadoc/src/main/java/org/apache/tapestry5/javadoc/TapestryDocTaglet.java Sun May 22 19:08:40 2011
@@ -0,0 +1,86 @@
+// Copyright 2011 The Apache Software Foundation
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+package org.apache.tapestry5.javadoc;
+
+import java.util.Map;
+
+import com.sun.javadoc.Tag;
+import com.sun.tools.doclets.Taglet;
+
+/**
+ * An inline tag allowed inside a type; it produces Tapestry component reference and other information.
+ */
+public class TapestryDocTaglet implements Taglet
+{
+ private static final String NAME = "tapestrydoc";
+
+ @SuppressWarnings("unchecked")
+ public static void register(Map paramMap)
+ {
+ paramMap.put(NAME, new TapestryDocTaglet());
+ }
+
+ public boolean inField()
+ {
+ return false;
+ }
+
+ public boolean inConstructor()
+ {
+ return false;
+ }
+
+ public boolean inMethod()
+ {
+ return false;
+ }
+
+ public boolean inOverview()
+ {
+ return false;
+ }
+
+ public boolean inPackage()
+ {
+ return false;
+ }
+
+ public boolean inType()
+ {
+ return true;
+ }
+
+ public boolean isInlineTag()
+ {
+ return true;
+ }
+
+ public String getName()
+ {
+ return NAME;
+ }
+
+ public String toString(Tag paramTag)
+ {
+ return String.format("<em>TapestryDoc: %s</em>", paramTag.holder());
+ }
+
+ // Never called for an inline tag.
+ public String toString(Tag[] paramArrayOfTag)
+ {
+ return null;
+ }
+
+}