Add items to CLion's New Project window
Answered
I need to add an item to the list of new CLion projects. It's a plugin written in Java with IntelliJ IDEA 2023.1.2
I found this https://intellij-support.jetbrains.com/hc/en-us/community/posts/360000055950-how-can-you-add-items-to-CLion-s-New-Project-window and followed what he said by adding a "directoryProjectGenerator" in the plugin.xml
I created the class
public class testClionGenerator implements DirectoryProjectGenerator {
@Override
public @NotNull String getName() {
return "Test CLion Project";
}
@Override
public @Nullable Icon getLogo() {
return null;
}
@Override
public void generateProject(@NotNull Project project, @NotNull VirtualFile baseDir, @NotNull Object settings, @NotNull Module module) {
}
@Override
public @NotNull ValidationResult validate(@NotNull String baseDirPath) {
return null;
}
}
But I don't know what else to do. How do you change the panel on the right when you do "new project"? What function is called when you click on next/cancel/create? Do you have any tutorials?
Please sign in to leave a comment.
There’s no dedicated tutorial for
DirectoryProjectGenerator
.Please see https://plugins.jetbrains.com/docs/intellij/explore-api.html on how to navigate and find code samples in general.
For
com.intellij.directoryProjectGenerator
extension point: https://plugins.jetbrains.com/intellij-platform-explorer/extensions?extensions=com.intellij.directoryProjectGenerator