From e102bfe0deafaa006805e9c0f75cf04ba0229258 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Mon, 29 Aug 2011 20:39:09 +0000 Subject: [PATCH] - separate cookie and content lookups in AssetDataObject git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@8134 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../src/com/jme3/gde/core/assets/AssetDataObject.java | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/sdk/jme3-core/src/com/jme3/gde/core/assets/AssetDataObject.java b/sdk/jme3-core/src/com/jme3/gde/core/assets/AssetDataObject.java index 38dd7d35d..9f229c355 100644 --- a/sdk/jme3-core/src/com/jme3/gde/core/assets/AssetDataObject.java +++ b/sdk/jme3-core/src/com/jme3/gde/core/assets/AssetDataObject.java @@ -60,7 +60,6 @@ import org.openide.util.Exceptions; import org.openide.util.Lookup; import org.openide.util.lookup.AbstractLookup; import org.openide.util.lookup.InstanceContent; -import org.openide.util.lookup.Lookups; import org.openide.util.lookup.ProxyLookup; /** @@ -89,10 +88,13 @@ public class AssetDataObject extends MultiDataObject { protected AssetKey assetKey; protected Savable savable; protected String saveExtension; + protected AbstractLookup contentLookup; public AssetDataObject(FileObject pf, MultiFileLoader loader) throws DataObjectExistsException, IOException { super(pf, loader); - lookup = new ProxyLookup(getCookieSet().getLookup(), new AbstractLookup(getLookupContents()), Lookups.fixed(new AssetData(this))); + contentLookup = new AbstractLookup(getLookupContents()); + lookupContents.add(new AssetData(this)); + lookup = new ProxyLookup(getCookieSet().getLookup(), contentLookup); setSaveCookie(saveCookie); findAssetManager(); } @@ -122,7 +124,7 @@ public class AssetDataObject extends MultiDataObject { @Override protected Node createNodeDelegate() { - DataNode node = new DataNode(this, Children.LEAF, getLookup()); + DataNode node = new DataNode(this, Children.LEAF, new ProxyLookup(getCookieSet().getLookup(), contentLookup)); node.setIconBaseWithExtension("com/jme3/gde/core/assets/jme-logo.png"); return node; }