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

Ability to preconfigure IntelliJ to have annotation processing active #981

Open
hohwille opened this issue Jan 23, 2025 · 1 comment · May be fixed by devonfw/ide-settings#74
Open

Ability to preconfigure IntelliJ to have annotation processing active #981

hohwille opened this issue Jan 23, 2025 · 1 comment · May be fixed by devonfw/ide-settings#74
Labels
enhancement New feature or request
Milestone

Comments

@hohwille
Copy link
Member

As an IDEasy user, I want to be able to automatically set the option Enable annotation processing to enabled so that my project compiles and works properly.

Image

@hohwille hohwille added the enhancement New feature or request label Jan 23, 2025
@hohwille hohwille added this to the settings milestone Jan 23, 2025
@github-project-automation github-project-automation bot moved this to 🆕 New in IDEasy board Jan 23, 2025
@hohwille
Copy link
Member Author

This is yet another one of the famous cases where IDE vendors do evil antipatterns.
E.g. Eclipse puts XML into property files:
https://github.com/devonfw/ide-settings/blob/5b68aa035a96869861353cf95844a6cdbd26b93c/eclipse/workspace/update/.metadata/.plugins/org.eclipse.core.runtime/.settings/org.eclipse.jdt.ui.prefs#L63

And here IntelliJ puts JSON into XML files:

  ...
 <component name="PropertiesComponent"><![CDATA[{
  "keyToString": {
    "RunOnceActivity.ShowReadmeOnStart": "true",
    "git-widget-placeholder": "main",
    "kotlin-language-version-configured": "true",
    "node.js.detected.package.eslint": "true",
    "node.js.detected.package.tslint": "true",
    "node.js.selected.package.eslint": "(autodetect)",
    "node.js.selected.package.tslint": "(autodetect)",
    "nodejs_package_manager_path": "npm",
    "project.structure.last.edited": "Artifacts",
    "project.structure.proportion": "0.15",
    "project.structure.side.proportion": "0.2",
    "settings.editor.selected.configurable": "reference.projectsettings.compiler.annotationProcessors",
    "vue.rearranger.settings.migration": "true"
  }
}]]></component>
  ...

IMHO this cases is even somewhat worse since the JSON contains arbitrary aspects of configurations mixed where some of them should stay in the control of the users while others should be preconfigured automatically for the project.

We have already spent an awful lot of effort to implement a generic XML merger just for the arbitrary challenges IntelliJ gave us but we are not planning to implement a CDATA JSON merger inside this XML merger and honestly I would not see how a user could configure that in his template and even if technically somehow possible how to document and explain that to our users.

As a result, I will just preconfigure this such that it will be set when the file is created whilst populating the workspace for the first time. However, we will not be able to give projects control to manage this feature after the workspace has been populated. So if the developers in your team already have setup IntelliJ and later your project wants to change (toggle) this option, then you need your users to delete the workspace.xml from your workspace and reconfigure it or you have to blame Jetbrains and ask them to rework the configuration structures to something more reasonable since this is an obvious anti-pattern.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: 🆕 New
Development

Successfully merging a pull request may close this issue.

1 participant