Externalized strings and added setting to require javadoc for public and protected classes.
diff --git a/bundles/org.eclipse.wst.xsl.core/.classpath b/bundles/org.eclipse.wst.xsl.core/.classpath
index 15a3154..fb0f6f5 100644
--- a/bundles/org.eclipse.wst.xsl.core/.classpath
+++ b/bundles/org.eclipse.wst.xsl.core/.classpath
@@ -8,6 +8,7 @@
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins">
<accessrules>
<accessrule kind="accessible" pattern="*org/eclipse/wst/xsl/**"/>
+ <accessrule kind="accessible" pattern="**/validation/**"/>
</accessrules>
</classpathentry>
<classpathentry kind="src" path="src"/>
diff --git a/bundles/org.eclipse.wst.xsl.core/.settings/org.eclipse.jdt.core.prefs b/bundles/org.eclipse.wst.xsl.core/.settings/org.eclipse.jdt.core.prefs
new file mode 100644
index 0000000..42d76b5
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsl.core/.settings/org.eclipse.jdt.core.prefs
@@ -0,0 +1,73 @@
+#Sun Mar 16 16:41:20 GMT-05:00 2008
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.doc.comment.support=enabled
+org.eclipse.jdt.core.compiler.problem.annotationSuperInterface=warning
+org.eclipse.jdt.core.compiler.problem.autoboxing=ignore
+org.eclipse.jdt.core.compiler.problem.deprecation=warning
+org.eclipse.jdt.core.compiler.problem.deprecationInDeprecatedCode=disabled
+org.eclipse.jdt.core.compiler.problem.deprecationWhenOverridingDeprecatedMethod=disabled
+org.eclipse.jdt.core.compiler.problem.discouragedReference=warning
+org.eclipse.jdt.core.compiler.problem.emptyStatement=ignore
+org.eclipse.jdt.core.compiler.problem.fallthroughCase=ignore
+org.eclipse.jdt.core.compiler.problem.fatalOptionalError=enabled
+org.eclipse.jdt.core.compiler.problem.fieldHiding=ignore
+org.eclipse.jdt.core.compiler.problem.finalParameterBound=warning
+org.eclipse.jdt.core.compiler.problem.finallyBlockNotCompletingNormally=warning
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=error
+org.eclipse.jdt.core.compiler.problem.hiddenCatchBlock=warning
+org.eclipse.jdt.core.compiler.problem.incompatibleNonInheritedInterfaceMethod=warning
+org.eclipse.jdt.core.compiler.problem.incompleteEnumSwitch=ignore
+org.eclipse.jdt.core.compiler.problem.indirectStaticAccess=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadoc=ignore
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTags=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsDeprecatedRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsNotVisibleRef=disabled
+org.eclipse.jdt.core.compiler.problem.invalidJavadocTagsVisibility=public
+org.eclipse.jdt.core.compiler.problem.localVariableHiding=ignore
+org.eclipse.jdt.core.compiler.problem.methodWithConstructorName=warning
+org.eclipse.jdt.core.compiler.problem.missingDeprecatedAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingJavadocComments=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocCommentsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagDescription=return_tag
+org.eclipse.jdt.core.compiler.problem.missingJavadocTags=error
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.missingJavadocTagsVisibility=protected
+org.eclipse.jdt.core.compiler.problem.missingOverrideAnnotation=ignore
+org.eclipse.jdt.core.compiler.problem.missingSerialVersion=warning
+org.eclipse.jdt.core.compiler.problem.noEffectAssignment=warning
+org.eclipse.jdt.core.compiler.problem.noImplicitStringConversion=warning
+org.eclipse.jdt.core.compiler.problem.nonExternalizedStringLiteral=warning
+org.eclipse.jdt.core.compiler.problem.nullReference=warning
+org.eclipse.jdt.core.compiler.problem.overridingPackageDefaultMethod=error
+org.eclipse.jdt.core.compiler.problem.parameterAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.possibleAccidentalBooleanAssignment=ignore
+org.eclipse.jdt.core.compiler.problem.potentialNullReference=ignore
+org.eclipse.jdt.core.compiler.problem.rawTypeReference=warning
+org.eclipse.jdt.core.compiler.problem.redundantNullCheck=ignore
+org.eclipse.jdt.core.compiler.problem.redundantSuperinterface=ignore
+org.eclipse.jdt.core.compiler.problem.specialParameterHidingField=disabled
+org.eclipse.jdt.core.compiler.problem.staticAccessReceiver=warning
+org.eclipse.jdt.core.compiler.problem.suppressWarnings=enabled
+org.eclipse.jdt.core.compiler.problem.syntheticAccessEmulation=ignore
+org.eclipse.jdt.core.compiler.problem.typeParameterHiding=warning
+org.eclipse.jdt.core.compiler.problem.uncheckedTypeOperation=warning
+org.eclipse.jdt.core.compiler.problem.undocumentedEmptyBlock=ignore
+org.eclipse.jdt.core.compiler.problem.unhandledWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.unnecessaryElse=ignore
+org.eclipse.jdt.core.compiler.problem.unnecessaryTypeCheck=ignore
+org.eclipse.jdt.core.compiler.problem.unqualifiedFieldAccess=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownException=ignore
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionIncludeUncheckedExceptions=disabled
+org.eclipse.jdt.core.compiler.problem.unusedDeclaredThrownExceptionWhenOverriding=disabled
+org.eclipse.jdt.core.compiler.problem.unusedImport=warning
+org.eclipse.jdt.core.compiler.problem.unusedLabel=warning
+org.eclipse.jdt.core.compiler.problem.unusedLocal=warning
+org.eclipse.jdt.core.compiler.problem.unusedParameter=ignore
+org.eclipse.jdt.core.compiler.problem.unusedParameterIncludeDocCommentReference=enabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenImplementingAbstract=disabled
+org.eclipse.jdt.core.compiler.problem.unusedParameterWhenOverridingConcrete=disabled
+org.eclipse.jdt.core.compiler.problem.unusedPrivateMember=warning
+org.eclipse.jdt.core.compiler.problem.unusedWarningToken=warning
+org.eclipse.jdt.core.compiler.problem.varargsArgumentNeedCast=warning
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/Messages.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/Messages.java
index e2b74a0..8969c81 100644
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/Messages.java
+++ b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/Messages.java
@@ -6,22 +6,36 @@
*
* Contributors:
* IBM - Initial API and implementation
- * Jesper Steen Møller - adapted from org.eclipse.core.internal.content
+ * Jesper Steen M�ller - adapted from org.eclipse.core.internal.content
**********************************************************************/
package org.eclipse.wst.xsl.core;
import org.eclipse.osgi.util.NLS;
+/**
+ * @author Jesper Steen
+ *
+ */
// Runtime plugin message catalog
+
public class Messages extends NLS {
private static final String BUNDLE_NAME = "org.eclipse.wst.xsl.core.messages"; //$NON-NLS-1$
+ /**
+ * TODO: Add JavaDoc
+ */
// Content type manager
public static String XSLCorePlugin_parserConfiguration;
+ /**
+ * TODO: Add JavaDoc
+ */
public static String XSLCorePlugin_badInitializationData;
+ /**
+ * TODO: Add JavaDoc
+ */
public static String XSLCorePlugin_coreError;
static {
@@ -29,6 +43,9 @@
reloadMessages();
}
+ /**
+ * TODO: Add JavaDoc
+ */
public static void reloadMessages() {
NLS.initializeMessages(BUNDLE_NAME, Messages.class);
}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/XSLCore.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/XSLCore.java
index 6a87787..1abcf19 100644
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/XSLCore.java
+++ b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/XSLCore.java
@@ -17,6 +17,9 @@
import org.eclipse.wst.xsl.core.internal.model.SourceFile;
import org.eclipse.wst.xsl.core.internal.model.SourceFileBuilder;
+/**
+ * TODO: Add JavaDoc
+ */
public class XSLCore
{
private static XSLCore instance;
@@ -52,7 +55,11 @@
return sourceFile;
}
- public static synchronized XSLCore getInstance()
+ /**
+ * TODO: Add JavaDoc
+ * @return An Instances of XSLCore
+ */
+public static synchronized XSLCore getInstance()
{
if (instance == null)
instance = new XSLCore();
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/XSLCorePlugin.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/XSLCorePlugin.java
index d2026af..0646043 100644
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/XSLCorePlugin.java
+++ b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/XSLCorePlugin.java
@@ -1,12 +1,12 @@
/*******************************************************************************
- * Copyright (c) 2008 Jesper Steen Møller and others
+ * Copyright (c) 2008 Jesper Steen M�ller 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:
- * Jesper Steen Møller - XSL core plugin
+ * Jesper Steen M�ller - XSL core plugin
*******************************************************************************/
package org.eclipse.wst.xsl.core;
@@ -26,8 +26,14 @@
public class XSLCorePlugin extends Plugin {
// The plug-in ID
+ /**
+ * TODO: Add JavaDoc
+ */
public static final String PLUGIN_ID = "org.eclipse.wst.xsl.core"; //$NON-NLS-1$
+ /**
+ * TODO: Add JavaDoc
+ */
public static final String XSLT_NS = "http://www.w3.org/1999/XSL/Transform"; //$NON-NLS-1$
// The shared instance
@@ -71,9 +77,10 @@
return plugin;
}
- /*
+ /**
* Return the registered SAX parser factory or null if one
- * does not exist.
+ * does not exist. * @return
+ * @return returns a SAXParserFactory
*/
public SAXParserFactory getFactory() {
if (parserTracker == null) {
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/ant/Messages.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/ant/Messages.java
new file mode 100644
index 0000000..f080f8e
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/ant/Messages.java
@@ -0,0 +1,68 @@
+package org.eclipse.wst.xsl.core.internal.ant;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * The XInclude message properties for string externalization
+ * @author dcarver
+ *
+ */
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.wst.xsl.core.internal.ant.messages"; //$NON-NLS-1$
+ /**
+ * TODO: Add JavaDoc
+ */
+ public static String XIncludeTask_0;
+ /**
+ * TODO: Add JavaDoc
+ */
+ public static String XIncludeTask_1;
+
+ /**
+ * TODO: Add JavaDoc
+ */
+ public static String XIncludeTask_2;
+
+ /**
+ * TODO: Add JavaDoc
+ */
+ public static String XIncludeTask_3;
+
+ /**
+ * TODO: Add JavaDoc
+ */
+ public static String XIncludeTask_4;
+
+ /**
+ * TODO: Add JavaDoc
+ */
+ public static String XIncludeTask_5;
+
+ /**
+ * TODO: Add JavaDoc
+ */
+ public static String XIncludeTask_6;
+
+ /**
+ * TODO: Add JavaDoc
+ */
+ public static String XIncludeTask_7;
+
+ /**
+ * TODO: Add JavaDoc
+ */
+ public static String XIncludeTask_8;
+
+ /**
+ * TODO: Add JavaDoc
+ */
+ public static String XIncludeTask_9;
+
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/ant/XIncludeTask.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/ant/XIncludeTask.java
index ba5fd1b..eaf33bb 100644
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/ant/XIncludeTask.java
+++ b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/ant/XIncludeTask.java
@@ -20,27 +20,40 @@
import org.apache.tools.ant.Task;
import org.eclipse.wst.xsl.core.internal.xinclude.XIncluder;
+/**
+ * TODO: Add Java Doc
+ * @author Lars Vogel
+ *
+ */
public class XIncludeTask extends Task {
private String inFile;
private String outFile;
+ /**
+ * TODO: Add JavaDoc
+ * @param inFile
+ */
public void setIn(String inFile) {
- log("Setting the output File to: " + inFile, Project.MSG_VERBOSE);
+ log(Messages.XIncludeTask_0 + inFile, Project.MSG_VERBOSE);
this.inFile = inFile;
}
+ /**
+ * TODO: Add JavaDoc
+ * @param outFile
+ */
public void setOut(String outFile) {
- log("Setting the output File to: " + outFile, Project.MSG_VERBOSE);
+ log(Messages.XIncludeTask_1 + outFile, Project.MSG_VERBOSE);
this.outFile = outFile;
}
public void execute() {
validate();
- log("Executing the XIncludeTask", Project.MSG_VERBOSE);
+ log(Messages.XIncludeTask_2, Project.MSG_VERBOSE);
File file = new File(inFile);
if (!file.exists()) {
- throw new BuildException("Specified Inputfile does not exists "
+ throw new BuildException(Messages.XIncludeTask_3
+ inFile);
}
// We will check if the file exists, if not we will try to create the
@@ -48,11 +61,11 @@
File fileout = new File(outFile);
File dir = new File(fileout.getParent());
if (!dir.exists()) {
- log("Creating the output directory " + dir.getAbsolutePath());
+ log(Messages.XIncludeTask_4 + dir.getAbsolutePath());
Boolean success = (new File(dir.getAbsolutePath())).mkdirs();
if (!success) {
- throw new BuildException("Could not create outputfile"
+ throw new BuildException(Messages.XIncludeTask_5
+ outFile);
}
}
@@ -60,13 +73,13 @@
// Assumption that all the included files are part of the input file
// directory
if (checkmodified(inFile, outFile)) {
- log("Changes detected. Creating a new output file",
+ log(Messages.XIncludeTask_6,
Project.MSG_INFO);
XIncluder la = new XIncluder();
try {
la.extractXMLFile(inFile, outFile);
} catch (Exception e) {
- throw new BuildException("Problems with accessing the files."
+ throw new BuildException(Messages.XIncludeTask_7
+ e.getMessage());
}
}
@@ -86,6 +99,12 @@
return false;
}
+ /**
+ * TODO: Add JavaDoc
+ * @param directory
+ * @param recurse
+ * @return
+ */
public Collection<File> listFiles(File directory, boolean recurse) {
// List of files / directories
Vector<File> files = new Vector<File>();
@@ -111,10 +130,10 @@
private void validate() {
if (inFile == null) {
- throw new BuildException("Please specify inputfile ");
+ throw new BuildException(Messages.XIncludeTask_8);
}
if (outFile == null) {
- throw new BuildException("Please specify outputfile ");
+ throw new BuildException(Messages.XIncludeTask_9);
}
}
}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/ant/messages.properties b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/ant/messages.properties
new file mode 100644
index 0000000..4e6ad93
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/ant/messages.properties
@@ -0,0 +1,10 @@
+XIncludeTask_0=Setting the output File to:
+XIncludeTask_1=Setting the output File to:
+XIncludeTask_2=Executing the XIncludeTask
+XIncludeTask_3=Specified Inputfile does not exists
+XIncludeTask_4=Creating the output directory
+XIncludeTask_5=Could not create outputfile
+XIncludeTask_6=Changes detected. Creating a new output file
+XIncludeTask_7=Problems with accessing the files.
+XIncludeTask_8=Please specify inputfile
+XIncludeTask_9=Please specify outputfile
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/Include.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/Include.java
index 19e4ef9..80289b0 100644
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/Include.java
+++ b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/Include.java
@@ -13,13 +13,30 @@
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.Path;
+/**
+ * @author Doug Satchwell
+ *
+ */
public class Include extends SourceArtifact
{
+ /**
+ * TODO: Add JavaDoc
+ */
public static final int INCLUDE = 1;
+
+ /**
+ * TODO: Add JavaDoc
+ */
public static final int IMPORT = 2;
private final String href;
private final int type;
+ /**
+ * TODO: Add JavaDoc
+ * @param parentSourceFile
+ * @param href
+ * @param type
+ */
public Include(SourceFile parentSourceFile, String href, int type)
{
super(parentSourceFile);
@@ -27,6 +44,10 @@
this.type = type;
}
+ /**
+ * TODO: Add Javadoc
+ * @return
+ */
public int getType()
{
return type;
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/Parameter.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/Parameter.java
index 7b51c31..028f39c 100644
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/Parameter.java
+++ b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/Parameter.java
@@ -10,12 +10,23 @@
*******************************************************************************/
package org.eclipse.wst.xsl.core.internal.model;
+/**
+ * TODO: Add JavaDoc
+ * @author Dough Satchwell
+ *
+ */
public class Parameter extends SourceArtifact
{
final String name;
final String select;
boolean value;
+ /**
+ * TODO: Add JavaDoc
+ * @param sf
+ * @param name
+ * @param select
+ */
public Parameter(SourceFile sf, String name, String select)
{
super(sf);
@@ -24,21 +35,37 @@
value = select != null;
}
+ /**
+ * TODO: Add JavaDoc
+ * @param b
+ */
public void setValue(boolean b)
{
value = b;
}
+ /**
+ * TODO: add JavaDoc
+ * @return
+ */
public String getName()
{
return name;
}
+ /**
+ * TODO: Add JavaDoc
+ * @return
+ */
public String getSelect()
{
return select;
}
+ /**
+ * TODO: Add JavaDoc
+ * @return
+ */
public boolean isValue()
{
return value;
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/SourceArtifact.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/SourceArtifact.java
index 4046fd9..37d18a0 100644
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/SourceArtifact.java
+++ b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/SourceArtifact.java
@@ -12,37 +12,66 @@
import org.eclipse.core.runtime.PlatformObject;
+/**
+ * TODO: Add JavaDoc
+ * @author Doug Satchwell
+ *
+ */
public class SourceArtifact extends PlatformObject
{
final SourceFile parentSourceFile;
int lineNumber;
int columnNumber;
+ /**
+ * TODO: Add JavaDoc
+ * @param parentSourceFile
+ */
public SourceArtifact(SourceFile parentSourceFile)
{
this.parentSourceFile = parentSourceFile;
}
+ /**
+ * TODO: Add JavaDoc
+ * @param lineNumber
+ */
public void setLineNumber(int lineNumber)
{
this.lineNumber = lineNumber;
}
+ /**
+ * TODO: Add JavaDoc
+ * @param columnNumber
+ */
public void setColumnNumber(int columnNumber)
{
this.columnNumber = columnNumber;
}
+ /**
+ * TODO: Add JavaDoc
+ * @return
+ */
public SourceFile getParentSourceFile()
{
return parentSourceFile;
}
+ /**
+ * TODO: Add JavaDoc
+ * @return
+ */
public int getLineNumber()
{
return lineNumber;
}
+ /**
+ * TODO: Add JavaDoc
+ * @return
+ */
public int getColumnNumber()
{
return columnNumber;
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/SourceFile.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/SourceFile.java
index 9626083..df07c38 100644
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/SourceFile.java
+++ b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/SourceFile.java
@@ -17,6 +17,11 @@
import org.eclipse.core.resources.IFile;
+/**
+ * TODO: Add Javadoc
+ * @author Doug Satchwell
+ *
+ */
public class SourceFile
{
private static final int INCLUDE = 1;
@@ -27,51 +32,90 @@
final List<Template> namedTemplates = new ArrayList<Template>();
final List<Template> calledTemplates = new ArrayList<Template>();
+ /**
+ * TODO: Add Javadoc
+ * @param file
+ */
public SourceFile(IFile file)
{
this.file = file;
}
+ /**
+ * TODO: Add Javadoc
+ * @param include
+ */
public void addInclude(Include include)
{
includes.add(include);
}
+ /**
+ * TODO: Add Javadoc
+ * @param include
+ */
public void addImport(Include include)
{
includes.add(include);
}
+ /**
+ * TODO: Add Javadoc
+ * @param template
+ */
public void addNamedTemplate(Template template)
{
namedTemplates.add(template);
}
+ /**
+ * TODO: Add Javadoc
+ * @param template
+ */
public void addCalledTemplate(Template template)
{
calledTemplates.add(template);
}
+ /**
+ * TODO: Add Javadoc
+ * @return
+ */
public IFile getFile()
{
return file;
}
+ /**
+ * TODO: Add Javadoc
+ * @return
+ */
public List<Include> getIncludes()
{
return includes;
}
+ /**
+ * @return
+ */
public List<Template> getNamedTemplates()
{
return namedTemplates;
}
+ /**
+ * TODO: Add Javadoc
+ * @return
+ */
public List<Template> getCalledTemplates()
{
return calledTemplates;
}
+ /**
+ * TODO: Add Javadoc
+ * @return
+ */
public Map<String,List<Template>> calculateTemplates()
{
Map<String,List<Template>> templateMap = new HashMap<String,List<Template>>();
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/SourceFileBuilder.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/SourceFileBuilder.java
index 03df442..0b9f169 100644
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/SourceFileBuilder.java
+++ b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/SourceFileBuilder.java
@@ -25,35 +25,49 @@
import org.w3c.dom.Attr;
import org.w3c.dom.NodeList;
+/**
+ * TODO: Add Javadoc
+ * @author Doug Satchwell
+ *
+ */
public class SourceFileBuilder {
private XPathExpression xpathInclude;
private XPathExpression xpathImport;
private XPathExpression xpathTemplate;
private XPathExpression xpathCallTemplate;
+ /**
+ * TODO: Add Javadoc
+ */
public SourceFileBuilder() {
XPath xpath = XPathFactory.newInstance().newXPath();
xpath.setNamespaceContext(new NamespaceContext() {
- @Override
+ /**
+ * TODO: Add Javadoc
+ */
public String getNamespaceURI(String arg0) {
- if ("xsl".equals(arg0))
+ if ("xsl".equals(arg0)) //$NON-NLS-1$
return XSLCorePlugin.XSLT_NS;
return null;
}
- @Override
+ /**
+ * TODO: Add Javadoc
+ */
public String getPrefix(String arg0) {
if (XSLCorePlugin.XSLT_NS.equals(arg0))
- return "xsl";
+ return "xsl"; //$NON-NLS-1$
return null;
}
- @Override
+ /**
+ * TODO: Add Javadoc
+ */
public Iterator getPrefixes(String arg0) {
if (XSLCorePlugin.XSLT_NS.equals(arg0)) {
List list = new ArrayList();
- list.add("xsl");
+ list.add("xsl"); //$NON-NLS-1$
return list.iterator();
}
return null;
@@ -61,17 +75,17 @@
});
try {
- xpathInclude = xpath.compile("/xsl:stylesheet/xsl:include");
- xpathImport = xpath.compile("/xsl:stylesheet/xsl:import");
- xpathTemplate = xpath.compile("/xsl:stylesheet/xsl:template");
- xpathCallTemplate = xpath.compile("/xsl:stylesheet/xsl:template//xsl:call-template");
+ xpathInclude = xpath.compile("/xsl:stylesheet/xsl:include"); //$NON-NLS-1$
+ xpathImport = xpath.compile("/xsl:stylesheet/xsl:import"); //$NON-NLS-1$
+ xpathTemplate = xpath.compile("/xsl:stylesheet/xsl:template"); //$NON-NLS-1$
+ xpathCallTemplate = xpath.compile("/xsl:stylesheet/xsl:template//xsl:call-template"); //$NON-NLS-1$
} catch (XPathExpressionException e) {
XSLCorePlugin.log(e);
}
}
/**
- *
+ * TODO: Add Javadoc
* @param file
* @return a source file, or null if creation failed
*/
@@ -102,7 +116,7 @@
NodeList includeNodes = (NodeList) xpathInclude.evaluate(document,XPathConstants.NODESET);
for (int i = 0; i < includeNodes.getLength(); i++) {
IDOMNode node = (IDOMNode) includeNodes.item(i);
- Attr att = (Attr) node.getAttributes().getNamedItem("href");
+ Attr att = (Attr) node.getAttributes().getNamedItem("href"); //$NON-NLS-1$
String href = att == null ? null : att.getValue();
Include inc = new Include(sf, href, Include.INCLUDE);
configure(node, inc, document.getStructuredDocument());
@@ -111,7 +125,7 @@
NodeList importNodes = (NodeList) xpathImport.evaluate(document,XPathConstants.NODESET);
for (int i = 0; i < importNodes.getLength(); i++) {
IDOMNode node = (IDOMNode) importNodes.item(i);
- Attr att = (Attr) node.getAttributes().getNamedItem("href");
+ Attr att = (Attr) node.getAttributes().getNamedItem("href"); //$NON-NLS-1$
String href = att == null ? null : att.getValue();
Include inc = new Include(sf, href, Include.IMPORT);
configure(node, inc, document.getStructuredDocument());
@@ -120,7 +134,7 @@
NodeList templateNodes = (NodeList) xpathTemplate.evaluate(document, XPathConstants.NODESET);
for (int i = 0; i < templateNodes.getLength(); i++) {
IDOMNode node = (IDOMNode) templateNodes.item(i);
- Attr att = (Attr) node.getAttributes().getNamedItem("name");
+ Attr att = (Attr) node.getAttributes().getNamedItem("name"); //$NON-NLS-1$
String name = att == null ? null : att.getValue();
if (name != null) {
Template template = new Template(sf, name);
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/Template.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/Template.java
index 3265b4f..db09086 100644
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/Template.java
+++ b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/model/Template.java
@@ -13,27 +13,49 @@
import java.util.ArrayList;
import java.util.List;
+/**
+ * TODO: Add Javadoc
+ * @author Doug Satchwell
+ *
+ */
public class Template extends SourceArtifact
{
final String name;
final List<Parameter> parameters = new ArrayList<Parameter>();
+ /**
+ * TODO: Add Javadoc
+ * @param sourceFile
+ * @param name
+ */
public Template(SourceFile sourceFile, String name)
{
super(sourceFile);
this.name = name;
}
+ /**
+ * TODO: Add Javadoc
+ * @param parameter
+ */
public void addParameter(Parameter parameter)
{
parameters.add(parameter);
}
+ /**
+ * TODO: Add Javadoc
+ * @return
+ */
public String getName()
{
return name;
}
+ /**
+ * TODO: Add Javadoc
+ * @return
+ */
public List<Parameter> getParameters()
{
return parameters;
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/Messages.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/Messages.java
new file mode 100644
index 0000000..c16cb09
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/Messages.java
@@ -0,0 +1,23 @@
+package org.eclipse.wst.xsl.core.internal.validation;
+
+import org.eclipse.osgi.util.NLS;
+
+/**
+ * TODO: Add JavaDoc
+ * @author dcarver
+ *
+ */
+public class Messages extends NLS {
+ private static final String BUNDLE_NAME = "org.eclipse.wst.xsl.core.internal.validation.messages"; //$NON-NLS-1$
+ /**
+ * TODO: Add JavaDoc
+ */
+ public static String XSLValidator_0;
+ static {
+ // initialize resource bundle
+ NLS.initializeMessages(BUNDLE_NAME, Messages.class);
+ }
+
+ private Messages() {
+ }
+}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/XSLValidationConfiguration.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/XSLValidationConfiguration.java
index 7f6f226..c1722c4 100644
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/XSLValidationConfiguration.java
+++ b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/XSLValidationConfiguration.java
@@ -18,7 +18,14 @@
* specific parsers.)
*/
public class XSLValidationConfiguration {
+ /**
+ * TODO: Add Java Doc
+ */
public static String HONOUR_ALL_SCHEMA_LOCATIONS = "HONOUR_ALL_SCHEMA_LOCATIONS"; //$NON-NLS-1$
+
+ /**
+ * TODO: Add Javadoc
+ */
public static String FULL_SCHEMA_CONFORMANCE = "FULL_SCHEMA_CONFORMANCE"; //$NON-NLS-1$
private boolean honour_all_schema_locations = false;
private boolean fullSchemaConformance = true;
@@ -30,8 +37,7 @@
* The feature to set.
* @param value
* The value to set for the feature.
- * @throws An
- * exception is thrown if the feature is not recognized.
+ * @throws Exception An exception is thrown if the feature is not recognized.
*/
public void setFeature(String feature, boolean value) throws Exception {
if (HONOUR_ALL_SCHEMA_LOCATIONS.equals(feature))
@@ -50,8 +56,7 @@
* @param feature
* The feature for which to retrieve the value.
* @return The feature's value, true or false.
- * @throws An
- * exception is thrown if the feature is not recognized.
+ * @throws Exception An exception is thrown if the feature is not recognized.
*/
public boolean getFeature(String feature) throws Exception {
if (HONOUR_ALL_SCHEMA_LOCATIONS.equals(feature))
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/XSLValidator.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/XSLValidator.java
index c8791be..4e306d9 100644
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/XSLValidator.java
+++ b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/XSLValidator.java
@@ -17,13 +17,25 @@
import org.eclipse.wst.xsl.core.XSLCore;
import org.eclipse.wst.xsl.core.internal.model.SourceFile;
+/**
+ * TODO: Add Javadoc
+ * @author Doug Satchwell
+ *
+ */
public class XSLValidator {
private static XSLValidator instance;
private XSLValidator() {
- System.out.println("XSLValidator ctor");
+ System.out.println(Messages.XSLValidator_0);
}
+ /**
+ * TODO: Add Javadoc
+ * @param uri
+ * @param xslFile
+ * @return
+ * @throws CoreException
+ */
public ValidationReport validate(String uri, IFile xslFile) throws CoreException {
SourceFile sourceFile = XSLCore.getInstance().buildSourceFile(xslFile);
ValidationInfo valinfo = new ValidationInfo(uri);
@@ -146,7 +158,12 @@
}
return found;
}
-*/
+*/
+
+ /**
+ * TODO: Add Javadoc
+ * @return
+ */
public static XSLValidator getInstance() {
if (instance == null)
instance = new XSLValidator();
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/eclipse/Validator.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/eclipse/Validator.java
index 72d63b4..f6c000c 100644
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/eclipse/Validator.java
+++ b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/eclipse/Validator.java
@@ -25,8 +25,16 @@
import org.eclipse.wst.xsl.core.XSLCorePlugin;
import org.eclipse.wst.xsl.core.internal.validation.XSLValidator;
+/**
+ * TODO: Add Javadoc
+ * @author Doug Satchwell
+ *
+ */
public class Validator extends AbstractNestedValidator {
+ /**
+ * TODO: Add Javadoc
+ */
public Validator() {
System.out.println("Validator ctor");
}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/messages.properties b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/messages.properties
new file mode 100644
index 0000000..0141418
--- /dev/null
+++ b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/validation/messages.properties
@@ -0,0 +1 @@
+XSLValidator_0=XSLValidator ctor
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/xinclude/XIncluder.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/xinclude/XIncluder.java
index cbbeae8..da724d3 100644
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/xinclude/XIncluder.java
+++ b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/internal/xinclude/XIncluder.java
@@ -25,8 +25,19 @@
import org.w3c.dom.Document;
+/**
+ * TODO: Add Javadoc
+ * @author Lars Vogel
+ *
+ */
public class XIncluder {
+ /**
+ * TODO: Add Javadoc
+ * @param in
+ * @param out
+ * @throws Exception
+ */
public void extractXMLFile(String in, String out) throws Exception {
Document document = null;
File file;
@@ -46,9 +57,9 @@
// TODO: This should be read from the input file and not hardcoded
// here
transformer.setOutputProperty(OutputKeys.DOCTYPE_PUBLIC,
- "-//OASIS//DTD DocBook XML V4.5//EN");
+ "-//OASIS//DTD DocBook XML V4.5//EN"); //$NON-NLS-1$
transformer.setOutputProperty(OutputKeys.DOCTYPE_SYSTEM,
- "../../docbook-xml-4.5/docbookx.dtd");
+ "../../docbook-xml-4.5/docbookx.dtd"); //$NON-NLS-1$
DOMSource source = new DOMSource(document);
FileOutputStream os = new FileOutputStream(new File(out));
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/resolver/ResolverExtension.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/resolver/ResolverExtension.java
index 61c7a73..35ba224 100644
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/resolver/ResolverExtension.java
+++ b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/resolver/ResolverExtension.java
@@ -31,6 +31,11 @@
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
+/**
+ * TODO: Javadoc
+ * @author Jesper Steen Moeller
+ *
+ */
public class ResolverExtension implements URIResolverExtension {
private static final Double DEFAULT_XSLT_VERSION = 1.0;
@@ -43,6 +48,9 @@
private static final String XSLT_TEMPLATE = "template"; //$NON-NLS-1$
private static final String XSLT_VERSION = "version"; //$NON-NLS-1$
+ /**
+ * TODO: Add Javadoc
+ */
public ResolverExtension() {
}
diff --git a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/resolver/XSLVersionHandler.java b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/resolver/XSLVersionHandler.java
index 4fd8b52..abcd489 100644
--- a/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/resolver/XSLVersionHandler.java
+++ b/bundles/org.eclipse.wst.xsl.core/src/org/eclipse/wst/xsl/core/resolver/XSLVersionHandler.java
@@ -6,7 +6,7 @@
*
* Contributors:
* IBM - Initial API and implementation
- * Jesper Steen Møller - adapted from org.eclipse.core.internal.content
+ * Jesper Steen M�ller - adapted from org.eclipse.core.internal.content
**********************************************************************/
package org.eclipse.wst.xsl.core.resolver;
@@ -59,6 +59,9 @@
*/
private String versionAttribute = null;
+ /**
+ * TODO: Add Javadoc
+ */
public XSLVersionHandler() {
}
@@ -133,10 +136,22 @@
// Not interested.
}
+ /**
+ * TODO: Add Javadoc
+ * @return
+ */
public String getVersionAttribute() {
return versionAttribute;
}
+ /**
+ * TODO: Add Javadoc
+ * @param contents
+ * @return
+ * @throws IOException
+ * @throws ParserConfigurationException
+ * @throws SAXException
+ */
public boolean parseContents(InputSource contents) throws IOException, ParserConfigurationException, SAXException {
// Parse the file into we have what we need (or an error occurs).
try {
@@ -191,7 +206,7 @@
if (uri.equals(XSLCorePlugin.XSLT_NS) && (XSLT_TEMPLATE.equals(elementName) || XSLT_STYLESHEET.equals(elementName))) {
versionAttribute = attributes.getValue(XSLT_VERSION);
} else {
- versionAttribute = "";
+ versionAttribute = ""; //$NON-NLS-1$
}
throw new StopParsingException();
}