Skip to content

Recovered code select#1552

Open
mickaelistria wants to merge 1241 commits into
eclipse-jdtls:dom-with-javacfrom
mickaelistria:recoveredCodeSelect
Open

Recovered code select#1552
mickaelistria wants to merge 1241 commits into
eclipse-jdtls:dom-with-javacfrom
mickaelistria:recoveredCodeSelect

Conversation

@mickaelistria
Copy link
Copy Markdown

No description provided.

Rob Stryker and others added 30 commits June 25, 2025 10:28
…er bugs

Signed-off-by: Rob Stryker <stryker@redhat.com>
Signed-off-by: Rob Stryker <stryker@redhat.com>
Speeds up completion of types significantly,
since the type hierarchy of `java.lang.Exception` is only created once
every completion invocation.

Signed-off-by: David Thompson <davthomp@redhat.com>
- Handle qualifying types referenced in the method declaration
  - eg. do not qualify imported types
  - eg. do not qualify types from the same package
  - eg. do not qualify inner classes nor inherited inner classes
- Fix parameter names
  - get them from the `IMethod`, which has more accurate
- Handle completion in anonymous classes
- Do not suggest overriding a method that's already overriden

Signed-off-by: David Thompson <davthomp@redhat.com>
Signed-off-by: David Thompson <davthomp@redhat.com>
Should improve a couple tests
+ Added a Timer utility class to help profiling
(for expected types purposes)

Signed-off-by: David Thompson <davthomp@redhat.com>
- Prevent NPE when completing name of the last parameter in a method
  declaration
  - This uses the existing "suggest a name for this variable" logic
- Prevent various NPEs when completing the first parameter of a
  parameterized type
  - eg.
    ```java
    List<| asdf = new ArrayList<>();
    ```
- move private check before deprecated check to avoid NPE trying to
  access the `IMethod` for a private JDK class member.
  (I think the root cause is that the private method doesn't exist in the
  stubbed jar, so we can't access the associated `IMethod`, but it does
  exist in javac's internal bindings, since javac has access to the real
  JDK class)
- when completing throws clause, add null checks when accessing the
  return type and name to compute the scanning index
  - constructors don't have a return type node, and an incomplete method
    declaration might not have a name
- replace a use of "Ljava/lang/Object;" with the constant from KeyUtils

Should fix 5 cases, and switch several test errors over to failures.

Signed-off-by: David Thompson <davthomp@redhat.com>
Signed-off-by: Rob Stryker <stryker@redhat.com>
- handle completing package-qualified method parameter type
- do not suggest overriding existing or declaring new methods in
  annotation type declarations
- when building override method completions, if the `IMethod` of a given
  method binding cannot be found, use the parameter names from
  the bindings instead
- prevent NPE when attempting to suggest completion for a method with
  an incomplete parameter type

Signed-off-by: David Thompson <davthomp@redhat.com>
getKey can be very expensive, so we should only have it computed on
demand.
This saves ~30% when executing completion tests with Javac.
- Add api filter for JLS_Latest

Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
Signed-off-by: Roland Grunberg <rgrunber@redhat.com>
Co-Authored-by: David Thompson <davthomp@redhat.com>
- Undo `@since` and cosmetic changes
- Remove changes from CompletionEngine

Signed-off-by: David Thompson <davthomp@redhat.com>
Signed-off-by: Rob Stryker <stryker@redhat.com>
Should fix at least one test failure.

Signed-off-by: David Thompson <davthomp@redhat.com>
- should fix one completion test

Signed-off-by: David Thompson <davthomp@redhat.com>
* for enumConstants
* for types
- hide types from other projects that are marked as inaccessible from completion
  (unless the appropriate settings to allow them to be completed are
  enabled)
- relevance numbers for those types

TODO:
- [ ] clean up the code, add comments, etc.

Signed-off-by: David Thompson <davthomp@redhat.com>
@mickaelistria mickaelistria force-pushed the recoveredCodeSelect branch from cb32599 to 0962f3a Compare July 5, 2025 20:54
@robstryker robstryker force-pushed the dom-with-javac branch 3 times, most recently from b1b4e0e to 309f390 Compare September 8, 2025 20:48
@robstryker robstryker force-pushed the dom-with-javac branch 2 times, most recently from 5738537 to 9962d57 Compare December 2, 2025 20:28
@robstryker robstryker force-pushed the dom-with-javac branch 2 times, most recently from dd7aa18 to fbe5e1a Compare March 6, 2026 18:59
@robstryker robstryker force-pushed the dom-with-javac branch 2 times, most recently from 2fcc4f8 to b7970ce Compare April 23, 2026 17:03
@robstryker robstryker force-pushed the dom-with-javac branch 2 times, most recently from 86c88a2 to 4ccbd95 Compare May 7, 2026 17:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants