#2097: Configure Ide Plugins in the GUI #2150
Conversation
- Added testing class for modals
- Added logging to IdeGuiStateManager. - Added functionality, that selecting a different project now switches the IdeContext to the new project.
- Added testing class for modals
- Added logging to IdeGuiStateManager. - Added functionality, that selecting a different project now switches the IdeContext to the new project.
…t-for-gui' into devonfw#1785-implement-modals-in-idecontext
- Added functionality, that selecting a different project now switches the IdeContext to the new project.
…plementation' into devonfw#1802-state-management-implementation
…r other ui feature branches
- added DI for IdeGuiStateManager.switchContext
…reading the list of workspaces/projects instead of reading those from the UI
…nager, when switchContext(Path rootDirectory, ...) is called.
This reverts commit 6f92d93.
…plementation' into devonfw#1802-state-management-implementation
…tateManager is now set when calling getInstance(), allowing us to provide a getInstance() method with a DI parameter
… getInstance()) (see previous commit)
…can be extended by tests
…plementation' into devonfw#1802-state-management-implementation
… the GUI, refactored ToolTreeCell.java to be in its own class file, added tests for the new add plugin feature
…tion-configuration-via-gui"
…tion-configuration-via-gui"
…oolSettingsServiceTest
…ition-configuration-via-gui" into "feature/2097-configure-ide-plugins-in-the-gui" and align the changes
…ion-or-edition-configuration-via-gui Content was already reconciled in 0cf29a0, which was committed without recording feature/2045's tip as a second parent, leaving the merge-base between the two branches stale and inflating PR diffs. This commit fixes the ancestry without changing any files.
Coverage Report for CI Build 29214208588Coverage decreased (-0.7%) to 71.491%Details
Uncovered ChangesNo uncovered changes found. Coverage Regressions47 previously-covered lines in 4 files lost coverage.
Coverage Stats💛 - Coveralls |
| this.context.getFileAccess().writeProperties(props, pluginFile); | ||
| } |
There was a problem hiding this comment.
There seems to be an issue where the plugin state is not refreshed after saving.
Steps to reproduce:
- Enable or disable a plugin in the Tool Configuration.
- Save the changes.
- Switch to main tab and then back to Tool Configuration.
Observed:
The plugin state is reset to its previous value and the recent change is no longer reflected in the UI.
This should fix the issue:
| this.context.getFileAccess().writeProperties(props, pluginFile); | |
| } | |
| this.context.getFileAccess().writeProperties(props, pluginFile); | |
| this.plugins = null; | |
| } |
Invalidate the plugin cache so that the next call to getPlugins() reloads the updated state from disk.
| * @return the created {@link ToolPluginDescriptor}. | ||
| */ | ||
| public ToolPluginDescriptor createPlugin(String name, String id, String url, String tags) { | ||
|
|
There was a problem hiding this comment.
Optional suggestion: consider checking if a plugin with the same name already exists before creating it. Otherwise, adding the same plugin multiple times can temporarily result in duplicate entries being shown in the UI.
| ToolPlugins existingPlugins = getPlugins(); | |
| if (existingPlugins.getByName(name) != null) { | |
| return null; | |
| } | |
| could prevent duplicate entries from being added accidentally. | |
|
While testing plugin installation, I ran into an issue that I could not fully explain. Only one instance of IDEA can be run at a time.The installation is triggered via: idea64.exe installPlugins org.intellij.scalaand exits with code 1. |
|
Since plugins can now be added from the UI, it might also be useful to provide a way to remove plugins again. |
This PR fixes #2097
depends on #2080
Implemented changes:
PluginBasedCommandlet-based (currently IDE tools like Eclipse/IntelliJ/VS Code, etc) can now list, enable/disable, and add plugins directly from the GUI.ToolTreeNodeas a marker interface so the settingsTreeViewcan hold bothToolConfiguration(tool rows) and the newPluginConfiguration(plugin rows) as children of a tool.PluginConfigurationmodel representing a single plugin (name, id, active flag, parent tool), withisParentEnabled()so plugin rows can reflect their parent tool's enabled state.ToolTreeCellout ofToolSettingsControllerinto its own file; it now dispatches rendering by node type — group header, tool row (checkbox | name | edition combo | version combo | error icon), or plugin row (checkbox | name | id).onAddPlugin) that lets the user create a new plugin for the selected tool, prompting for plugin ID, name, tags, and URL (when required by the tool), and persists it viaToolSettingsService.createPlugin.ToolSettingsServicemethods:loadPluginsForTool,savePluginActive,isPluginUrlNeeded,createPlugin, backed byPluginBasedCommandlet.ToolSettingsServiceTestcovering plugin loading, activation/deactivation, and plugin creation.Testing instructions
intellijoreclipse).mvn clean testin theguimodule and confirm all tests pass.Checklist for this PR
Make sure everything is checked before merging this PR. For further info please also see
our DoD.
mvn clean testlocally all tests pass and build is successful#«issue-id»: «brief summary»(e.g.#921: fixed setup.bat). If no issue ID exists, title only.In Progressand assigned to you or there is no issue (might happen for very small PRs)with
internalChecklist for tool commandlets