How to get the classpath of the current project

I was wondering if somebody could help me out? To enhance the Jetstyle
plugin, I need to get hold of the classpath for the currently open
project. How can I do that?

--
Dennis Lundberg

1 comment

Hello Dennis,

DL> I was wondering if somebody could help me out? To enhance the
DL> Jetstyle plugin, I need to get hold of the classpath for the
DL> currently open project. How can I do that?

The classpath is defined on a per-module, not per-project basis. The classpath
for a module can be obtained by calling:
ModuleRootManager.getInstance(module).getOrderEntries()

Different subclasses of OrderEntry represent different types of entries in
the classpath of a module (JDK, another module, a library and so on).

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0

Please sign in to leave a comment.