Skip to content

Commit

Permalink
Adapt to latest PDE changes + use latest update site
Browse files Browse the repository at this point in the history
  • Loading branch information
laeubi committed Dec 10, 2023
1 parent 3734819 commit 74f693b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

public interface TychoConstants {

public static final String ECLIPSE_LATEST = "https://download.eclipse.org/releases/2023-09/";
public static final String ECLIPSE_LATEST = "https://download.eclipse.org/releases/2023-12/";

static final String ANY_QUALIFIER = "qualifier";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,15 @@
import org.eclipse.pde.internal.core.XMLDefaultHandler;
import org.eclipse.pde.internal.core.builders.SchemaTransformer;
import org.eclipse.pde.internal.core.ischema.ISchema;
import org.eclipse.pde.internal.core.ischema.ISchemaDescriptor;
import org.eclipse.pde.internal.core.ischema.ISchemaInclude;
import org.eclipse.pde.internal.core.plugin.ExternalFragmentModel;
import org.eclipse.pde.internal.core.plugin.ExternalPluginModel;
import org.eclipse.pde.internal.core.plugin.ExternalPluginModelBase;
import org.eclipse.pde.internal.core.schema.PathSchemaProvider;
import org.eclipse.pde.internal.core.schema.Schema;
import org.eclipse.pde.internal.core.schema.SchemaDescriptor;
import org.eclipse.pde.internal.core.schema.SchemaProvider;
import org.eclipse.pde.internal.core.util.HeaderMap;
import org.osgi.framework.Constants;

Expand Down Expand Up @@ -100,14 +103,23 @@ public ConvertSchemaToHtmlResult call() throws Exception {
.parse(schemaFile, handler);
@SuppressWarnings("deprecation")
URL url = schemaFile.toURL();
SchemaDescriptor desc = new SchemaDescriptor(extPoint.getFullId(), url,
PathSchemaProvider pathSchemaProvider = new PathSchemaProvider(
additionalSearchPaths.stream().map(pathString -> {
IPath path = IPath.fromOSString(pathString);
if (!path.isAbsolute()) {
return IPath.fromOSString(baseDir.getPath()).append(path);
}
return path;
}).toList());
SchemaDescriptor desc = new SchemaDescriptor(extPoint.getFullId(), url, new SchemaProvider() {

@Override
public ISchema createSchema(ISchemaDescriptor descriptor, String location) {
// TODO if the path return null we should search inside the bundle target
// platform for the schema!
return pathSchemaProvider.createSchema(descriptor, schemaLocation);
}
});
schema = (Schema) desc.getSchema(false);

// Check that all included schemas are available
Expand Down

0 comments on commit 74f693b

Please sign in to comment.