From cd1defcb97e915187c55085e7e5c90a61e997c57 Mon Sep 17 00:00:00 2001 From: Dirk Fauth Date: Wed, 15 May 2024 11:42:29 +0200 Subject: [PATCH] Add demo for pde.bnd integration with classic Eclipse product build (cherry picked from commit f983ce63b5d122c590df476c562e57bd8031ad27) --- demo/README.md | 1 + demo/pde-automatic-manifest/.gitignore | 1 + .../.mvn/extensions.xml | 8 ++ demo/pde-automatic-manifest/README.md | 14 +++ demo/pde-automatic-manifest/pom.xml | 97 +++++++++++++++++++ .../tycho.demo.app/.classpath | 7 ++ .../tycho.demo.app/.project | 28 ++++++ .../.settings/org.eclipse.jdt.core.prefs | 9 ++ .../tycho.demo.app/Application.e4xmi | 17 ++++ .../tycho.demo.app/META-INF/MANIFEST.MF | 18 ++++ .../tycho.demo.app/build.properties | 7 ++ .../tycho.demo.app/css/default.css | 0 .../tycho.demo.app/plugin.xml | 22 +++++ .../tycho.demo.feature/.project | 17 ++++ .../tycho.demo.feature/build.properties | 1 + .../tycho.demo.feature/feature.xml | 35 +++++++ .../tycho.demo.inverter.ui/.classpath | 7 ++ .../tycho.demo.inverter.ui/.project | 28 ++++++ .../.settings/org.eclipse.jdt.core.prefs | 9 ++ .../META-INF/MANIFEST.MF | 16 +++ .../tycho.demo.inverter.ui/build.properties | 5 + .../tycho.demo.inverter.ui/fragment.e4xmi | 7 ++ .../demo/inverter/ui/part/InverterPart.java | 64 ++++++++++++ .../tycho.demo.product/.project | 11 +++ .../tycho.demo.product/tycho.demo.app.product | 43 ++++++++ .../tycho.demo.service.api/.classpath | 7 ++ .../tycho.demo.service.api/.project | 23 +++++ .../.settings/org.eclipse.jdt.core.prefs | 9 ++ .../tycho.demo.service.api/pde.bnd | 4 + .../demo/service/api/InverterService.java | 5 + .../tycho/demo/service/api/package-info.java | 3 + .../tycho.demo.service.impl/.classpath | 7 ++ .../tycho.demo.service.impl/.project | 23 +++++ .../.settings/org.eclipse.jdt.core.prefs | 9 ++ .../tycho.demo.service.impl/pde.bnd | 8 ++ .../service/impl/InverterServiceImpl.java | 14 +++ .../tycho.demo.target/.project | 11 +++ .../tycho.demo.target.target | 22 +++++ 38 files changed, 617 insertions(+) create mode 100644 demo/pde-automatic-manifest/.gitignore create mode 100644 demo/pde-automatic-manifest/.mvn/extensions.xml create mode 100644 demo/pde-automatic-manifest/README.md create mode 100644 demo/pde-automatic-manifest/pom.xml create mode 100644 demo/pde-automatic-manifest/tycho.demo.app/.classpath create mode 100644 demo/pde-automatic-manifest/tycho.demo.app/.project create mode 100644 demo/pde-automatic-manifest/tycho.demo.app/.settings/org.eclipse.jdt.core.prefs create mode 100644 demo/pde-automatic-manifest/tycho.demo.app/Application.e4xmi create mode 100644 demo/pde-automatic-manifest/tycho.demo.app/META-INF/MANIFEST.MF create mode 100644 demo/pde-automatic-manifest/tycho.demo.app/build.properties create mode 100644 demo/pde-automatic-manifest/tycho.demo.app/css/default.css create mode 100644 demo/pde-automatic-manifest/tycho.demo.app/plugin.xml create mode 100644 demo/pde-automatic-manifest/tycho.demo.feature/.project create mode 100644 demo/pde-automatic-manifest/tycho.demo.feature/build.properties create mode 100644 demo/pde-automatic-manifest/tycho.demo.feature/feature.xml create mode 100644 demo/pde-automatic-manifest/tycho.demo.inverter.ui/.classpath create mode 100644 demo/pde-automatic-manifest/tycho.demo.inverter.ui/.project create mode 100644 demo/pde-automatic-manifest/tycho.demo.inverter.ui/.settings/org.eclipse.jdt.core.prefs create mode 100644 demo/pde-automatic-manifest/tycho.demo.inverter.ui/META-INF/MANIFEST.MF create mode 100644 demo/pde-automatic-manifest/tycho.demo.inverter.ui/build.properties create mode 100644 demo/pde-automatic-manifest/tycho.demo.inverter.ui/fragment.e4xmi create mode 100644 demo/pde-automatic-manifest/tycho.demo.inverter.ui/src/tycho/demo/inverter/ui/part/InverterPart.java create mode 100644 demo/pde-automatic-manifest/tycho.demo.product/.project create mode 100644 demo/pde-automatic-manifest/tycho.demo.product/tycho.demo.app.product create mode 100644 demo/pde-automatic-manifest/tycho.demo.service.api/.classpath create mode 100644 demo/pde-automatic-manifest/tycho.demo.service.api/.project create mode 100644 demo/pde-automatic-manifest/tycho.demo.service.api/.settings/org.eclipse.jdt.core.prefs create mode 100644 demo/pde-automatic-manifest/tycho.demo.service.api/pde.bnd create mode 100644 demo/pde-automatic-manifest/tycho.demo.service.api/src/tycho/demo/service/api/InverterService.java create mode 100644 demo/pde-automatic-manifest/tycho.demo.service.api/src/tycho/demo/service/api/package-info.java create mode 100644 demo/pde-automatic-manifest/tycho.demo.service.impl/.classpath create mode 100644 demo/pde-automatic-manifest/tycho.demo.service.impl/.project create mode 100644 demo/pde-automatic-manifest/tycho.demo.service.impl/.settings/org.eclipse.jdt.core.prefs create mode 100644 demo/pde-automatic-manifest/tycho.demo.service.impl/pde.bnd create mode 100644 demo/pde-automatic-manifest/tycho.demo.service.impl/src/tycho/demo/service/impl/InverterServiceImpl.java create mode 100644 demo/pde-automatic-manifest/tycho.demo.target/.project create mode 100644 demo/pde-automatic-manifest/tycho.demo.target/tycho.demo.target.target diff --git a/demo/README.md b/demo/README.md index 60a5ca7ad0..0a5df81ab2 100644 --- a/demo/README.md +++ b/demo/README.md @@ -7,6 +7,7 @@ Sample projects demonstrating how to use Tycho. * `itp02/`: Simple application that demonstrates [use of pom-first dependencies](https://wiki.eclipse.org/Tycho/How_Tos/Dependency_on_pom-first_artifacts) * `itp04-rcp/`: [Trivial cross-platform RCP product application with root files which can be updated by means of p2](https://wiki.eclipse.org/Tycho/Demo_Projects/RCP_Application) * `testing`: Demonstrate different ways to test Bundles/Plugins with Tycho see https://tycho.eclipseprojects.io/doc/master/TestingBundles.html for more details. +* `pde-automatic-manifest`: Demonstrate the combination of classical PDE project layouts with project layouts that use automatic MANIFEST generation to build an Eclipse based product. Each demo project (except itp02) can be built by executing: diff --git a/demo/pde-automatic-manifest/.gitignore b/demo/pde-automatic-manifest/.gitignore new file mode 100644 index 0000000000..e10e727be5 --- /dev/null +++ b/demo/pde-automatic-manifest/.gitignore @@ -0,0 +1 @@ +/.metadata/ diff --git a/demo/pde-automatic-manifest/.mvn/extensions.xml b/demo/pde-automatic-manifest/.mvn/extensions.xml new file mode 100644 index 0000000000..ff2889110d --- /dev/null +++ b/demo/pde-automatic-manifest/.mvn/extensions.xml @@ -0,0 +1,8 @@ + + + + org.eclipse.tycho + tycho-build + ${tycho-version} + + diff --git a/demo/pde-automatic-manifest/README.md b/demo/pde-automatic-manifest/README.md new file mode 100644 index 0000000000..2f413cc63a --- /dev/null +++ b/demo/pde-automatic-manifest/README.md @@ -0,0 +1,14 @@ +Build with automatic MANIFEST generation +======================================== + +This example shows how to combine projects that use the classical PDE project layout (MANIFEST first) with projects that use the automatic manifest generation, to build a feature based product using a pom-less setup. + +It contains the following projects: + +- tycho.demo.app - the application plugin project that contains the Application Model (classical PDE layout) +- tycho.demo.feature - the feature project that contains the custom plugins of this project to add to the product +- tycho.demo.inverter.ui - a plugin that contains some UI elements (classical PDE layout) +- tycho.demo.product - the product project to build the feature based product +- tycho.demo.service.api - a service API bundle (automatic manifest generation) +- tycho.demo.service.impl - a service implementation bundle (automatic manifest generation) +- tycho.demo.target - the target definition project that specifies the target platform to resolve the project dependencies \ No newline at end of file diff --git a/demo/pde-automatic-manifest/pom.xml b/demo/pde-automatic-manifest/pom.xml new file mode 100644 index 0000000000..22181c3598 --- /dev/null +++ b/demo/pde-automatic-manifest/pom.xml @@ -0,0 +1,97 @@ + + + + 4.0.0 + + tycho.demo + parent + 1.0.0-SNAPSHOT + + pom + + Tycho Demo App + + + + tycho.demo.target + + + tycho.demo.service.api + tycho.demo.service.impl + tycho.demo.inverter.ui + tycho.demo.app + + + tycho.demo.feature + + + tycho.demo.product + + + + 17 + 17 + UTF-8 + + + + + + org.eclipse.tycho + tycho-maven-plugin + ${tycho-version} + true + + + org.eclipse.tycho + target-platform-configuration + ${tycho-version} + + + + tycho.demo + tycho.demo.target + ${project.version} + + + honor + JavaSE-17 + + + win32 + win32 + x86_64 + + + linux + gtk + x86_64 + + + macosx + cocoa + x86_64 + + + + + + + + + + + org.eclipse.tycho + tycho-p2-director-plugin + ${tycho-version} + + + + + \ No newline at end of file diff --git a/demo/pde-automatic-manifest/tycho.demo.app/.classpath b/demo/pde-automatic-manifest/tycho.demo.app/.classpath new file mode 100644 index 0000000000..81fe078c20 --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.app/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/demo/pde-automatic-manifest/tycho.demo.app/.project b/demo/pde-automatic-manifest/tycho.demo.app/.project new file mode 100644 index 0000000000..187ef97001 --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.app/.project @@ -0,0 +1,28 @@ + + + tycho.demo.app + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/demo/pde-automatic-manifest/tycho.demo.app/.settings/org.eclipse.jdt.core.prefs b/demo/pde-automatic-manifest/tycho.demo.app/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..62ef3488cc --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.app/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,9 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=17 diff --git a/demo/pde-automatic-manifest/tycho.demo.app/Application.e4xmi b/demo/pde-automatic-manifest/tycho.demo.app/Application.e4xmi new file mode 100644 index 0000000000..4fe0282e28 --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.app/Application.e4xmi @@ -0,0 +1,17 @@ + + + + + + + + + + + + + + + + + diff --git a/demo/pde-automatic-manifest/tycho.demo.app/META-INF/MANIFEST.MF b/demo/pde-automatic-manifest/tycho.demo.app/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..cc7281bde4 --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.app/META-INF/MANIFEST.MF @@ -0,0 +1,18 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: App +Bundle-SymbolicName: tycho.demo.app;singleton:=true +Bundle-Version: 1.0.0.qualifier +Require-Bundle: org.eclipse.swt, + org.eclipse.e4.ui.model.workbench, + org.eclipse.jface, + org.eclipse.e4.ui.services, + org.eclipse.e4.ui.workbench, + org.eclipse.e4.core.di, + org.eclipse.e4.ui.di, + org.eclipse.e4.core.contexts, + org.eclipse.core.runtime +Bundle-RequiredExecutionEnvironment: JavaSE-17 +Import-Package: jakarta.annotation;version="[2.1.0,3.0.0)", + jakarta.inject;version="[2.0.0,3.0.0)" +Automatic-Module-Name: tycho.demo.app diff --git a/demo/pde-automatic-manifest/tycho.demo.app/build.properties b/demo/pde-automatic-manifest/tycho.demo.app/build.properties new file mode 100644 index 0000000000..6432064912 --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.app/build.properties @@ -0,0 +1,7 @@ +source.. = src/ +output.. = bin/ +bin.includes = plugin.xml,\ + META-INF/,\ + .,\ + css/default.css,\ + Application.e4xmi diff --git a/demo/pde-automatic-manifest/tycho.demo.app/css/default.css b/demo/pde-automatic-manifest/tycho.demo.app/css/default.css new file mode 100644 index 0000000000..e69de29bb2 diff --git a/demo/pde-automatic-manifest/tycho.demo.app/plugin.xml b/demo/pde-automatic-manifest/tycho.demo.app/plugin.xml new file mode 100644 index 0000000000..ec5e1107eb --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.app/plugin.xml @@ -0,0 +1,22 @@ + + + + + + + + + + + + + + diff --git a/demo/pde-automatic-manifest/tycho.demo.feature/.project b/demo/pde-automatic-manifest/tycho.demo.feature/.project new file mode 100644 index 0000000000..e54e68f5ff --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.feature/.project @@ -0,0 +1,17 @@ + + + tycho.demo.feature + + + + + + org.eclipse.pde.FeatureBuilder + + + + + + org.eclipse.pde.FeatureNature + + diff --git a/demo/pde-automatic-manifest/tycho.demo.feature/build.properties b/demo/pde-automatic-manifest/tycho.demo.feature/build.properties new file mode 100644 index 0000000000..64f93a9f0b --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.feature/build.properties @@ -0,0 +1 @@ +bin.includes = feature.xml diff --git a/demo/pde-automatic-manifest/tycho.demo.feature/feature.xml b/demo/pde-automatic-manifest/tycho.demo.feature/feature.xml new file mode 100644 index 0000000000..9de9605bd6 --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.feature/feature.xml @@ -0,0 +1,35 @@ + + + + + [Enter Feature Description here.] + + + + [Enter Copyright Description here.] + + + + [Enter License Description here.] + + + + + + + + + + + diff --git a/demo/pde-automatic-manifest/tycho.demo.inverter.ui/.classpath b/demo/pde-automatic-manifest/tycho.demo.inverter.ui/.classpath new file mode 100644 index 0000000000..81fe078c20 --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.inverter.ui/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/demo/pde-automatic-manifest/tycho.demo.inverter.ui/.project b/demo/pde-automatic-manifest/tycho.demo.inverter.ui/.project new file mode 100644 index 0000000000..fe5b8be665 --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.inverter.ui/.project @@ -0,0 +1,28 @@ + + + tycho.demo.inverter.ui + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.ManifestBuilder + + + + + org.eclipse.pde.SchemaBuilder + + + + + + org.eclipse.pde.PluginNature + org.eclipse.jdt.core.javanature + + diff --git a/demo/pde-automatic-manifest/tycho.demo.inverter.ui/.settings/org.eclipse.jdt.core.prefs b/demo/pde-automatic-manifest/tycho.demo.inverter.ui/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..62ef3488cc --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.inverter.ui/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,9 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=17 diff --git a/demo/pde-automatic-manifest/tycho.demo.inverter.ui/META-INF/MANIFEST.MF b/demo/pde-automatic-manifest/tycho.demo.inverter.ui/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..e00d092f4b --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.inverter.ui/META-INF/MANIFEST.MF @@ -0,0 +1,16 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: Ui +Bundle-SymbolicName: tycho.demo.inverter.ui +Bundle-Version: 1.0.0.qualifier +Require-Bundle: org.eclipse.swt, + org.eclipse.jface, + org.eclipse.e4.ui.model.workbench +Model-Fragment: fragment.e4xmi +Bundle-RequiredExecutionEnvironment: JavaSE-17 +Automatic-Module-Name: tycho.demo.inverter.ui +Import-Package: jakarta.annotation;version="[2.1.0,3.0.0)";resolution:=optional, + jakarta.inject;version="[2.0.0,3.0.0)", + org.eclipse.e4.core.di.extensions;version="[0.16.0,1.0.0)", + tycho.demo.service.api;version="[1.0.0,2.0.0)" +Bundle-ActivationPolicy: lazy diff --git a/demo/pde-automatic-manifest/tycho.demo.inverter.ui/build.properties b/demo/pde-automatic-manifest/tycho.demo.inverter.ui/build.properties new file mode 100644 index 0000000000..3bf7118713 --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.inverter.ui/build.properties @@ -0,0 +1,5 @@ +bin.includes = META-INF/,\ + .,\ + fragment.e4xmi +source.. = src/ +output.. = bin/ diff --git a/demo/pde-automatic-manifest/tycho.demo.inverter.ui/fragment.e4xmi b/demo/pde-automatic-manifest/tycho.demo.inverter.ui/fragment.e4xmi new file mode 100644 index 0000000000..f62d34ebb0 --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.inverter.ui/fragment.e4xmi @@ -0,0 +1,7 @@ + + + + + + + diff --git a/demo/pde-automatic-manifest/tycho.demo.inverter.ui/src/tycho/demo/inverter/ui/part/InverterPart.java b/demo/pde-automatic-manifest/tycho.demo.inverter.ui/src/tycho/demo/inverter/ui/part/InverterPart.java new file mode 100644 index 0000000000..8361478c4d --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.inverter.ui/src/tycho/demo/inverter/ui/part/InverterPart.java @@ -0,0 +1,64 @@ +package tycho.demo.inverter.ui.part; + +import org.eclipse.e4.core.di.extensions.Service; +import org.eclipse.jface.layout.GridDataFactory; +import org.eclipse.swt.SWT; +import org.eclipse.swt.events.KeyAdapter; +import org.eclipse.swt.events.KeyEvent; +import org.eclipse.swt.events.SelectionAdapter; +import org.eclipse.swt.events.SelectionEvent; +import org.eclipse.swt.layout.GridLayout; +import org.eclipse.swt.widgets.Button; +import org.eclipse.swt.widgets.Composite; +import org.eclipse.swt.widgets.Label; +import org.eclipse.swt.widgets.Text; + +import jakarta.annotation.PostConstruct; +import jakarta.inject.Inject; +import tycho.demo.service.api.InverterService; + +public class InverterPart { + + @Inject + @Service + private InverterService inverter; + + @PostConstruct + public void postConstruct(Composite parent) { + parent.setLayout(new GridLayout(3, true)); + + Label inputLabel = new Label(parent, SWT.NONE); + inputLabel.setText("String to revert:"); + GridDataFactory.fillDefaults().applyTo(inputLabel); + + final Text input = new Text(parent, SWT.BORDER); + GridDataFactory.fillDefaults().grab(true, false).applyTo(input); + + Button button = new Button(parent, SWT.PUSH); + button.setText("Revert"); + GridDataFactory.defaultsFor(button).applyTo(button); + + Label outputLabel = new Label(parent, SWT.NONE); + outputLabel.setText("Inverted String:"); + GridDataFactory.fillDefaults().applyTo(outputLabel); + + final Text output = new Text(parent, SWT.READ_ONLY | SWT.WRAP); + GridDataFactory.fillDefaults().grab(true, true).span(2, 1).applyTo(output); + + button.addSelectionListener(new SelectionAdapter() { + @Override + public void widgetSelected(SelectionEvent e) { + output.setText(inverter.invert(input.getText())); + } + }); + + input.addKeyListener(new KeyAdapter() { + @Override + public void keyPressed(KeyEvent e) { + if (e.keyCode == SWT.CR || e.keyCode == SWT.KEYPAD_CR) { + output.setText(inverter.invert(input.getText())); + } + } + }); + } +} \ No newline at end of file diff --git a/demo/pde-automatic-manifest/tycho.demo.product/.project b/demo/pde-automatic-manifest/tycho.demo.product/.project new file mode 100644 index 0000000000..ec98d1f5fc --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.product/.project @@ -0,0 +1,11 @@ + + + tycho.demo.product + + + + + + + + diff --git a/demo/pde-automatic-manifest/tycho.demo.product/tycho.demo.app.product b/demo/pde-automatic-manifest/tycho.demo.product/tycho.demo.app.product new file mode 100644 index 0000000000..6c40181bd2 --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.product/tycho.demo.app.product @@ -0,0 +1,43 @@ + + + + + + + + + + –clearPersistedState + + -XstartOnFirstThread -Dorg.eclipse.swt.internal.carbon.smallFonts + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/demo/pde-automatic-manifest/tycho.demo.service.api/.classpath b/demo/pde-automatic-manifest/tycho.demo.service.api/.classpath new file mode 100644 index 0000000000..81fe078c20 --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.service.api/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/demo/pde-automatic-manifest/tycho.demo.service.api/.project b/demo/pde-automatic-manifest/tycho.demo.service.api/.project new file mode 100644 index 0000000000..640e90c33d --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.service.api/.project @@ -0,0 +1,23 @@ + + + tycho.demo.service.api + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.BndBuilder + + + + + + org.eclipse.pde.BndNature + org.eclipse.jdt.core.javanature + + diff --git a/demo/pde-automatic-manifest/tycho.demo.service.api/.settings/org.eclipse.jdt.core.prefs b/demo/pde-automatic-manifest/tycho.demo.service.api/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..62ef3488cc --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.service.api/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,9 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=17 diff --git a/demo/pde-automatic-manifest/tycho.demo.service.api/pde.bnd b/demo/pde-automatic-manifest/tycho.demo.service.api/pde.bnd new file mode 100644 index 0000000000..3363efc07a --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.service.api/pde.bnd @@ -0,0 +1,4 @@ +Bundle-Name: Api +Bundle-SymbolicName: tycho.demo.service.api +Bundle-Vendor: +Bundle-Version: 1.0.0.qualifier diff --git a/demo/pde-automatic-manifest/tycho.demo.service.api/src/tycho/demo/service/api/InverterService.java b/demo/pde-automatic-manifest/tycho.demo.service.api/src/tycho/demo/service/api/InverterService.java new file mode 100644 index 0000000000..23b7060adc --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.service.api/src/tycho/demo/service/api/InverterService.java @@ -0,0 +1,5 @@ +package tycho.demo.service.api; + +public interface InverterService { + String invert(String input); +} \ No newline at end of file diff --git a/demo/pde-automatic-manifest/tycho.demo.service.api/src/tycho/demo/service/api/package-info.java b/demo/pde-automatic-manifest/tycho.demo.service.api/src/tycho/demo/service/api/package-info.java new file mode 100644 index 0000000000..a1fd6445f1 --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.service.api/src/tycho/demo/service/api/package-info.java @@ -0,0 +1,3 @@ +@org.osgi.annotation.bundle.Export +@org.osgi.annotation.versioning.Version("1.0.0") +package tycho.demo.service.api; \ No newline at end of file diff --git a/demo/pde-automatic-manifest/tycho.demo.service.impl/.classpath b/demo/pde-automatic-manifest/tycho.demo.service.impl/.classpath new file mode 100644 index 0000000000..81fe078c20 --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.service.impl/.classpath @@ -0,0 +1,7 @@ + + + + + + + diff --git a/demo/pde-automatic-manifest/tycho.demo.service.impl/.project b/demo/pde-automatic-manifest/tycho.demo.service.impl/.project new file mode 100644 index 0000000000..933fd4539f --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.service.impl/.project @@ -0,0 +1,23 @@ + + + tycho.demo.service.impl + + + + + + org.eclipse.jdt.core.javabuilder + + + + + org.eclipse.pde.BndBuilder + + + + + + org.eclipse.pde.BndNature + org.eclipse.jdt.core.javanature + + diff --git a/demo/pde-automatic-manifest/tycho.demo.service.impl/.settings/org.eclipse.jdt.core.prefs b/demo/pde-automatic-manifest/tycho.demo.service.impl/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000000..62ef3488cc --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.service.impl/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,9 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enablePreviewFeatures=disabled +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.problem.reportPreviewFeatures=warning +org.eclipse.jdt.core.compiler.release=enabled +org.eclipse.jdt.core.compiler.source=17 diff --git a/demo/pde-automatic-manifest/tycho.demo.service.impl/pde.bnd b/demo/pde-automatic-manifest/tycho.demo.service.impl/pde.bnd new file mode 100644 index 0000000000..49571764e3 --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.service.impl/pde.bnd @@ -0,0 +1,8 @@ +Bundle-Name: Impl +Bundle-SymbolicName: tycho.demo.service.impl +Bundle-Vendor: +Bundle-Version: 1.0.0.qualifier +Bundle-ActivationPolicy: lazy + +-buildpath: \ + tycho.demo.service.api;version=latest \ No newline at end of file diff --git a/demo/pde-automatic-manifest/tycho.demo.service.impl/src/tycho/demo/service/impl/InverterServiceImpl.java b/demo/pde-automatic-manifest/tycho.demo.service.impl/src/tycho/demo/service/impl/InverterServiceImpl.java new file mode 100644 index 0000000000..408d43dc35 --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.service.impl/src/tycho/demo/service/impl/InverterServiceImpl.java @@ -0,0 +1,14 @@ +package tycho.demo.service.impl; + +import org.osgi.service.component.annotations.Component; + +import tycho.demo.service.api.InverterService; + +@Component +public class InverterServiceImpl implements InverterService { + + @Override + public String invert(String input) { + return new StringBuilder(input).reverse().toString(); + } +} \ No newline at end of file diff --git a/demo/pde-automatic-manifest/tycho.demo.target/.project b/demo/pde-automatic-manifest/tycho.demo.target/.project new file mode 100644 index 0000000000..d2f711701e --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.target/.project @@ -0,0 +1,11 @@ + + + tycho.demo.target + + + + + + + + diff --git a/demo/pde-automatic-manifest/tycho.demo.target/tycho.demo.target.target b/demo/pde-automatic-manifest/tycho.demo.target/tycho.demo.target.target new file mode 100644 index 0000000000..b021c235ac --- /dev/null +++ b/demo/pde-automatic-manifest/tycho.demo.target/tycho.demo.target.target @@ -0,0 +1,22 @@ + + + + + + + + + + + + \ No newline at end of file