From d7b9c99c88b742575530bd822e34be0103a2814a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christoph=20L=C3=A4ubrich?= Date: Sun, 10 Dec 2023 07:50:39 +0100 Subject: [PATCH] Adapt to latest PDE changes + use latest update site --- Jenkinsfile | 2 +- .../java/org/eclipse/tycho/TychoConstants.java | 2 +- .../runner/ConvertSchemaToHtmlRunner.java | 14 +++++++++++++- 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index af9ca57cf9..5a23c5d2fc 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,7 +10,7 @@ if(env.BRANCH_NAME == deployBranch) { pipeline { options { - timeout(time: 180, unit: 'MINUTES') + timeout(time: 240, unit: 'MINUTES') buildDiscarder(logRotator(numToKeepStr:'10')) disableConcurrentBuilds(abortPrevious: true) } diff --git a/tycho-api/src/main/java/org/eclipse/tycho/TychoConstants.java b/tycho-api/src/main/java/org/eclipse/tycho/TychoConstants.java index 5b5ead3643..bda95f4351 100644 --- a/tycho-api/src/main/java/org/eclipse/tycho/TychoConstants.java +++ b/tycho-api/src/main/java/org/eclipse/tycho/TychoConstants.java @@ -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"; diff --git a/tycho-extras/tycho-document-bundle-plugin/src/main/java/org/eclipse/tycho/extras/docbundle/runner/ConvertSchemaToHtmlRunner.java b/tycho-extras/tycho-document-bundle-plugin/src/main/java/org/eclipse/tycho/extras/docbundle/runner/ConvertSchemaToHtmlRunner.java index 8f727ee4fe..f4d058d69d 100644 --- a/tycho-extras/tycho-document-bundle-plugin/src/main/java/org/eclipse/tycho/extras/docbundle/runner/ConvertSchemaToHtmlRunner.java +++ b/tycho-extras/tycho-document-bundle-plugin/src/main/java/org/eclipse/tycho/extras/docbundle/runner/ConvertSchemaToHtmlRunner.java @@ -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; @@ -100,7 +103,7 @@ 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()) { @@ -108,6 +111,15 @@ public ConvertSchemaToHtmlResult call() throws Exception { } 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