You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@netbeans.apache.org by Sean Carrick <se...@pekinsoft.com> on 2022/10/16 18:31:25 UTC

Getting RCP Application Name at Runtime

I am currently working on porting my Jigsaw application to the NetBeans RCP
and cannot figure out how to retrieve the application name at runtime.
There are various places where I was needing this information with my old
API, and am needing it again with the RCP.

Any information on how to retrieve that information would be greatly
appreciated. Thank you!

Sincerely,

Sean Carrick
Owner - PekinSOFT Systems
sean@pekinsoft.com
(309) 989-0672

Re: Getting RCP Application Name at Runtime

Posted by Sean Carrick <se...@pekinsoft.com>.
Mathieu,

Thank you for that pointer. I'll check that out.

Neil,

The API that I'm using is my own customized version of the old Swing
AppFramework API from Java.net.

Getting the application name, title, ID, and version was simply a matter of
using the ResourceMap class, such as:

ResourceMap rm = Application.getInstance().getContext().getResourceMap();
Application.getInstance().getMainFrame().setTitle(
*rm.getString("Application.title")*);

While I have heavily customized that old API, there are parts of it, such
as ResourceMap, that still work as they originally did. In my current
application, I use the resource bundle properties files to store all sorts
of default property settings for the application, as well as the
application-specific information, such as the title, name, id, vendor name,
vendor id, version, default look and feel, etc. These bundle files are also
where I store localization properties such as icons, fonts, colors, etc.,
above the internationalization properties for string values.

This API has been serving me well for quite a while, but I do not have
docking for my applications and the single- and multi-document interfaces
are so a couple of decades ago, that I was considering porting the
applications to the NetBeans Platform as RCPs, simply for the docking
interface. Other than that, I am satisfied with my API.

I hope this information helps you to be able to give me some pointers in
what I am trying to accomplish. I truly do appreciate both of your
suggestions!

-SC


On Mon, Oct 17, 2022, 04:25 Neil C Smith <ne...@apache.org> wrote:

> On Mon, 17 Oct 2022 at 10:02, Mathieu Bastian <ma...@gephi.org>
> wrote:
> > This gives you the application name and version:
> >
> >
> NbBundle.getBundle("org.netbeans.core.startup.Bundle").getString("currentVersion")
> >
>
> There is also NbBundle::getBranding
>
> It's unclear from the question exactly what is being looked for.  What
> was the old API using and how?
>
> Best wishes,
>
> Neil
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
> For additional commands, e-mail: users-help@netbeans.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>

Re: Getting RCP Application Name at Runtime

Posted by Neil C Smith <ne...@apache.org>.
On Mon, 17 Oct 2022 at 10:02, Mathieu Bastian <ma...@gephi.org> wrote:
> This gives you the application name and version:
>
> NbBundle.getBundle("org.netbeans.core.startup.Bundle").getString("currentVersion")
>

There is also NbBundle::getBranding

It's unclear from the question exactly what is being looked for.  What
was the old API using and how?

Best wishes,

Neil

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@netbeans.apache.org
For additional commands, e-mail: users-help@netbeans.apache.org

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


Re: Getting RCP Application Name at Runtime

Posted by Mathieu Bastian <ma...@gephi.org>.
Hi Sean,

This gives you the application name and version:

NbBundle.getBundle("org.netbeans.core.startup.Bundle").getString("currentVersion")

I believe it's equivalent to System.getProperty("netbeans.productversion")

Greetings,

Mathieu

On Sun, Oct 16, 2022 at 8:31 PM Sean Carrick <se...@pekinsoft.com> wrote:

> I am currently working on porting my Jigsaw application to the NetBeans
> RCP and cannot figure out how to retrieve the application name at runtime.
> There are various places where I was needing this information with my old
> API, and am needing it again with the RCP.
>
> Any information on how to retrieve that information would be greatly
> appreciated. Thank you!
>
> Sincerely,
>
> Sean Carrick
> Owner - PekinSOFT Systems
> sean@pekinsoft.com
> (309) 989-0672
>