[RSS]

How can I add support for Lookups on nodes representing my file type?

DataObject does not yet support a getLookup() method, but is expected to do so in the future.

You can simulate this behavior in the meantime by using InstanceContent and AbstractLookup. Simplified typical usage:

public SomeObject {
   private InstanceContent content = new InstanceContent();
   private final AbstractLookup lkp = new AbstractLookup(content);
   
   public someMethod() {
      ic.set (someCollection...);
   }

   public Lookup getLookup() {
      return lkp;
   }
}

This is how you create a lookup with dynamic content of your choosing. See also Tom Wheeler's TodoListManager for an example of some code that illustrates how to do this.