Getting project structure

Hi!

I have a question: is it possible to get access to the structure of current project (tree of directiries and files) from plugin and change something there? And can I add some new features to the Project tool panel, or I have to create my own tool panel?

5 comments

Hello Alexander,

A> I have a question: is it possible to get access to the structure of
A> current project (tree of directiries and files) from plugin and
A> change something there?

Yes, of course. If you tell exactly what you need to accomplish, I'll point
you to the necessary APIs.

A> And can I add some new features to the
A> Project tool panel, or I have to create my own tool panel?

Depends on what features exactly you need, but most likely you'll need to
create your own toolwindow.

--
Dmitry Jemerov
Software Developer
http://www.jetbrains.com/
"Develop with Pleasure!"


0

>Yes, of course. If you tell exactly what you need to accomplish, I'll point
>you to the necessary APIs.

For example to add some new nodes or leafs in project tree structure or change color/font/image of leaf

>Depends on what features exactly you need, but most likely you'll need to
>create your own toolwindow.

I'd like IDEA to be able to understand some another project structure, for example if sources files lies in specific directories but the plugin follows some logic picks out necessary sources files and builds new project tree.

0

Hello Alexander,

>> Yes, of course. If you tell exactly what you need to accomplish, I'll
>> point you to the necessary APIs.
>>
A> For example to add some new nodes or leafs in project tree structure
A> or change color/font/image of leaf

The TreeStructureProvider interface allows you to modify the structure of
elements displayed in the project view.

>> Depends on what features exactly you need, but most likely you'll
>> need to create your own toolwindow.
>>
A> I'd like IDEA to be able to understand some another project
A> structure, for example if sources files lies in specific directories
A> but the plugin follows some logic picks out necessary sources files
A> and builds new project tree.

If the possibilities provided by the interface are sufficient for you, you
won't need to create a new toolwindow.

Note that all these modifications will affect only the display of the project
view, and will have no effect on actual project analysis and compilation
logic.

--
Dmitry Jemerov
Software Developer
http://www.jetbrains.com/
"Develop with Pleasure!"


0

>The TreeStructureProvider interface allows you to modify the structure of
>elements displayed in the project view.

Thanks!
But is there an example of implementation of this interface?

0

Hello Alexander,

>> The TreeStructureProvider interface allows you to modify the
>> structure of elements displayed in the project view.
>>
A> Thanks!
A> But is there an example of implementation of this interface?

No, I don't think we have any public example for this.

--
Dmitry Jemerov
Software Developer
http://www.jetbrains.com/
"Develop with Pleasure!"


0

Please sign in to leave a comment.