summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCurtis Windatt2013-08-21 17:27:27 (EDT)
committer Curtis Windatt2013-08-21 17:27:27 (EDT)
commitf177901ea8b32c9b7b00ca41b7d1afa4653e80be (patch)
tree0fcb8212c34aa10457860fe5ab85b44a9d75ebc2
parent2afc6f926a2b3ff823c5d26d17e7a58a0fcaa75d (diff)
downloadeclipse.pde.ui-f177901ea8b32c9b7b00ca41b7d1afa4653e80be.zip
eclipse.pde.ui-f177901ea8b32c9b7b00ca41b7d1afa4653e80be.tar.gz
eclipse.pde.ui-f177901ea8b32c9b7b00ca41b7d1afa4653e80be.tar.bz2
Bug 415159 - pde.convertSchemaToHTML task doesn't report errors
-rw-r--r--ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDECoreMessages.java2
-rw-r--r--ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/pderesources.properties1
-rw-r--r--ui/org.eclipse.pde.core/src_ant/org/eclipse/pde/internal/core/ant/ConvertSchemaToHTML.java12
3 files changed, 13 insertions, 2 deletions
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDECoreMessages.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDECoreMessages.java
index 043f453..1fdf8bf 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDECoreMessages.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/PDECoreMessages.java
@@ -272,6 +272,8 @@ public class PDECoreMessages extends NLS {
public static String ClasspathHelper_BadFileLocation;
+ public static String ConvertSchemaToHTML_CannotFindIncludedSchema;
+
public static String ConvertSchemaToHTML_InvalidAdditionalSearchPath;
public static String ExportWizard_badDirectory;
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/pderesources.properties b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/pderesources.properties
index 54ddeb1..f3a7d72 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/pderesources.properties
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/pderesources.properties
@@ -213,6 +213,7 @@ FeatureExportOperation_runningPackagerScript=Running packager script
FeatureExportOperation_workspaceBuildErrorsFoundDuringExport=Export completed successfully, but build problems were detected in the following required projects: {0}
BaseExportTask_pdeExport=PDE Export
ClasspathHelper_BadFileLocation=Could not determine absolute location of file: {0}
+ConvertSchemaToHTML_CannotFindIncludedSchema=Cannot find included schema ''{0}'' required by parent schema ''{1}''
ConvertSchemaToHTML_InvalidAdditionalSearchPath=Invalid path found in additional search paths: {0}
XMLErrorReporter_ExternalEntityResolution=External entity resolution is not supported by PDE.
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 c9530cd..2a54fca 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
@@ -14,8 +14,7 @@ import java.io.*;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.*;
-import org.apache.tools.ant.BuildException;
-import org.apache.tools.ant.Task;
+import org.apache.tools.ant.*;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.Path;
import org.eclipse.osgi.util.ManifestElement;
@@ -24,6 +23,7 @@ import org.eclipse.pde.core.plugin.IPluginExtensionPoint;
import org.eclipse.pde.core.plugin.IPluginModelBase;
import org.eclipse.pde.internal.core.*;
import org.eclipse.pde.internal.core.builders.SchemaTransformer;
+import org.eclipse.pde.internal.core.ischema.ISchemaInclude;
import org.eclipse.pde.internal.core.plugin.*;
import org.eclipse.pde.internal.core.schema.Schema;
import org.eclipse.pde.internal.core.schema.SchemaDescriptor;
@@ -84,6 +84,14 @@ public class ConvertSchemaToHTML extends Task {
SchemaDescriptor desc = new SchemaDescriptor(extPoints[i].getFullId(), url, searchPaths);
schema = (Schema) desc.getSchema(false);
+ // Check that all included schemas are available
+ ISchemaInclude[] includes = schema.getIncludes();
+ for (int j = 0; j < includes.length; j++) {
+ if (includes[j].getIncludedSchema() == null) {
+ log(NLS.bind(PDECoreMessages.ConvertSchemaToHTML_CannotFindIncludedSchema, includes[j].getLocation(), schemaFile), Project.MSG_ERR);
+ }
+ }
+
File directory = new Path(destination).isAbsolute() ? new File(destination) : new File(getProject().getBaseDir(), destination);
if (!directory.exists() || !directory.isDirectory())
if (!directory.mkdirs()) {