Skip to content

Find a better trigger for detecting when the project is loaded #137

@Luro02

Description

@Luro02

After a cloned submission is loaded, intellij has to detect the project and load it.

The PR #133 introduced code that nudges intellij to load the project as a maven project. It works most of the time, rarely it does not, which then looks like this:

Image

The code is written in a way that should force another load through maven, which should then load the project. There are a lot of uncertainties, because I could not find a good way to reliably detect that the project was loaded. One can register a listener that is called by the maven code, but these are sometimes called, even though it failed to load the project, or it did not finish loading the project completely.

Ideally there would be a more reliable way to detect the successful or failed loading of the project.

One idea is to make the code look at the Project ToolWindow (I think it is a tool window). Plugins can relatively easy fetch these, like demonstrated in the current code base (currently used to hide a maven popup). I think it would be possible to programmatically go through the listed files, if all are listed (e.g. the submission code), it can be assumed that the project was loaded successfully.

The main motivation for a better trigger is to improve reliability, there is some code that relies on this (namely the one that opens a class file).

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