diff --git a/net.sf.eclipsecs.core/.classpath b/net.sf.eclipsecs.core/.classpath index 7b9d58ece..a66272ec4 100644 --- a/net.sf.eclipsecs.core/.classpath +++ b/net.sf.eclipsecs.core/.classpath @@ -1,15 +1,16 @@ - + + + + + - - - diff --git a/net.sf.eclipsecs.core/META-INF/MANIFEST.MF b/net.sf.eclipsecs.core/META-INF/MANIFEST.MF index 333c147b7..6d1e7a7ce 100644 --- a/net.sf.eclipsecs.core/META-INF/MANIFEST.MF +++ b/net.sf.eclipsecs.core/META-INF/MANIFEST.MF @@ -5,9 +5,6 @@ Bundle-SymbolicName: net.sf.eclipsecs.core;singleton:=true Bundle-Version: 10.4.0.qualifier Bundle-RequiredExecutionEnvironment: JavaSE-11 Bundle-ClassPath: ., - lib/dom4j-2.1.3.jar, - lib/snakeyaml-1.33.jar, - lib/javassist-3.28.0-GA.jar, lib/checkstyle-10.4-all.jar Bundle-Activator: net.sf.eclipsecs.core.CheckstylePlugin Bundle-ActivationPolicy: lazy @@ -25,7 +22,9 @@ Export-Package: net.sf.eclipsecs.core, net.sf.eclipsecs.core.projectconfig, net.sf.eclipsecs.core.projectconfig.filters, net.sf.eclipsecs.core.util -Import-Package: org.eclipse.core.filebuffers, +Import-Package: org.dom4j;version="2.1.3", + org.dom4j.io;version="2.1.3", + org.eclipse.core.filebuffers, org.eclipse.core.resources, org.eclipse.core.runtime, org.eclipse.core.runtime.jobs, @@ -42,6 +41,7 @@ Import-Package: org.eclipse.core.filebuffers, org.eclipse.team.core.subscribers;resolution:=optional, org.eclipse.team.core.synchronize;resolution:=optional, org.osgi.framework, - org.osgi.service.prefs + org.osgi.service.prefs, + org.yaml.snakeyaml;version="1.33.0" Automatic-Module-Name: net.sf.eclipsecs.core diff --git a/net.sf.eclipsecs.core/build.properties b/net.sf.eclipsecs.core/build.properties index 8042f2922..133f1e6ce 100644 --- a/net.sf.eclipsecs.core/build.properties +++ b/net.sf.eclipsecs.core/build.properties @@ -7,10 +7,7 @@ bin.includes = .,\ plugin.xml,\ schema/,\ core.properties,\ - lib/dom4j-2.1.3.jar,\ - lib/snakeyaml-1.33.jar,\ lib/checkstyle-10.4-all.jar -source.. = src/ javacDefaultEncoding.. = UTF-8 diff --git a/net.sf.eclipsecs.core/lib/dom4j-2.1.3.jar b/net.sf.eclipsecs.core/lib/dom4j-2.1.3.jar deleted file mode 100644 index 9a4f5d273..000000000 Binary files a/net.sf.eclipsecs.core/lib/dom4j-2.1.3.jar and /dev/null differ diff --git a/net.sf.eclipsecs.core/lib/javassist-3.28.0-GA.jar b/net.sf.eclipsecs.core/lib/javassist-3.28.0-GA.jar deleted file mode 100644 index 5f28011f2..000000000 Binary files a/net.sf.eclipsecs.core/lib/javassist-3.28.0-GA.jar and /dev/null differ diff --git a/net.sf.eclipsecs.core/lib/snakeyaml-1.33.jar b/net.sf.eclipsecs.core/lib/snakeyaml-1.33.jar deleted file mode 100644 index 5a95195e5..000000000 Binary files a/net.sf.eclipsecs.core/lib/snakeyaml-1.33.jar and /dev/null differ diff --git a/net.sf.eclipsecs.target/net.sf.eclipsecs.partial.target b/net.sf.eclipsecs.target/net.sf.eclipsecs.partial.target new file mode 100644 index 000000000..363ccff4c --- /dev/null +++ b/net.sf.eclipsecs.target/net.sf.eclipsecs.partial.target @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/net.sf.eclipsecs.target/net.sf.eclipsecs.target.tpd b/net.sf.eclipsecs.target/net.sf.eclipsecs.partial.tpd similarity index 94% rename from net.sf.eclipsecs.target/net.sf.eclipsecs.target.tpd rename to net.sf.eclipsecs.target/net.sf.eclipsecs.partial.tpd index f127f5a30..cba202392 100644 --- a/net.sf.eclipsecs.target/net.sf.eclipsecs.target.tpd +++ b/net.sf.eclipsecs.target/net.sf.eclipsecs.partial.tpd @@ -1,6 +1,6 @@ // Install https://download.eclipse.org/cbi/tpd/3.0.0-SNAPSHOT/ to use this target definition. // Read https://github.com/eclipse-cbi/targetplatform-dsl for more details. -target "Eclipse Checkstyle" +target "Eclipse Checkstyle (Eclipse Plugins)" with source configurePhase environment JavaSE-11 diff --git a/net.sf.eclipsecs.target/net.sf.eclipsecs.target.target b/net.sf.eclipsecs.target/net.sf.eclipsecs.target.target index 2f356c08f..3aaa27569 100644 --- a/net.sf.eclipsecs.target/net.sf.eclipsecs.target.target +++ b/net.sf.eclipsecs.target/net.sf.eclipsecs.target.target @@ -1,25 +1,30 @@ - - - - - - - - - - - - - - - - - - - - - - + + + + + + + org.dom4j + dom4j + 2.1.3 + jar + + + org.javassist + javassist + 3.29.2-GA + jar + + + org.yaml + snakeyaml + 1.33 + jar + + + + + \ No newline at end of file diff --git a/net.sf.eclipsecs.target/readme.md b/net.sf.eclipsecs.target/readme.md index 772769d5e..27c175dc6 100644 --- a/net.sf.eclipsecs.target/readme.md +++ b/net.sf.eclipsecs.target/readme.md @@ -1,27 +1,54 @@ ## What's this? -The .target file describes the minimum eclipse environment that eclipse-cs runs in. +The `.target` file describes the minimum Eclipse environment that eclipse-cs runs in. +Right now that is 2020-09 (since that is the first version officially running on Java 11). + + +## Preconditions for development + +To use the target platform, these plugins must be installed in your Eclipse IDE: +* [Eclipse M2E](https://marketplace.eclipse.org/content/eclipse-m2e-maven-support-eclipse-ide) +* [Target Platform DSL](https://github.com/eclipse-cbi/targetplatform-dsl) + ## How to use the target platform In the Maven build it is used automatically for compilation (see target-platform-configuration section in the parent POM). -For development in Eclipse you have to load it manually, but only one time: -Open the .target file and use the "Set As Active Target" hyperlink. This may take -a while the first time, since plugins are loaded from the Internet. +For development in Eclipse you have to load it manually, but only after it has been modified. +Open the `net.sf.eclipsecs.target.target` file and use the "Set As Active Target" hyperlink. +This may take a while the first time, since plugins are loaded from the Internet. + +If you don't do that, the compilation happens against the Eclipse plugins of your IDE +and you may call methods that don't exist in earlier versions, +which will lead to runtime errors for end users that are still on an old Eclipse version. -If you don't do that, the compilation happens against the eclipse plugins of -your IDE and you may call methods that don't exist in earlier versions, which -will lead to runtime errors for end users. ## How to update the target platform -Target files are hard to maintain manually. Therefore we use a custom DSL to -maintain the target platform, and to derive the .target file. +Target files are hard to maintain manually. +Therefore we use a custom DSL to maintain most of the target platform, and to derive the `.target` file. +However, that DSL based generation is not possible for the part of the target platform that shall include Maven coordinates. +That's why the target platform is split over 2 files. +The root target platform contains only the Maven coordinates and can be edited manually. +It also includes a nested target file, which is generated from the target platform DSL. +While that structure may look confusing at first glance, it simplifies the actual editing a lot, +because you either only edit Maven coordinates or entries in the `.tpd` file. + +### Eclipse plugins + +Edit the `net.sf.eclipsecs.partial.tpd` file (note the _partial_ in the name). +After saving use the context menu of the .tpd file to create a new version of the `net.sf.eclipsecs.partial.target` file. + +### Maven libraries + +Meanwhile Eclipse PDE and Tycho can also use Maven libraries directly in the target platform +(by automatically wrapping them into a generated OSGi bundle). +Those libraries are contained in `net.sf.eclipsecs.target.target`. +You can open that with a text editor and edit the Maven coordinates like in a `pom.xml`. + -Install https://github.com/eclipse-cbi/targetplatform-dsl to edit the .tpd -file. After saving use the context menu of the .tpd file to create a new -version of the .target file. +## Committing changes -Both the .target and .tpd files must be checked in after changes. \ No newline at end of file +Both the `.target` and `.tpd` files must be checked in after changes. \ No newline at end of file