-
Notifications
You must be signed in to change notification settings - Fork 21
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
#1309: Improve plugin managment #229
#1309: Improve plugin managment #229
Conversation
…te else add to plugins map
Pull Request Test Coverage Report for Build 9221194472Details
💛 - Coveralls |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
except the unused import and maybe the refactoring for the assert(), LGTM :)
cli/src/main/java/com/devonfw/tools/ide/tool/PluginBasedCommandlet.java
Outdated
Show resolved
Hide resolved
cli/src/test/java/com/devonfw/tools/ide/tool/PluginBasedCommandletTest.java
Outdated
Show resolved
Hide resolved
…ement' into Enhancement/improve_plugin_management
…ement' into Enhancement/improve_plugin_management
added PluginMaps wrapper class modified testGetPluginsMap and added testGetPlugin
After reviewing and analyzing issue devonfw/ide#1309, I found that the issue of duplicate plugins, caused by not properly removing the plugins folder after every tool update, does not exist in IDEasy. This behavior has been thoroughly tested for both Eclipse and IntelliJ. Additionally, I have made modifications to PluginBasedCommandlet.java. These modifications introduce two PluginMaps: one with plugin IDs as keys and another with plugin names as keys. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your implementation, LGTM 🌹
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@diiinesh thanks for your rework, improvements and testing on this feature.
I took your approach further to encapsulate the plugin mapping into the new PluginMaps
class. See my review comments with the suggested code-changes.
The JUnit would still need adoption that I can not do reliably in the browser.
After all I am thinking that we might have over-complicated things with adding the additional by-id map:
- some plugins may not even have an ID but that is covered in the code
- eclipse plugin ID is a comma separated list of feature IDs. In case you have more than one feature overriding can become problematic: If you want to override the plugin configuration but want to have a more or less features, the plugin ID will change and therefore you are not technically overriding things even if you pick the same filename
«plugin».properties
. Therefore it is impossible to reduce the number of features but only add more features.
Maybe always using themapByName
forgetPlugins()
would be a better solution...
cli/src/main/java/com/devonfw/tools/ide/tool/PluginBasedCommandlet.java
Outdated
Show resolved
Hide resolved
cli/src/test/java/com/devonfw/tools/ide/tool/PluginBasedCommandletTest.java
Outdated
Show resolved
Hide resolved
cli/src/main/java/com/devonfw/tools/ide/tool/PluginBasedCommandlet.java
Outdated
Show resolved
Hide resolved
Co-authored-by: Jörg Hohwiller <hohwille@users.noreply.github.com>
…dlet.java Co-authored-by: Jörg Hohwiller <hohwille@users.noreply.github.com>
…dlet.java Co-authored-by: Jörg Hohwiller <hohwille@users.noreply.github.com>
…ment # Conflicts: # cli/src/main/java/com/devonfw/tools/ide/tool/PluginBasedCommandlet.java # cli/src/test/java/com/devonfw/tools/ide/tool/PluginBasedCommandletTest.java
…ement' into Enhancement/improve_plugin_management
…ement' into Enhancement/improve_plugin_management # Conflicts: # cli/src/main/java/com/devonfw/tools/ide/tool/PluginBasedCommandlet.java # cli/src/test/java/com/devonfw/tools/ide/tool/PluginBasedCommandletTest.java
@diiinesh there are test errors:
Please have a look. Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@diiinesh thanks for the update. You finally nailed it 👍
Solves devonfw/ide#1309
Improves plugin managment by solving the error of installing duplicate plugins