Hello guys.
I am developing a plugin in which I redefine the commit button (to the company server), as well as other logic using com.intellij.dvcs.push.ui.CustomRenderedTreeNode. However, since 2024.3 it has started throwing a lot of errors. Do i have any alternative?
Hi,
Please share the errors you get.
java.lang.IllegalAccessError: failed to access class com.intellij.dvcs.push.ui.CustomRenderedTreeNode from class com.my.plugin.actions.git.panels.PushCommitsPanel$MyTreeCellRenderer (com.intellij.dvcs.push.ui.CustomRenderedTreeNode is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @6a6f9440; com.my.plugin.actions.git.panels.PushCommitsPanel$MyTreeCellRenderer is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @4284e7be)
Please share the full stacktrace, your Gradle build script configuration and plugin.xml part with dependencies.
StackTrace:
java.lang.IllegalAccessError: failed to access class com.intellij.dvcs.push.ui.CustomRenderedTreeNode from class com.my.plugin.actions.git.panels.PushCommitsPanel$MyTreeCellRenderer (com.intellij.dvcs.push.ui.CustomRenderedTreeNode is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @72528777; com.my.plugin.actions.git.panels.PushCommitsPanel$MyTreeCellRenderer is in unnamed module of loader com.intellij.ide.plugins.cl.PluginClassLoader @31f64cd5)
at com.my.plugin.actions.git.panels.PushCommitsPanel$MyTreeCellRenderer.customizeRenderer(PushCommitsPanel.kt:315)
at com.intellij.ui.CheckboxTreeBase$CheckboxTreeCellRendererBase.getTreeCellRendererComponent(CheckboxTreeBase.java:154)
at com.intellij.ui.tree.ui.DefaultTreeUI.getRenderer(DefaultTreeUI.java:208)
at com.intellij.ui.tree.ui.DefaultTreeUI$2.getNodeDimensions(DefaultTreeUI.java:659)
at java.desktop/javax.swing.tree.AbstractLayoutCache.getNodeDimensions(AbstractLayoutCache.java:497)
at com.intellij.ui.tree.ui.DefaultTreeLayoutCache.access$getNodeDimensions(DefaultTreeLayoutCache.kt:19)
at com.intellij.ui.tree.ui.DefaultTreeLayoutCache$Node.getBounds(DefaultTreeLayoutCache.kt:539)
at com.intellij.ui.tree.ui.DefaultTreeLayoutCache.getBounds(DefaultTreeLayoutCache.kt:197)
at java.desktop/javax.swing.plaf.basic.BasicTreeUI.getPathBounds(BasicTreeUI.java:679)
at java.desktop/javax.swing.plaf.basic.BasicTreeUI.getPathBounds(BasicTreeUI.java:672)
at com.intellij.ui.tree.ui.DefaultTreeUI.getPathBounds(DefaultTreeUI.java:873)
at java.desktop/javax.swing.JTree.getPathBounds(JTree.java:2195)
at com.intellij.util.ui.tree.TreeUtil.repaintPath(TreeUtil.java:160)
at com.intellij.ui.tree.ui.DefaultTreeUI.repaintPath(DefaultTreeUI.java:243)
at com.intellij.ui.tree.ui.DefaultTreeUI$5.propertyChange(DefaultTreeUI.java:860)
at java.desktop/java.beans.PropertyChangeSupport.fire(PropertyChangeSupport.java:343)
at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:335)
at java.desktop/java.beans.PropertyChangeSupport.firePropertyChange(PropertyChangeSupport.java:268)
at java.desktop/java.awt.Component.firePropertyChange(Component.java:8764)
at com.intellij.ui.treeStructure.Tree.firePropertyChange(Tree.java:638)
at java.desktop/javax.swing.JTree.setLeadSelectionPath(JTree.java:1742)
at java.desktop/javax.swing.plaf.basic.BasicTreeUI.setLeadSelectionPath(BasicTreeUI.java:2810)
at java.desktop/javax.swing.plaf.basic.BasicTreeUI.setLeadSelectionPath(BasicTreeUI.java:2801)
at java.desktop/javax.swing.plaf.basic.BasicTreeUI$Handler.valueChanged(BasicTreeUI.java:4248)
at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.fireValueChanged(DefaultTreeSelectionModel.java:650)
at com.intellij.ui.treeStructure.Tree$MySelectionModel.fireValueChanged(Tree.java:961)
at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.notifyPathChange(DefaultTreeSelectionModel.java:1120)
at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.setSelectionPaths(DefaultTreeSelectionModel.java:306)
at java.desktop/javax.swing.tree.DefaultTreeSelectionModel.setSelectionPath(DefaultTreeSelectionModel.java:200)
at java.desktop/javax.swing.JTree.setSelectionPath(JTree.java:1710)
at com.vk.admstorm.actions.git.panels.PushCommitsPanel.<init>(PushCommitsPanel.kt:141)
at com.vk.admstorm.git.sync.commits.NotSyncCommitsDialog.<init>(NotSyncCommitsDialog.kt:163)
at com.vk.admstorm.git.sync.commits.NotSyncCommitsDialog$Companion.show(NotSyncCommitsDialog.kt:37)
at com.vk.admstorm.git.sync.commits.GitCommitComparison.showDialog$lambda$0(GitCommitComparison.kt:52)
at com.intellij.openapi.application.ActionsKt.invokeLater$lambda$5(actions.kt:60)
at com.intellij.openapi.application.TransactionGuardImpl.runWithWritingAllowed(TransactionGuardImpl.java:236)
at com.intellij.openapi.application.TransactionGuardImpl.access$100(TransactionGuardImpl.java:25)
at com.intellij.openapi.application.TransactionGuardImpl$1.run(TransactionGuardImpl.java:198)
at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runIntendedWriteActionOnCurrentThread$lambda$2(AnyThreadWriteThreadingSupport.kt:217)
at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:128)
at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runIntendedWriteActionOnCurrentThread(AnyThreadWriteThreadingSupport.kt:216)
at com.intellij.openapi.application.impl.ApplicationImpl.runIntendedWriteActionOnCurrentThread(ApplicationImpl.java:842)
at com.intellij.openapi.application.impl.ApplicationImpl$2.run(ApplicationImpl.java:421)
at com.intellij.util.concurrency.ChildContext$runInChildContext$1.invoke(propagation.kt:101)
at com.intellij.util.concurrency.ChildContext$runInChildContext$1.invoke(propagation.kt:101)
at com.intellij.util.concurrency.ChildContext.runInChildContext(propagation.kt:107)
at com.intellij.util.concurrency.ChildContext.runInChildContext(propagation.kt:101)
at com.intellij.util.concurrency.ContextRunnable.run(ContextRunnable.java:27)
at com.intellij.openapi.application.impl.FlushQueue.runNextEvent(FlushQueue.java:117)
at com.intellij.openapi.application.impl.FlushQueue.flushNow(FlushQueue.java:43)
at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:318)
at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:781)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:728)
at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:722)
at java.base/java.security.AccessController.doPrivileged(AccessController.java:400)
at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:87)
at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:750)
at com.intellij.ide.IdeEventQueue.defaultDispatchEvent(IdeEventQueue.kt:675)
at com.intellij.ide.IdeEventQueue._dispatchEvent(IdeEventQueue.kt:573)
at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18$lambda$17$lambda$16$lambda$15(IdeEventQueue.kt:355)
at com.intellij.openapi.progress.impl.CoreProgressManager.computePrioritized(CoreProgressManager.java:857)
at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18$lambda$17$lambda$16(IdeEventQueue.kt:354)
at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$2$lambda$1(IdeEventQueue.kt:1045)
at com.intellij.openapi.application.WriteIntentReadAction.lambda$run$0(WriteIntentReadAction.java:24)
at com.intellij.openapi.application.impl.AnyThreadWriteThreadingSupport.runWriteIntentReadAction(AnyThreadWriteThreadingSupport.kt:128)
at com.intellij.openapi.application.impl.ApplicationImpl.runWriteIntentReadAction(ApplicationImpl.java:916)
at com.intellij.openapi.application.WriteIntentReadAction.compute(WriteIntentReadAction.java:55)
at com.intellij.openapi.application.WriteIntentReadAction.run(WriteIntentReadAction.java:23)
at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$2(IdeEventQueue.kt:1045)
at com.intellij.ide.IdeEventQueueKt.performActivity$lambda$3(IdeEventQueue.kt:1054)
at com.intellij.openapi.application.TransactionGuardImpl.performActivity(TransactionGuardImpl.java:109)
at com.intellij.ide.IdeEventQueueKt.performActivity(IdeEventQueue.kt:1054)
at com.intellij.ide.IdeEventQueue.dispatchEvent$lambda$18(IdeEventQueue.kt:349)
at com.intellij.ide.IdeEventQueue.dispatchEvent(IdeEventQueue.kt:395)
at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:207)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:128)
at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:117)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:113)
at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:105)
at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:92)
Gradle build script (pastebin)
Dependencies:
<depends>com.intellij.modules.platform</depends>
<depends>org.jetbrains.plugins.remote-run</depends>
<depends>org.jetbrains.plugins.terminal</depends>
<depends>com.jetbrains.php</depends>
<depends>Git4Idea</depends>
Hi,
I don’t understand how you were able to access com.intellij.dvcs.push.ui.CustomRenderedTreeNode
in 2024.3 and earlier versions as it was package-private and now is @Internal
.
Am I missing something?
Previously I could use error suppression with ‘ignored-problems.txt’ in pluginVerification and everything were ok, but now it converted to errors since 20242.3 (because @internal
now)
This is were really cool feature because if company have very large infrastructure with customs dev-containers, ‘CustomRenderedTreeNode’ gave a lot of options. Is there any alternative or extension points?
This seems impossible as the class wasn’t public and you would get a compilation error, or am I missing something?
In general, it seems that this class was never available for public use. If this is the case, you can try requesting to open this API on YouTrack: https://youtrack.jetbrains.com/issues/IJPL (Subsystem: Version Control).
You can also describe your use case in detail (I suggest a new topic), and the community or our developers will try to help you with finding an alternative approach.
Okay. I will try. Thank you for advice
Also in many cases you can simply copy such code and adapt it, as some UI things just are not API at all