Getting the Project and finding files
Hi all,
I'm new to building IDEA plugins, so these may be stupid questsions...
How do I get the Project for a ProjectComponent? I was copying a pattern I saw in the HibernatePlugin where the ProjectComponent's constructor took a Project object, but I'm getting:
com.opensymphony.ivyclasspath.IvyProjectComponent has unsatisfiable dependencies: [[interface com.intellij.openapi.project.Project]]
org.picocontainer.defaults.UnsatisfiableDependenciesException: com.opensymphony.ivyclasspath.IvyProjectComponent has unsatisfiable dependencies: [[interface com.intellij.openapi.project.Project]]
What I want to do is (in my ProjectComponent):
1) Get the Project
2) Find a specific file under the project and read it
How do I get the Module in my ModuleComponent?
then I've got a ModuleComponent which needs to get its Module and the ProjectComponent created above so it can:
1) Get the file name it should look for inside this Module.
2) Load that file and read it to get a set of dependencies (a File[] pointing to the jars required)
3) Add these jars to the classpath of the Module (which I haven't seen how to do anywhere yet).
How do I add jars to the libraries of a Module (or to the project or global libraries)?
Any ideas for me? Just point me in the right direction...
Please sign in to leave a comment.
I believe a similar problem occurred when people overwrote previous EAP's
with the current EAP, leaving two copies of the picocontainer jar. You should
make sure you haven't done this - that there's only one picocontainer jar
in lib\
If that's not the problem, I don't know enough to help you more.
I've installed each EAP in its own directory. Could this be related to the other 3316 bug I encountered where it couldn't find the tools.jar?
It could be, I don't know. I personally have a plugin that works for me using
public NullyProjectComponent(Project proj), so I don't know why it doesn't
work for you. Someone else should be able to help you, I don't know the answer.
>> I believe a similar problem occurred when people
>> overwrote previous EAP's
>> with the current EAP, leaving two copies of the
>> picocontainer jar. You should
>> make sure you haven't done this - that there's only
>> one picocontainer jar
>> in lib\
In article <30353116.1115041980272.JavaMail.itn@is.intellij.net>,
jcarreira@gmail.com says...
I had the same problem because I originally copied the plugin.xml from
another project... make sure you've got the tag
<project-components>
and not something like
<application-components>
for your plugin component.
As for the rest, I just started on this stuff yesterday, and I've got a
loong way to go! But since I had the same problem, I thought I'd pass
that tidbit along. Of course, it could be something else altogether...
Douglas Bullard