From d25bfd01a13f592f5cb8817827db170e3cfb9d87 Mon Sep 17 00:00:00 2001 From: "nor..67" Date: Sat, 2 Jul 2011 00:01:42 +0000 Subject: [PATCH] - add message to "Add to project" about usage git-svn-id: https://jmonkeyengine.googlecode.com/svn/trunk@7801 75d07b2b-3a1a-0410-a2c5-0572b91ccdca --- .../gde/assetpack/actions/AddToProjectAction.java | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/actions/AddToProjectAction.java b/sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/actions/AddToProjectAction.java index dcd0f9ded..8c9112480 100644 --- a/sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/actions/AddToProjectAction.java +++ b/sdk/jme3-assetpack-support/src/com/jme3/gde/assetpack/actions/AddToProjectAction.java @@ -4,7 +4,6 @@ */ package com.jme3.gde.assetpack.actions; -import com.jme3.asset.AssetManager; import com.jme3.export.binary.BinaryExporter; import com.jme3.gde.assetpack.AssetConfiguration; import com.jme3.gde.assetpack.AssetPackLoader; @@ -22,7 +21,11 @@ import org.openide.util.Exceptions; import org.w3c.dom.Element; import com.jme3.gde.scenecomposer.SceneComposerTopComponent; import java.io.OutputStream; +import org.openide.DialogDisplayer; +import org.openide.NotifyDescriptor; +import org.openide.NotifyDescriptor.Message; import org.openide.filesystems.FileObject; +import uk.co.mandolane.midi.e; public final class AddToProjectAction implements Action { @@ -61,6 +64,14 @@ public final class AddToProjectAction implements Action { } else { Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "Cannot copy, file 'Models' exists"); } + } else{ + Message msg = new NotifyDescriptor.Message( + "Please open a model from the destination\n" + + "project in the SceneExplorer\n" + + "to define the project.\n" + + "(temp. workaround)", + NotifyDescriptor.ERROR_MESSAGE); + DialogDisplayer.getDefault().notifyLater(msg); } } else { Logger.getLogger(this.getClass().getName()).log(Level.WARNING, "Error loading model");