Find the file (via data object most likely) in the current selection, then
ask project manager what project owns it.

Note multiple files may be selected in different projects or a file that
belongs to no project may be selected.

-Tim

On Mon, Jul 30, 2018 at 3:06 PM [email protected] <
[email protected]> wrote:

> Hi, I'm developing a module for Netbeans, and it needs to have
> "project-specific" functionality i.e. similar to how the "Run Application"
> button in the toolbar compiles and runs only the current project.
>
> I can't however figure out how to determine the "current project" from
> within the application. I was looking into the ProjectManager and the
> OpenProjects classes, yet those only have support for either the "Main
> Project" (not what I'm looking for, I found out), or for the entire list of
> currently open projects.
>
> How does the "Run Project" toolbar button determine which project to
> build/run, and how can I implement similar functionality within my plugin?
> Thanks in advance
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
> --
http://timboudreau.com

Reply via email to