Can't find IgnoreFileActionKt with the Idea build 242
Answered
vesion:
update from 2024.1.4 (build 241) to 2024.2 (build 242)
api
com.intellij.openapi.vcs.changes.ignore.actions.IgnoreFileActionKt
usage:
private static void ignoreFiles(@NotNull Project project, List<VirtualFile> filesToAdd,
VirtualFile excludeVirtualFile, GitVcs gitVcs, GitRepository gitRepository) {
List<IgnoredFileBean> ignores =
filesToAdd.stream().map(file -> IgnoredBeanFactory.ignoreFile(file, project)).collect(Collectors.toList());
WriteCommandAction.writeCommandAction(project)
.withName("Git Ignore Writer")
.run(() -> IgnoreFileActionKt.writeIgnoreFileEntries(project, excludeVirtualFile, ignores, gitVcs,
gitRepository.getRoot()));
}
I can see it's still be used at this kt class : git4idea.ignore.actions.AddToGitExcludeAction
but I can't use that class or found it in the lib. Looks like it's been deleted in the build 242.
How can I use this function in the new build ? (BTW, how can I check the source code when I'm developing plugin. It's hard to read the decompiled code)
Please sign in to leave a comment.
You must use IntelliJ Platform Gradle Plugin (2.x) https://plugins.jetbrains.com/docs/intellij/tools-intellij-platform-gradle-plugin.html when targeting 2024.2, see big warning on https://plugins.jetbrains.com/docs/intellij/api-notable-list-2024.html and corresponding error message when trying to use Gradle IntelliJ Plugin (1.x).
Took some time to migrate. And It works fine, thanks a lot.
And may I ask one more question: I'd like to use the customPluginRepository like this:
But there is a problem :
unable to resolve class credentials
orCould not get unknown property 'CustomPluginRepositoryType'
May be I need to wait the next version of Gradle Plugin ?
Are you using Groovy instead of Kotlin DSL?
Try using the following class instead
com.jetbrains.plugin.structure.intellij.repository.CustomPluginRepositoryListingType
yeah, I'm using Groovy. It worked with CustomPluginRepositoryListingType, thanks for that。
But there is another problem when I continue :
exception is :
I don't know where it come from . So I use the localPlugin instead