Re: Build Warning: Cannot translate according to ...

2018-08-30 Thread georgetroulis



On 2018/08/27 23:33:09, georgetrou...@gmail.com  
wrote: 
> Hi everyone,
> 
> I'm developing a custom Module for the MPLAB X IDE v5.00 using the MPLAB X 
> SDK as well as NetBeans API's documentation. I'm developing it in NetBeans 
> 8.2, and I've added MPLAB X as a NetBeans Platform such that whenever I run 
> my module, an instance of MPLAB is opened for testing my module.
> 
> I've been trying to eliminate all build warnings, yet there is one that I 
> cannot seem to eliminate. I've broken it down over several lines to make it 
> easier to read:
> 
> Cannot translate according to 
> [
> 
> file:/C:/Microchip/MPLABX/v5.00/mplab_platform/ide/config/ModuleAutoDeps/org-netbeans-modules-projectapi.xml,
> 
> file:/C:/Microchip/MPLABX/v5.00/mplab_platform/ide/config/ModuleAutoDeps/org-netbeans-modules-projectuiapi.xml,
> 
> file:/C:/Microchip/MPLABX/v5.00/mplab_platform/platform/config/ModuleAutoDeps/org-openide-filesystems.xml,
> 
> file:/C:/Microchip/MPLABX/v5.00/mplab_platform/platform/config/ModuleAutoDeps/org-openide-util.xml
> ]
> because could not find none of [org.netbeans.core.startup.base]
> 
> I've downloaded the source code for NetBeans 8.2 from the official repos to 
> trace the source of the warning, and I've traced its origin to line 883 of 
> org.netbeans.nbbuild.ParseProjectXml.java.
> 
> From my limited understanding from reading the source, it seems that NetBeans 
> is trying to locate certain "hard-coded" modules from the target NetBeans 
> Platform bundle directories (the mplab_platform in my situation), and the XML 
> file corresponding to the specific module (org.netbeans.core.startup.base) 
> does not exist in my MPLAB installation directory.
> 
> My question is the following: Is this warning significant? I've been trying 
> to understand what the implications of this warning are, and I would rather 
> not just ignore this warning unless I have a solid understanding of its 
> existence in my build output.
> 
> I understand that this is perhaps an unusual issue. Thank you to everyone in 
> advance for taking the time to respond
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@netbeans.incubator.apache.org
> For additional commands, e-mail: dev-h...@netbeans.incubator.apache.org
> 
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> 
> 
> 
> 

I found a fix for this. Since MPLAB X v5.00 is based on Netbeans 8.0.1, I 
discovered that if I use Netbeans 8.0.1 to compile my module then the warning I 
mentioned above goes away. This could be a bug (#178260 might be related to 
this) since I'm compiling a module for an older "Netbeans" platform when the 
org.netbeans.core.startup.base didn't exist.

I guess I should have used Netbeans 8.0.1 all along

-
To unsubscribe, e-mail: dev-unsubscr...@netbeans.incubator.apache.org
For additional commands, e-mail: dev-h...@netbeans.incubator.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists





Build Warning: Cannot translate according to ...

2018-08-27 Thread georgetroulis
Hi everyone,

I'm developing a custom Module for the MPLAB X IDE v5.00 using the MPLAB X SDK 
as well as NetBeans API's documentation. I'm developing it in NetBeans 8.2, and 
I've added MPLAB X as a NetBeans Platform such that whenever I run my module, 
an instance of MPLAB is opened for testing my module.

I've been trying to eliminate all build warnings, yet there is one that I 
cannot seem to eliminate. I've broken it down over several lines to make it 
easier to read:

Cannot translate according to 
[

file:/C:/Microchip/MPLABX/v5.00/mplab_platform/ide/config/ModuleAutoDeps/org-netbeans-modules-projectapi.xml,

file:/C:/Microchip/MPLABX/v5.00/mplab_platform/ide/config/ModuleAutoDeps/org-netbeans-modules-projectuiapi.xml,

file:/C:/Microchip/MPLABX/v5.00/mplab_platform/platform/config/ModuleAutoDeps/org-openide-filesystems.xml,

file:/C:/Microchip/MPLABX/v5.00/mplab_platform/platform/config/ModuleAutoDeps/org-openide-util.xml
]
because could not find none of [org.netbeans.core.startup.base]

I've downloaded the source code for NetBeans 8.2 from the official repos to 
trace the source of the warning, and I've traced its origin to line 883 of 
org.netbeans.nbbuild.ParseProjectXml.java.

>From my limited understanding from reading the source, it seems that NetBeans 
>is trying to locate certain "hard-coded" modules from the target NetBeans 
>Platform bundle directories (the mplab_platform in my situation), and the XML 
>file corresponding to the specific module (org.netbeans.core.startup.base) 
>does not exist in my MPLAB installation directory.

My question is the following: Is this warning significant? I've been trying to 
understand what the implications of this warning are, and I would rather not 
just ignore this warning unless I have a solid understanding of its existence 
in my build output.

I understand that this is perhaps an unusual issue. Thank you to everyone in 
advance for taking the time to respond

-
To unsubscribe, e-mail: dev-unsubscr...@netbeans.incubator.apache.org
For additional commands, e-mail: dev-h...@netbeans.incubator.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists





Re: Determine the "current" project from module code

2018-08-01 Thread georgetroulis



On 2018/07/30 21:06:12, Jan Lahoda  wrote: 
> There is
> org.netbeans.spi.project.ui.support.ProjectSensitiveActions.projectSensitiveAction
> in module projectuiapi, which may be useful (a custom performer is called
> with the current project when the action is invoked).
> 
> Alternatively, you could look into the Lookup returned from
> org.openide.util.Utilities.actionsGlobalContext to see if there's a
> FileObject/DataObject inside, and then use FileOwnerQuery.getOwner.
> 
> Jan
> 
> 
> On Mon, Jul 30, 2018 at 10:53 PM, georgetrou...@gmail.com <
> georgetrou...@gmail.com> wrote:
> 
> >
> >
> > On 2018/07/30 19:42:59, Svata Dedic  wrote:
> > > Dne 30.7.2018 v 21:05 georgetrou...@gmail.com napsal(a):
> > > > 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.
> > > >
> > >
> > > Define what is "current" :) Is it "the project, which owns the active
> > > editor" ? Or "the project which owns the active node's file" (which may
> > > change as e.g. file explorer or various supplemental windows are
> > > activated) ... Or has the user to specifically open a project explorer
> > > and select project's node before your action ? Please be more specific
> > > what "current" means in your scenarios.
> > >
> > > -Svata
> > >
> > > -
> > > To unsubscribe, e-mail: dev-unsubscr...@netbeans.incubator.apache.org
> > > For additional commands, e-mail: dev-h...@netbeans.incubator.apache.org
> > >
> > > For further information about the NetBeans mailing lists, visit:
> > > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> > >
> > >
> > >
> >  I'm a little bit new to some of the NetBeans terminologies (i.e. Nodes
> > etc), but I can try my best to explain. I'm thinking in terms of how the
> > "Run Project" button works in the main toolbar, and how that must determine
> > which project to run somehow. That project that it "chooses to run" is what
> > I mean by the "current" project.
> >
> > I hope that is more specific :) Thanks for your reply
> >
> > -
> > To unsubscribe, e-mail: dev-unsubscr...@netbeans.incubator.apache.org
> > For additional commands, e-mail: dev-h...@netbeans.incubator.apache.org
> >
> > For further information about the NetBeans mailing lists, visit:
> > https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> >
> >
> >
> >
> 

I got it to work! Thanks to everyone for your feedback/help. I familiarized 
myself with the Lookup API and Nodes (both concepts I didn't know about). 

I utilized the actionsGlobalContext() to get the global lookup, and used it to 
lookup for FileObjects (doing a Lookup on Nodes didn't help for some reason). 
There was always at most FileObject returned, which nicely corresponded to my 
"current project" as I had defined it in my mind. 

>From there I was easily able to trace the FileObject to its owning Project 
>with a FileOwnerQuery. Thanks again everyone :)

-
To unsubscribe, e-mail: dev-unsubscr...@netbeans.incubator.apache.org
For additional commands, e-mail: dev-h...@netbeans.incubator.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists





Re: Determine the "current" project from module code

2018-07-30 Thread georgetroulis



On 2018/07/30 19:42:59, Svata Dedic  wrote: 
> Dne 30.7.2018 v 21:05 georgetrou...@gmail.com napsal(a):
> > 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.
> > 
> 
> Define what is "current" :) Is it "the project, which owns the active 
> editor" ? Or "the project which owns the active node's file" (which may 
> change as e.g. file explorer or various supplemental windows are 
> activated) ... Or has the user to specifically open a project explorer 
> and select project's node before your action ? Please be more specific 
> what "current" means in your scenarios.
> 
> -Svata
> 
> -
> To unsubscribe, e-mail: dev-unsubscr...@netbeans.incubator.apache.org
> For additional commands, e-mail: dev-h...@netbeans.incubator.apache.org
> 
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
> 
> 
> 
 I'm a little bit new to some of the NetBeans terminologies (i.e. Nodes etc), 
but I can try my best to explain. I'm thinking in terms of how the "Run 
Project" button works in the main toolbar, and how that must determine which 
project to run somehow. That project that it "chooses to run" is what I mean by 
the "current" project.

I hope that is more specific :) Thanks for your reply

-
To unsubscribe, e-mail: dev-unsubscr...@netbeans.incubator.apache.org
For additional commands, e-mail: dev-h...@netbeans.incubator.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists





Determine the "current" project from module code

2018-07-30 Thread georgetroulis
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: dev-unsubscr...@netbeans.incubator.apache.org
For additional commands, e-mail: dev-h...@netbeans.incubator.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists