summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCurtis Windatt2013-08-21 15:41:45 (EDT)
committerCurtis Windatt2013-08-21 15:41:45 (EDT)
commit18ffafb5a74c1c191fece9a2696947c52877dae7 (patch)
tree4c5d89cab0a46a259c4ab6c7802b33cf3eeeecc1
parent7f9693d6107e7969ac180d87f5572a34bbb2150a (diff)
downloadeclipse.pde.ui-18ffafb5a74c1c191fece9a2696947c52877dae7.zip
eclipse.pde.ui-18ffafb5a74c1c191fece9a2696947c52877dae7.tar.gz
eclipse.pde.ui-18ffafb5a74c1c191fece9a2696947c52877dae7.tar.bz2
Bug 415008 - All extension point docs which include a file using the
schema: protocol are broken Allow ant basedir relative paths in task Change-Id: Ia17d347655d0de428323c923f87d653a290e2c62
-rw-r--r--ui/org.eclipse.pde.core/src_ant/org/eclipse/pde/internal/core/ant/ConvertSchemaToHTML.java21
1 files changed, 11 insertions, 10 deletions
diff --git a/ui/org.eclipse.pde.core/src_ant/org/eclipse/pde/internal/core/ant/ConvertSchemaToHTML.java b/ui/org.eclipse.pde.core/src_ant/org/eclipse/pde/internal/core/ant/ConvertSchemaToHTML.java
index 2636223..c9530cd 100644
--- a/ui/org.eclipse.pde.core/src_ant/org/eclipse/pde/internal/core/ant/ConvertSchemaToHTML.java
+++ b/ui/org.eclipse.pde.core/src_ant/org/eclipse/pde/internal/core/ant/ConvertSchemaToHTML.java
@@ -110,7 +110,8 @@ public class ConvertSchemaToHTML extends Task {
/**
* Required attribute describing the location of the plugin.xml file
- * for the plug-in to create schema html docs for.
+ * for the plug-in to create schema html docs for. May be an absolute
+ * file path or a path relative to the ant base directory <code>${basedir}</code>
*
* @param manifest string file path to plugin.xml for the plug-in to convert
*/
@@ -132,7 +133,7 @@ public class ConvertSchemaToHTML extends Task {
* list of file paths to search for plug-ins that provide schema
* files included by the schema files being converted.
* <p>
- * When a schema file includes another the html will include the
+ * When a schema file includes another, the html will include the
* element definitions from the included schema if it is available.
* If the schema does not exist in the same plug-in, the task will
* assume the schema url is of the form
@@ -141,13 +142,9 @@ public class ConvertSchemaToHTML extends Task {
* parent schema's host plug-in. If the plug-ins are not all in the same
* directory, this attribute can be used to locate them.
* </p><p>
- * The paths can be absolute file paths or paths relative to the schema
- * file. For example if converting a schema at <code>/WS/org.eclipse.test/schema/schemaA.exsd</code>
- * which includes a schema: <code>schema://org.eclipse.included/schema/schemaB.exsd</code>
- * you could provide the search paths: <code>c:\MySchemas\</code> to
- * add an absolute path and <code>..\..\..\..\MyRepos\</code> to check
- * a directory higher than where the plug-in is.
- * </p>
+ * The paths can be absolute file paths or paths relative to the ant
+ * base directory <code>${basedir}</code>.
+ * </p>
*
* @param additionalSearchPaths comma delimited list of search paths
*/
@@ -208,8 +205,12 @@ public class ConvertSchemaToHTML extends Task {
String[] paths = this.additionalSearchPaths.split(","); //$NON-NLS-1$
List<IPath> result = new ArrayList<IPath>(paths.length);
for (int i = 0; i < paths.length; i++) {
- Path path = new Path(paths[i]);
+ IPath path = new Path(paths[i]);
if (path.isValidPath(paths[i])) {
+ if (!path.isAbsolute()) {
+ File baseDir = getProject().getBaseDir();
+ path = new Path(baseDir.getPath()).append(path);
+ }
result.add(path);
} else {
System.out.println(NLS.bind(PDECoreMessages.ConvertSchemaToHTML_InvalidAdditionalSearchPath, paths[i]));