- fix issue with files in ProjectAssets showing with "unfold triangle"

experimental
Normen Hansen 10 years ago
parent 829971890b
commit 5917d699d6
  1. 11
      sdk/jme3-core/src/com/jme3/gde/core/assets/nodes/AssetNode.java

@ -48,12 +48,21 @@ public class AssetNode extends FilterNode {
private Node node;
public AssetNode(ProjectAssetManager manager, Node node) {
super(node, new AssetChildren(manager, node), createLookupProxy(manager, node));
super(node, isFile(node) ? Children.LEAF : new AssetChildren(manager, node), createLookupProxy(manager, node));
this.node = node;
enableDelegation(DELEGATE_GET_ACTIONS);
enableDelegation(DELEGATE_GET_CONTEXT_ACTIONS);
}
public static boolean isFile(Node node) {
DataObject obj = null;
obj = node.getLookup().lookup(DataObject.class);
if (obj != null) {
return !obj.getPrimaryFile().isFolder();
}
return false;
}
public static Lookup createLookupProxy(ProjectAssetManager manager, Node node) {
//TODO: This is causing the most silly exception for the most silly problem
// due to the most silly warning in netbeans platform

Loading…
Cancel
Save