sdk filters : modification of the lookup for JmeFilter

experimental
Dokthar 9 years ago
parent bc6ced1ed4
commit 01a6a0e8a0
  1. 19
      sdk/jme3-core/src/com/jme3/gde/core/filters/FilterPostProcessorNode.java

@ -75,8 +75,6 @@ public class FilterPostProcessorNode extends AbstractNode {
getLookup().lookup(FilterIndexSupport.class).setFilterPostProcessorNode(this); getLookup().lookup(FilterIndexSupport.class).setFilterPostProcessorNode(this);
((FilterChildren) getChildren()).setFilterPostProcessorNode(this); ((FilterChildren) getChildren()).setFilterPostProcessorNode(this);
} }
@Override @Override
@ -165,8 +163,8 @@ public class FilterPostProcessorNode extends AbstractNode {
public Action[] getActions(boolean context) { public Action[] getActions(boolean context) {
// return super.getActions(context); // return super.getActions(context);
return new Action[]{ return new Action[]{
new NewFilterPopup(this) new NewFilterPopup(this)
}; };
} }
public static class FilterChildren extends Children.Keys<Object> { public static class FilterChildren extends Children.Keys<Object> {
@ -221,15 +219,10 @@ public class FilterPostProcessorNode extends AbstractNode {
@Override @Override
protected Node[] createNodes(Object t) { protected Node[] createNodes(Object t) {
Filter filter = (Filter) t; Filter filter = (Filter) t;
for (FilterNode di : Lookup.getDefault().lookupAll(FilterNode.class)) { //get JmeFilter, the only FilterNode spi
if (di.getExplorerObjectClass().getName().equals(filter.getClass().getName())) { FilterNode di = Lookup.getDefault().lookup(FilterNode.class);
Node[] ret = di.createNodes(filter, dataObject, readOnly); Node[] ret = di.createNodes(filter, dataObject, readOnly);
if (ret != null) { return ret;
return ret;
}
}
}
return new Node[]{};
} }
} }
} }

Loading…
Cancel
Save