How to invoke the commit action for a file

I would like to add a commit action to my plugin, so it would commit a file to the VCS (SVN in our case). I've found the following solution to commit a file immediately, but I would like to show the default commit dialog of IntelliJ.


ProjectLevelVcsManager plvm = ProjectLevelVcsManager.getInstance(project);
AbstractVcs vcs = plvm.getVcsFor(vf);
VcsContextFactory contextFactory = PeerFactory.getInstance().getVcsContextFactory();
FilePath path = contextFactory.createFilePathOn(virtualFile);
List<Change> changes = new ArrayList<Change>();
CurrentContentRevision cr = new CurrentContentRevision(path);
Change c = new Change(cr, cr);
changes.add(c);
vcs.getCheckinEnvironment().commit(changes, "Commit " + virtualFile.getNameWithoutExtension());

How can I show the default commit dialog for a given file?  Thanks a lot!

Tim

6 comments
Comment actions Permalink

Hello Tim,

The method you probably want is CommitChangeListDialog.commitPaths()

I would like to add a commit action to my plugin, so it would commit a
file to the VCS (SVN in our case). I've found the following solution
to commit a file immediately, but I would like to show the default
commit dialog of IntelliJ.

ProjectLevelVcsManager plvm =
ProjectLevelVcsManager.getInstance(project);
AbstractVcs vcs = plvm.getVcsFor(vf);
VcsContextFactory contextFactory =
PeerFactory.getInstance().getVcsContextFactory();
FilePath path = contextFactory.createFilePathOn(virtualFile);
List<Change> changes = new ArrayList<Change>();
CurrentContentRevision cr = new CurrentContentRevision(path);
Change c = new Change(cr, cr);
changes.add(c);
vcs.getCheckinEnvironment().commit(changes, "Commit " +
virtualFile.getNameWithoutExtension());
How can I show the default commit dialog for a given file?  Thanks a
lot!


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

Hello Dmitry,

That's the method I need, indeed. Thanks a lot. Like always, it's so embarrassing simple once you know it. :-)

Although I still have a problem invocing this method. He can't find the class CommitChangeListDialog (although the code I posted above works perfectly) when I hadn't the IntelliJ community edition source code imported in my project yet.

Now I have added the IntelliJ source code and he can find this class, but when I run IntelliJ in debug, I get this error:

[ 133462]  ERROR - ij.components.ComponentManager - Error while registering component: com.intellij.openapi.components.ComponentConfig@d78a70
com.intellij.diagnostic.PluginException: Prohibited package name: java.lang [Plugin: System9 DBDashboard]
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:492)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:466)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.access$100(ComponentManagerImpl.java:452)
at com.intellij.openapi.components.impl.ComponentManagerImpl.a(ComponentManagerImpl.java:119)
at com.intellij.openapi.components.impl.ComponentManagerImpl.initComponents(ComponentManagerImpl.java:383)
at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:89)
at com.intellij.openapi.project.impl.ProjectImpl.init(ProjectImpl.java:245)
at com.intellij.openapi.project.impl.ProjectManagerImpl.a(ProjectManagerImpl.java:269)
at com.intellij.openapi.project.impl.ProjectManagerImpl.b(ProjectManagerImpl.java:297)
at com.intellij.openapi.project.impl.ProjectManagerImpl.access$400(ProjectManagerImpl.java:76)
at com.intellij.openapi.project.impl.ProjectManagerImpl$6.run(ProjectManagerImpl.java:470)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$3.run(ProgressManagerImpl.java:255)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:482)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$4.run(ProgressManagerImpl.java:267)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:205)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:233)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:196)
at com.intellij.openapi.application.impl.ApplicationImpl$8$1.run(ApplicationImpl.java:575)
at com.intellij.openapi.application.impl.ApplicationImpl$6.run(ApplicationImpl.java:383)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:131)
Caused by: java.lang.SecurityException: Prohibited package name: java.lang
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:480)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:626)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.lang.ClassLoader.defineClass(ClassLoader.java:466)
at com.intellij.util.lang.UrlClassLoader._defineClass(UrlClassLoader.java:123)
at com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:119)
at com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:95)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(PluginClassLoader.java:94)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:57)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.lang.ClassLoader.defineClass(ClassLoader.java:466)
at com.intellij.util.lang.UrlClassLoader._defineClass(UrlClassLoader.java:123)
at com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:119)
at com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:95)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(PluginClassLoader.java:94)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:57)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.lang.ClassLoader.defineClass(ClassLoader.java:466)
at com.intellij.util.lang.UrlClassLoader._defineClass(UrlClassLoader.java:123)
at com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:119)
at com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:95)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(PluginClassLoader.java:94)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:57)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.lang.ClassLoader.defineClass(ClassLoader.java:466)
at com.intellij.util.lang.UrlClassLoader._defineClass(UrlClassLoader.java:123)
at com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:119)
at com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:95)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(PluginClassLoader.java:94)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:57)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:476)
... 25 more
[ 133508]  ERROR - ij.components.ComponentManager - IntelliJ IDEA 10.0.3  Build #IU-103.255
[ 133508]  ERROR - ij.components.ComponentManager - JDK: 1.6.0_22
[ 133508]  ERROR - ij.components.ComponentManager - VM: Java HotSpot(TM) Client VM
[ 133508]  ERROR - ij.components.ComponentManager - Vendor: Sun Microsystems Inc.
[ 133508]  ERROR - ij.components.ComponentManager - OS: Windows 7
[ 133508]  ERROR - ij.components.ComponentManager - Last Action:  
[ 133508]  ERROR - ij.components.ComponentManager - Original exception:  
java.lang.SecurityException: Prohibited package name: java.lang
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:480)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:626)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.lang.ClassLoader.defineClass(ClassLoader.java:466)
at com.intellij.util.lang.UrlClassLoader._defineClass(UrlClassLoader.java:123)
at com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:119)
at com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:95)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(PluginClassLoader.java:94)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:57)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.lang.ClassLoader.defineClass(ClassLoader.java:466)
at com.intellij.util.lang.UrlClassLoader._defineClass(UrlClassLoader.java:123)
at com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:119)
at com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:95)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(PluginClassLoader.java:94)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:57)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.lang.ClassLoader.defineClass(ClassLoader.java:466)
at com.intellij.util.lang.UrlClassLoader._defineClass(UrlClassLoader.java:123)
at com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:119)
at com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:95)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(PluginClassLoader.java:94)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:57)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.lang.ClassLoader.defineClass(ClassLoader.java:466)
at com.intellij.util.lang.UrlClassLoader._defineClass(UrlClassLoader.java:123)
at com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:119)
at com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:95)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(PluginClassLoader.java:94)
at com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoader.java:57)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:476)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.a(ComponentManagerImpl.java:466)
at com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRegistry.access$100(ComponentManagerImpl.java:452)
at com.intellij.openapi.components.impl.ComponentManagerImpl.a(ComponentManagerImpl.java:119)
at com.intellij.openapi.components.impl.ComponentManagerImpl.initComponents(ComponentManagerImpl.java:383)
at com.intellij.openapi.components.impl.ComponentManagerImpl.init(ComponentManagerImpl.java:89)
at com.intellij.openapi.project.impl.ProjectImpl.init(ProjectImpl.java:245)
at com.intellij.openapi.project.impl.ProjectManagerImpl.a(ProjectManagerImpl.java:269)
at com.intellij.openapi.project.impl.ProjectManagerImpl.b(ProjectManagerImpl.java:297)
at com.intellij.openapi.project.impl.ProjectManagerImpl.access$400(ProjectManagerImpl.java:76)
at com.intellij.openapi.project.impl.ProjectManagerImpl$6.run(ProjectManagerImpl.java:470)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$3.run(ProgressManagerImpl.java:255)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.run(ProgressManagerImpl.java:482)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$4.run(ProgressManagerImpl.java:267)
at com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressManagerImpl.java:205)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:233)
at com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(ProgressManagerImpl.java:196)
at com.intellij.openapi.application.impl.ApplicationImpl$8$1.run(ApplicationImpl.java:575)
at com.intellij.openapi.application.impl.ApplicationImpl$6.run(ApplicationImpl.java:383)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
at com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(ApplicationImpl.java:131)

I only get this error when I added the community source code module as a dependency of my plugin module. But when I remove this dependency he can only find the com.intellij.openapi.vcs.changes package, but no subpackage com.intellij.openapi.vcs.changes.ui.

My plugin devKit is version 1.0 and my module SDK is IDEA IU-103.255, as I'm using IntelliJ 10.0.3.

Thanks a lot for any advice.

0
Comment actions Permalink

Hello Tim,

Instead of adding the CE source code as a dependency to your module, you
need to attach it as source to the IDEA JDK.

That's the method I need, indeed. Thanks a lot. Like always, it's so
embarrassing simple once you know it. :)

Although I still have a problem invocing this method. He can't find
the class CommitChangeListDialog (although the code I posted above
works perfectly) when I hadn't the IntelliJ community edition source
code imported in my project yet.

Now I have added the IntelliJ source code and he can find this class,
but when I run IntelliJ in debug, I get this error:

  ERROR - ij.components.ComponentManager - Error while
registering component:
mailto:com.intellij.openapi.components.ComponentConfig@d78a70
com.intellij.diagnostic.PluginException: Prohibited package name:
java.lang
at
com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRe
gistry.a(ComponentManagerImpl.java:492)
at
com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRe
gistry.a(ComponentManagerImpl.java:466)
at
com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRe
gistry.access$100(ComponentManagerImpl.java:452)
at
com.intellij.openapi.components.impl.ComponentManagerImpl.a(ComponentM
anagerImpl.java:119)
at
com.intellij.openapi.components.impl.ComponentManagerImpl.initComponen
ts(ComponentManagerImpl.java:383)
at
com.intellij.openapi.components.impl.ComponentManagerImpl.init(Compone
ntManagerImpl.java:89)
at
com.intellij.openapi.project.impl.ProjectImpl.init(ProjectImpl.java:24
5)
at
com.intellij.openapi.project.impl.ProjectManagerImpl.a(ProjectManagerI
mpl.java:269)
at
com.intellij.openapi.project.impl.ProjectManagerImpl.b(ProjectManagerI
mpl.java:297)
at
com.intellij.openapi.project.impl.ProjectManagerImpl.access$400(Projec
tManagerImpl.java:76)
at
com.intellij.openapi.project.impl.ProjectManagerImpl$6.run(ProjectMana
gerImpl.java:470)
at
com.intellij.openapi.progress.impl.ProgressManagerImpl$3.run(ProgressM
anagerImpl.java:255)
at
com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.ru
n(ProgressManagerImpl.java:482)
at
com.intellij.openapi.progress.impl.ProgressManagerImpl$4.run(ProgressM
anagerImpl.java:267)
at
com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressM
anagerImpl.java:205)
at
com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessU
nderProgress(ProgressManagerImpl.java:233)
at
com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(Prog
ressManagerImpl.java:196)
at
com.intellij.openapi.application.impl.ApplicationImpl$8$1.run(Applicat
ionImpl.java:575)
at
com.intellij.openapi.application.impl.ApplicationImpl$6.run(Applicatio
nImpl.java:383)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441
)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecu
tor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.
java:908)
at java.lang.Thread.run(Thread.java:662)
at
com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(Applicat
ionImpl.java:131)
Caused by: java.lang.SecurityException: Prohibited package name:
java.lang
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:480)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:626)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.lang.ClassLoader.defineClass(ClassLoader.java:466)
at
com.intellij.util.lang.UrlClassLoader._defineClass(UrlClassLoader.java
:123)
at
com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:
119)
at
com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:9
5)
at
com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(Plug
inClassLoader.java:94)
at
com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoa
der.java:57)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.lang.ClassLoader.defineClass(ClassLoader.java:466)
at
com.intellij.util.lang.UrlClassLoader._defineClass(UrlClassLoader.java
:123)
at
com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:
119)
at
com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:9
5)
at
com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(Plug
inClassLoader.java:94)
at
com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoa
der.java:57)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.lang.ClassLoader.defineClass(ClassLoader.java:466)
at
com.intellij.util.lang.UrlClassLoader._defineClass(UrlClassLoader.java
:123)
at
com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:
119)
at
com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:9
5)
at
com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(Plug
inClassLoader.java:94)
at
com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoa
der.java:57)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.lang.ClassLoader.defineClass(ClassLoader.java:466)
at
com.intellij.util.lang.UrlClassLoader._defineClass(UrlClassLoader.java
:123)
at
com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:
119)
at
com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:9
5)
at
com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(Plug
inClassLoader.java:94)
at
com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoa
der.java:57)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at
com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRe
gistry.a(ComponentManagerImpl.java:476)
... 25 more
  ERROR - ij.components.ComponentManager - IntelliJ IDEA
10.0.3  Build #IU-103.255
  ERROR - ij.components.ComponentManager - JDK: 1.6.0_22
  ERROR - ij.components.ComponentManager - VM: Java
HotSpot(TM) Client VM
  ERROR - ij.components.ComponentManager - Vendor: Sun
Microsystems Inc.
  ERROR - ij.components.ComponentManager - OS: Windows 7
  ERROR - ij.components.ComponentManager - Last Action:
  ERROR - ij.components.ComponentManager - Original
exception:
java.lang.SecurityException: Prohibited package name: java.lang
at java.lang.ClassLoader.preDefineClass(ClassLoader.java:480)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:626)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.lang.ClassLoader.defineClass(ClassLoader.java:466)
at
com.intellij.util.lang.UrlClassLoader._defineClass(UrlClassLoader.java
:123)
at
com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:
119)
at
com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:9
5)
at
com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(Plug
inClassLoader.java:94)
at
com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoa
der.java:57)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.lang.ClassLoader.defineClass(ClassLoader.java:466)
at
com.intellij.util.lang.UrlClassLoader._defineClass(UrlClassLoader.java
:123)
at
com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:
119)
at
com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:9
5)
at
com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(Plug
inClassLoader.java:94)
at
com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoa
der.java:57)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.lang.ClassLoader.defineClass(ClassLoader.java:466)
at
com.intellij.util.lang.UrlClassLoader._defineClass(UrlClassLoader.java
:123)
at
com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:
119)
at
com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:9
5)
at
com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(Plug
inClassLoader.java:94)
at
com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoa
der.java:57)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
at java.lang.ClassLoader.defineClass(ClassLoader.java:466)
at
com.intellij.util.lang.UrlClassLoader._defineClass(UrlClassLoader.java
:123)
at
com.intellij.util.lang.UrlClassLoader.defineClass(UrlClassLoader.java:
119)
at
com.intellij.util.lang.UrlClassLoader._findClass(UrlClassLoader.java:9
5)
at
com.intellij.ide.plugins.cl.PluginClassLoader.loadClassInsideSelf(Plug
inClassLoader.java:94)
at
com.intellij.ide.plugins.cl.PluginClassLoader.loadClass(PluginClassLoa
der.java:57)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at
com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRe
gistry.a(ComponentManagerImpl.java:476)
at
com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRe
gistry.a(ComponentManagerImpl.java:466)
at
com.intellij.openapi.components.impl.ComponentManagerImpl$ComponentsRe
gistry.access$100(ComponentManagerImpl.java:452)
at
com.intellij.openapi.components.impl.ComponentManagerImpl.a(ComponentM
anagerImpl.java:119)
at
com.intellij.openapi.components.impl.ComponentManagerImpl.initComponen
ts(ComponentManagerImpl.java:383)
at
com.intellij.openapi.components.impl.ComponentManagerImpl.init(Compone
ntManagerImpl.java:89)
at
com.intellij.openapi.project.impl.ProjectImpl.init(ProjectImpl.java:24
5)
at
com.intellij.openapi.project.impl.ProjectManagerImpl.a(ProjectManagerI
mpl.java:269)
at
com.intellij.openapi.project.impl.ProjectManagerImpl.b(ProjectManagerI
mpl.java:297)
at
com.intellij.openapi.project.impl.ProjectManagerImpl.access$400(Projec
tManagerImpl.java:76)
at
com.intellij.openapi.project.impl.ProjectManagerImpl$6.run(ProjectMana
gerImpl.java:470)
at
com.intellij.openapi.progress.impl.ProgressManagerImpl$3.run(ProgressM
anagerImpl.java:255)
at
com.intellij.openapi.progress.impl.ProgressManagerImpl$TaskRunnable.ru
n(ProgressManagerImpl.java:482)
at
com.intellij.openapi.progress.impl.ProgressManagerImpl$4.run(ProgressM
anagerImpl.java:267)
at
com.intellij.openapi.progress.impl.ProgressManagerImpl$2.run(ProgressM
anagerImpl.java:205)
at
com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessU
nderProgress(ProgressManagerImpl.java:233)
at
com.intellij.openapi.progress.impl.ProgressManagerImpl.runProcess(Prog
ressManagerImpl.java:196)
at
com.intellij.openapi.application.impl.ApplicationImpl$8$1.run(Applicat
ionImpl.java:575)
at
com.intellij.openapi.application.impl.ApplicationImpl$6.run(Applicatio
nImpl.java:383)
at
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:441
)
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
at java.util.concurrent.FutureTask.run(FutureTask.java:138)
at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecu
tor.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.
java:908)
at java.lang.Thread.run(Thread.java:662)
at
com.intellij.openapi.application.impl.ApplicationImpl$1$1.run(Applicat
ionImpl.java:131)
I only get this error when I added the community source code module as
a dependency of my plugin module. But when I remove this dependency he
can only find the com.intellij.openapi.vcs.changes package, but no
subpackage com.intellij.openapi.vcs.changes.ui.

My plugin devKit is version 1.0 and my module SDK is IDEA IU-103.255,
as I'm using IntelliJ 10.0.3.

Thanks a lot for any advice.

---
Original message URL:
http://devnet.jetbrains.net/message/5305083#5305083


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

OK, but then my project doesn't compile anymore. I guess the class CommitChangeListDialog has been moved and renamed between build 99.18 and build 103.255.

I can't find it anymore on: http://git.jetbrains.org/?p=idea/community.git;a=tree;f=java/openapi/src/com/intellij/openapi/vcs;hb=HEAD but it was available in the sources I've downloaded of build 99.18.

0
Comment actions Permalink

Hello Tim,

It didn't move anywhere; it was and still is at:
http://git.jetbrains.org/?p=idea/community.git;a=blob;f=platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/CommitChangeListDialog.java;h=5b4421f3c0e8764e23accd8d70f7b1c82506517f;hb=HEAD
Make sure you add idea.jar to the classpath of the IDEA SDK.

OK, but then my project doesn't compile anymore. I guess the class
CommitChangeListDialog has been moved and renamed between build 99.18
and build 103.255.

I can't find it anymore on:
http://git.jetbrains.org/?p=idea/community.git;a=tree;f=java/openapi/s
rc/com/intellij/openapi/vcs;hb=HEAD but it was available in the
sources I've downloaded of build 99.18.


--
Dmitry Jemerov
Development Lead
JetBrains, Inc.
http://www.jetbrains.com/
"Develop with Pleasure!"


0
Comment actions Permalink

OK, now everything works perfectly. I don't know why the idea.jar wasn't included in the project yet/anymore, 'cause I don't remember me removing it.

Anyway, it works and I'd like to thank you very much for your patience and your very useful reply's. Keep up the good work!

0

Please sign in to leave a comment.