eclipse-xtext / eclipse-xtext/xtext
ImplicitlyImportedFeatures: make `getExtensionClasses()` and `getStaticImportClasses()` static methods
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 831
- Forks
- 330
- Avg merge
- 3d 7h
- Merged PRs (30d)
- 12
Description
A class, which extends ImplicitlyImportedFeatures and overrides getExtensionClasses() and getStaticImportClasses(), should call super.getExtensionClasses() and super.getStaticImportClasses(). My understanding is that getExtensionClasses() and getStaticImportClasses are called for each model (XBase-derivative). So for each model instance, the lists from the above methods are supposed to be constructed anew.
It would be better, if the lists are constructed in a static block and the methods return the ready list. For this to wok in a meaningful way, super.getExtensionClasses() and super.getStaticImportClasses() should be static, so that a derived class can call them from a static block.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at ImplicitlyImportedFeatures and locate getExtensionClasses() and getStaticImportClasses(), then inspect their overrides and call sites. Confirm how model instances currently invoke the methods and whether derived classes need superclass access during static initialization. Done means the methods support the requested static usage without breaking existing overrides or callers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- tooling
- Issue type
- Refactor
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100