diff --git a/build/org.eclipse.pde.build.tests/build.properties b/build/org.eclipse.pde.build.tests/build.properties
index 5279318b69..2b93dbb3ba 100644
--- a/build/org.eclipse.pde.build.tests/build.properties
+++ b/build/org.eclipse.pde.build.tests/build.properties
@@ -20,5 +20,5 @@ bin.includes = META-INF/,\
test.xml
src.includes = about.html
jars.compile.order = .
-pom.model.property.skipTests = true
+pom.model.property.skipTests = false
pom.model.property.code.ignoredWarnings = ${tests.ignoredWarnings}
diff --git a/build/pom.xml b/build/pom.xml
index ee217ec842..2f1bbbfa4d 100644
--- a/build/pom.xml
+++ b/build/pom.xml
@@ -23,4 +23,33 @@
org.eclipse.pde.build
org.eclipse.pde.build.tests
+
+
+
+
+ org.eclipse.tycho
+ tycho-surefire-plugin
+
+
+
+ eclipse-plugin
+ org.eclipse.osgi.compatibility.state
+ 0.0.0
+
+
+ p2-installable-unit
+ org.eclipse.equinox.executable
+ 0.0.0
+
+
+ eclipse-feature
+ org.eclipse.sdk
+ 0.0.0
+
+
+ p2Installed
+
+
+
+
diff --git a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/schema/SchemaInclude.java b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/schema/SchemaInclude.java
index f8455eb447..3428a7f01a 100644
--- a/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/schema/SchemaInclude.java
+++ b/ui/org.eclipse.pde.core/src/org/eclipse/pde/internal/core/schema/SchemaInclude.java
@@ -14,6 +14,7 @@
package org.eclipse.pde.internal.core.schema;
import java.io.PrintWriter;
+import java.util.Objects;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.pde.internal.core.PDECore;
@@ -24,6 +25,8 @@
public class SchemaInclude extends SchemaObject implements ISchemaInclude {
+ private static final PathSchemaProvider DEFAULT_SCHEMA_PROVIDER = new PathSchemaProvider(null);
+
private static final long serialVersionUID = 1L;
private String fLocation;
@@ -57,7 +60,7 @@ public SchemaInclude(ISchemaObject parent, String location, boolean abbreviated,
super(parent, location);
fLocation = location;
fAbbreviated = abbreviated;
- this.schemaProvider = schemaProvider;
+ this.schemaProvider = Objects.requireNonNullElse(schemaProvider, DEFAULT_SCHEMA_PROVIDER);
}
/**
@@ -98,7 +101,7 @@ public ISchema getIncludedSchema() {
if (fAbbreviated) {
SchemaRegistry registry = PDECore.getDefault().getSchemaRegistry();
fIncludedSchema = registry.getIncludedSchema(descriptor, fLocation);
- } else if (fIncludedSchema == null && schemaProvider != null) {
+ } else if (fIncludedSchema == null) {
fIncludedSchema = schemaProvider.createSchema(descriptor, fLocation);
}
return fIncludedSchema;
diff --git a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/SchemaEditor.java b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/SchemaEditor.java
index ead3667165..1f511c9cad 100644
--- a/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/SchemaEditor.java
+++ b/ui/org.eclipse.pde.ui/src/org/eclipse/pde/internal/ui/editor/schema/SchemaEditor.java
@@ -187,10 +187,17 @@ public static boolean openSchema(IFile file) {
public static boolean openSchema(IPath path) {
String pluginId = path.segment(0);
+ int remove;
+ if ("schema:".equals(pluginId)) { //$NON-NLS-1$
+ pluginId = path.segment(1);
+ remove = 2;
+ } else {
+ remove = 1;
+ }
IPluginModelBase model = PluginRegistry.findModel(pluginId);
if (model != null && model.getUnderlyingResource() != null) {
IProject project = model.getUnderlyingResource().getProject();
- IFile file = project.getFile(path.removeFirstSegments(1));
+ IFile file = project.getFile(path.removeFirstSegments(remove));
return openSchema(file);
}
return false;