Re: How to open Navigator panel programmatically?

Dmitry Avtonomov <[email protected]> Sat, 15 Jul 2017 19:41:08 -0400
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Message-ID <CAMMjtf90mMh5AxnQdyF+5Bo+snAVzAUFPx0=nKfr0k-Om0xNuw@mail.gmail.com>
Cool!
Do you know which packages are required for Properties panel?

On Fri, Jul 14, 2017 at 6:22 PM, Peter Nabbefeld <[email protected]>
wrote:

> Hi Arsi,
>
> thank You - that works great!
>
> Kind regards
> Peter
>
>
> Am 14.07.2017 um 23:43 schrieb arsi:
>
>> Hello,
>>
>> Simple way:
>>
>> |ClassLoader loader = Lookup.getDefault().lookup(ClassLoader.class); try
>> { Class<?> navigatorTC = loader.loadClass("org.netbeans
>> .modules.navigator.NavigatorTC"); Method m =
>> navigatorTC.getDeclaredMethod("getInstance"); TopComponent navPanel =
>> (TopComponent) m.invoke(null); navPanel.open(); navPanel.requestActive(); }
>> catch (Exception ex) { Exceptions.printStackTrace(ex); } |
>>
>> ​
>>
>> or:
>>
>> |NavigatorTC navTC = NavigatorTC.getInstance(); navTC.open();
>> navTC.requestActive(); |
>>
>> ​
>>
>> It's a module private package..
>>
>> For nb module:
>>
>> add module *org-netbeans-spi-navigator*, then edit and set it as
>> implementation version..
>>
>>
>>
>>
>> For maven:
>>
>> |<plugin> <artifactId>nbm-maven-plugin</artifactId>
>> <groupId>org.codehaus.mojo</groupId> <extensions>true</extensions>
>> <configuration> <moduleDependencies> <dependency> <!--Private Package
>> Reference--> <id>org.netbeans.api:org-netbeans-spi-navigator</id>
>> <type>impl</type> </dependency> </moduleDependencies> </configuration>
>> </plugin> |
>>
>> ​
>> Arsi
>> ------------------------------------------------------------------------
>>
>> *From:* Peter Nabbefeld
>> *Sent:* Friday, July 14, 2017 10:19PM
>> *To:* Dev
>> *Subject:* [platform-dev] How to open Navigator panel programmatically?
>>
>>
>>
>>> Hello,
>>>
>>> I wonder how to activate navigator panel programmatically. My current
>>> code is:
>>>
>>
>>
>
>