daniel.kroeger@... wrote:
> Project project = (Project)n.getValue("Project"); // NOI18N
Node.getValue() is completely unused. I think you mean
Project project = n.getLookup().lookup(Project.class);
if (project != null) ...
This will only work on project nodes. For file nodes, you would need to
find the DataObject in lookup; if present, get its primaryFile, then use
FileOwnerQuery to find the project it is part of (if any).
> Item item = (Item)n.getValue("Item"); // NOI18N
I have no idea what this is supposed to be. Delete it.
> if (ap != null)
&& ap.supportsAction(AP.C_C_S)
> Lookups.fixed(new Object[] {project, n})
n.getLookup()