Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow import of run configuration folderName from Gradle / External Project Model #2897

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

shartte
Copy link

@shartte shartte commented Jan 8, 2025

This enables JetBrains/gradle-idea-ext-plugin#87 to be solved, by importing the folderName model property for run configurations.

Empty strings are converted to null here, since the IDE expects null for "no folder" and doesn't react nicely to empty strings being set.

Tested using an adapted idea-ext to work (these run configs were imported from Gradle, including the folders):
image

No tests were adapted since I couldn't find any tests that actually tested this external model import.


Example on how to make use of this with idea-ext, without having to build a custom plugin:

var appRun = new Application("name", project) {
    @SuppressWarnings("unchecked")
    @Override
    public Map<String, ?> toMap() {
        var result = (Map<String, Object>) super.toMap();
        result.put("folderName", "RUN SUBFOLDER");
        return result;
    }
};
runConfigurations.add(appRun); // add as normal to the container

@shartte
Copy link
Author

shartte commented Jan 8, 2025

This might of interest to you @nskvortsov, if you're still maintaining idea-ext

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant