diff --git a/sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/AssetPackLoader.java b/sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/AssetPackLoader.java index fa4d19377..6e65a321f 100644 --- a/sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/AssetPackLoader.java +++ b/sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/AssetPackLoader.java @@ -171,19 +171,19 @@ public class AssetPackLoader { String path = fileElem.getAttribute("path"); if ("material".equals(type) && (materialName == null || materialName.equals(path))) { if (hasExtension(path, "j3m")) { - mat = pm.getManager().loadMaterial(path); + mat = pm.loadMaterial(path); } else if (hasExtension(path, "material")) { if (matList == null) { Logger.getLogger(AssetPackLoader.class.getName()).log(Level.INFO, "Load Ogre Material"); OgreMaterialKey matKey = new OgreMaterialKey(path); matKey.setMaterialExtensionSet(matExts); - matList = pm.getManager().loadAsset(matKey); + matList = pm.loadAsset(matKey); key = new OgreMeshKey(name, matList); } else { Logger.getLogger(AssetPackLoader.class.getName()).log(Level.INFO, "Add Ogre Material"); OgreMaterialKey matKey = new OgreMaterialKey(path); matKey.setMaterialExtensionSet(matExts); - MaterialList newMatList = pm.getManager().loadAsset(matKey); + MaterialList newMatList = pm.loadAsset(matKey); matList.putAll(newMatList); } } @@ -196,7 +196,7 @@ public class AssetPackLoader { String path = fileElem.getAttribute("path"); if ("material".equals(type) && (materialName == null || materialName.equals(path))) { if (hasExtension(path, "j3m")) { - mat = pm.getManager().loadMaterial(path); + mat = pm.loadMaterial(path); } } } @@ -207,9 +207,9 @@ public class AssetPackLoader { Logger.getLogger(AddAssetAction.class.getName()).log(Level.WARNING, "j3m and ogre material defined for asset {0}.", name); } if (key != null) { - model = pm.getManager().loadAsset(key); + model = pm.loadAsset(key); } else { - model = pm.getManager().loadModel(name); + model = pm.loadModel(name); } if (model == null) { Logger.getLogger(AddAssetAction.class.getName()).log(Level.SEVERE, "Could not load model {0}!", name); diff --git a/sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/project/actions/ConvertOgreBinaryMeshesAction.java b/sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/project/actions/ConvertOgreBinaryMeshesAction.java index 3d647a4f8..ce64700d4 100644 --- a/sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/project/actions/ConvertOgreBinaryMeshesAction.java +++ b/sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/project/actions/ConvertOgreBinaryMeshesAction.java @@ -26,6 +26,7 @@ import org.openide.WizardDescriptor; import org.openide.filesystems.FileObject; import org.openide.filesystems.FileUtil; +@SuppressWarnings("unchecked") public final class ConvertOgreBinaryMeshesAction implements Action { private final Project context; diff --git a/sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/project/actions/ImportAssetAction.java b/sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/project/actions/ImportAssetAction.java index 608f57759..952cff04b 100644 --- a/sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/project/actions/ImportAssetAction.java +++ b/sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/project/actions/ImportAssetAction.java @@ -24,6 +24,7 @@ import org.openide.WizardDescriptor; import org.openide.filesystems.FileUtil; import org.w3c.dom.Element; +@SuppressWarnings("unchecked") public final class ImportAssetAction implements Action { private final AssetPackProject context; diff --git a/sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/project/actions/PublishAssetPackAction.java b/sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/project/actions/PublishAssetPackAction.java index c3a8e0b73..2b35f5831 100644 --- a/sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/project/actions/PublishAssetPackAction.java +++ b/sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/project/actions/PublishAssetPackAction.java @@ -33,6 +33,7 @@ import org.openide.filesystems.FileObject; import org.openide.filesystems.FileUtil; import org.openide.util.NbPreferences; +@SuppressWarnings("unchecked") public final class PublishAssetPackAction implements Action { private final Project context; diff --git a/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/LinkSceneComposer.java b/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/LinkSceneComposer.java index c920bd42f..204556da9 100644 --- a/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/LinkSceneComposer.java +++ b/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/LinkSceneComposer.java @@ -30,7 +30,7 @@ public final class LinkSceneComposer implements ActionListener { FileObject file = spatialAssetDataObject.getPrimaryFile(); String assetName = manager.getRelativeAssetPath(file.getPath()); SceneComposerTopComponent composer = SceneComposerTopComponent.findInstance(); - composer.linkModel(manager.getManager(), assetName); + composer.linkModel(manager, assetName); } } } diff --git a/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/OpenSceneComposer.java b/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/OpenSceneComposer.java index a0574ba5e..02a574d3e 100644 --- a/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/OpenSceneComposer.java +++ b/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/OpenSceneComposer.java @@ -47,7 +47,7 @@ public final class OpenSceneComposer implements ActionListener { java.awt.EventQueue.invokeLater(new Runnable() { public void run() { - ((DesktopAssetManager) manager.getManager()).clearCache(); + manager.clearCache(); SceneComposerTopComponent composer = SceneComposerTopComponent.findInstance(); composer.openScene(asset, context, manager); } diff --git a/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/SceneComposerTopComponent.java b/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/SceneComposerTopComponent.java index be97adfe8..7cce546fe 100644 --- a/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/SceneComposerTopComponent.java +++ b/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/SceneComposerTopComponent.java @@ -46,6 +46,7 @@ import org.openide.util.Utilities; */ @ConvertAsProperties(dtd = "-//com.jme3.gde.scenecomposer//SceneComposer//EN", autostore = false) +@SuppressWarnings("unchecked") public final class SceneComposerTopComponent extends TopComponent implements SceneListener, LookupListener { private static SceneComposerTopComponent instance; @@ -810,7 +811,7 @@ public final class SceneComposerTopComponent extends TopComponent implements Sce if (toolController != null) { toolController.cleanup(); } - toolController = new SceneToolController(currentRequest.getToolNode(), currentRequest.getManager().getManager()); + toolController = new SceneToolController(currentRequest.getToolNode(), currentRequest.getManager()); camController = new ComposerCameraController(SceneApplication.getApplication().getCamera(), request.getJmeNode()); camController.setMaster(this); camController.enable(); diff --git a/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/SceneEditorController.java b/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/SceneEditorController.java index 5633e9821..ba0a44ac9 100644 --- a/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/SceneEditorController.java +++ b/sdk/jme3-scenecomposer/src/com/jme3/gde/scenecomposer/SceneEditorController.java @@ -698,7 +698,7 @@ public class SceneEditorController implements PropertyChangeListener, NodeListen final Node selected = selectedSpat.getLookup().lookup(Node.class); ProjectAssetManager manager = file.getLookup().lookup(ProjectAssetManager.class); if (manager != null) { - ((DesktopAssetManager) manager.getManager()).clearCache(); + manager.clearCache(); } if (selected != null) { setNeedsSave(true); @@ -716,7 +716,7 @@ public class SceneEditorController implements PropertyChangeListener, NodeListen ProgressHandle progressHandle = ProgressHandleFactory.createHandle("Adding Model.."); progressHandle.start(); try { - Spatial linkNode = (Spatial) file.loadAsset(); + Spatial linkNode = file.loadAsset(); if (linkNode != null) { selected.attachChild(linkNode); if (location != null) {