Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work on Matchlocator and dom #913

Open
wants to merge 758 commits into
base: dom-with-javac
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
758 commits
Select commit Hold shift + click to select a range
56fe906
Fix resolveName() in case name doesn't have symbol
mickaelistria Aug 20, 2024
0e86042
Fix problem range for reduced visibility
mickaelistria Aug 21, 2024
68e1894
Fix javadoc test 001 and others (#718)
robstryker Aug 21, 2024
277032a
Fix binaryName, better map and reconcile abstract related pb.
mickaelistria Aug 21, 2024
dd92f95
Translate some problem IDs for module-related problems
datho7561 Aug 21, 2024
ab380cb
Improve name binding resolution
mickaelistria Aug 21, 2024
a21c2ae
Fix binary name
mickaelistria Aug 22, 2024
bf25111
Fixes to switch expressions
datho7561 Aug 22, 2024
b5d3d86
Honor test flag on classpathEntry
mickaelistria Aug 26, 2024
7b8d966
Trigger downstream jdt-ls-javac job upon completion
mickaelistria Aug 26, 2024
36623b5
Don't wait/propagate downstream job result
mickaelistria Aug 26, 2024
52257f3
Fix JavacUtils.isTest()
mickaelistria Aug 27, 2024
b0282e9
Mark fake id as MALFORMED
mickaelistria Aug 26, 2024
0c5857f
Improve JavacTypeBinding.getJavaElement()
mickaelistria Aug 26, 2024
9840dd7
More slight javadoc work, annotating javadoc tests
Aug 21, 2024
9a8fb03
Fixes incubator #740 - ignore some specific malformed declarations
Aug 22, 2024
d98e60f
Work on javadoc inline tags
Aug 23, 2024
2177f28
Fix javadoc bug 68025 for erroneous see tags
Aug 27, 2024
15558cb
Fixes testBug68726 - bad regex for splitting javadoc comments
Aug 27, 2024
7262700
Force resolution of bindings when computeProblems
mickaelistria Aug 27, 2024
90cc939
Avoid potential NPEs
mickaelistria Aug 27, 2024
13a06a7
Do not JavacBindingResolver if not necessary (frees some memory)
mickaelistria Aug 27, 2024
74ecc3e
Revert "Fixes incubator #740 - ignore some specific malformed declara…
mickaelistria Aug 28, 2024
104229a
Trim recovered/invalid nodes when recovery is not enabled
mickaelistria Aug 28, 2024
1dd8ec3
Prevent NPE for virtual IJavaProject (without IProject)
mickaelistria Aug 28, 2024
db5ccaa
Replaced MALFORMED by RECOVERED
mickaelistria Aug 28, 2024
70f6129
JavacTypeBinding.getJavaElement() returning null for .class with sources
mickaelistria Aug 28, 2024
a01fca9
Fix NPE when trimming recovered nodes
mickaelistria Aug 28, 2024
87a8be3
Resolve `var` type binding to actual resolved type
mickaelistria Aug 28, 2024
7c9b4f3
Fix translating empty name to _
mickaelistria Aug 28, 2024
e8a2f33
Enable lombok annotation processing when parsing DOM for workingcopy …
testforstephen Aug 29, 2024
89e7a89
Improve range for variable declaration fragment
mickaelistria Aug 28, 2024
22afc58
Make JavacBindingResolver more thread-safe
mickaelistria Aug 29, 2024
6d16f53
Fix resolveBindings(LambdaExpression)
mickaelistria Aug 29, 2024
62120ea
Improve JavacLambdaBinding and lambda params
mickaelistria Aug 30, 2024
7235a17
More Javadoc lint
mickaelistria Aug 31, 2024
4086547
Add support for more Javadoc problems
mickaelistria Aug 31, 2024
55f2bfd
Fix converting Javadoc for type parameter
mickaelistria Aug 31, 2024
e8f4100
Map javadoc missing return tag
mickaelistria Sep 1, 2024
3e992c6
Skip constructor & serialVersionUID & exception parameter of catch bl…
testforstephen Sep 2, 2024
77f949f
Improve problem mapping for EnumAbstractMethodMustBeImplemented
mickaelistria Sep 2, 2024
e57fcd3
Better recover not visible parameterized types
mickaelistria Sep 2, 2024
bbea981
A workaround to resolve constructor binding
mickaelistria Sep 2, 2024
1d29d01
Fix unused private constructor (#777)
testforstephen Sep 3, 2024
9c1df61
Inspect nested diagnostic in some cases
mickaelistria Sep 3, 2024
02df50b
Mostly fix test109
Aug 30, 2024
8985d0a
Fix several tests with malformed package declarations
Aug 28, 2024
66c5572
Fix testBug347100
Aug 27, 2024
923a223
Cleanup and a small fix
Aug 28, 2024
968ba61
test annotations
Aug 30, 2024
be5ba87
Fix test83804 and test83804a - incorrect source ranges / lengths
Aug 30, 2024
b848a69
Ignore testBug103304 - violates javadoc spec
Sep 3, 2024
b06f342
Fix testBug113108b - three slash comments should be Line Comments
Sep 3, 2024
09b391b
Improve problem conversion to UndefinedName
mickaelistria Sep 3, 2024
b4aa108
Fix converting problems about accessing static members
mickaelistria Sep 3, 2024
a2c15b8
Better map UndefinedConstructor problem
mickaelistria Sep 4, 2024
dc7f7d4
Map error for diamond op on non generic type
datho7561 Sep 3, 2024
9f7b8ae
Improve JavacBindingResolver.resolveExpressionType()
mickaelistria Sep 4, 2024
c043083
Fix some more error ids
datho7561 Sep 4, 2024
7c60d6b
Fix testBug87845 - varargs in javadoc method ref parameters
Sep 3, 2024
1cd8070
Fix testBug79809 - type parameter javadoc test; previous fix insuffic…
Sep 3, 2024
5122c52
Better map missing method diagnostic and related bindings
mickaelistria Sep 4, 2024
3450bb9
Fix potential exception in JavacTypeBinding
mickaelistria Sep 5, 2024
500c0b9
Bump parent pom version to 4.34
mickaelistria Sep 5, 2024
978bafb
Use some TreeInfo utils instead of custom code
mickaelistria Sep 5, 2024
63c5712
Some more problem ids
datho7561 Sep 4, 2024
5d1c2cf
Map compiler.warn.try.explicit.close.call problem
akurtakov Sep 5, 2024
9c4405c
Code cleanups
akurtakov Sep 5, 2024
0b8b548
Use variable kind to check if it qualifies for unused checker (#801)
testforstephen Sep 6, 2024
a22eb15
Fix type name position
mickaelistria Sep 5, 2024
1e9aabc
Add members to ImplicitTypeDeclaration
mickaelistria Sep 5, 2024
b5dcfc8
Fix text elements in Snippets
mickaelistria Sep 6, 2024
6a910cc
Fix conversion of Javadoc @value tag
mickaelistria Sep 6, 2024
bb22239
Fix JavacVariableBinding.getJavaElement() to try fields first
mickaelistria Sep 6, 2024
ef7846b
Another round of problem id mappings
datho7561 Sep 5, 2024
4151c25
Force the DOM parser to continue with errors (#808)
testforstephen Sep 9, 2024
7f0c94c
Revert "Force the DOM parser to continue with errors (#808)"
mickaelistria Sep 10, 2024
e036bdb
Prefer TextElement to Name for @uses
mickaelistria Sep 9, 2024
0af7e63
Use JDK's snippet markup parser
mickaelistria Sep 9, 2024
48c1837
Avoid failure in asMethodType()
mickaelistria Sep 10, 2024
4046125
Improve method bindings generic/type/raw
mickaelistria Sep 10, 2024
5dc34d6
Add textElement to DCUses
mickaelistria Sep 10, 2024
1667398
Fix NPE in JavacMethodBinding
mickaelistria Sep 10, 2024
069538a
Avoid NPE in JavacBindingResolver
mickaelistria Sep 10, 2024
f8b4546
Configure processor arguments (e.g. -Akey=value) to Javac compiler (#…
testforstephen Sep 11, 2024
4ed5995
Add config to use internal Javadoc API in tests
mickaelistria Sep 10, 2024
1677d4a
Make bindings.isEqualTo() respect the spec
mickaelistria Sep 11, 2024
ec63cd6
Avoid NPE in ProcessorConfig
mickaelistria Sep 11, 2024
6c01e2f
Make small enhancements to jdt.core test suite to allow for proper fi…
Sep 10, 2024
e4a7007
Fix enum component contructor position
mickaelistria Sep 12, 2024
8990379
Add export for lombok
mickaelistria Sep 12, 2024
4ee69c2
Set -proc:only
mickaelistria Sep 12, 2024
a530124
Some more problem IDs
datho7561 Sep 6, 2024
ff179be
Fix testBug80257 and possibly others: resolve correct type binding in…
Sep 5, 2024
574d28b
Make all model test suites recursively filterable
Sep 13, 2024
938f544
Fix some UnresolvedMethodsTest because of incorrect range
mickaelistria Sep 13, 2024
da5313a
Also produce specific build of o.e.j.core.compiler.batch
mickaelistria Sep 13, 2024
38c5282
Enable the test filtering on the javac test bundle
Sep 13, 2024
5ebc5d3
Ignore one test via annotation to verify annotation filtering for tes…
Sep 13, 2024
6438476
Improve support for lombok
mickaelistria Sep 13, 2024
a817036
Build full JDT with Javac p2 repo after build of main branch
mickaelistria Sep 13, 2024
d71c40e
Revert "Improve support for lombok"
mickaelistria Sep 14, 2024
86cffce
Improve some bindings, and safer convert
mickaelistria Sep 14, 2024
9b7dcf3
Reapply "Improve support for lombok"
mickaelistria Sep 14, 2024
a38f7ec
Another round of problem id mappings
datho7561 Sep 12, 2024
21c869d
Fix format in p2.inf
mickaelistria Sep 17, 2024
d4a7fe7
Fix AST conversion error when handling type in array dims
datho7561 Sep 17, 2024
d2299b3
De-duplicate test-on-javase23 profile
mickaelistria Sep 18, 2024
4d1e005
Adapt to Java 23 changes
mickaelistria Sep 18, 2024
8f059a9
Try should-stop.ifError Javac options when getting DOM
mickaelistria Sep 10, 2024
e902d8e
Fix version in ClassFileConstants
mickaelistria Sep 18, 2024
3037dea
Fix underlying issue in test0009 - new array has incorrect diment sio…
Sep 17, 2024
c198c37
Add some annotations to tests
Sep 18, 2024
8f12ede
Fix slimmed down dom trees via focalPoint - test0486 and others
Sep 18, 2024
fc21ee9
More accurate range
Sep 18, 2024
a01d671
Support conversion of Markdown Javadoc
mickaelistria Sep 19, 2024
577ea4d
Improve diagnostic location for "virtual" nodes
mickaelistria Sep 20, 2024
bfb5e82
Fix some source ranges because of Lombok
mickaelistria Sep 23, 2024
d2f6207
Avoid NPE with treePath
mickaelistria Sep 20, 2024
0f561ee
Fix 0-length or end-of-line diagnostic position
mickaelistria Sep 24, 2024
f841f46
Do not crash on non-convertible type
mickaelistria Sep 24, 2024
3342701
Map unknown compiler error by default
mickaelistria Sep 24, 2024
485cee1
Revert "Run more tests with Java 23"
mickaelistria Sep 24, 2024
68b5290
Some improvements to Markdown rendering
mickaelistria Sep 25, 2024
de5b836
Ensure linkplain tag is handled properly
Sep 24, 2024
7b925c7
Fix reference tags with a module reference included
Sep 24, 2024
49a271a
Issue when initializer is null or cannot be converted
Sep 25, 2024
a7c1463
Resolve bindings for annotations on type definitions
Sep 25, 2024
db90363
Do not show annotations that had errors resolving unless recover-bind…
Sep 25, 2024
0564146
Fine-grain details about converting a Name node when there is an erro…
Sep 25, 2024
0e522d3
Small improvement to accuracy of method binding's getKey method
Sep 25, 2024
8fd8cb6
Fix bug in problem reporting where end position was before start posi…
Sep 25, 2024
eea9e78
Possibly fix https://github.com/eclipse-jdtls/eclipse-jdt-core-incuba…
Sep 25, 2024
0d136ad
Add helpful comments in code, and add test annotations
Sep 25, 2024
08df138
Ignoring several snippet tests
Sep 25, 2024
d5264c2
Cache JCCompilationUnit from compilation job for reuse in problem con…
testforstephen Sep 26, 2024
c974ed5
Fix some javadoc issue mapping
mickaelistria Sep 25, 2024
c57d0be
Set AccDeprected flag at DOM level
mickaelistria Sep 27, 2024
0023e09
Fix `ClassCastException` when working with module projects
datho7561 Aug 20, 2024
b559035
Completion to add override for inherited method
datho7561 Sep 27, 2024
d0a548b
Improvements to variable and method completion in method bodies
datho7561 Sep 30, 2024
b596fb8
Handle incomplete qualified names
datho7561 Sep 30, 2024
611628d
Completion on `super.`
datho7561 Oct 2, 2024
9d3367e
Map a problem id related to `super()`
datho7561 Oct 2, 2024
7901bfb
Method argument completion
datho7561 Oct 2, 2024
c7b0152
Improve annotation completion
datho7561 Oct 4, 2024
6cd5df5
Set debug info parameters (-g) to javac compiler
testforstephen Oct 8, 2024
f76dc97
Enable completion tests
datho7561 Oct 4, 2024
fe2289e
Fix some completion relevances
datho7561 Oct 8, 2024
02794dc
Completion for keywords that can be inserted where statements can
datho7561 Oct 9, 2024
3dccb09
Add cancellation checks to DOMCompletionEngine
datho7561 Oct 9, 2024
ba9e1bc
Compile the generated sources into the expected target directory (#879)
testforstephen Oct 10, 2024
4bc8aad
ASTConverter15JLS4Test.test0155 through test0160 - boxing and unboxing
Sep 30, 2024
6f3dc67
Add some problem mapping
Sep 30, 2024
f7cfe89
More test annotations
Sep 30, 2024
81bbe89
index out of bounds exception
Sep 30, 2024
390c846
test0050/X.java - Cleaner handling of variable arity signatures
Sep 30, 2024
16c36ea
Ensure parent packages are added to bindings
Sep 30, 2024
117460f
Cleanup
Sep 30, 2024
e575cf7
Begin reporting on completion progress monitor
datho7561 Oct 11, 2024
3f10f28
Mark the completion task as done using the progress monitor
datho7561 Oct 11, 2024
5cc0963
Share/deduplicate jar contents
mickaelistria Oct 10, 2024
316d1d8
Fix test0080 - generics vs raw vs parameterized
Oct 11, 2024
6e294e8
Fix test0164 - getDeclaringMethod() should return the declaration bin…
Oct 11, 2024
a2102cb
Use one default completion strategy
datho7561 Oct 10, 2024
8e2c77e
Prevent error when renaming variable
datho7561 Oct 16, 2024
c9654bd
Complete method return type, modifiers and thrown exceptions
datho7561 Oct 15, 2024
a0638cb
Make MatchLocator capable of working with DOM
mickaelistria Sep 30, 2024
319f178
JavacUtils.classpathEntriesToFiles doesn't configure dependent projects
snjeza Oct 21, 2024
ba647fc
Improve field completion (`name.|`)
datho7561 Oct 18, 2024
ad73382
Fix some NPEs in completion
datho7561 Oct 22, 2024
5cc014d
Avoid NumberFormatException when trying to get latest JRE.
mickaelistria Oct 23, 2024
5d36a4f
Really ignore compiler.warn.dangling.doc.comment
akurtakov Oct 24, 2024
b7b578a
Some fixes to keyword completion
datho7561 Oct 23, 2024
df43ba7
Prevent exception with multiline Javadoc method ref
datho7561 Oct 24, 2024
31727a2
Improve completion in extends/implements
datho7561 Oct 24, 2024
5f9575f
Fixes to relevance and specific completion content
datho7561 Oct 25, 2024
c9c190c
Map "compiler.warn.override.unchecked.ret"
akurtakov Oct 29, 2024
9e35199
Improve JavacBindingResolver
snjeza Oct 28, 2024
53eee61
Ignore 2 warnings without positions
akurtakov Oct 29, 2024
4bc08da
Improve ClassInstanceCreation completion
datho7561 Oct 16, 2024
3b1f9e2
Fix StringIndexOutOfBoundsException in Javadoc conversion
akurtakov Oct 31, 2024
e17f795
Remove false positive 'unused import' for import used in Javadoc
datho7561 Oct 30, 2024
60fd211
Field access and extends/implements completion improvements
datho7561 Oct 31, 2024
fc22564
Fix wrong unused import for throws javadoc
akurtakov Nov 4, 2024
f88e280
More fixes for field access
datho7561 Nov 1, 2024
e2dcb92
Better support for ASTParser.setFocalPoint()
mickaelistria Nov 4, 2024
039a392
Do not generate false positive unused parameter warning
akurtakov Nov 5, 2024
49f93fc
Fix some regressions caused by field access fix
datho7561 Nov 5, 2024
0dc50a9
Share the FileManager used when -release is set
mickaelistria Nov 5, 2024
6d9edc4
Manage prefix for extends and implements completion
datho7561 Nov 6, 2024
4284387
Improve completion for annotation members
datho7561 Nov 7, 2024
f45e071
No completion in strings, text blocks, comments, or Javadoc
datho7561 Nov 8, 2024
3c08eff
Update doc
mickaelistria Nov 12, 2024
89eb53f
Restore completion strategy switch
mickaelistria Nov 12, 2024
cd12ae8
Handle resolving bindings for generic constructors
datho7561 Nov 13, 2024
e7edd84
Fix some errors that occur when importing o.e.j.c incubator
datho7561 Oct 30, 2024
5507e37
[WIP] double colon completion
datho7561 Nov 8, 2024
fedf23d
Improve completion for binary infix operator
datho7561 Nov 8, 2024
a12a2d7
Ignoring Javadoc of depedencies
mickaelistria Nov 15, 2024
5e4052c
Completion for Javadoc tags
datho7561 Nov 14, 2024
bdc3e46
Prevent from closing the Platform FileManager
mickaelistria Nov 17, 2024
f1458d6
Reduce processing using -implicit:none
mickaelistria Nov 18, 2024
b093656
Add output folders to classpath
mickaelistria Nov 18, 2024
96196bf
Skip linting without binding nor FORCE_PROBLEM_DETECTION
mickaelistria Nov 18, 2024
290c3ed
Fix completion when typing out an import
datho7561 Nov 18, 2024
8fae73e
Ignore Javadoc for compiler
mickaelistria Nov 19, 2024
172e4c0
Do not lint when focusing on 1 particular position
mickaelistria Nov 19, 2024
f0a0474
Use partial DOM for completion, and for codeSelect on bigger files
mickaelistria Nov 19, 2024
fb29a87
Fix issue setting position of markdown comments
mickaelistria Nov 20, 2024
b75c4d8
Fix unconfigure in p2.inf
mickaelistria Nov 21, 2024
911dd4e
Problem range for `IProblem.AbstractServiceImplementation`
datho7561 Aug 21, 2024
ce3a461
Fix replace range for anonymous class instance creation
datho7561 Nov 21, 2024
839fd46
Handle adding semicolon properly for import completion
datho7561 Nov 21, 2024
92efc43
Completion on unimported class
datho7561 Nov 21, 2024
9ca568d
Fix issue populating multiple output class folders
mickaelistria Nov 22, 2024
e5cd220
Fix instruction.unconfigure
mickaelistria Nov 22, 2024
c18392e
Improve `throws` completion
datho7561 Nov 21, 2024
81f5107
Fix NPE when converting constructor without body
datho7561 Nov 21, 2024
5bc29cc
If outside the double quotes of a string literal, use the parent as t…
datho7561 Nov 22, 2024
be1321f
Some support for "proceedOnError"-like with javac
mickaelistria Nov 8, 2024
b0538e6
Improve recovery on undefined method reference
mickaelistria Nov 25, 2024
f038333
Avoid NPE when using completion for import QuickFix
datho7561 Nov 22, 2024
8a9e222
Fix some CompletionContextTests
mickaelistria Nov 25, 2024
1995b89
Support unknown expr in instanceof
mickaelistria Nov 26, 2024
5655498
Fix error popups when class extends itself
datho7561 Nov 25, 2024
3df02e5
Make some match locator work with DOM
Nov 27, 2024
bf00d42
Fix some conversion/bindings
Nov 27, 2024
6ac4d13
Keep string folding for build (not for CompilationUnitResolver)
mickaelistria Nov 28, 2024
f8014fb
Suggest creating a new lambda when a funcitonal interface is needed
datho7561 Nov 27, 2024
7cbf75d
Enable compilation progress reporting and cancellation
mickaelistria Nov 29, 2024
e9391f0
Revert "Fix error popups when class extends itself"
mickaelistria Nov 29, 2024
350da61
Single pass compilation even with multiple source folders
mickaelistria Nov 29, 2024
1492ea4
Fix possible IndexArrayOutOfBoundsError
mickaelistria Nov 29, 2024
62044ba
Expected type for ternary (`? :`)
datho7561 Nov 28, 2024
7cc7efb
Endless loop during testBug229951a
Nov 27, 2024
0b4732a
Fix testTypeParameterConstructors04 and others
Nov 25, 2024
6db210d
Fix testStaticImportMethod03 and others
Nov 21, 2024
76e9c71
Fix testStaticImportField04
Nov 21, 2024
e44ee34
Fix testEnum05
Nov 18, 2024
f497408
Fix some NPEs
Nov 12, 2024
0fa92bb
Fix testTypeReference35 - corrupt jar on cp
Nov 7, 2024
b3d0220
Fix NPE, convert 4 errors to fails
Oct 15, 2024
f02d5a8
Historical merge error in javadoc, not new
Dec 2, 2024
86b18e1
Add output folder to classpath (#1006)
snjeza Dec 2, 2024
9f6f4cc
Fix testTypeParameterConstructors01 and others
Nov 8, 2024
d0be67c
Fix testTypeDeclaration12 and others
Nov 18, 2024
95178a7
Fix testTypeReference22
Nov 22, 2024
c43fb2e
Fix testCamelCaseTypePattern01_CamelCase and many others
Oct 30, 2024
f55b9c3
Speed improvement in test classes. May contribute to upstream
Nov 27, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/auto-author-assign.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Auto Author Assign

on:
pull_request_target:
types: [ opened, reopened ]

permissions:
pull-requests: write

jobs:
assign-author:
runs-on: ubuntu-latest
steps:
- uses: toshimaru/auto-author-assign@v2.1.0
53 changes: 53 additions & 0 deletions .github/workflows/ci-dom-javac.yml
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@v4
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@v4
with:
java-version: |
8
17
21
mvn-toolchain-id: |
JavaSE-1.8
JavaSE-17
JavaSE-21
distribution: 'temurin'
- name: Set up Maven
uses: stCarolas/setup-maven@d6af6abeda15e98926a57b5aa970a96bb37f97d1 # v5
with:
maven-version: 3.9.6
- 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-21 -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,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}' -)
46 changes: 41 additions & 5 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pipeline {
jdk 'openjdk-jdk23-latest'
}
stages {
stage('Build') {
stage('Build and Test') {
steps {
sh """#!/bin/bash -x

Expand All @@ -29,7 +29,8 @@ pipeline {
# export MAVEN_OPTS="-Xmx2G"

mvn clean install -f org.eclipse.jdt.core.compiler.batch -DlocalEcjVersion=99.99 -Dmaven.repo.local=$WORKSPACE/.m2/repository -DcompilerBaselineMode=disable -DcompilerBaselineReplace=none


# Build and test without DOM-first to ensure no regression takes place
mvn -U clean verify --batch-mode --fail-at-end -Dmaven.repo.local=$WORKSPACE/.m2/repository \
-Ptest-on-javase-23 -Pbree-libs -Papi-check -Pjavadoc -Pp2-repo \
-Dmaven.test.failure.ignore=true \
Expand All @@ -44,7 +45,6 @@ pipeline {
}
post {
always {
archiveArtifacts artifacts: '*.log,*/target/work/data/.metadata/*.log,*/tests/target/work/data/.metadata/*.log,apiAnalyzer-workspace/.metadata/*.log,repository/target/repository/**,**/target/artifactcomparison/**', allowEmptyArchive: true
// The following lines use the newest build on master that did not fail a reference
// To not fail master build on failed test maven needs to be started with "-Dmaven.test.failure.ignore=true" it will then only marked unstable.
// To not fail the build also "unstable: true" is used to only mark the build unstable instead of failing when qualityGates are missed
Expand All @@ -54,10 +54,46 @@ pipeline {
// The eclipse compiler name is changed because the logfile not only contains ECJ but also API warnings.
// "pattern:" is used to collect warnings in dedicated files avoiding output of junit tests treated as warnings
junit '**/target/surefire-reports/*.xml'
discoverGitReferenceBuild referenceJob: 'eclipse.jdt.core-github/master'
recordIssues publishAllIssues:false, ignoreQualityGate:true, tool: eclipse(name: 'Compiler and API Tools', pattern: '**/target/compilelogs/*.xml'), qualityGates: [[threshold: 1, type: 'DELTA', unstable: true]]
//discoverGitReferenceBuild referenceJob: 'eclipse.jdt.core-github/master'
//recordIssues publishAllIssues:false, ignoreQualityGate:true, tool: eclipse(name: 'Compiler and API Tools', pattern: '**/target/compilelogs/*.xml'), qualityGates: [[threshold: 1, type: 'DELTA', unstable: true]]
}
}
}
stage('javac specific tests') {
steps {
sh """#!/bin/bash -x
mkdir -p $WORKSPACE/tmp

unset JAVA_TOOL_OPTIONS
unset _JAVA_OPTIONS
# force qualifier to start with `z` so we identify it more easily and it always seem more recent than upstrea
mvn install -DskipTests -Djava.io.tmpdir=$WORKSPACE/tmp \
-Dtycho.buildqualifier.format="'z'yyyyMMdd-HHmm" \
-Pp2-repo \
-pl org.eclipse.jdt.core.compiler.batch,org.eclipse.jdt.core,org.eclipse.jdt.core.javac,org.eclipse.jdt.core.tests.model,org.eclipse.jdt.core.tests.compiler,repository

mvn verify --batch-mode -f org.eclipse.jdt.core.tests.javac \
--fail-at-end -Ptest-on-javase-23 -Pbree-libs \
-DfailIfNoTests=false -DexcludedGroups=org.junit.Ignore -DproviderHint=junit47 \
-Papi-check -Djava.io.tmpdir=$WORKSPACE/tmp -Dproject.build.sourceEncoding=UTF-8 \
-Dmaven.test.failure.ignore=true -Dmaven.test.error.ignore=true
"""
}
post {
always {
archiveArtifacts artifacts: '*.log,*/target/work/data/.metadata/*.log,*/tests/target/work/data/.metadata/*.log,apiAnalyzer-workspace/.metadata/*.log,repository/target/repository/**,**/target/artifactcomparison/**', allowEmptyArchive: true
junit 'org.eclipse.jdt.core.tests.javac/target/surefire-reports/*.xml'
}
}
}
stage('trigger JDT-LS with Javac build and tests') {
when {
branch 'dom-with-javac'
}
steps {
build(job: 'jdt-ls-javac', wait: false, propagate: false)
build(job: 'Build-JDT-with-Javac-p2-repo', wait: false, propagate: false)
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3738,55 +3738,12 @@ public static final char[] replace(
char[] toBeReplaced,
char[] replacementChars) {

int max = array.length;
int replacedLength = toBeReplaced.length;
int replacementLength = replacementChars.length;

int[] starts = new int[5];
int occurrenceCount = 0;

if (!equals(toBeReplaced, replacementChars)) {

next : for (int i = 0; i < max;) {
int index = indexOf(toBeReplaced, array, true, i);
if (index == -1) {
i++;
continue next;
}
if (occurrenceCount == starts.length) {
System.arraycopy(
starts,
0,
starts = new int[occurrenceCount * 2],
0,
occurrenceCount);
}
starts[occurrenceCount++] = index;
i = index + replacedLength;
}
}
if (occurrenceCount == 0)
String s1 = new String(array);
String myRet = s1.replace(new String(toBeReplaced), new String(replacementChars));
if( myRet.equals(s1)) {
return array;
char[] result =
new char[max
+ occurrenceCount * (replacementLength - replacedLength)];
int inStart = 0, outStart = 0;
for (int i = 0; i < occurrenceCount; i++) {
int offset = starts[i] - inStart;
System.arraycopy(array, inStart, result, outStart, offset);
inStart += offset;
outStart += offset;
System.arraycopy(
replacementChars,
0,
result,
outStart,
replacementLength);
inStart += replacedLength;
outStart += replacementLength;
}
System.arraycopy(array, inStart, result, outStart, max - inStart);
return result;
return myRet.toCharArray();
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,10 @@ public interface ClassFileConstants {
long JDK22 = ((long)ClassFileConstants.MAJOR_VERSION_22 << 16) + ClassFileConstants.MINOR_VERSION_0;
long JDK23 = ((long)ClassFileConstants.MAJOR_VERSION_23 << 16) + ClassFileConstants.MINOR_VERSION_0;

/**
*
* @return The latest JDK level supported by ECJ (can be different from the latest known JDK level)
*/
public static long getLatestJDKLevel() {
return ((long)ClassFileConstants.MAJOR_LATEST_VERSION << 16) + ClassFileConstants.MINOR_VERSION_0;
}
Expand Down
12 changes: 12 additions & 0 deletions org.eclipse.jdt.core.javac/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-23">
<attributes>
<attribute name="module" value="true"/>
<attribute name="add-exports" value="jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED:jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED:jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED:jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED:jdk.compiler/com.sun.tools.javac.tree=ALL-UNNAMED:jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED:jdk.compiler/com.sun.tools.javac.comp=ALL-UNNAMED:jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED:jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.taglets.snippet=ALL-UNNAMED:jdk.javadoc/jdk.javadoc.internal.doclets.formats.html.taglets=ALL-UNNAMED:jdk.compiler/com.sun.tools.javac.platform=ALL-UNNAMED:jdk.compiler/com.sun.tools.javac.resources=ALL-UNNAMED:jdk.compiler/com.sun.tools.javac.jvm=ALL-UNNAMED"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="bin"/>
</classpath>
28 changes: 28 additions & 0 deletions org.eclipse.jdt.core.javac/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>org.eclipse.jdt.core.javac</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.ManifestBuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.pde.SchemaBuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.pde.PluginNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
eclipse.preferences.version=1
encoding/<project>=UTF-8
Loading
Loading