[platform-dev] Re: Problem with Global Selection Lookup

  • From: Frédéric Deniger < >
  • To:
  • Subject: [platform-dev] Re: Problem with Global Selection Lookup
  • Date: Wed, 31 Oct 2012 09:45:04 +0100

Hi,
You keep a reference to Lookup.Result<Element> in your TopComponent so the result won't be garbage collected while your topcomponent is opened and you should receive events.

An obvious mistake must be somewhere...
Did you try to add a breakpoint in the important methods (componentOpened,...)
Did you try to listen to any objects ?

 result = Utilities.actionsGlobalContext().lookupResult(Object.class);


Fred



@Fr thanks for your reply.

The hard reference is realised by the field result of the class 
OutputTopComponent.


The tutorial  "Selection Management Tutorial II—Using Nodes" uses a module 
named MyAPI. In MyAPI module a class Event  is defined. The class Event has a static 
field and a final field.


Code:

private static int count = 0;
private final int index;




I suppose these fields are hard reference.


To my mind, your code should work: if you select/unselect a node in the 
module 1, the method resultChanged of the module 2 should be called.

This is exactly what I want.
Unfortunately my code doesnt work. The method resultChanged of module2 is 
never called.

In my project I try to add a new Module where I define a new class with a 
org.jsoup.nodes.Element field.







[platform-dev] Problem with Global Selection Lookup

kosmos890 10/29/2012

[platform-dev] Re: Problem with Global Selection Lookup

Benno Markiewicz 10/29/2012

[platform-dev] Problem with Global Selection Lookup

kosmos890 10/29/2012

[platform-dev] Re: Problem with Global Selection Lookup

Frédéric Deniger 10/30/2012

[platform-dev] Problem with Global Selection Lookup

kosmos890 10/30/2012

[platform-dev] Re: Problem with Global Selection Lookup

Frédéric Deniger 10/31/2012

[platform-dev] Problem with Global Selection Lookup

kosmos890 10/31/2012

Project Features

Project Links

About this Project

Platform was started in November 2009, is owned by Antonin Nebuzelsky, and has 138 members.
By use of this website, you agree to the NetBeans Policies and Terms of Use (revision 20140418.2d69abc). © 2013, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo
 
 
Close
loading
Please Confirm
Close