Skip to content

Commit

Permalink
Restructure JDT core to get proper ecj bundle (#181)
Browse files Browse the repository at this point in the history
The org.eclipse.jdt.core.ecj.validation was a "dummy" bundle so far,
used only to validate compilation issues in IDE.

That one is renamed (org.eclipse.jdt.core.ecj.validation ->
org.eclipse.jdt.core.compiler.batch) and is a proper maven library now.

It is actually the ecj compiler library without any dependencies (except
optional ant), that could be consumed by JDT and the rest of the world.

It must be required and re-exported by JDT core.

Unfortunately, there are two split packages:

- org.eclipse.jdt.internal.compiler
- org.eclipse.jdt.internal.compiler.parser

So the new bundle exports them to jdt.core and jdt.core re-exports.

org.eclipse.jdt.compiler.apt and org.eclipse.jdt.compiler.tool were
fragments of jdt.core, now they are inside
org.eclipse.jdt.core.compiler.batch.

TODO:

1) What I did NOT tried is to re-write all the magic scripts that build
and package separated ecj library out of jdt.core.
2) The 3 antadapter classes are now split over ecj and jdt core, because
BuildJarIndex.java and CheckDebugAttributes.java depend on JDT core
code.
3) ecj.1 and build_ecj.xml aren't touched yet. ecj.1 was touched last
time 2017, it seem to be used for man pages.
4) pom from jdt core will need an adoption.
5) org.eclipse.jdt-feature need to be updated
6) TBC

See
- #181
- eclipse-platform/eclipse.platform.ua#18
  • Loading branch information
iloveeclipse committed Dec 7, 2022
1 parent 71120c1 commit c4e7594
Show file tree
Hide file tree
Showing 696 changed files with 623 additions and 1,570 deletions.
4 changes: 2 additions & 2 deletions org.eclipse.jdt.apt.core/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.jdt.apt.core; singleton:=true
Bundle-Version: 3.7.50.qualifier
Bundle-Version: 3.7.100.qualifier
Bundle-Localization: plugin
Export-Package: com.sun.mirror.apt,
com.sun.mirror.declaration,
Expand All @@ -18,7 +18,7 @@ Export-Package: com.sun.mirror.apt,
org.eclipse.jdt.apt.core.internal.type;x-friends:="org.eclipse.jdt.apt.pluggable.core,org.eclipse.jdt.apt.tests,org.eclipse.jdt.apt.ui,org.eclipse.jdt.apt.pluggable.tests",
org.eclipse.jdt.apt.core.internal.util;x-friends:="org.eclipse.jdt.apt.pluggable.core,org.eclipse.jdt.apt.tests,org.eclipse.jdt.apt.ui,org.eclipse.jdt.apt.pluggable.tests",
org.eclipse.jdt.apt.core.util
Require-Bundle: org.eclipse.jdt.core;bundle-version="[3.27.0,4.0.0)",
Require-Bundle: org.eclipse.jdt.core;bundle-version="[3.33.0,4.0.0)",
org.eclipse.core.runtime;bundle-version="[3.5.100,4.0.0)",
org.eclipse.core.resources;bundle-version="[3.6.0,4.0.0)",
org.apache.ant;bundle-version="1.6.5"
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.jdt.apt.core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
<version>4.27.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jdt.apt.core</artifactId>
<version>3.7.50-SNAPSHOT</version>
<version>3.7.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@ public static void deleteAptProject(IJavaProject javaProject) {
public static boolean canRunJava6Processors() {
if (_java6ProcessorClass == null)
return false;
return Platform.getBundle("org.eclipse.jdt.compiler.apt") != null; //$NON-NLS-1$
return Platform.getBundle("org.eclipse.jdt.core.compiler.batch") != null; //$NON-NLS-1$
}

/**
Expand Down
10 changes: 3 additions & 7 deletions org.eclipse.jdt.apt.pluggable.core/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,22 +2,18 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.jdt.apt.pluggable.core;singleton:=true
Bundle-Version: 1.3.0.qualifier
Bundle-Version: 1.3.100.qualifier
Bundle-Activator: org.eclipse.jdt.internal.apt.pluggable.core.Apt6Plugin
Bundle-Vendor: %providerName
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.jdt.apt.core,
org.eclipse.jdt.core,
org.eclipse.core.resources
org.eclipse.core.resources,
org.eclipse.jdt.core;bundle-version="3.33.0"
Bundle-ActivationPolicy: lazy
Export-Package: org.eclipse.jdt.internal.apt.pluggable.core;x-internal:=true,
org.eclipse.jdt.internal.apt.pluggable.core.dispatch;x-internal:=true,
org.eclipse.jdt.internal.apt.pluggable.core.filer;x-internal:=true
Bundle-Localization: plugin
Import-Package: org.eclipse.jdt.internal.compiler.tool,
org.eclipse.jdt.internal.compiler.apt.dispatch,
org.eclipse.jdt.internal.compiler.apt.model,
org.eclipse.jdt.internal.compiler.apt.util
Bundle-RequiredExecutionEnvironment: JavaSE-11
Automatic-Module-Name: org.eclipse.jdt.apt.pluggable.core

2 changes: 1 addition & 1 deletion org.eclipse.jdt.apt.pluggable.core/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,6 @@
<version>4.27.0-SNAPSHOT</version>
</parent>
<artifactId>org.eclipse.jdt.apt.pluggable.core</artifactId>
<version>1.3.0-SNAPSHOT</version>
<version>1.3.100-SNAPSHOT</version>
<packaging>eclipse-plugin</packaging>
</project>
4 changes: 2 additions & 2 deletions org.eclipse.jdt.apt.pluggable.tests/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.jdt.apt.pluggable.tests;singleton:=true
Bundle-Version: 3.5.0.qualifier
Bundle-Version: 3.5.100.qualifier
Bundle-Activator: org.eclipse.jdt.apt.pluggable.tests.Apt6TestsPlugin
Bundle-Localization: plugin
Require-Bundle: org.junit,
Expand All @@ -13,7 +13,7 @@ Require-Bundle: org.junit,
org.eclipse.jdt.core.tests.builder,
org.eclipse.jdt.core.tests.compiler,
org.eclipse.test.performance,
org.eclipse.jdt.core,
org.eclipse.jdt.core;bundle-version="3.33.0",
org.eclipse.ui.ide,
org.eclipse.jdt.annotation;bundle-version="[1.1.0,2.0.0)";resolution:=optional,
org.eclipse.jdt.annotation;bundle-version="[2.0.0,3.0.0)";resolution:=optional
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.jdt.apt.pluggable.tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<relativePath>../tests-pom/</relativePath>
</parent>
<artifactId>org.eclipse.jdt.apt.pluggable.tests</artifactId>
<version>3.5.0-SNAPSHOT</version>
<version>3.5.100-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>
<properties>
<testSuite>${project.artifactId}</testSuite>
Expand Down
7 changes: 4 additions & 3 deletions org.eclipse.jdt.compiler.apt.tests/META-INF/MANIFEST.MF
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.jdt.compiler.apt.tests;singleton:=true
Bundle-Version: 1.2.200.qualifier
Bundle-Version: 1.2.300.qualifier
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: JavaSE-11
Require-Bundle: org.junit,
org.eclipse.jdt.core;bundle-version="3.27.0",
org.eclipse.jdt.core;bundle-version="3.33.0",
org.eclipse.core.resources,
org.eclipse.core.runtime
org.eclipse.core.runtime,
org.eclipse.jdt.core.compiler.batch;bundle-version="3.33.0"
Export-Package: org.eclipse.jdt.compiler.apt.tests,
org.eclipse.jdt.compiler.apt.tests.annotations,
org.eclipse.jdt.compiler.apt.tests.processors.base,
Expand Down
2 changes: 1 addition & 1 deletion org.eclipse.jdt.compiler.apt.tests/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<relativePath>../tests-pom/</relativePath>
</parent>
<artifactId>org.eclipse.jdt.compiler.apt.tests</artifactId>
<version>1.2.200-SNAPSHOT</version>
<version>1.2.300-SNAPSHOT</version>
<packaging>eclipse-test-plugin</packaging>

<properties>
Expand Down

This file was deleted.

113 changes: 0 additions & 113 deletions org.eclipse.jdt.compiler.apt/.settings/org.eclipse.jdt.core.prefs

This file was deleted.

15 changes: 0 additions & 15 deletions org.eclipse.jdt.compiler.apt/META-INF/MANIFEST.MF

This file was deleted.

25 changes: 0 additions & 25 deletions org.eclipse.jdt.compiler.apt/build.properties

This file was deleted.

15 changes: 0 additions & 15 deletions org.eclipse.jdt.compiler.apt/compiler_apt_fragment.properties

This file was deleted.

Loading

0 comments on commit c4e7594

Please sign in to comment.