-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch to make some operations rely on DOM instead of ECJ
Introduced 2 system property switches to control whether some IDE operations are using ECJ parser (legacy/default) or whether to make those operations powered by a full DOM. * CompilationUnit.DOM_BASED_OPERATIONS will make codeSelect (hover, link to definition...), buildStructure (JDT Project element model), reconciler (code diagnostics feedback); this one seems currently working ✔ * CompilationUnit.codeComplete.DOM_BASED_OPERATIONS controls completion (unlike other operations, completion based on DOM is far from being complete or straightforward) 🏗️ * SourceIndexer.DOM_BASED_INDEXER controls whether the indexation of a source document should first build/use a full DOM. This one is currently incomplete 🏗️ The DOM-based operation can then allow to plug alternative compiler then ECJ and still get JDT functionalities working. Also-By: David Thompson <[email protected]> Also-By: Snjezana Peco <[email protected]>
- Loading branch information
1 parent
329c4da
commit 7649a67
Showing
12 changed files
with
2,266 additions
and
136 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Continuous Integration with DOM/Javac | ||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-dom | ||
cancel-in-progress: true | ||
|
||
on: | ||
push: | ||
branches: [ 'dom-based-operations', 'dom-with-javac' ] | ||
pull_request: | ||
branches: [ 'dom-based-operations', 'dom-with-javac' ] | ||
|
||
jobs: | ||
build-dom-javac: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Install xmllint | ||
shell: bash | ||
run: | | ||
sudo apt update | ||
sudo apt install -y libxml2-utils | ||
- uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
fetch-depth: 0 | ||
- name: Enable DOM-first and Javac | ||
run: sed -i 's$</argLine>$ -DCompilationUnit.DOM_BASED_OPERATIONS=true -DSourceIndexer.DOM_BASED_INDEXER=false -DICompilationUnitResolver=org.eclipse.jdt.core.dom.JavacCompilationUnitResolver -DAbstractImageBuilder.compiler=org.eclipse.jdt.internal.javac.JavacCompiler_</argLine>$g' */pom.xml | ||
- name: Set up JDKs ☕ | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: | | ||
8 | ||
17 | ||
20 | ||
mvn-toolchain-id: | | ||
JavaSE-1.8 | ||
JavaSE-17 | ||
JavaSE-20 | ||
distribution: 'temurin' | ||
- name: Set up Maven | ||
uses: stCarolas/setup-maven@07fbbe97d97ef44336b7382563d66743297e442f # v4.5 | ||
with: | ||
maven-version: 3.9.3 | ||
- name: Build with Maven 🏗️ | ||
run: | | ||
mvn clean install --batch-mode -f org.eclipse.jdt.core.compiler.batch -DlocalEcjVersion=99.99 | ||
mvn -U clean verify --batch-mode --fail-at-end -Ptest-on-javase-20 -Pbree-libs -Papi-check -Djava.io.tmpdir=$WORKSPACE/tmp -Dproject.build.sourceEncoding=UTF-8 -Dtycho.surefire.argLine="--add-modules ALL-SYSTEM -Dcompliance=1.8,11,17,20 -Djdt.performance.asserts=disabled" -Dcbi-ecj-version=99.99 | ||
- name: Test Report | ||
if: success() || failure() # run this step even if previous step failed | ||
run: | | ||
echo ▶️ TESTS RUN: $(xmllint --xpath 'string(/testsuite/@tests)' */target/surefire-reports/TEST-*.xml | awk '{n += $1}; END{print n}' -) | ||
echo ❌ FAILURES: $(xmllint --xpath 'string(/testsuite/@failures)' */target/surefire-reports/TEST-*.xml | awk '{n += $1}; END{print n}' -) | ||
echo 💥 ERRORS: $(xmllint --xpath 'string(/testsuite/@errors)' */target/surefire-reports/TEST-*.xml | awk '{n += $1}; END{print n}' -) | ||
echo 🛑 SKIPPED: $(xmllint --xpath 'string(/testsuite/@skipped)' */target/surefire-reports/TEST-*.xml | awk '{n += $1}; END{print n}' -) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.