Skip to main content
aboutsummaryrefslogtreecommitdiffstats
path: root/doc
diff options
context:
space:
mode:
authormfeldman2007-04-02 14:08:06 -0400
committermfeldman2007-04-02 14:08:06 -0400
commit2335694cd7ec68959f0affb43e12c5b723f1b84e (patch)
treeba198d9855383130262f94f1ed59c82518b79cba /doc
parent80a7064376f570aefdc5dcbebcf406936fdafb67 (diff)
downloadorg.eclipse.gmf-tooling-2335694cd7ec68959f0affb43e12c5b723f1b84e.tar.gz
org.eclipse.gmf-tooling-2335694cd7ec68959f0affb43e12c5b723f1b84e.tar.xz
org.eclipse.gmf-tooling-2335694cd7ec68959f0affb43e12c5b723f1b84e.zip
Doclet updated for Java 1.5 and repackaged
Diffstat (limited to 'doc')
-rw-r--r--doc/org.eclipse.gmf.doclet/.classpath7
-rw-r--r--doc/org.eclipse.gmf.doclet/.project17
-rw-r--r--doc/org.eclipse.gmf.doclet/build.properties17
-rw-r--r--doc/org.eclipse.gmf.doclet/build.xml38
-rw-r--r--doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/Doclet.java401
-rw-r--r--doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/ITagDefinitions.java29
-rw-r--r--doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ClassDocProxy.java298
-rw-r--r--doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ComparableProxy.java43
-rw-r--r--doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ConstructorDocProxy.java42
-rw-r--r--doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/DocProxy.java243
-rw-r--r--doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ExecutableMemberDocProxy.java131
-rw-r--r--doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/FieldDocProxy.java85
-rw-r--r--doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/MemberDocProxy.java43
-rw-r--r--doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/MethodDocProxy.java79
-rw-r--r--doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/PackageDocProxy.java109
-rw-r--r--doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ParamTagProxy.java56
-rw-r--r--doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ParameterProxy.java66
-rw-r--r--doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ProgramElementDocProxy.java131
-rw-r--r--doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/Proxy.java37
-rw-r--r--doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ProxyFactory.java1064
-rw-r--r--doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ProxyRegistry.java41
-rw-r--r--doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ProxyUtil.java29
-rw-r--r--doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/RootDocProxy.java273
-rw-r--r--doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/SeeTagProxy.java86
-rw-r--r--doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/SerialFieldTagProxy.java83
-rw-r--r--doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/TagProxy.java92
-rw-r--r--doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ThrowsTagProxy.java65
-rw-r--r--doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/TypeProxy.java101
-rw-r--r--doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/utils/AliasRegistry.java42
-rw-r--r--doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/utils/MapsGenerator.java198
-rw-r--r--doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/utils/NamespaceChecker.java145
-rw-r--r--doc/org.eclipse.gmf.doclet/tools.jarbin0 -> 12159158 bytes
32 files changed, 4091 insertions, 0 deletions
diff --git a/doc/org.eclipse.gmf.doclet/.classpath b/doc/org.eclipse.gmf.doclet/.classpath
new file mode 100644
index 000000000..74300d7df
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/.classpath
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+ <classpathentry kind="src" path="src"/>
+ <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
+ <classpathentry kind="lib" path="tools.jar"/>
+ <classpathentry kind="output" path="bin"/>
+</classpath>
diff --git a/doc/org.eclipse.gmf.doclet/.project b/doc/org.eclipse.gmf.doclet/.project
new file mode 100644
index 000000000..f9677bb7b
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/.project
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+ <name>org.eclipse.gmf.doclet</name>
+ <comment></comment>
+ <projects>
+ </projects>
+ <buildSpec>
+ <buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ </buildSpec>
+ <natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
+ </natures>
+</projectDescription>
diff --git a/doc/org.eclipse.gmf.doclet/build.properties b/doc/org.eclipse.gmf.doclet/build.properties
new file mode 100644
index 000000000..e82bc2ddd
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/build.properties
@@ -0,0 +1,17 @@
+# ==============================================================================
+#*+------------------------------------------------------------------------+
+#*| Copyright (c) 2005 IBM Corporation and others. |
+#*| All rights reserved. This program and the accompanying materials |
+#*| are made available under the terms of the Eclipse Public License v1.0 |
+#*| which accompanies this distribution, and is available at |
+#*| http://www.eclipse.org/legal/epl-v10.html |
+#*| |
+#*| Contributors: |
+#*| IBM Corporation - initial API and implementation |
+#*+------------------------------------------------------------------------+
+# ==============================================================================
+jars.compile.order = doclet.jar
+source.doclet.jar = src/
+output.doclet.jar = bin/
+bin.includes = tools.jar,\
+ doclet.jar
diff --git a/doc/org.eclipse.gmf.doclet/build.xml b/doc/org.eclipse.gmf.doclet/build.xml
new file mode 100644
index 000000000..0e2a142e7
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/build.xml
@@ -0,0 +1,38 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright (c) 2005 IBM Corporation and others. -->
+<!-- All rights reserved. This program and the accompanying materials -->
+<!-- are made available under the terms of the Eclipse Public License v1.0 -->
+<!-- which accompanies this distribution, and is available at -->
+<!-- http://www.eclipse.org/legal/epl-v10.html -->
+<!-- -->
+<!-- Contributors: -->
+<!-- IBM Corporation - initial API and implementation -->
+<project default="jar" basedir=".">
+
+ <target name="jar">
+ <jar destfile="${basedir}/doclet.jar" basedir="${basedir}/bin" />
+ </target>
+
+ <path id="project.classpath">
+ <pathelement location="bin" />
+ <pathelement location="${basedir}/tools.jar" />
+ </path>
+
+ <target name="init">
+ <mkdir dir="bin" />
+ </target>
+
+ <target name="clean">
+ <delete dir="bin" />
+ </target>
+
+ <target name="build" depends="init">
+ <javac destdir="bin" source="1.5" target="1.5">
+ <src path="src" />
+ <classpath refid="project.classpath" />
+ </javac>
+ </target>
+
+ <target name="build.jar" depends="build,jar" />
+
+</project>
diff --git a/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/Doclet.java b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/Doclet.java
new file mode 100644
index 000000000..6b4b06026
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/Doclet.java
@@ -0,0 +1,401 @@
+/******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ ****************************************************************************/
+
+package org.eclipse.gmf.runtime.doclet;
+
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.text.Collator;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Properties;
+import java.util.TreeSet;
+
+import org.eclipse.gmf.runtime.doclet.proxies.ProxyFactory;
+import org.eclipse.gmf.runtime.doclet.utils.AliasRegistry;
+import org.eclipse.gmf.runtime.doclet.utils.MapsGenerator;
+import org.eclipse.gmf.runtime.doclet.utils.NamespaceChecker;
+
+import com.sun.javadoc.ClassDoc;
+import com.sun.javadoc.DocErrorReporter;
+import com.sun.javadoc.PackageDoc;
+import com.sun.javadoc.RootDoc;
+import com.sun.tools.doclets.standard.Standard;
+
+
+/**
+ * Main entry point of the doclet, this doclet offers support for the
+ * special namespace-based accessibility rules and generates Eclipse TOC for
+ * exported packages
+ */
+public class Doclet extends Standard
+{
+
+ private static final String CMDLINE_OPTION_CLIENT_CONTEXT = "-clientContext"; //$NON-NLS-1$
+
+ private static final String CMDLINE_OPTION_NAMESPACE_ALIAS = "-namespaceAlias"; //$NON-NLS-1$
+
+ private static final String CMDLINE_OPTION_NAMESPACE_ALIASES = "-namespaceAliases"; //$NON-NLS-1$
+
+ private static final String CMDLINE_OPTION_TOC_FILENAME = "-tocFilename"; //$NON-NLS-1$
+
+ private static final String CMDLINE_OPTION_TOC_REF_PREFIX = "-tocRefPrefix"; //$NON-NLS-1$
+
+ private static final String CMDLINE_OPTION_TOC_TITLE = "-tocTitle"; //$NON-NLS-1$
+
+ private static final String CMDLINE_OPTION_TOC_LINK_TO = "-tocLinkTo"; //$NON-NLS-1$
+
+ private static String clientContext = ""; //$NON-NLS-1$
+
+ private static NamespaceChecker namespaceChecker = null;
+
+ private static AliasRegistry aliasRegistry = null;
+
+ private static File tocFile = null;
+
+ private static String tocRefPrefix = "reference/api/"; //$NON-NLS-1$
+
+ private static String tocTitle = "API Reference"; //$NON-NLS-1$
+
+ private static String tocLinkTo = ""; //$NON-NLS-1$
+
+ public static boolean start(RootDoc root)
+ {
+
+ readOptions(root.options(), root);
+ RootDoc rootDocProxy = getRootDocProxy(root);
+ boolean startRet = Standard.start(rootDocProxy);
+ outputToc(rootDocProxy);
+
+ return startRet;
+ }
+
+ public static int optionLength(String option)
+ {
+
+ if (option.equals(CMDLINE_OPTION_CLIENT_CONTEXT))
+ {
+ return 2;
+ }
+ if (option.equals(CMDLINE_OPTION_NAMESPACE_ALIAS))
+ {
+ return 2;
+ }
+ if (option.equals(CMDLINE_OPTION_NAMESPACE_ALIASES))
+ {
+ return 2;
+ }
+ if (option.equals(CMDLINE_OPTION_TOC_FILENAME))
+ {
+ return 2;
+ }
+ if (option.equals(CMDLINE_OPTION_TOC_REF_PREFIX))
+ {
+ return 2;
+ }
+ if (option.equals(CMDLINE_OPTION_TOC_TITLE))
+ {
+ return 2;
+ }
+ if (option.equals(CMDLINE_OPTION_TOC_LINK_TO))
+ {
+ return 2;
+ }
+ return Standard.optionLength(option);
+ }
+
+ public static boolean validOptions(String options[][], DocErrorReporter reporter)
+ {
+
+ boolean foundClientContextOption = false;
+
+ for (int i = 0; i < options.length; i++)
+ {
+ String[] opt = options[i];
+
+ if (opt[0].equals(CMDLINE_OPTION_CLIENT_CONTEXT))
+ {
+ if (foundClientContextOption)
+ {
+ reporter.printError("Only one " + CMDLINE_OPTION_CLIENT_CONTEXT + " option allowed."); //$NON-NLS-1$ //$NON-NLS-2$
+ return false;
+ }
+ else
+ {
+ foundClientContextOption = true;
+ }
+ }
+ else if (opt[0].equals(CMDLINE_OPTION_NAMESPACE_ALIAS))
+ {
+ String arg = opt[1];
+ int equalPos = arg.indexOf('=');
+ if (equalPos <= 0 || equalPos >= arg.length() - 2)
+ {
+ reporter.printError("Invalid " + CMDLINE_OPTION_NAMESPACE_ALIAS + ": " + arg); //$NON-NLS-1$ //$NON-NLS-2$
+ return false;
+ }
+ }
+ else if (opt[0].equals(CMDLINE_OPTION_NAMESPACE_ALIASES))
+ {
+ String arg = opt[1];
+ File file = new File(arg);
+ if (!file.exists())
+ {
+ reporter.printError("No such file in " + CMDLINE_OPTION_NAMESPACE_ALIASES + ": " + arg); //$NON-NLS-1$ //$NON-NLS-2$
+ return false;
+ }
+ }
+ else if (opt[0].equals(CMDLINE_OPTION_TOC_FILENAME))
+ {
+ String arg = opt[1];
+ if (arg == null || arg.length() == 0)
+ {
+ reporter.printError("Unable to create TOC file: \"" + arg + "\""); //$NON-NLS-1$ //$NON-NLS-2$
+ return false;
+ }
+ else
+ {
+ File file = new File(arg);
+ if (file.isDirectory())
+ {
+ reporter.printError("Unable to create TOC file: \"" + arg + "\" is a directory"); //$NON-NLS-1$ //$NON-NLS-2$
+ return false;
+ }
+ }
+ }
+ else if (opt[0].equals(CMDLINE_OPTION_TOC_REF_PREFIX))
+ {
+ String arg = opt[1];
+ if (arg == null || arg.length() == 0)
+ {
+ reporter.printError("Invalid " + CMDLINE_OPTION_TOC_REF_PREFIX + ": " + arg); //$NON-NLS-1$ //$NON-NLS-2$
+ return false;
+ }
+ }
+ else if (opt[0].equals(CMDLINE_OPTION_TOC_TITLE))
+ {
+ String arg = opt[1];
+ if (arg == null || arg.length() == 0)
+ {
+ reporter.printError("Invalid " + CMDLINE_OPTION_TOC_TITLE + ": " + arg); //$NON-NLS-1$ //$NON-NLS-2$
+ return false;
+ }
+ }
+ }
+
+ return Standard.validOptions(options, reporter);
+ }
+
+ private static void readOptions(String[][] options, DocErrorReporter reporter)
+ {
+
+ aliasRegistry = new AliasRegistry();
+
+ for (int i = 0; i < options.length; i++)
+ {
+ String[] opt = options[i];
+ if (opt[0].equals(CMDLINE_OPTION_CLIENT_CONTEXT))
+ {
+ clientContext = opt[1];
+ }
+ else if (opt[0].equals(CMDLINE_OPTION_NAMESPACE_ALIAS))
+ {
+ String arg = opt[1];
+ int equalPos = arg.indexOf('=');
+ if (equalPos > 0 && equalPos < arg.length() - 2)
+ {
+ String alias = arg.substring(0, equalPos);
+ String value = arg.substring(equalPos + 1);
+ aliasRegistry.registerAlias(alias, value);
+ }
+ }
+ else if (opt[0].equals(CMDLINE_OPTION_NAMESPACE_ALIASES))
+ {
+ readNamespaceAliases(opt[1], reporter);
+ }
+ else if (opt[0].equals(CMDLINE_OPTION_TOC_FILENAME))
+ {
+ String arg = opt[1];
+ File file = new File(arg);
+ try
+ {
+ file.delete();
+ if (file.createNewFile())
+ {
+ tocFile = file;
+ reporter.printNotice("TOC Pathname: " + file.getAbsolutePath()); //$NON-NLS-1$
+ }
+ }
+ catch (IOException e)
+ {
+ reporter.printError("Could not create TOC file: \"" + arg + "\""); //$NON-NLS-1$ //$NON-NLS-2$
+ }
+ }
+ else if (opt[0].equals(CMDLINE_OPTION_TOC_REF_PREFIX))
+ {
+ tocRefPrefix = opt[1];
+ reporter.printNotice("TOC REF Prefix: " + tocRefPrefix); //$NON-NLS-1$
+ }
+ else if (opt[0].equals(CMDLINE_OPTION_TOC_TITLE))
+ {
+ tocTitle = opt[1];
+ reporter.printNotice("TOC Title: " + tocTitle); //$NON-NLS-1$
+ }
+ else if (opt[0].equals(CMDLINE_OPTION_TOC_LINK_TO))
+ {
+ tocLinkTo = opt[1].trim();
+ reporter.printNotice("TOC Link To: " + tocLinkTo); //$NON-NLS-1$
+ }
+ }
+
+ /* Check for alias for the client context */
+ String aliasValue = getAliasRegistry().getAliasValue(clientContext);
+ if (aliasValue != null)
+ {
+ clientContext = aliasValue;
+ }
+
+ }
+
+ private static void readNamespaceAliases(String fileName, DocErrorReporter reporter)
+ {
+ Properties namespaceAliases = new Properties();
+
+ try
+ {
+ FileInputStream fis = new FileInputStream(fileName);
+ namespaceAliases.load(fis);
+ fis.close();
+
+ for (Iterator iter = namespaceAliases.entrySet().iterator(); iter.hasNext();)
+ {
+ Map.Entry next = (Map.Entry)iter.next();
+
+ aliasRegistry.registerAlias((String)next.getKey(), (String)next.getValue());
+ }
+ }
+ catch (IOException e)
+ {
+ reporter.printError("Could not read namespace aliases from " + fileName //$NON-NLS-1$
+ + ": " + e.getLocalizedMessage()); //$NON-NLS-1$
+ }
+ }
+
+ public static NamespaceChecker getNamespaceChecker()
+ {
+ return namespaceChecker;
+ }
+
+ public static AliasRegistry getAliasRegistry()
+ {
+ return aliasRegistry;
+ }
+
+ private static RootDoc getRootDocProxy(RootDoc root)
+ {
+
+ MapsGenerator mapGenerator = new MapsGenerator(root, getAliasRegistry());
+
+ namespaceChecker = new NamespaceChecker(clientContext, mapGenerator.getCanBeSeeByMap());
+
+ RootDoc retRootDoc = ProxyFactory.getInstance().createRootDocProxy(root);
+ // printOptions(retRootDoc.options());
+ return retRootDoc;
+ }
+
+ private static void outputToc(RootDoc rootDoc)
+ {
+ if (tocFile == null)
+ return;
+
+ try
+ {
+ FileOutputStream fos = new FileOutputStream(tocFile);
+ PrintWriter pw = new PrintWriter(fos);
+ pw.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); //$NON-NLS-1$
+ pw.println("<?NLS TYPE=\"org.eclipse.help.toc\"?>"); //$NON-NLS-1$
+ pw.println();
+
+ String linkToText = ""; //$NON-NLS-1$
+ if (tocLinkTo.length() > 0)
+ {
+ linkToText = " link_to=\"" + tocLinkTo + "\""; //$NON-NLS-1$ //$NON-NLS-2$
+ }
+
+ String tocText = "<toc" + linkToText + " label=\"Reference\">"; //$NON-NLS-1$ //$NON-NLS-2$
+ pw.println(tocText);
+
+ pw.println("\t<topic label=\"" + tocTitle + "\" href=\"" + tocRefPrefix + "overview-summary.html\">"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+
+ /* Gather list of packages and sort by name */
+ TreeSet treeSet = new TreeSet(Collator.getInstance());
+ ClassDoc classDocs[] = rootDoc.classes();
+ if (classDocs != null)
+ {
+ for (int i = 0; i < classDocs.length; i++)
+ {
+ ClassDoc classDoc = classDocs[i];
+ PackageDoc packageDoc = classDoc.containingPackage();
+ if (packageDoc != null)
+ {
+ treeSet.add(packageDoc.name());
+ }
+ }
+ }
+
+ /* Iterate over each package name and output a topic entry */
+ for (Iterator iter = treeSet.iterator(); iter.hasNext();)
+ {
+ String packageName = (String)iter.next();
+ String packagePath = packageName.replace('.', '/');
+ pw.println("\t\t<topic label=\"" + packageName + "\" href=\"" + tocRefPrefix + packagePath + "/package-summary.html\" />"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ }
+
+ pw.println("\t</topic>"); //$NON-NLS-1$
+ pw.println("</toc>"); //$NON-NLS-1$
+
+ pw.close();
+
+ }
+ catch (FileNotFoundException e)
+ {
+ rootDoc.printError("Cannot find tocFile: " + tocFile.getAbsolutePath()); //$NON-NLS-1$
+ }
+
+ }
+
+ // private static void printOptions(String options[][]) {
+ // System.out.println();
+ // System.out
+ // .println("************************* START Options
+ // ***************************"); //$NON-NLS-1$
+ // System.out.println();
+ // for (int i = 0; i < options.length; i++) {
+ // String[] opt = options[i];
+ // for (int j = 0; j < opt.length; j++) {
+ // String string = opt[j];
+ // System.out.print(string + " "); //$NON-NLS-1$
+ // }
+ // System.out.println();
+ // }
+ // System.out.println();
+ // System.out
+ // .println("************************* END Options
+ // ***************************"); //$NON-NLS-1$
+ // System.out.println();
+ // }
+
+} \ No newline at end of file
diff --git a/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/ITagDefinitions.java b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/ITagDefinitions.java
new file mode 100644
index 000000000..513b4d870
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/ITagDefinitions.java
@@ -0,0 +1,29 @@
+/******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ ****************************************************************************/
+
+package org.eclipse.gmf.runtime.doclet;
+
+
+/**
+ * New tags supported by the Doclet
+ */
+public interface ITagDefinitions
+{
+ public static final String TAG_CAN_BE_SEEN_BY = "canBeSeenBy"; //$NON-NLS-1$
+
+ public static final String TAG_CAN_BE_IMPLEMENTED_BY = "canBeImplementedBy "; //$NON-NLS-1$
+
+ public static final String TAG_CAN_BE_SUBCLASSED_BY = "canBeSubclassedBy"; //$NON-NLS-1$
+
+ public static final String TAG_CAN_BE_INSTANTIATED_BY = "canBeInstantiatedBy"; //$NON-NLS-1$
+
+ public static final String TAG_CAN_BE_EXECUTED_BY = "canBeExecutedBy"; //$NON-NLS-1$
+}
diff --git a/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ClassDocProxy.java b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ClassDocProxy.java
new file mode 100644
index 000000000..48f131c85
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ClassDocProxy.java
@@ -0,0 +1,298 @@
+/******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ ****************************************************************************/
+
+package org.eclipse.gmf.runtime.doclet.proxies;
+
+import com.sun.javadoc.AnnotationDesc;
+import com.sun.javadoc.AnnotationTypeDoc;
+import com.sun.javadoc.ClassDoc;
+import com.sun.javadoc.ConstructorDoc;
+import com.sun.javadoc.FieldDoc;
+import com.sun.javadoc.MethodDoc;
+import com.sun.javadoc.PackageDoc;
+import com.sun.javadoc.ParamTag;
+import com.sun.javadoc.ParameterizedType;
+import com.sun.javadoc.Type;
+import com.sun.javadoc.TypeVariable;
+import com.sun.javadoc.WildcardType;
+
+
+/**
+ * Proxy to a ClassDoc
+ */
+public class ClassDocProxy
+ extends ProgramElementDocProxy
+ implements ClassDoc {
+
+ private Type type;
+
+ public ClassDocProxy(ClassDoc innerClassDoc) {
+ super (innerClassDoc);
+ type = new TypeProxy(innerClassDoc);
+ }
+
+ private ClassDoc getInnerClassDoc() {
+ return (ClassDoc)getInnerObject();
+ }
+
+ private Type getType() {
+ return type;
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ClassDoc#definesSerializableFields()
+ */
+ public boolean definesSerializableFields() {
+ return getInnerClassDoc().definesSerializableFields();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ClassDoc#isAbstract()
+ */
+ public boolean isAbstract() {
+ return getInnerClassDoc().isAbstract();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ClassDoc#isExternalizable()
+ */
+ public boolean isExternalizable() {
+ return getInnerClassDoc().isExternalizable();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ClassDoc#isSerializable()
+ */
+ public boolean isSerializable() {
+ return getInnerClassDoc().isSerializable();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ClassDoc#superclass()
+ */
+ public ClassDoc superclass() {
+ return FACTORY.createClassDocProxy(getInnerClassDoc().superclass());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ClassDoc#importedClasses()
+ */
+ public ClassDoc[] importedClasses() {
+ return FACTORY.createClassDocProxies(getInnerClassDoc().importedClasses());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ClassDoc#innerClasses()
+ */
+ public ClassDoc[] innerClasses() {
+ return FACTORY.createClassDocProxies(getInnerClassDoc().innerClasses());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ClassDoc#interfaces()
+ */
+ public ClassDoc[] interfaces() {
+ return FACTORY.createClassDocProxies(getInnerClassDoc().interfaces());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ClassDoc#subclassOf(com.sun.javadoc.ClassDoc)
+ */
+ public boolean subclassOf(ClassDoc arg0) {
+ return getInnerClassDoc().subclassOf((ClassDoc)ProxyUtil.getInnerObject(arg0));
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ClassDoc#innerClasses(boolean)
+ */
+ public ClassDoc[] innerClasses(boolean arg0) {
+ return getInnerClassDoc().innerClasses(arg0);
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ClassDoc#constructors()
+ */
+ public ConstructorDoc[] constructors() {
+ return FACTORY.createConstructorDocProxies(getInnerClassDoc().constructors());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ClassDoc#constructors(boolean)
+ */
+ public ConstructorDoc[] constructors(boolean arg0) {
+ return FACTORY.createConstructorDocProxies(getInnerClassDoc().constructors(arg0));
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ClassDoc#fields()
+ */
+ public FieldDoc[] fields() {
+ return FACTORY.createFieldDocProxies(getInnerClassDoc().fields());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ClassDoc#serializableFields()
+ */
+ public FieldDoc[] serializableFields() {
+ return FACTORY.createFieldDocProxies(getInnerClassDoc().serializableFields());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ClassDoc#fields(boolean)
+ */
+ public FieldDoc[] fields(boolean arg0) {
+ return FACTORY.createFieldDocProxies(getInnerClassDoc().fields(arg0));
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ClassDoc#methods()
+ */
+ public MethodDoc[] methods() {
+ return FACTORY.createMethodDocProxies(getInnerClassDoc().methods());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ClassDoc#serializationMethods()
+ */
+ public MethodDoc[] serializationMethods() {
+ return FACTORY.createMethodDocProxies(getInnerClassDoc().serializationMethods());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ClassDoc#methods(boolean)
+ */
+ public MethodDoc[] methods(boolean arg0) {
+ return FACTORY.createMethodDocProxies(getInnerClassDoc().methods(arg0));
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ClassDoc#importedPackages()
+ */
+ public PackageDoc[] importedPackages() {
+ return FACTORY.createPackageDocProxies(getInnerClassDoc().importedPackages());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ClassDoc#findClass(java.lang.String)
+ */
+ public ClassDoc findClass(String arg0) {
+ return FACTORY.createClassDocProxy(getInnerClassDoc().findClass(arg0));
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.Type#asClassDoc()
+ */
+ public ClassDoc asClassDoc() {
+ return getType().asClassDoc();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.Type#dimension()
+ */
+ public String dimension() {
+ return getType().dimension();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.Type#qualifiedTypeName()
+ */
+ public String qualifiedTypeName() {
+ return getType().qualifiedTypeName();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.Type#typeName()
+ */
+ public String typeName() {
+ return getType().typeName();
+ }
+
+ public FieldDoc[] enumConstants()
+ {
+ return null;
+ }
+
+ public Type[] interfaceTypes()
+ {
+ return null;
+ }
+
+ public Type superclassType()
+ {
+ return null;
+ }
+
+ public ParamTag[] typeParamTags()
+ {
+ return null;
+ }
+
+ public TypeVariable[] typeParameters()
+ {
+ return null;
+ }
+
+ public AnnotationDesc[] annotations()
+ {
+ return null;
+ }
+
+ public boolean isAnnotationType()
+ {
+ return false;
+ }
+
+ public boolean isAnnotationTypeElement()
+ {
+ return false;
+ }
+
+ public boolean isEnum()
+ {
+ return false;
+ }
+
+ public boolean isEnumConstant()
+ {
+ return false;
+ }
+
+ public AnnotationTypeDoc asAnnotationTypeDoc()
+ {
+ return null;
+ }
+
+ public ParameterizedType asParameterizedType()
+ {
+ return null;
+ }
+
+ public TypeVariable asTypeVariable()
+ {
+ return null;
+ }
+
+ public WildcardType asWildcardType()
+ {
+ return null;
+ }
+
+ public boolean isPrimitive()
+ {
+ return false;
+ }
+
+ public String simpleTypeName()
+ {
+ return null;
+ }
+
+}
diff --git a/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ComparableProxy.java b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ComparableProxy.java
new file mode 100644
index 000000000..4321b1123
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ComparableProxy.java
@@ -0,0 +1,43 @@
+/******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ ****************************************************************************/
+
+package org.eclipse.gmf.runtime.doclet.proxies;
+
+
+/**
+ * Proxy to a Comparable
+ */
+public class ComparableProxy extends Proxy implements Comparable<Object>
+{
+
+ public ComparableProxy(Comparable innerComparable)
+ {
+ super(innerComparable);
+ }
+
+ private Comparable getInnerComparable()
+ {
+ return (Comparable)getInnerObject();
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Comparable#compareTo(java.lang.Object)
+ */
+ public int compareTo(Object o)
+ {
+ if (o instanceof Proxy)
+ {
+ o = ((Proxy)o).getInnerObject();
+ }
+ return getInnerComparable().compareTo(o);
+ }
+
+}
diff --git a/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ConstructorDocProxy.java b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ConstructorDocProxy.java
new file mode 100644
index 000000000..693aac23b
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ConstructorDocProxy.java
@@ -0,0 +1,42 @@
+/******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ ****************************************************************************/
+
+package org.eclipse.gmf.runtime.doclet.proxies;
+
+
+import com.sun.javadoc.ConstructorDoc;
+import com.sun.javadoc.ExecutableMemberDoc;
+
+
+/**
+ * Proxy to a ConstructorDoc
+ */
+public class ConstructorDocProxy extends ExecutableMemberDocProxy implements ConstructorDoc
+{
+
+ public ConstructorDocProxy(ExecutableMemberDoc innerConstructorDoc)
+ {
+ super(innerConstructorDoc);
+ }
+
+ private ConstructorDoc getInnerConstructorDoc()
+ {
+ return (ConstructorDoc)getInnerObject();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ProgramElementDoc#qualifiedName()
+ */
+ public String qualifiedName()
+ {
+ return getInnerConstructorDoc().qualifiedName();
+ }
+}
diff --git a/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/DocProxy.java b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/DocProxy.java
new file mode 100644
index 000000000..c610856f0
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/DocProxy.java
@@ -0,0 +1,243 @@
+/******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ ****************************************************************************/
+
+package org.eclipse.gmf.runtime.doclet.proxies;
+
+
+import org.eclipse.gmf.runtime.doclet.Doclet;
+
+import com.sun.javadoc.Doc;
+import com.sun.javadoc.PackageDoc;
+import com.sun.javadoc.ProgramElementDoc;
+import com.sun.javadoc.RootDoc;
+import com.sun.javadoc.SeeTag;
+import com.sun.javadoc.SourcePosition;
+import com.sun.javadoc.Tag;
+
+/**
+ * Proxy to a Doc
+ */
+public class DocProxy extends ComparableProxy implements Doc
+{
+
+ public DocProxy(Doc innerDoc)
+ {
+ super(innerDoc);
+ }
+
+ private Doc getInnerDoc()
+ {
+ return (Doc)getInnerObject();
+ }
+
+ /* (non-Javadoc)
+ * @see Doc#isClass()
+ */
+ public boolean isClass()
+ {
+ return getInnerDoc().isClass();
+ }
+
+ /* (non-Javadoc)
+ * @see Doc#isConstructor()
+ */
+ public boolean isConstructor()
+ {
+ return getInnerDoc().isConstructor();
+ }
+
+ /* (non-Javadoc)
+ * @see Doc#isError()
+ */
+ public boolean isError()
+ {
+ return getInnerDoc().isError();
+ }
+
+ /* (non-Javadoc)
+ * @see Doc#isException()
+ */
+ public boolean isException()
+ {
+ return getInnerDoc().isException();
+ }
+
+ /* (non-Javadoc)
+ * @see Doc#isField()
+ */
+ public boolean isField()
+ {
+ return getInnerDoc().isField();
+ }
+
+ /* (non-Javadoc)
+ * @see Doc#isIncluded()
+ */
+ public boolean isIncluded()
+ {
+
+ boolean isIncluded = getInnerDoc().isIncluded();
+
+ /* If included, extra filtering may be caused by @canBeSeenBy tags */
+ if (isIncluded)
+ {
+ if (getInnerDoc() instanceof PackageDoc)
+ {
+ PackageDoc packageDoc = (PackageDoc)getInnerDoc();
+ String qualifiedName = packageDoc.name();
+ if (Doclet.getNamespaceChecker().isClientPreventedToSee(qualifiedName))
+ {
+ isIncluded = false;
+ }
+ }
+ else if (getInnerDoc() instanceof ProgramElementDoc)
+ {
+ ProgramElementDoc programElementDoc = (ProgramElementDoc)getInnerDoc();
+ String qualifiedName = programElementDoc.qualifiedName();
+ if (Doclet.getNamespaceChecker().isClientPreventedToSee(qualifiedName))
+ {
+ isIncluded = false;
+ }
+ }
+ else if (getInnerDoc() instanceof RootDoc)
+ {
+ isIncluded = true;
+ }
+ }
+
+ return isIncluded;
+ }
+
+ /* (non-Javadoc)
+ * @see Doc#isInterface()
+ */
+ public boolean isInterface()
+ {
+ return getInnerDoc().isInterface();
+ }
+
+ /* (non-Javadoc)
+ * @see Doc#isMethod()
+ */
+ public boolean isMethod()
+ {
+ return getInnerDoc().isMethod();
+ }
+
+ /* (non-Javadoc)
+ * @see Doc#isOrdinaryClass()
+ */
+ public boolean isOrdinaryClass()
+ {
+ return getInnerDoc().isOrdinaryClass();
+ }
+
+ /* (non-Javadoc)
+ * @see Doc#seeTags()
+ */
+ public SeeTag[] seeTags()
+ {
+ return getInnerDoc().seeTags();
+ }
+
+ /* (non-Javadoc)
+ * @see Doc#position()
+ */
+ public SourcePosition position()
+ {
+ return getInnerDoc().position();
+ }
+
+ /* (non-Javadoc)
+ * @see Doc#firstSentenceTags()
+ */
+ public Tag[] firstSentenceTags()
+ {
+ return getInnerDoc().firstSentenceTags();
+ }
+
+ /* (non-Javadoc)
+ * @see Doc#inlineTags()
+ */
+ public Tag[] inlineTags()
+ {
+ return getInnerDoc().inlineTags();
+ }
+
+ /* (non-Javadoc)
+ * @see Doc#tags()
+ */
+ public Tag[] tags()
+ {
+ return getInnerDoc().tags();
+ }
+
+ /* (non-Javadoc)
+ * @see Doc#commentText()
+ */
+ public String commentText()
+ {
+ return getInnerDoc().commentText();
+ }
+
+ /* (non-Javadoc)
+ * @see Doc#getRawCommentText()
+ */
+ public String getRawCommentText()
+ {
+ return getInnerDoc().getRawCommentText();
+ }
+
+ /* (non-Javadoc)
+ * @see Doc#name()
+ */
+ public String name()
+ {
+ return getInnerDoc().name();
+ }
+
+ /* (non-Javadoc)
+ * @see Doc#setRawCommentText(java.lang.String)
+ */
+ public void setRawCommentText(String arg0)
+ {
+ getInnerDoc().setRawCommentText(arg0);
+ }
+
+ /* (non-Javadoc)
+ * @see Doc#tags(java.lang.String)
+ */
+ public Tag[] tags(String arg0)
+ {
+ return getInnerDoc().tags(arg0);
+ }
+
+ public boolean isAnnotationType()
+ {
+ return false;
+ }
+
+ public boolean isAnnotationTypeElement()
+ {
+ return false;
+ }
+
+ public boolean isEnum()
+ {
+ return false;
+ }
+
+ public boolean isEnumConstant()
+ {
+ return false;
+ }
+
+}
diff --git a/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ExecutableMemberDocProxy.java b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ExecutableMemberDocProxy.java
new file mode 100644
index 000000000..0a1557724
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ExecutableMemberDocProxy.java
@@ -0,0 +1,131 @@
+/******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ ****************************************************************************/
+
+package org.eclipse.gmf.runtime.doclet.proxies;
+
+
+import com.sun.javadoc.AnnotationDesc;
+import com.sun.javadoc.ClassDoc;
+import com.sun.javadoc.ExecutableMemberDoc;
+import com.sun.javadoc.ParamTag;
+import com.sun.javadoc.Parameter;
+import com.sun.javadoc.ThrowsTag;
+import com.sun.javadoc.Type;
+import com.sun.javadoc.TypeVariable;
+
+
+/**
+ * Proxy to an ExecutableMemberDoc
+ */
+
+public class ExecutableMemberDocProxy extends MemberDocProxy implements ExecutableMemberDoc
+{
+
+ public ExecutableMemberDocProxy(ExecutableMemberDoc innerExecutableMemberDoc)
+ {
+ super(innerExecutableMemberDoc);
+ }
+
+ private ExecutableMemberDoc getInnerExecutableMemberDoc()
+ {
+ return (ExecutableMemberDoc)getInnerObject();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ExecutableMemberDoc#isNative()
+ */
+ public boolean isNative()
+ {
+ return getInnerExecutableMemberDoc().isNative();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ExecutableMemberDoc#isSynchronized()
+ */
+ public boolean isSynchronized()
+ {
+ return getInnerExecutableMemberDoc().isSynchronized();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ExecutableMemberDoc#thrownExceptions()
+ */
+ public ClassDoc[] thrownExceptions()
+ {
+ return FACTORY.createClassDocProxies(getInnerExecutableMemberDoc().thrownExceptions());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ExecutableMemberDoc#paramTags()
+ */
+ public ParamTag[] paramTags()
+ {
+ return getInnerExecutableMemberDoc().paramTags();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ExecutableMemberDoc#parameters()
+ */
+ public Parameter[] parameters()
+ {
+ return FACTORY.createParameterProxies(getInnerExecutableMemberDoc().parameters());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ExecutableMemberDoc#throwsTags()
+ */
+ public ThrowsTag[] throwsTags()
+ {
+ return FACTORY.createThrowsTagProxies(getInnerExecutableMemberDoc().throwsTags());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ExecutableMemberDoc#flatSignature()
+ */
+ public String flatSignature()
+ {
+ return getInnerExecutableMemberDoc().flatSignature();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ExecutableMemberDoc#signature()
+ */
+ public String signature()
+ {
+ return getInnerExecutableMemberDoc().signature();
+ }
+
+ public boolean isVarArgs()
+ {
+ return false;
+ }
+
+ public Type[] thrownExceptionTypes()
+ {
+ return null;
+ }
+
+ public ParamTag[] typeParamTags()
+ {
+ return null;
+ }
+
+ public TypeVariable[] typeParameters()
+ {
+ return null;
+ }
+
+ public AnnotationDesc[] annotations()
+ {
+ return null;
+ }
+
+}
diff --git a/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/FieldDocProxy.java b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/FieldDocProxy.java
new file mode 100644
index 000000000..600e3feb8
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/FieldDocProxy.java
@@ -0,0 +1,85 @@
+/******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ ****************************************************************************/
+
+package org.eclipse.gmf.runtime.doclet.proxies;
+
+
+import com.sun.javadoc.FieldDoc;
+import com.sun.javadoc.SerialFieldTag;
+import com.sun.javadoc.Type;
+
+
+/**
+ * Proxy to a FieldDoc
+ */
+
+public class FieldDocProxy extends MemberDocProxy implements FieldDoc
+{
+
+ public FieldDocProxy(FieldDoc innerFieldDoc)
+ {
+ super(innerFieldDoc);
+ }
+
+ private FieldDoc getInnerFieldDoc()
+ {
+ return (FieldDoc)getInnerObject();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.FieldDoc#isTransient()
+ */
+ public boolean isTransient()
+ {
+ return getInnerFieldDoc().isTransient();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.FieldDoc#isVolatile()
+ */
+ public boolean isVolatile()
+ {
+ return getInnerFieldDoc().isVolatile();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.FieldDoc#serialFieldTags()
+ */
+ public SerialFieldTag[] serialFieldTags()
+ {
+ return FACTORY.createSerialFieldTagProxies(getInnerFieldDoc().serialFieldTags());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.FieldDoc#type()
+ */
+ public Type type()
+ {
+ return (Type)FACTORY.createTypeProxy(getInnerFieldDoc().type());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.FieldDoc#constantValue()
+ */
+ public Object constantValue()
+ {
+ return getInnerFieldDoc().constantValue();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.FieldDoc#constantValueExpression()
+ */
+ public String constantValueExpression()
+ {
+ return getInnerFieldDoc().constantValueExpression();
+ }
+
+}
diff --git a/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/MemberDocProxy.java b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/MemberDocProxy.java
new file mode 100644
index 000000000..c977f3e60
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/MemberDocProxy.java
@@ -0,0 +1,43 @@
+/******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ ****************************************************************************/
+
+package org.eclipse.gmf.runtime.doclet.proxies;
+
+
+import com.sun.javadoc.MemberDoc;
+
+
+/**
+ * Proxy to a MemberDoc
+ */
+
+public class MemberDocProxy extends ProgramElementDocProxy implements MemberDoc
+{
+
+ public MemberDocProxy(MemberDoc innerMemberDoc)
+ {
+ super(innerMemberDoc);
+ }
+
+ private MemberDoc getInnerMemberDoc()
+ {
+ return (MemberDoc)getInnerObject();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.MemberDoc#isSynthetic()
+ */
+ public boolean isSynthetic()
+ {
+ return getInnerMemberDoc().isSynthetic();
+ }
+
+}
diff --git a/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/MethodDocProxy.java b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/MethodDocProxy.java
new file mode 100644
index 000000000..5b284c5b0
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/MethodDocProxy.java
@@ -0,0 +1,79 @@
+/******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ ****************************************************************************/
+
+package org.eclipse.gmf.runtime.doclet.proxies;
+
+
+import com.sun.javadoc.ClassDoc;
+import com.sun.javadoc.MethodDoc;
+import com.sun.javadoc.Type;
+
+
+/**
+ * Proxy to a MethodDoc
+ */
+
+public class MethodDocProxy extends ExecutableMemberDocProxy implements MethodDoc
+{
+
+ public MethodDocProxy(MethodDoc innerMethodDoc)
+ {
+ super(innerMethodDoc);
+ }
+
+ private MethodDoc getInnerMethodDoc()
+ {
+ return (MethodDoc)getInnerObject();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.MethodDoc#isAbstract()
+ */
+ public boolean isAbstract()
+ {
+ return getInnerMethodDoc().isAbstract();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.MethodDoc#overriddenClass()
+ */
+ public ClassDoc overriddenClass()
+ {
+ return FACTORY.createClassDocProxy(getInnerMethodDoc().overriddenClass());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.MethodDoc#overriddenMethod()
+ */
+ public MethodDoc overriddenMethod()
+ {
+ return FACTORY.createMethodDocProxy(getInnerMethodDoc().overriddenMethod());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.MethodDoc#returnType()
+ */
+ public Type returnType()
+ {
+ return (Type)FACTORY.createTypeProxy(getInnerMethodDoc().returnType());
+ }
+
+ public Type overriddenType()
+ {
+ return null;
+ }
+
+ public boolean overrides(MethodDoc arg0)
+ {
+ return false;
+ }
+
+}
diff --git a/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/PackageDocProxy.java b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/PackageDocProxy.java
new file mode 100644
index 000000000..bd99fbd7a
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/PackageDocProxy.java
@@ -0,0 +1,109 @@
+/******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ ****************************************************************************/
+
+package org.eclipse.gmf.runtime.doclet.proxies;
+
+
+import com.sun.javadoc.AnnotationDesc;
+import com.sun.javadoc.AnnotationTypeDoc;
+import com.sun.javadoc.ClassDoc;
+import com.sun.javadoc.PackageDoc;
+
+
+/**
+ * Proxy to a PackageDoc
+ */
+
+public class PackageDocProxy extends DocProxy implements PackageDoc
+{
+
+ public PackageDocProxy(PackageDoc innerPackageDoc)
+ {
+ super(innerPackageDoc);
+ }
+
+ private PackageDoc getInnerPackageDoc()
+ {
+ return (PackageDoc)getInnerObject();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.PackageDoc#allClasses()
+ */
+ public ClassDoc[] allClasses()
+ {
+ return ProxyFactory.getInstance().createClassDocProxies(getInnerPackageDoc().allClasses());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.PackageDoc#errors()
+ */
+ public ClassDoc[] errors()
+ {
+ return ProxyFactory.getInstance().createClassDocProxies(getInnerPackageDoc().errors());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.PackageDoc#exceptions()
+ */
+ public ClassDoc[] exceptions()
+ {
+ return ProxyFactory.getInstance().createClassDocProxies(getInnerPackageDoc().exceptions());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.PackageDoc#interfaces()
+ */
+ public ClassDoc[] interfaces()
+ {
+ return ProxyFactory.getInstance().createClassDocProxies(getInnerPackageDoc().interfaces());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.PackageDoc#ordinaryClasses()
+ */
+ public ClassDoc[] ordinaryClasses()
+ {
+ return ProxyFactory.getInstance().createClassDocProxies(getInnerPackageDoc().ordinaryClasses());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.PackageDoc#allClasses(boolean)
+ */
+ public ClassDoc[] allClasses(boolean arg0)
+ {
+ return ProxyFactory.getInstance().createClassDocProxies(getInnerPackageDoc().allClasses(arg0));
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.PackageDoc#findClass(java.lang.String)
+ */
+ public ClassDoc findClass(String arg0)
+ {
+ return ProxyFactory.getInstance().createClassDocProxy(getInnerPackageDoc().findClass(arg0));
+ }
+
+ public AnnotationTypeDoc[] annotationTypes()
+ {
+ return null;
+ }
+
+ public AnnotationDesc[] annotations()
+ {
+ return null;
+ }
+
+ public ClassDoc[] enums()
+ {
+ return null;
+ }
+
+}
diff --git a/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ParamTagProxy.java b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ParamTagProxy.java
new file mode 100644
index 000000000..b14e3387d
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ParamTagProxy.java
@@ -0,0 +1,56 @@
+/******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ ****************************************************************************/
+
+package org.eclipse.gmf.runtime.doclet.proxies;
+
+
+import com.sun.javadoc.ParamTag;
+
+
+/**
+ * Proxy to a ParamTag
+ */
+
+public class ParamTagProxy extends TagProxy implements ParamTag
+{
+
+ public ParamTagProxy(ParamTag innerParamTag)
+ {
+ super(innerParamTag);
+ }
+
+ private ParamTag getInnerParamTag()
+ {
+ return (ParamTag)getInnerObject();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ParamTag#parameterComment()
+ */
+ public String parameterComment()
+ {
+ return getInnerParamTag().parameterComment();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ParamTag#parameterName()
+ */
+ public String parameterName()
+ {
+ return getInnerParamTag().parameterName();
+ }
+
+ public boolean isTypeParameter()
+ {
+ return false;
+ }
+
+}
diff --git a/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ParameterProxy.java b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ParameterProxy.java
new file mode 100644
index 000000000..a5b319c1d
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ParameterProxy.java
@@ -0,0 +1,66 @@
+/******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ ****************************************************************************/
+
+package org.eclipse.gmf.runtime.doclet.proxies;
+
+
+import com.sun.javadoc.AnnotationDesc;
+import com.sun.javadoc.Parameter;
+import com.sun.javadoc.Type;
+
+
+/**
+ * Proxy to a Parameter
+ */
+
+public class ParameterProxy extends Proxy implements Parameter
+{
+
+ public ParameterProxy(Parameter innerParameter)
+ {
+ super(innerParameter);
+ }
+
+ private Parameter getInnerParameter()
+ {
+ return (Parameter)getInnerObject();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.Parameter#type()
+ */
+ public Type type()
+ {
+ return (Type)FACTORY.createTypeProxy(getInnerParameter().type());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.Parameter#name()
+ */
+ public String name()
+ {
+ return getInnerParameter().name();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.Parameter#typeName()
+ */
+ public String typeName()
+ {
+ return getInnerParameter().typeName();
+ }
+
+ public AnnotationDesc[] annotations()
+ {
+ return null;
+ }
+
+}
diff --git a/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ProgramElementDocProxy.java b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ProgramElementDocProxy.java
new file mode 100644
index 000000000..17861e185
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ProgramElementDocProxy.java
@@ -0,0 +1,131 @@
+/******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ ****************************************************************************/
+
+package org.eclipse.gmf.runtime.doclet.proxies;
+
+
+import com.sun.javadoc.AnnotationDesc;
+import com.sun.javadoc.ClassDoc;
+import com.sun.javadoc.PackageDoc;
+import com.sun.javadoc.ProgramElementDoc;
+
+
+/**
+ * Proxy to a ProgramElementDoc
+ */
+
+public class ProgramElementDocProxy extends DocProxy implements ProgramElementDoc
+{
+
+ public ProgramElementDocProxy(ProgramElementDoc innerProgramElementDoc)
+ {
+ super(innerProgramElementDoc);
+ }
+
+ private ProgramElementDoc getInnerProgramElementDoc()
+ {
+ return (ProgramElementDoc)getInnerObject();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ProgramElementDoc#modifierSpecifier()
+ */
+ public int modifierSpecifier()
+ {
+ return getInnerProgramElementDoc().modifierSpecifier();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ProgramElementDoc#isFinal()
+ */
+ public boolean isFinal()
+ {
+ return getInnerProgramElementDoc().isFinal();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ProgramElementDoc#isPackagePrivate()
+ */
+ public boolean isPackagePrivate()
+ {
+ return getInnerProgramElementDoc().isPackagePrivate();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ProgramElementDoc#isPrivate()
+ */
+ public boolean isPrivate()
+ {
+ return getInnerProgramElementDoc().isPrivate();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ProgramElementDoc#isProtected()
+ */
+ public boolean isProtected()
+ {
+ return getInnerProgramElementDoc().isProtected();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ProgramElementDoc#isPublic()
+ */
+ public boolean isPublic()
+ {
+ return getInnerProgramElementDoc().isPublic();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ProgramElementDoc#isStatic()
+ */
+ public boolean isStatic()
+ {
+ return getInnerProgramElementDoc().isStatic();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ProgramElementDoc#containingClass()
+ */
+ public ClassDoc containingClass()
+ {
+ return FACTORY.createClassDocProxy(getInnerProgramElementDoc().containingClass());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ProgramElementDoc#containingPackage()
+ */
+ public PackageDoc containingPackage()
+ {
+ return FACTORY.createPackageDocProxy(getInnerProgramElementDoc().containingPackage());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ProgramElementDoc#modifiers()
+ */
+ public String modifiers()
+ {
+ return getInnerProgramElementDoc().modifiers();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ProgramElementDoc#qualifiedName()
+ */
+ public String qualifiedName()
+ {
+ return getInnerProgramElementDoc().qualifiedName();
+ }
+
+ public AnnotationDesc[] annotations()
+ {
+ return null;
+ }
+
+}
diff --git a/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/Proxy.java b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/Proxy.java
new file mode 100644
index 000000000..d53a72c8a
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/Proxy.java
@@ -0,0 +1,37 @@
+/******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ ****************************************************************************/
+
+package org.eclipse.gmf.runtime.doclet.proxies;
+
+
+/**
+ * Base proxy class. Used to wrap an Standard Doclet object. Derived classes
+ * forward calls to the wrapped instance and wrap generally the returned object.
+ */
+
+public class Proxy
+{
+
+ protected Object innerObject;
+
+ protected static ProxyFactory FACTORY = ProxyFactory.getInstance();
+
+ public Proxy(Object innerObject)
+ {
+ this.innerObject = innerObject;
+ }
+
+ /*package*/Object getInnerObject()
+ {
+ return this.innerObject;
+ }
+
+}
diff --git a/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ProxyFactory.java b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ProxyFactory.java
new file mode 100644
index 000000000..11e90b95f
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ProxyFactory.java
@@ -0,0 +1,1064 @@
+/******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ ****************************************************************************/
+
+package org.eclipse.gmf.runtime.doclet.proxies;
+
+
+import java.util.ArrayList;
+
+import com.sun.javadoc.ClassDoc;
+import com.sun.javadoc.ConstructorDoc;
+import com.sun.javadoc.Doc;
+import com.sun.javadoc.ExecutableMemberDoc;
+import com.sun.javadoc.FieldDoc;
+import com.sun.javadoc.MemberDoc;
+import com.sun.javadoc.MethodDoc;
+import com.sun.javadoc.PackageDoc;
+import com.sun.javadoc.ParamTag;
+import com.sun.javadoc.Parameter;
+import com.sun.javadoc.ProgramElementDoc;
+import com.sun.javadoc.RootDoc;
+import com.sun.javadoc.SeeTag;
+import com.sun.javadoc.SerialFieldTag;
+import com.sun.javadoc.Tag;
+import com.sun.javadoc.ThrowsTag;
+import com.sun.javadoc.Type;
+
+
+/**
+ * Factory for proxy objects. Generate proxies for Object, typed Object, or collection.
+ * The factory is smart enough to always return the most derived proxy for a given element.
+ * The factory will always return the same proxy for a given object to wrap.
+ */
+
+public class ProxyFactory
+{
+
+ private ProxyRegistry proxyRegistry = null;
+
+ private static ProxyFactory instance = null;
+
+ public static ProxyFactory getInstance()
+ {
+ if (instance == null)
+ {
+ instance = new ProxyFactory();
+ }
+
+ return instance;
+ }
+
+ /*
+ * DocProxy Proxies
+ */
+
+ public DocProxy[] createDocProxies(Doc docs[])
+ {
+
+ ArrayList docProxies = new ArrayList();
+
+ for (int i = 0; i < docs.length; i++)
+ {
+ Doc doc = docs[i];
+ docProxies.add(createDocProxy(doc));
+ }
+
+ return (DocProxy[])docProxies.toArray(new DocProxy [0]);
+ }
+
+ public DocProxy createDocProxy(Object object)
+ {
+ DocProxy docProxy = null;
+
+ if (object instanceof DocProxy)
+ {
+ docProxy = (DocProxy)object;
+ }
+ else
+ {
+ if (object instanceof Doc)
+ {
+ docProxy = createDocProxy((Doc)object);
+ }
+ }
+
+ return docProxy;
+ }
+
+ public DocProxy createDocProxy(Doc doc)
+ {
+
+ DocProxy proxy = null;
+
+ if (doc != null)
+ {
+ proxy = (DocProxy)getProxyRegistry().getProxyForObject(doc);
+ if (proxy == null)
+ {
+ if (doc instanceof PackageDoc)
+ {
+ proxy = createPackageDocProxy((PackageDoc)doc);
+ }
+ else if (doc instanceof ProgramElementDoc)
+ {
+ proxy = createProgramElementDocProxy((ProgramElementDoc)doc);
+ }
+ else if (doc instanceof RootDoc)
+ {
+ proxy = createRootDocProxy((RootDoc)doc);
+ }
+ else
+ {
+ proxy = new DocProxy(doc);
+ ProxyFactory.getInstance().getProxyRegistry().registerProxy(doc, proxy);
+ }
+ }
+ }
+
+ return proxy;
+ }
+
+ /*
+ * PackageDoc Proxies
+ */
+
+ public PackageDocProxy[] createPackageDocProxies(PackageDoc packageDocs[])
+ {
+
+ ArrayList packageDocProxies = new ArrayList();
+
+ for (int i = 0; i < packageDocs.length; i++)
+ {
+ PackageDoc packageDoc = packageDocs[i];
+ packageDocProxies.add(createPackageDocProxy(packageDoc));
+ }
+
+ return (PackageDocProxy[])packageDocProxies.toArray(new PackageDocProxy [0]);
+ }
+
+ public PackageDocProxy createPackageDocProxy(Object object)
+ {
+ PackageDocProxy packageDocProxy = null;
+
+ if (object instanceof PackageDocProxy)
+ {
+ packageDocProxy = (PackageDocProxy)object;
+ }
+ else
+ {
+ if (object instanceof PackageDoc)
+ {
+ packageDocProxy = createPackageDocProxy((PackageDoc)object);
+ }
+ }
+
+ return packageDocProxy;
+ }
+
+ public PackageDocProxy createPackageDocProxy(PackageDoc packageDoc)
+ {
+
+ PackageDocProxy proxy = null;
+
+ if (packageDoc != null)
+ {
+ proxy = (PackageDocProxy)getProxyRegistry().getProxyForObject(packageDoc);
+ if (proxy == null)
+ {
+ proxy = new PackageDocProxy(packageDoc);
+ ProxyFactory.getInstance().getProxyRegistry().registerProxy(packageDoc, proxy);
+ }
+ }
+
+ return proxy;
+ }
+
+ /*
+ * ProgramElementDocProxy Proxies
+ */
+
+ public ProgramElementDocProxy[] createProgramElementDocProxies(ProgramElementDoc programElementDocs[])
+ {
+
+ ArrayList programElementDocProxies = new ArrayList();
+
+ for (int i = 0; i < programElementDocs.length; i++)
+ {
+ ProgramElementDoc programElementDoc = programElementDocs[i];
+ programElementDocProxies.add(createProgramElementDocProxy(programElementDoc));
+ }
+
+ return (ProgramElementDocProxy[])programElementDocProxies.toArray(new ProgramElementDocProxy [0]);
+ }
+
+ public ProgramElementDocProxy createProgramElementDocProxy(Object object)
+ {
+ ProgramElementDocProxy programElementDocProxy = null;
+
+ if (object instanceof ProgramElementDocProxy)
+ {
+ programElementDocProxy = (ProgramElementDocProxy)object;
+ }
+ else
+ {
+ if (object instanceof ProgramElementDoc)
+ {
+ programElementDocProxy = createProgramElementDocProxy((ProgramElementDoc)object);
+ }
+ }
+
+ return programElementDocProxy;
+ }
+
+ public ProgramElementDocProxy createProgramElementDocProxy(ProgramElementDoc programElementDoc)
+ {
+
+ ProgramElementDocProxy proxy = null;
+
+ if (programElementDoc != null)
+ {
+ proxy = (ProgramElementDocProxy)getProxyRegistry().getProxyForObject(programElementDoc);
+ if (proxy == null)
+ {
+ if (programElementDoc instanceof ClassDoc)
+ {
+ proxy = createClassDocProxy((ClassDoc)programElementDoc);
+ }
+ else if (programElementDoc instanceof MemberDoc)
+ {
+ proxy = createMemberDocProxy((MemberDoc)programElementDoc);
+ }
+ else
+ {
+ proxy = new ProgramElementDocProxy(programElementDoc);
+ ProxyFactory.getInstance().getProxyRegistry().registerProxy(programElementDoc, proxy);
+ }
+ }
+ }
+
+ return proxy;
+ }
+
+ /*
+ * RootDoc Proxies
+ */
+
+ public RootDocProxy createRootDocProxy(Object object)
+ {
+ RootDocProxy rootDocProxy = null;
+
+ if (object instanceof RootDocProxy)
+ {
+ rootDocProxy = (RootDocProxy)object;
+ }
+ else
+ {
+ if (object instanceof RootDoc)
+ {
+ rootDocProxy = createRootDocProxy((RootDoc)object);
+ }
+ }
+
+ return rootDocProxy;
+ }
+
+ public RootDocProxy createRootDocProxy(RootDoc rootDoc)
+ {
+
+ RootDocProxy proxy = null;
+
+ if (rootDoc != null)
+ {
+ proxy = (RootDocProxy)getProxyRegistry().getProxyForObject(rootDoc);
+ if (proxy == null)
+ {
+ proxy = new RootDocProxy(rootDoc);
+ ProxyFactory.getInstance().getProxyRegistry().registerProxy(rootDoc, proxy);
+ }
+ }
+
+ return proxy;
+ }
+
+ /*
+ * ClassDoc Proxies
+ */
+
+ public ClassDocProxy[] createClassDocProxies(ClassDoc classDocs[])
+ {
+
+ ArrayList classDocProxies = new ArrayList();
+
+ for (int i = 0; i < classDocs.length; i++)
+ {
+ ClassDoc classDoc = classDocs[i];
+ classDocProxies.add(createClassDocProxy(classDoc));
+ }
+
+ return (ClassDocProxy[])classDocProxies.toArray(new ClassDocProxy [0]);
+ }
+
+ public ClassDocProxy createClassDocProxy(Object object)
+ {
+ ClassDocProxy classDocProxy = null;
+
+ if (object instanceof ClassDocProxy)
+ {
+ classDocProxy = (ClassDocProxy)object;
+ }
+ else
+ {
+ if (object instanceof ClassDoc)
+ {
+ classDocProxy = createClassDocProxy((ClassDoc)object);
+ }
+ }
+
+ return classDocProxy;
+ }
+
+ public ClassDocProxy createClassDocProxy(ClassDoc classDoc)
+ {
+
+ ClassDocProxy proxy = null;
+
+ if (classDoc != null)
+ {
+ proxy = (ClassDocProxy)getProxyRegistry().getProxyForObject(classDoc);
+ if (proxy == null)
+ {
+ proxy = new ClassDocProxy(classDoc);
+ ProxyFactory.getInstance().getProxyRegistry().registerProxy(classDoc, proxy);
+ }
+ }
+
+ return proxy;
+ }
+
+ /*
+ * MemberDoc Proxies
+ */
+
+ public MemberDocProxy[] createMemberDocProxies(MemberDoc memberDocs[])
+ {
+
+ ArrayList memberDocProxies = new ArrayList();
+
+ for (int i = 0; i < memberDocs.length; i++)
+ {
+ MemberDoc memberDoc = memberDocs[i];
+ memberDocProxies.add(createMemberDocProxy(memberDoc));
+ }
+
+ return (MemberDocProxy[])memberDocProxies.toArray(new MemberDocProxy [0]);
+ }
+
+ public MemberDocProxy createMemberDocProxy(Object object)
+ {
+ MemberDocProxy memberDocProxy = null;
+
+ if (object instanceof MemberDocProxy)
+ {
+ memberDocProxy = (MemberDocProxy)object;
+ }
+ else
+ {
+ if (object instanceof MemberDoc)
+ {
+ memberDocProxy = createMemberDocProxy((MemberDoc)object);
+ }
+ }
+
+ return memberDocProxy;
+ }
+
+ public MemberDocProxy createMemberDocProxy(MemberDoc memberDoc)
+ {
+
+ MemberDocProxy proxy = null;
+
+ if (memberDoc != null)
+ {
+ proxy = (MemberDocProxy)getProxyRegistry().getProxyForObject(memberDoc);
+ if (proxy == null)
+ {
+ if (memberDoc instanceof ExecutableMemberDoc)
+ {
+ proxy = createExecutableMemberDocProxy((ExecutableMemberDoc)memberDoc);
+ }
+ else if (memberDoc instanceof FieldDoc)
+ {
+ proxy = createFieldDocProxy((FieldDoc)memberDoc);
+ }
+ else
+ {
+ proxy = new MemberDocProxy(memberDoc);
+ ProxyFactory.getInstance().getProxyRegistry().registerProxy(memberDoc, proxy);
+ }
+ }
+ }
+
+ return proxy;
+ }
+
+ /*
+ * ExecutableMemberDoc Proxies
+ */
+
+ public ExecutableMemberDocProxy[] createExecutableMemberDocProxies(ExecutableMemberDoc executableMemberDocs[])
+ {
+
+ ArrayList executableMemberDocProxies = new ArrayList();
+
+ for (int i = 0; i < executableMemberDocs.length; i++)
+ {
+ ExecutableMemberDoc executableMemberDoc = executableMemberDocs[i];
+ executableMemberDocProxies.add(createExecutableMemberDocProxy(executableMemberDoc));
+ }
+
+ return (ExecutableMemberDocProxy[])executableMemberDocProxies.toArray(new ExecutableMemberDocProxy [0]);
+ }
+
+ public ExecutableMemberDocProxy createExecutableMemberDocProxy(Object object)
+ {
+ ExecutableMemberDocProxy executableMemberDocProxy = null;
+
+ if (object instanceof ExecutableMemberDocProxy)
+ {
+ executableMemberDocProxy = (ExecutableMemberDocProxy)object;
+ }
+ else
+ {
+ if (object instanceof ExecutableMemberDoc)
+ {
+ executableMemberDocProxy = createExecutableMemberDocProxy((ExecutableMemberDoc)object);
+ }
+ }
+
+ return executableMemberDocProxy;
+ }
+
+ public ExecutableMemberDocProxy createExecutableMemberDocProxy(ExecutableMemberDoc executableMemberDoc)
+ {
+
+ ExecutableMemberDocProxy proxy = null;
+
+ if (executableMemberDoc != null)
+ {
+ proxy = (ExecutableMemberDocProxy)getProxyRegistry().getProxyForObject(executableMemberDoc);
+ if (proxy == null)
+ {
+ if (executableMemberDoc instanceof ConstructorDoc)
+ {
+ proxy = createConstructorDocProxy((ConstructorDoc)executableMemberDoc);
+ }
+ else if (executableMemberDoc instanceof MethodDoc)
+ {
+ proxy = createMethodDocProxy((MethodDoc)executableMemberDoc);
+ }
+ else
+ {
+ proxy = new ExecutableMemberDocProxy(executableMemberDoc);
+ ProxyFactory.getInstance().getProxyRegistry().registerProxy(executableMemberDoc, proxy);
+ }
+ }
+ }
+
+ return proxy;
+ }
+
+ /*
+ * FieldDoc Proxies
+ */
+
+ public FieldDocProxy[] createFieldDocProxies(FieldDoc fieldDocs[])
+ {
+
+ ArrayList fieldDocProxies = new ArrayList();
+
+ for (int i = 0; i < fieldDocs.length; i++)
+ {
+ FieldDoc fieldDoc = fieldDocs[i];
+ fieldDocProxies.add(createFieldDocProxy(fieldDoc));
+ }
+
+ return (FieldDocProxy[])fieldDocProxies.toArray(new FieldDocProxy [0]);
+ }
+
+ public FieldDocProxy createFieldDocProxy(Object object)
+ {
+ FieldDocProxy fieldDocProxy = null;
+
+ if (object instanceof FieldDocProxy)
+ {
+ fieldDocProxy = (FieldDocProxy)object;
+ }
+ else
+ {
+ if (object instanceof FieldDoc)
+ {
+ fieldDocProxy = createFieldDocProxy((FieldDoc)object);
+ }
+ }
+
+ return fieldDocProxy;
+ }
+
+ public FieldDocProxy createFieldDocProxy(FieldDoc fieldDoc)
+ {
+
+ FieldDocProxy proxy = null;
+
+ if (fieldDoc != null)
+ {
+ proxy = (FieldDocProxy)getProxyRegistry().getProxyForObject(fieldDoc);
+ if (proxy == null)
+ {
+ proxy = new FieldDocProxy(fieldDoc);
+ ProxyFactory.getInstance().getProxyRegistry().registerProxy(fieldDoc, proxy);
+ }
+ }
+
+ return proxy;
+ }
+
+ /*
+ * ContructorDoc Proxies
+ */
+
+ public ConstructorDocProxy[] createConstructorDocProxies(ConstructorDoc constructorDocs[])
+ {
+
+ ArrayList constructorDocProxies = new ArrayList();
+
+ for (int i = 0; i < constructorDocs.length; i++)
+ {
+ ConstructorDoc constructorDoc = constructorDocs[i];
+ constructorDocProxies.add(createConstructorDocProxy(constructorDoc));
+ }
+
+ return (ConstructorDocProxy[])constructorDocProxies.toArray(new ConstructorDocProxy [0]);
+ }
+
+ public ConstructorDocProxy createConstructorDocProxy(Object object)
+ {
+ ConstructorDocProxy constructorDocProxy = null;
+
+ if (object instanceof ConstructorDocProxy)
+ {
+ constructorDocProxy = (ConstructorDocProxy)object;
+ }
+ else
+ {
+ if (object instanceof ConstructorDoc)
+ {
+ constructorDocProxy = createConstructorDocProxy((ConstructorDoc)object);
+ }
+ }
+
+ return constructorDocProxy;
+ }
+
+ public ConstructorDocProxy createConstructorDocProxy(ConstructorDoc constructorDoc)
+ {
+
+ ConstructorDocProxy proxy = null;
+
+ if (constructorDoc != null)
+ {
+ proxy = (ConstructorDocProxy)getProxyRegistry().getProxyForObject(constructorDoc);
+ if (proxy == null)
+ {
+ proxy = new ConstructorDocProxy(constructorDoc);
+ ProxyFactory.getInstance().getProxyRegistry().registerProxy(constructorDoc, proxy);
+ }
+ }
+
+ return proxy;
+ }
+
+ /*
+ * MethodDoc Proxies
+ */
+
+ public MethodDocProxy[] createMethodDocProxies(MethodDoc methodDocs[])
+ {
+
+ ArrayList methodDocProxies = new ArrayList();
+
+ for (int i = 0; i < methodDocs.length; i++)
+ {
+ MethodDoc methodDoc = methodDocs[i];
+ methodDocProxies.add(createMethodDocProxy(methodDoc));
+ }
+
+ return (MethodDocProxy[])methodDocProxies.toArray(new MethodDocProxy [0]);
+ }
+
+ public MethodDocProxy createMethodDocProxy(Object object)
+ {
+ MethodDocProxy methodDocProxy = null;
+
+ if (object instanceof MethodDocProxy)
+ {
+ methodDocProxy = (MethodDocProxy)object;
+ }
+ else
+ {
+ if (object instanceof MethodDoc)
+ {
+ methodDocProxy = createMethodDocProxy((MethodDoc)object);
+ }
+ }
+
+ return methodDocProxy;
+ }
+
+ public MethodDocProxy createMethodDocProxy(MethodDoc methodDoc)
+ {
+
+ MethodDocProxy proxy = null;
+
+ if (methodDoc != null)
+ {
+ proxy = (MethodDocProxy)getProxyRegistry().getProxyForObject(methodDoc);
+ if (proxy == null)
+ {
+ proxy = new MethodDocProxy(methodDoc);
+ ProxyFactory.getInstance().getProxyRegistry().registerProxy(methodDoc, proxy);
+ }
+ }
+
+ return proxy;
+ }
+
+ /*
+ * Parameter Proxies
+ */
+
+ public ParameterProxy[] createParameterProxies(Parameter parameters[])
+ {
+
+ ArrayList parameterProxies = new ArrayList();
+
+ for (int i = 0; i < parameters.length; i++)
+ {
+ Parameter parameter = parameters[i];
+ parameterProxies.add(createParameterProxy(parameter));
+ }
+
+ return (ParameterProxy[])parameterProxies.toArray(new ParameterProxy [0]);
+ }
+
+ public ParameterProxy createParameterProxy(Object object)
+ {
+ ParameterProxy parameterProxy = null;
+
+ if (object instanceof ParameterProxy)
+ {
+ parameterProxy = (ParameterProxy)object;
+ }
+ else
+ {
+ if (object instanceof Parameter)
+ {
+ parameterProxy = createParameterProxy((Parameter)object);
+ }
+ }
+
+ return parameterProxy;
+ }
+
+ public ParameterProxy createParameterProxy(Parameter parameter)
+ {
+
+ ParameterProxy proxy = null;
+
+ if (parameter != null)
+ {
+ proxy = (ParameterProxy)getProxyRegistry().getProxyForObject(parameter);
+ if (proxy == null)
+ {
+ proxy = new ParameterProxy(parameter);
+ ProxyFactory.getInstance().getProxyRegistry().registerProxy(parameter, proxy);
+ }
+ }
+
+ return proxy;
+ }
+
+ /*
+ * Type Proxies
+ */
+
+ public Proxy[] createTypeProxies(Type types[])
+ {
+
+ ArrayList typeProxies = new ArrayList();
+
+ for (int i = 0; i < types.length; i++)
+ {
+ Type type = types[i];
+ typeProxies.add(createTypeProxy(type));
+ }
+
+ return (Proxy[])typeProxies.toArray(new Proxy [0]);
+ }
+
+ public Proxy createTypeProxy(Object object)
+ {
+ Proxy typeProxy = null;
+
+ if (object instanceof TypeProxy)
+ {
+ typeProxy = (TypeProxy)object;
+ }
+ else
+ {
+ if (object instanceof Type)
+ {
+ typeProxy = createTypeProxy((Type)object);
+ }
+ }
+
+ return typeProxy;
+ }
+
+ public Proxy createTypeProxy(Type type)
+ {
+
+ Proxy proxy = null;
+
+ if (type != null)
+ {
+ proxy = getProxyRegistry().getProxyForObject(type);
+ if (proxy == null)
+ {
+ if (type instanceof ClassDoc)
+ {
+ proxy = new ClassDocProxy((ClassDoc)type);
+ }
+ else
+ {
+ proxy = new TypeProxy(type);
+ }
+ ProxyFactory.getInstance().getProxyRegistry().registerProxy(type, proxy);
+ }
+ }
+
+ return proxy;
+ }
+
+ /*
+ * Tag Proxies
+ */
+
+ public TagProxy[] createTagProxies(Tag tags[])
+ {
+
+ ArrayList tagProxies = new ArrayList();
+
+ for (int i = 0; i < tags.length; i++)
+ {
+ Tag tag = tags[i];
+ tagProxies.add(createTagProxy(tag));
+ }
+
+ return (TagProxy[])tagProxies.toArray(new TagProxy [0]);
+ }
+
+ public TagProxy createTagProxy(Object object)
+ {
+ TagProxy tagProxy = null;
+
+ if (object instanceof TagProxy)
+ {
+ tagProxy = (TagProxy)object;
+ }
+ else
+ {
+ if (object instanceof Tag)
+ {
+ tagProxy = createTagProxy((Tag)object);
+ }
+ }
+
+ return tagProxy;
+ }
+
+ public TagProxy createTagProxy(Tag tag)
+ {
+
+ TagProxy proxy = null;
+
+ if (tag != null)
+ {
+ proxy = (TagProxy)getProxyRegistry().getProxyForObject(tag);
+ if (proxy == null)
+ {
+ if (tag instanceof ParamTag)
+ {
+ proxy = createParamTagProxy((ParamTag)tag);
+ }
+ else if (tag instanceof SeeTag)
+ {
+ proxy = createSeeTagProxy((SeeTag)tag);
+ }
+ else if (tag instanceof SerialFieldTag)
+ {
+ proxy = createSerialFieldTagProxy((SerialFieldTag)tag);
+ }
+ else if (tag instanceof ThrowsTag)
+ {
+ proxy = createThrowsTagProxy((ThrowsTag)tag);
+ }
+ else
+ {
+ proxy = new TagProxy(tag);
+ }
+
+ ProxyFactory.getInstance().getProxyRegistry().registerProxy(tag, proxy);
+ }
+ }
+
+ return proxy;
+ }
+
+ /*
+ * ParamTag Proxies
+ */
+
+ public ParamTagProxy[] createParamTagProxies(ParamTag paramTags[])
+ {
+
+ ArrayList paramTagProxies = new ArrayList();
+
+ for (int i = 0; i < paramTags.length; i++)
+ {
+ ParamTag paramTag = paramTags[i];
+ paramTagProxies.add(createParamTagProxy(paramTag));
+ }
+
+ return (ParamTagProxy[])paramTagProxies.toArray(new ParamTagProxy [0]);
+ }
+
+ public ParamTagProxy createParamTagProxy(Object object)
+ {
+ ParamTagProxy paramTagProxy = null;
+
+ if (object instanceof ParamTagProxy)
+ {
+ paramTagProxy = (ParamTagProxy)object;
+ }
+ else
+ {
+ if (object instanceof ParamTag)
+ {
+ paramTagProxy = createParamTagProxy((ParamTag)object);
+ }
+ }
+
+ return paramTagProxy;
+ }
+
+ public ParamTagProxy createParamTagProxy(ParamTag paramTag)
+ {
+
+ ParamTagProxy proxy = null;
+
+ if (paramTag != null)
+ {
+ proxy = (ParamTagProxy)getProxyRegistry().getProxyForObject(paramTag);
+ if (proxy == null)
+ {
+ proxy = new ParamTagProxy(paramTag);
+ ProxyFactory.getInstance().getProxyRegistry().registerProxy(paramTag, proxy);
+ }
+ }
+
+ return proxy;
+ }
+
+ /*
+ * SeeTag Proxies
+ */
+
+ public SeeTagProxy[] createSeeTagProxies(SeeTag seeTags[])
+ {
+
+ ArrayList seeTagProxies = new ArrayList();
+
+ for (int i = 0; i < seeTags.length; i++)
+ {
+ SeeTag seeTag = seeTags[i];
+ seeTagProxies.add(createSeeTagProxy(seeTag));
+ }
+
+ return (SeeTagProxy[])seeTagProxies.toArray(new SeeTagProxy [0]);
+ }
+
+ public SeeTagProxy createSeeTagProxy(Object object)
+ {
+ SeeTagProxy seeTagProxy = null;
+
+ if (object instanceof SeeTagProxy)
+ {
+ seeTagProxy = (SeeTagProxy)object;
+ }
+ else
+ {
+ if (object instanceof SeeTag)
+ {
+ seeTagProxy = createSeeTagProxy((SeeTag)object);
+ }
+ }
+
+ return seeTagProxy;
+ }
+
+ public SeeTagProxy createSeeTagProxy(SeeTag seeTag)
+ {
+
+ SeeTagProxy proxy = null;
+
+ if (seeTag != null)
+ {
+ proxy = (SeeTagProxy)getProxyRegistry().getProxyForObject(seeTag);
+ if (proxy == null)
+ {
+ proxy = new SeeTagProxy(seeTag);
+ ProxyFactory.getInstance().getProxyRegistry().registerProxy(seeTag, proxy);
+ }
+ }
+
+ return proxy;
+ }
+
+ /*
+ * ThrowsTag Proxies
+ */
+
+ public ThrowsTagProxy[] createThrowsTagProxies(ThrowsTag throwsTags[])
+ {
+
+ ArrayList throwsTagProxies = new ArrayList();
+
+ for (int i = 0; i < throwsTags.length; i++)
+ {
+ ThrowsTag throwsTag = throwsTags[i];
+ throwsTagProxies.add(createThrowsTagProxy(throwsTag));
+ }
+
+ return (ThrowsTagProxy[])throwsTagProxies.toArray(new ThrowsTagProxy [0]);
+ }
+
+ public ThrowsTagProxy createThrowsTagProxy(Object object)
+ {
+ ThrowsTagProxy throwsTagProxy = null;
+
+ if (object instanceof ThrowsTagProxy)
+ {
+ throwsTagProxy = (ThrowsTagProxy)object;
+ }
+ else
+ {
+ if (object instanceof ThrowsTag)
+ {
+ throwsTagProxy = createThrowsTagProxy((ThrowsTag)object);
+ }
+ }
+
+ return throwsTagProxy;
+ }
+
+ public ThrowsTagProxy createThrowsTagProxy(ThrowsTag throwsTag)
+ {
+
+ ThrowsTagProxy proxy = null;
+
+ if (throwsTag != null)
+ {
+ proxy = (ThrowsTagProxy)getProxyRegistry().getProxyForObject(throwsTag);
+ if (proxy == null)
+ {
+ proxy = new ThrowsTagProxy(throwsTag);
+ ProxyFactory.getInstance().getProxyRegistry().registerProxy(throwsTag, proxy);
+ }
+ }
+
+ return proxy;
+ }
+
+ /*
+ * SerialFieldTag Proxies
+ */
+
+ public SerialFieldTagProxy[] createSerialFieldTagProxies(SerialFieldTag serialFieldTags[])
+ {
+
+ ArrayList serialFieldTagProxies = new ArrayList();
+
+ for (int i = 0; i < serialFieldTags.length; i++)
+ {
+ SerialFieldTag serialFieldTag = serialFieldTags[i];
+ serialFieldTagProxies.add(createSerialFieldTagProxy(serialFieldTag));
+ }
+
+ return (SerialFieldTagProxy[])serialFieldTagProxies.toArray(new SerialFieldTagProxy [0]);
+ }
+
+ public SerialFieldTagProxy createSerialFieldTagProxy(Object object)
+ {
+ SerialFieldTagProxy serialFieldTagProxy = null;
+
+ if (object instanceof SerialFieldTagProxy)
+ {
+ serialFieldTagProxy = (SerialFieldTagProxy)object;
+ }
+ else
+ {
+ if (object instanceof SerialFieldTag)
+ {
+ serialFieldTagProxy = createSerialFieldTagProxy((SerialFieldTag)object);
+ }
+ }
+
+ return serialFieldTagProxy;
+ }
+
+ public SerialFieldTagProxy createSerialFieldTagProxy(SerialFieldTag serialFieldTag)
+ {
+
+ SerialFieldTagProxy proxy = null;
+
+ if (serialFieldTag != null)
+ {
+ proxy = (SerialFieldTagProxy)getProxyRegistry().getProxyForObject(serialFieldTag);
+ if (proxy == null)
+ {
+ proxy = new SerialFieldTagProxy(serialFieldTag);
+ ProxyFactory.getInstance().getProxyRegistry().registerProxy(serialFieldTag, proxy);
+ }
+ }
+
+ return proxy;
+ }
+
+ private ProxyFactory()
+ {
+ proxyRegistry = new ProxyRegistry();
+ }
+
+ /* package */ProxyRegistry getProxyRegistry()
+ {
+ return proxyRegistry;
+ }
+} \ No newline at end of file
diff --git a/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ProxyRegistry.java b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ProxyRegistry.java
new file mode 100644
index 000000000..b33bca2ee
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ProxyRegistry.java
@@ -0,0 +1,41 @@
+/******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ ****************************************************************************/
+
+package org.eclipse.gmf.runtime.doclet.proxies;
+
+
+import java.util.HashMap;
+
+
+/**
+ * Registry of proxies.
+ */
+public class ProxyRegistry
+{
+
+ private HashMap objectToProxyMap;
+
+ public ProxyRegistry()
+ {
+ this.objectToProxyMap = new HashMap();
+ }
+
+ public void registerProxy(Object object, Proxy proxy)
+ {
+ this.objectToProxyMap.put(object, proxy);
+ }
+
+ public Proxy getProxyForObject(Object object)
+ {
+ return (Proxy)this.objectToProxyMap.get(object);
+ }
+
+}
diff --git a/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ProxyUtil.java b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ProxyUtil.java
new file mode 100644
index 000000000..a5a522584
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ProxyUtil.java
@@ -0,0 +1,29 @@
+/******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ ****************************************************************************/
+
+package org.eclipse.gmf.runtime.doclet.proxies;
+
+
+/**
+ * Utility to deal with proxies
+ */
+public class ProxyUtil
+{
+
+ public static Object getInnerObject(Object possibleProxy)
+ {
+ if (possibleProxy instanceof Proxy)
+ {
+ possibleProxy = ((Proxy)possibleProxy).getInnerObject();
+ }
+ return possibleProxy;
+ }
+}
diff --git a/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/RootDocProxy.java b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/RootDocProxy.java
new file mode 100644
index 000000000..b8f58de45
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/RootDocProxy.java
@@ -0,0 +1,273 @@
+/******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ ****************************************************************************/
+
+package org.eclipse.gmf.runtime.doclet.proxies;
+
+
+import java.util.ArrayList;
+
+import org.eclipse.gmf.runtime.doclet.Doclet;
+import org.eclipse.gmf.runtime.doclet.ITagDefinitions;
+import com.sun.javadoc.ClassDoc;
+import com.sun.javadoc.PackageDoc;
+import com.sun.javadoc.RootDoc;
+import com.sun.javadoc.SourcePosition;
+
+
+/**
+ * Proxy to a RootDoc. Manages the filtering of classes and packages.
+ */
+
+public class RootDocProxy extends DocProxy implements RootDoc
+{
+
+ private ClassDoc[] filteredClasses = null;
+
+ private ClassDoc[] filteredSpecifiedClasses = null;
+
+ private PackageDoc[] filteredSpecifiedPackages = null;
+
+ private String options[][] = null;
+
+ public RootDocProxy(RootDoc innerRootDoc)
+ {
+ super(innerRootDoc);
+ setFilteredClasses(filterClasses(getInnerRootDoc().classes()));
+ setFilteredSpecifiedClasses(filterClasses(getInnerRootDoc().specifiedClasses()));
+ setFilteredPackages(filterPackages(getInnerRootDoc().specifiedPackages()));
+ }
+
+ private RootDoc getInnerRootDoc()
+ {
+ return (RootDoc)getInnerObject();
+ }
+
+ private ClassDoc[] getFilteredClasses()
+ {
+ return this.filteredClasses;
+ }
+
+ private void setFilteredClasses(ClassDoc[] filteredClasses)
+ {
+ this.filteredClasses = filteredClasses;
+ }
+
+ private ClassDoc[] getFilteredSpecifiedClasses()
+ {
+ return this.filteredSpecifiedClasses;
+ }
+
+ private void setFilteredSpecifiedClasses(ClassDoc[] filteredSpecifiedClasses)
+ {
+ this.filteredSpecifiedClasses = filteredSpecifiedClasses;
+ }
+
+ private PackageDoc[] getFilteredSpecifiedPackages()
+ {
+ return this.filteredSpecifiedPackages;
+ }
+
+ private void setFilteredPackages(PackageDoc[] filteredSpecifiedPackages)
+ {
+ this.filteredSpecifiedPackages = filteredSpecifiedPackages;
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.sun.javadoc.RootDoc#classes()
+ */
+ public ClassDoc[] classes()
+ {
+ return getFilteredClasses();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.sun.javadoc.RootDoc#specifiedClasses()
+ */
+
+ public ClassDoc[] specifiedClasses()
+ {
+ return getFilteredSpecifiedClasses();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.sun.javadoc.RootDoc#specifiedPackages()
+ */
+ public PackageDoc[] specifiedPackages()
+ {
+ return getFilteredSpecifiedPackages();
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.sun.javadoc.RootDoc#options()
+ */
+ public String[][] options()
+ {
+
+ if (this.options == null)
+ {
+ this.options = getOptions();
+ }
+
+ return this.options;
+ }
+
+ private String[][] getOptions()
+ {
+
+ String innerOptions[][] = getInnerRootDoc().options();
+
+ /* Regenerate a new array of options that includes our default options */
+ ArrayList augmentedOptions = new ArrayList();
+
+ for (int i = 0; i < innerOptions.length; i++)
+ {
+ String[] opt = innerOptions[i];
+ augmentedOptions.add(opt);
+ }
+
+ /* Ensure no warnings on our custom tags */
+ augmentedOptions.add(new String []{ "-tag", ITagDefinitions.TAG_CAN_BE_SEEN_BY + ":X" }); //$NON-NLS-1$//$NON-NLS-2$
+
+ return (String[][])augmentedOptions.toArray(new String [0] [0]);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.sun.javadoc.RootDoc#classNamed(java.lang.String)
+ */
+ public ClassDoc classNamed(String arg0)
+ {
+ return ProxyFactory.getInstance().createClassDocProxy(getInnerRootDoc().classNamed(arg0));
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.sun.javadoc.RootDoc#packageNamed(java.lang.String)
+ */
+ public PackageDoc packageNamed(String arg0)
+ {
+ return ProxyFactory.getInstance().createPackageDocProxy(getInnerRootDoc().packageNamed(arg0));
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.sun.javadoc.DocErrorReporter#printError(java.lang.String)
+ */
+ public void printError(String arg0)
+ {
+ getInnerRootDoc().printError(arg0);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.sun.javadoc.DocErrorReporter#printNotice(java.lang.String)
+ */
+ public void printNotice(String arg0)
+ {
+ getInnerRootDoc().printNotice(arg0);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.sun.javadoc.DocErrorReporter#printWarning(java.lang.String)
+ */
+ public void printWarning(String arg0)
+ {
+ getInnerRootDoc().printWarning(arg0);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.sun.javadoc.DocErrorReporter#printError(com.sun.javadoc.SourcePosition,
+ * java.lang.String)
+ */
+ public void printError(SourcePosition arg0, String arg1)
+ {
+ getInnerRootDoc().printError(arg0, arg1);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.sun.javadoc.DocErrorReporter#printNotice(com.sun.javadoc.SourcePosition,
+ * java.lang.String)
+ */
+ public void printNotice(SourcePosition arg0, String arg1)
+ {
+ getInnerRootDoc().printNotice(arg0, arg1);
+ }
+
+ /*
+ * (non-Javadoc)
+ *
+ * @see com.sun.javadoc.DocErrorReporter#printWarning(com.sun.javadoc.SourcePosition,
+ * java.lang.String)
+ */
+ public void printWarning(SourcePosition arg0, String arg1)
+ {
+ getInnerRootDoc().printWarning(arg0, arg1);
+ }
+
+ private ClassDoc[] filterClasses(ClassDoc[] classes)
+ {
+ ArrayList retClasses = new ArrayList();
+ for (int i = 0; i < classes.length; i++)
+ {
+ ClassDoc classDoc = classes[i];
+ if (false == isFiltered(classDoc))
+ {
+ retClasses.add(ProxyFactory.getInstance().createClassDocProxy(classDoc));
+ }
+
+ }
+ return (ClassDoc[])retClasses.toArray(new ClassDoc [0]);
+ }
+
+ private boolean isFiltered(ClassDoc classDoc)
+ {
+ return (Doclet.getNamespaceChecker().isClientPreventedToSee(classDoc.qualifiedName()));
+ }
+
+ private PackageDoc[] filterPackages(PackageDoc[] packages)
+ {
+ ArrayList retPackages = new ArrayList();
+ for (int i = 0; i < packages.length; i++)
+ {
+ PackageDoc packageDoc = packages[i];
+ if (false == isFiltered(packageDoc))
+ {
+ retPackages.add(ProxyFactory.getInstance().createPackageDocProxy(packageDoc));
+ }
+
+ }
+ return (PackageDoc[])retPackages.toArray(new PackageDoc [0]);
+ }
+
+ private boolean isFiltered(PackageDoc packageDoc)
+ {
+ return (Doclet.getNamespaceChecker().isClientPreventedToSee(packageDoc.name()));
+ }
+
+} \ No newline at end of file
diff --git a/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/SeeTagProxy.java b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/SeeTagProxy.java
new file mode 100644
index 000000000..5fcb3ea9c
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/SeeTagProxy.java
@@ -0,0 +1,86 @@
+/******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ ****************************************************************************/
+
+package org.eclipse.gmf.runtime.doclet.proxies;
+
+
+import com.sun.javadoc.ClassDoc;
+import com.sun.javadoc.MemberDoc;
+import com.sun.javadoc.PackageDoc;
+import com.sun.javadoc.SeeTag;
+
+
+/**
+ * Proxy to a SeeTag
+ */
+
+public class SeeTagProxy extends TagProxy implements SeeTag
+{
+
+ public SeeTagProxy(SeeTag innerSeeTag)
+ {
+ super(innerSeeTag);
+ }
+
+ private SeeTag getInnerSeeTag()
+ {
+ return (SeeTag)getInnerObject();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.SeeTag#referencedClass()
+ */
+ public ClassDoc referencedClass()
+ {
+ return FACTORY.createClassDocProxy(getInnerSeeTag().referencedClass());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.SeeTag#referencedMember()
+ */
+ public MemberDoc referencedMember()
+ {
+ return FACTORY.createMemberDocProxy(getInnerSeeTag().referencedMember());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.SeeTag#referencedPackage()
+ */
+ public PackageDoc referencedPackage()
+ {
+ return FACTORY.createPackageDocProxy(getInnerSeeTag().referencedPackage());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.SeeTag#label()
+ */
+ public String label()
+ {
+ return getInnerSeeTag().label();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.SeeTag#referencedClassName()
+ */
+ public String referencedClassName()
+ {
+ return getInnerSeeTag().referencedClassName();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.SeeTag#referencedMemberName()
+ */
+ public String referencedMemberName()
+ {
+ return getInnerSeeTag().referencedMemberName();
+ }
+
+}
diff --git a/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/SerialFieldTagProxy.java b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/SerialFieldTagProxy.java
new file mode 100644
index 000000000..627a9061e
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/SerialFieldTagProxy.java
@@ -0,0 +1,83 @@
+/******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ ****************************************************************************/
+
+package org.eclipse.gmf.runtime.doclet.proxies;
+
+
+import com.sun.javadoc.ClassDoc;
+import com.sun.javadoc.SerialFieldTag;
+
+
+/**
+ * Proxy to a SerialFieldTag
+ */
+
+public class SerialFieldTagProxy extends TagProxy implements SerialFieldTag
+{
+
+ private Comparable comparable;
+
+ public SerialFieldTagProxy(SerialFieldTag innerSerialFieldTag)
+ {
+ super(innerSerialFieldTag);
+ this.comparable = new ComparableProxy(innerSerialFieldTag);
+ }
+
+ private SerialFieldTag getInnerSerialFieldTag()
+ {
+ return (SerialFieldTag)getInnerObject();
+ }
+
+ private Comparable getComparable()
+ {
+ return comparable;
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.SerialFieldTag#fieldTypeDoc()
+ */
+ public ClassDoc fieldTypeDoc()
+ {
+ return FACTORY.createClassDocProxy(getInnerSerialFieldTag().fieldType());
+ }
+
+ /* (non-Javadoc)
+ * @see java.lang.Comparable#compareTo(java.lang.Object)
+ */
+ public int compareTo(Object arg0)
+ {
+ return getComparable().compareTo(arg0);
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.SerialFieldTag#description()
+ */
+ public String description()
+ {
+ return getInnerSerialFieldTag().description();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.SerialFieldTag#fieldName()
+ */
+ public String fieldName()
+ {
+ return getInnerSerialFieldTag().fieldName();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.SerialFieldTag#fieldType()
+ */
+ public String fieldType()
+ {
+ return getInnerSerialFieldTag().fieldType();
+ }
+}
diff --git a/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/TagProxy.java b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/TagProxy.java
new file mode 100644
index 000000000..f55def742
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/TagProxy.java
@@ -0,0 +1,92 @@
+/******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ ****************************************************************************/
+
+package org.eclipse.gmf.runtime.doclet.proxies;
+
+
+import com.sun.javadoc.Doc;
+import com.sun.javadoc.SourcePosition;
+import com.sun.javadoc.Tag;
+
+
+/**
+ * Proxy to a Tag
+ */
+
+public class TagProxy extends Proxy implements Tag
+{
+
+ public TagProxy(Tag innerTag)
+ {
+ super(innerTag);
+ }
+
+ private Tag getInnerTag()
+ {
+ return (Tag)getInnerObject();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.Tag#holder()
+ */
+ public Doc holder()
+ {
+ return FACTORY.createDocProxy(getInnerTag().holder());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.Tag#position()
+ */
+ public SourcePosition position()
+ {
+ return getInnerTag().position();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.Tag#firstSentenceTags()
+ */
+ public Tag[] firstSentenceTags()
+ {
+ return FACTORY.createTagProxies(getInnerTag().firstSentenceTags());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.Tag#inlineTags()
+ */
+ public Tag[] inlineTags()
+ {
+ return FACTORY.createTagProxies(getInnerTag().inlineTags());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.Tag#kind()
+ */
+ public String kind()
+ {
+ return getInnerTag().kind();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.Tag#name()
+ */
+ public String name()
+ {
+ return getInnerTag().name();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.Tag#text()
+ */
+ public String text()
+ {
+ return getInnerTag().text();
+ }
+}
diff --git a/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ThrowsTagProxy.java b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ThrowsTagProxy.java
new file mode 100644
index 000000000..7c4fe6f2d
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/ThrowsTagProxy.java
@@ -0,0 +1,65 @@
+/******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ ****************************************************************************/
+
+package org.eclipse.gmf.runtime.doclet.proxies;
+
+
+import com.sun.javadoc.ClassDoc;
+import com.sun.javadoc.ThrowsTag;
+import com.sun.javadoc.Type;
+
+
+/**
+ * Proxy to a ThrowsTag
+ */
+
+public class ThrowsTagProxy extends TagProxy implements ThrowsTag
+{
+
+ public ThrowsTagProxy(ThrowsTag innerThrowsTag)
+ {
+ super(innerThrowsTag);
+ }
+
+ private ThrowsTag getInnerThrowsTag()
+ {
+ return (ThrowsTag)getInnerObject();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ThrowsTag#exception()
+ */
+ public ClassDoc exception()
+ {
+ return FACTORY.createClassDocProxy(getInnerThrowsTag().exception());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ThrowsTag#exceptionComment()
+ */
+ public String exceptionComment()
+ {
+ return getInnerThrowsTag().exceptionComment();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.ThrowsTag#exceptionName()
+ */
+ public String exceptionName()
+ {
+ return getInnerThrowsTag().exceptionName();
+ }
+
+ public Type exceptionType()
+ {
+ return null;
+ }
+}
diff --git a/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/TypeProxy.java b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/TypeProxy.java
new file mode 100644
index 000000000..a492d432e
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/proxies/TypeProxy.java
@@ -0,0 +1,101 @@
+/******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ ****************************************************************************/
+
+package org.eclipse.gmf.runtime.doclet.proxies;
+
+
+import com.sun.javadoc.AnnotationTypeDoc;
+import com.sun.javadoc.ClassDoc;
+import com.sun.javadoc.ParameterizedType;
+import com.sun.javadoc.Type;
+import com.sun.javadoc.TypeVariable;
+import com.sun.javadoc.WildcardType;
+
+
+/**
+ * Proxy to a Type
+ */
+
+public class TypeProxy extends Proxy implements Type
+{
+
+ public TypeProxy(Type innerType)
+ {
+ super(innerType);
+ }
+
+ private Type getInnerType()
+ {
+ return (Type)getInnerObject();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.Type#asClassDoc()
+ */
+ public ClassDoc asClassDoc()
+ {
+ return FACTORY.createClassDocProxy(getInnerType().asClassDoc());
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.Type#dimension()
+ */
+ public String dimension()
+ {
+ return getInnerType().dimension();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.Type#qualifiedTypeName()
+ */
+ public String qualifiedTypeName()
+ {
+ return getInnerType().qualifiedTypeName();
+ }
+
+ /* (non-Javadoc)
+ * @see com.sun.javadoc.Type#typeName()
+ */
+ public String typeName()
+ {
+ return getInnerType().typeName();
+ }
+
+ public AnnotationTypeDoc asAnnotationTypeDoc()
+ {
+ return null;
+ }
+
+ public ParameterizedType asParameterizedType()
+ {
+ return null;
+ }
+
+ public TypeVariable asTypeVariable()
+ {
+ return null;
+ }
+
+ public WildcardType asWildcardType()
+ {
+ return null;
+ }
+
+ public boolean isPrimitive()
+ {
+ return false;
+ }
+
+ public String simpleTypeName()
+ {
+ return null;
+ }
+}
diff --git a/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/utils/AliasRegistry.java b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/utils/AliasRegistry.java
new file mode 100644
index 000000000..675a163d3
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/utils/AliasRegistry.java
@@ -0,0 +1,42 @@
+/******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ ****************************************************************************/
+
+package org.eclipse.gmf.runtime.doclet.utils;
+
+
+import java.util.HashMap;
+
+
+/**
+ * Registry of aliases. Maps alias to value.
+ */
+
+public class AliasRegistry
+{
+
+ private HashMap aliasMap;
+
+ public AliasRegistry()
+ {
+ this.aliasMap = new HashMap();
+ }
+
+ public void registerAlias(String alias, String value)
+ {
+ this.aliasMap.put(alias.trim(), value.trim());
+ }
+
+ public String getAliasValue(String alias)
+ {
+ return (String)this.aliasMap.get(alias);
+ }
+
+} \ No newline at end of file
diff --git a/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/utils/MapsGenerator.java b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/utils/MapsGenerator.java
new file mode 100644
index 000000000..76c370064
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/utils/MapsGenerator.java
@@ -0,0 +1,198 @@
+/******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ ****************************************************************************/
+
+package org.eclipse.gmf.runtime.doclet.utils;
+
+
+import java.util.HashMap;
+import java.util.HashSet;
+import java.util.Iterator;
+import java.util.Map;
+import java.util.Set;
+
+import org.eclipse.gmf.runtime.doclet.ITagDefinitions;
+import com.sun.javadoc.ClassDoc;
+import com.sun.javadoc.PackageDoc;
+import com.sun.javadoc.ProgramElementDoc;
+import com.sun.javadoc.RootDoc;
+import com.sun.javadoc.Tag;
+
+
+/**
+ * Generator for all canBeSeenBy maps. Traverse all packages, classes, and members to find
+ * @canbeSeenBy tags and records them in a map.
+ */
+
+public class MapsGenerator
+{
+
+ private static final String NAMESPACE_SEPARATOR = ","; //$NON-NLS-1$
+
+ private HashMap canBeSeenByMap = null;
+
+ private RootDoc root;
+
+ private AliasRegistry aliasRegistry;
+
+ public MapsGenerator(RootDoc root, AliasRegistry aliasRegistry)
+ {
+ this.root = root;
+ this.aliasRegistry = aliasRegistry;
+
+ generateMaps();
+
+ printMaps();
+ }
+
+ public HashMap getCanBeSeeByMap()
+ {
+ return this.canBeSeenByMap;
+ }
+
+ public AliasRegistry getAliasRegistry()
+ {
+ return this.aliasRegistry;
+ }
+
+ private void generateMaps()
+ {
+
+ this.canBeSeenByMap = new HashMap();
+
+ if (root.classes() != null)
+ {
+ visitClassDocs(root.classes());
+ }
+
+ if (root.specifiedPackages() != null)
+ {
+ visitPackageDocs(root.specifiedPackages());
+ }
+ }
+
+ private void visitClassDocs(ClassDoc classDocs[])
+ {
+ for (int i = 0; i < classDocs.length; i++)
+ {
+ ClassDoc classDoc = classDocs[i];
+ visitClassDoc(classDoc);
+ }
+ }
+
+ private void visitClassDoc(ClassDoc classDoc)
+ {
+
+ addVisibilityRules(classDoc);
+
+ addVisibilityRules(classDoc.constructors());
+
+ addVisibilityRules(classDoc.methods());
+
+ addVisibilityRules(classDoc.fields());
+
+ visitClassDocs(classDoc.innerClasses());
+
+ visitPackageDoc(classDoc.containingPackage());
+ }
+
+ private void visitPackageDocs(PackageDoc packageDocs[])
+ {
+ for (int i = 0; i < packageDocs.length; i++)
+ {
+ PackageDoc packageDoc = packageDocs[i];
+ visitPackageDoc(packageDoc);
+ }
+ }
+
+ private void visitPackageDoc(PackageDoc packageDoc)
+ {
+ addVisibilityRules(packageDoc.tags(ITagDefinitions.TAG_CAN_BE_SEEN_BY), packageDoc.name());
+ }
+
+ private void addVisibilityRules(ProgramElementDoc programElementDocs[])
+ {
+ for (int i = 0; i < programElementDocs.length; i++)
+ {
+ ProgramElementDoc programElementDoc = programElementDocs[i];
+ addVisibilityRules(programElementDoc);
+ }
+ }
+
+ private void addVisibilityRules(ProgramElementDoc programElementDoc)
+ {
+ addVisibilityRules(programElementDoc.tags(ITagDefinitions.TAG_CAN_BE_SEEN_BY), programElementDoc.qualifiedName());
+ }
+
+ private void addVisibilityRules(Tag canBeSeenByTags[], String qualifiedName)
+ {
+
+ for (int i = 0; i < canBeSeenByTags.length; i++)
+ {
+ Tag tag = canBeSeenByTags[i];
+ addVisibilityRule(getCanBeSeeByMap(), qualifiedName, tag.text());
+ }
+ }
+
+ private void addVisibilityRule(HashMap map, String qualifiedName, String allowedNamespace)
+ {
+
+ String aliasValue = getAliasRegistry().getAliasValue(allowedNamespace);
+ if (aliasValue != null)
+ {
+ allowedNamespace = aliasValue;
+ }
+
+ String allowedNamespaces[] = allowedNamespace.split(NAMESPACE_SEPARATOR);
+
+ for (int i = 0; i < allowedNamespaces.length; i++)
+ {
+ String singleNamespace = allowedNamespaces[i];
+
+ Set existingAllowedNamespaces = (Set)map.get(qualifiedName);
+
+ if (existingAllowedNamespaces == null)
+ {
+ existingAllowedNamespaces = new HashSet();
+ map.put(qualifiedName, existingAllowedNamespaces);
+ }
+
+ existingAllowedNamespaces.add(singleNamespace);
+
+ }
+
+ }
+
+ private void printMaps()
+ {
+
+ System.out.println();
+ System.out.println("************************* START @canBeSeenBy Map ***************************"); //$NON-NLS-1$
+ System.out.println();
+
+ Set entries = getCanBeSeeByMap().entrySet();
+ for (Iterator iterEntry = entries.iterator(); iterEntry.hasNext();)
+ {
+ Map.Entry entry = (Map.Entry)iterEntry.next();
+
+ Set namespaces = (Set)entry.getValue();
+ for (Iterator iterNamespace = namespaces.iterator(); iterNamespace.hasNext();)
+ {
+ String namespace = (String)iterNamespace.next();
+ System.out.println((String)entry.getKey() + "\t->\t" + namespace); //$NON-NLS-1$
+ }
+ }
+
+ System.out.println();
+ System.out.println("************************* END @canBeSeenBy Map ***************************"); //$NON-NLS-1$
+ System.out.println();
+ }
+
+} \ No newline at end of file
diff --git a/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/utils/NamespaceChecker.java b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/utils/NamespaceChecker.java
new file mode 100644
index 000000000..7c2c80e9b
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/src/org/eclipse/gmf/runtime/doclet/utils/NamespaceChecker.java
@@ -0,0 +1,145 @@
+/******************************************************************************
+ * Copyright (c) 2005 IBM Corporation and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * IBM Corporation - initial API and implementation
+ ****************************************************************************/
+
+package org.eclipse.gmf.runtime.doclet.utils;
+
+
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Set;
+
+
+/**
+ * Contains the logic to determine if a given qualified name is visible
+ * in the context and in the canBeSeenByMap provided to the constructor.
+ */
+
+public class NamespaceChecker
+{
+
+ private static final String WILDCARD = "*"; //$NON-NLS-1$
+
+ private final String clientContext;
+
+ private final HashMap canBeSeenByMap;
+
+ public NamespaceChecker(String clientContext, HashMap canBeSeenByMap)
+ {
+ this.clientContext = clientContext;
+ this.canBeSeenByMap = canBeSeenByMap;
+ }
+
+ private String getClientContext()
+ {
+ return this.clientContext;
+ }
+
+ private HashMap getCanBeSeenByMap()
+ {
+ return this.canBeSeenByMap;
+ }
+
+ public boolean isClientPreventedToSee(String qualifiedName)
+ {
+
+ /* By default clients are not prevented to see a given namespace */
+ boolean clientPreventedToSee = false;
+
+ /*
+ * We iterate through each namespace involved in the fully qualified
+ * name passed as parameter until a visibility rule is encountered. The
+ * iteration is perform from child namespace to parent namespace.
+ *
+ * e.g. com.ibm.xtool.common.core would be iterated as follows:
+ *
+ * com.ibm.xtool.common.core com.ibm.xtool.common com.ibm.xtool com.ibm
+ * com
+ */
+
+ boolean verdictMade = false;
+ String partialQualifiedName = qualifiedName;
+
+ while (verdictMade == false && partialQualifiedName.length() > 0)
+ {
+
+ /* Get list of allowed client namespaces */
+ Set allowedClientNamespaces = (Set)getCanBeSeenByMap().get(partialQualifiedName);
+
+ if (allowedClientNamespaces != null)
+ {
+
+ /*
+ * Found a visibility rule, remember so we can exit walking
+ * through namespaces
+ */
+ verdictMade = true;
+
+ /*
+ * When rules are found, assume client is prevented to see
+ * unless a rule states otherwise
+ */
+ clientPreventedToSee = true;
+
+ /* Iterate through rules to see if one allows visibility */
+ for (Iterator iterAllowedClient = allowedClientNamespaces.iterator(); clientPreventedToSee == true && iterAllowedClient.hasNext();)
+ {
+
+ /*
+ * The following cases are handled: Rule is "*" -> Everybody
+ * are allowed to see Rule ends with ".*" -> Everybody
+ * sharing namespace before ".*" are allowed to see
+ * Otherwise -> Only the namespace identical to the
+ * namespace identified in the rule is allowed
+ */
+ String allowedClient = (String)iterAllowedClient.next();
+ if (allowedClient.endsWith(WILDCARD))
+ {
+ if (allowedClient.length() == 1)
+ {
+ clientPreventedToSee = false;
+ }
+ else
+ {
+ String allowedNamespace = allowedClient.substring(0, allowedClient.length() - 2 - 1);
+ if (getClientContext().startsWith(allowedNamespace))
+ {
+ clientPreventedToSee = false;
+ }
+ }
+ }
+ else
+ {
+ if (false == getClientContext().equals(allowedClient))
+ {
+ clientPreventedToSee = false;
+ }
+ }
+ }
+ }
+
+ /* Get next parent namespace */
+ int lastDot = partialQualifiedName.lastIndexOf('.');
+ if (lastDot == -1)
+ {
+ /* No more parent, we are done iterating */
+ verdictMade = true;
+ }
+ else
+ {
+ partialQualifiedName = partialQualifiedName.substring(0, lastDot);
+ }
+ }
+
+ // System.out.println("******** " + qualifiedName + (clientPreventedToSee ? " Prevented" : " Allowed"));
+
+ return clientPreventedToSee;
+ }
+} \ No newline at end of file
diff --git a/doc/org.eclipse.gmf.doclet/tools.jar b/doc/org.eclipse.gmf.doclet/tools.jar
new file mode 100644
index 000000000..3679a4f44
--- /dev/null
+++ b/doc/org.eclipse.gmf.doclet/tools.jar
Binary files differ

Back to the top