Skip to content

Conversation

@jan-vcapgemini
Copy link
Contributor

@jan-vcapgemini jan-vcapgemini commented Feb 26, 2025

Fixes: #654

Implements:

  • added plugin marker file after successful plugin installation as well as checks for existence of it
  • added edition marker file and checks as well as checks for existence of it
  • added tests for new marker files
  • added ProcessContext to installPlugin methods
  • initialized plugins in run of IdeToolCommandlet
  • added check for successful plugin installation to vscode
  • made sure that if a conflict with editions was detected, all ide matching plugin marker files get re-initialized properly
  • set edition marker test os to windows
  • moved testIntellijInstallPluginWithCustomUrl from IntellijTest to new InstallPluginCommandletTest and renamed it to testInstallPlugin
  • added ProcessContext to install and postInstall methods of LocalToolCommandlet
  • initialized a new context in IdeToolDummyCommandlet instead of using an empty EnvironmentContext

Fixes: devonfw#654

### Implements:
* added plugin marker file after successful plugin installation and checks
* added edition marker file and checks
* added tests for new marker files
* added ProcessContext to installPlugin methods
* initialized plugins in run of IdeToolCommandlet
* added check for successful plugin installation to vscode
@jan-vcapgemini jan-vcapgemini moved this from 🆕 New to Team Review in IDEasy board Feb 26, 2025
@jan-vcapgemini jan-vcapgemini self-assigned this Feb 26, 2025
@jan-vcapgemini jan-vcapgemini added plugins related to plugins (for Eclipse, Intellij, VSCode, etc.) enhancement New feature or request labels Feb 26, 2025
jan-vcapgemini and others added 9 commits February 26, 2025 15:52
adjusted vscode and intellij tests
added --force to vscode plugin installation
made sure that if a conflict with editions was detected, all ide matching plugin marker files get re-initialized properly
set edition marker test os to windows
added missing null checks
moved testIntellijInstallPluginWithCustomUrl from IntellijTest to new InstallPluginCommandletTest and renamed it to testInstallPlugin
removed ProcessContext from installPlugin
added installPlugin implementation without ProcessContext
@coveralls
Copy link
Collaborator

coveralls commented Feb 28, 2025

Pull Request Test Coverage Report for Build 13772747296

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • 128 unchanged lines in 12 files lost coverage.
  • Overall coverage increased (+0.1%) to 68.619%

Files with Coverage Reduction New Missed Lines %
com/devonfw/tools/ide/process/EnvironmentContext.java 1 0.0%
com/devonfw/tools/ide/process/EnvironmentContextEmpty.java 2 0.0%
com/devonfw/tools/ide/tool/intellij/Intellij.java 2 86.49%
com/devonfw/tools/ide/tool/ide/IdeToolCommandlet.java 4 77.59%
com/devonfw/tools/ide/tool/eclipse/Eclipse.java 6 62.82%
com/devonfw/tools/ide/tool/plugin/PluginBasedCommandlet.java 10 81.82%
com/devonfw/tools/ide/tool/vscode/Vscode.java 11 80.46%
com/devonfw/tools/ide/tool/LocalToolCommandlet.java 12 88.24%
com/devonfw/tools/ide/tool/ide/IdeaBasedIdeToolCommandlet.java 14 70.79%
com/devonfw/tools/ide/tool/mvn/Mvn.java 19 64.97%
Totals Coverage Status
Change from base Build 13772587587: 0.1%
Covered Lines: 7934
Relevant Lines: 11117

💛 - Coveralls

@hohwille hohwille added this to the release:2025.03.001 milestone Mar 3, 2025
@jan-vcapgemini jan-vcapgemini marked this pull request as ready for review March 3, 2025 12:42
@jan-vcapgemini
Copy link
Contributor Author

jan-vcapgemini commented Mar 3, 2025

I've run into problems with the new ProcessContext approach. Now intellij can't install any plugins while another instance of intellij is running. I've traced this down to the different behavior of git-bash.exe vs bash.exe but have not found a solution yet.

jan-vcapgemini and others added 3 commits March 3, 2025 19:06
added ProcessContext to install and postInstall methods of LocalToolCommandlet
initialized a new context in IdeToolDummyCommandlet instead of using an empty EnvironmentContext
Copy link
Member

@hohwille hohwille left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jan-vcapgemini thanks for your PR. This story turned out to be underestimated and more complex than initially thought. Great that you found a great solution and made everything work 🥇
Still I have some review comments for rework. I will resolve the 1-2 nice-to-haves but the remaining ones should be addressed. Then we can finally merge this and again bring a great improvement to our users.

jan-vcapgemini and others added 6 commits March 6, 2025 11:47
…dCommandlet.java

Co-authored-by: Jörg Hohwiller <hohwille@users.noreply.github.com>
…dCommandlet.java

Co-authored-by: Jörg Hohwiller <hohwille@users.noreply.github.com>
removed create edition marker file logic
adjusted tests
removed install method using EnvironmentContext
replaced all install implementations with ProcessContext
change return param of installPlugin to boolean
moved testCheckPluginInstallation from IdeToolCommandletTest to IntellijTest
moved testCheckEditionConflictInstallation from IdeToolCommandletTest to IntellijTest
Adjusted IntellijTest testIntellijPluginInstallWithCustomRepoUrl to use install instead of run
@hohwille hohwille merged commit 0510421 into devonfw:main Mar 10, 2025
3 checks passed
@github-project-automation github-project-automation bot moved this from Team Review to ✅ Done in IDEasy board Mar 10, 2025
@hohwille hohwille added the story-reviewed Marks PRs that have been presented in the sprint-review meeting or that do not need to be presented. label Mar 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request plugins related to plugins (for Eclipse, Intellij, VSCode, etc.) story-reviewed Marks PRs that have been presented in the sprint-review meeting or that do not need to be presented.

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

Improve plugin support

4 participants