Skip to content

Proper support of project modules in the IntelliJ platform #60

@raja-s

Description

@raja-s

IntelliJ-based IDEs have a specific workspace model: a project is a collection of modules which may reside at different locations in the file system without any sort of hierarchy. This model may be suitable to represent project hierarchies, with a separate module for each "withed" project, which would allow to have entries for all the different subprojects of a project in the "Project" tool window, very similar to what GPS does.

Currently, the Ada-IntelliJ plugin simply assumes the presence of a single module in an Ada project. It even completely ignores modules and directly works with the project, for example using Project#getBaseDir() to get the project's root directory. The fact that this method is now deprecated in newer versions is proof that this behavior is broken and should be fixed by properly handling project modules:

@deprecated No such concept as "project root". Project consists of module set, each has own content root set.

There's even a bug related to project templates originating from this broken behavior: creating a project from a template is done by creating a module of the currently defined Ada module type, but that operation either fails or produces incorrect results when manually creating a new module in an existing project (as opposed to the module being automatically created during the process of creating an entire new project) since the template files are copied to the root of the project instead of that of the module being created.

A fix to this broken behavior may require major changes throughout the project, including:

  • Properly defining Ada module type(s) within the IntelliJ platform
  • Possibly transforming certain project components into module components
  • Readapting affected functionalities to the notion of modules

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions