Skip to content

Refactor Jetbrains IDEs #505

@jan-vcapgemini

Description

@jan-vcapgemini

PR #480 was merged but this is not really completed:

  • Introduce an abstract class IdeaBasedIdeToolCommandlet between IdeToolCommandlet and its current implementations Intellij and AndroidStudio. There might come support for additional such IDEs to IDEasy in the future (PyCharm, WebStorm, etc.).
  • Extract common functionalities to the new abstract base class.
    • IMHO plugin installation is the same for all IDEA/JetBrains IDEs except for some parameterization of the download URL and the IDE folder name in the plugins folder. UPDATE: This is more or less a duplicate of Add plugin installation support to AndroidStudio #479 - at least that would be the best way to resolve Add plugin installation support to AndroidStudio #479 instead of copy&paste approach.
    • IDEA_PROPERTIES mechanism is the same for all IDEA/JetBrains IDEs only the name of the environment variable differs. The Variable value differs per workspace. Therefore setting it once in postInstall with a fixed workspace name is buggy since we write the resolved workspace name in there instead of ${WORKSPACE}. We could better "export" this property via ProcessContext for each call of that IDE instead of writing to ide.properties files. Also it seems an existing flaw that we use the same-filename for different IDE products: See android-studio and IntelliJ. As both files have different content, they also must have different filenames as otherwise one overrides the other. - done with this commit.
    • The getBinaryName() problem is the same for all IDEA/JetBrains IDEs. The current solution is still not nice. I would prefer a postInstall hook that creates a simple wrapper bash script if the default command is not already present. So create bash script studio that only calls studio64.exe $*, etc. UPDATE: This point is more or less a duplicate of Generalize intellij OS startup command for all OS's #440 (but that issue is only about IntelliJ).

Originally posted by @hohwille in #339 (comment)

Metadata

Metadata

Labels

android-studioAndroid Studio IDE from Jet-BrainsenhancementNew feature or requestintellijIntelliJ IDE from Jet-Brains

Projects

Status

✅ Done

Relationships

None yet

Development

No branches or pull requests

Issue actions