From: <aki...@us...> - 2008-08-08 19:19:25
|
Revision: 4805 http://gridarta.svn.sourceforge.net/gridarta/?rev=4805&view=rev Author: akirschbaum Date: 2008-08-08 19:19:25 +0000 (Fri, 08 Aug 2008) Log Message: ----------- Move code to common code base. Modified Paths: -------------- trunk/crossfire/src/cfeditor/CMainControl.java trunk/daimonin/src/daieditor/CMainControl.java trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialogFactory.java Modified: trunk/crossfire/src/cfeditor/CMainControl.java =================================================================== --- trunk/crossfire/src/cfeditor/CMainControl.java 2008-08-08 19:12:37 UTC (rev 4804) +++ trunk/crossfire/src/cfeditor/CMainControl.java 2008-08-08 19:19:25 UTC (rev 4805) @@ -603,14 +603,7 @@ /** {@inheritDoc} */ public void openAttrDialog(final GameObject gameObject) { - if (archetypeTypeSet.isEmpty()) { - // types.xml is missing! - ACTION_FACTORY.showMessageDialog(mainView, "openAttrDialogNoTypes"); - } else if (gameObject != null && !gameObject.hasUndefinedArchetype()) { - gameObjectAttributesDialogFactory.showAttribDialog(gameObject); - } else { - ACTION_FACTORY.showMessageDialog(mainView, "openAttrDialogNoDefaultArch"); - } + gameObjectAttributesDialogFactory.showAttribDialog(gameObject); } /** {@inheritDoc} */ Modified: trunk/daimonin/src/daieditor/CMainControl.java =================================================================== --- trunk/daimonin/src/daieditor/CMainControl.java 2008-08-08 19:12:37 UTC (rev 4804) +++ trunk/daimonin/src/daieditor/CMainControl.java 2008-08-08 19:19:25 UTC (rev 4805) @@ -788,14 +788,7 @@ /** {@inheritDoc} */ public void openAttrDialog(final GameObject gameObject) { - if (archetypeTypeSet.isEmpty()) { - // types.xml is missing! - ACTION_FACTORY.showMessageDialog(mainView, "openAttrDialogNoTypes"); - } else if (gameObject != null && !gameObject.hasUndefinedArchetype()) { - gameObjectAttributesDialogFactory.showAttribDialog(gameObject); - } else { - ACTION_FACTORY.showMessageDialog(mainView, "openAttrDialogNoDefaultArch"); - } + gameObjectAttributesDialogFactory.showAttribDialog(gameObject); } /** {@inheritDoc} */ Modified: trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialogFactory.java =================================================================== --- trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialogFactory.java 2008-08-08 19:12:37 UTC (rev 4804) +++ trunk/src/app/net/sf/gridarta/gui/gameobjectattributesdialog/GameObjectAttributesDialogFactory.java 2008-08-08 19:19:25 UTC (rev 4805) @@ -88,6 +88,17 @@ * @param gameObject the GameObject to be displayed by this dialog */ public void showAttribDialog(@NotNull final G gameObject) { + if (archetypeTypeSet.isEmpty()) { + // types.xml is missing! + ACTION_FACTORY.showMessageDialog(parent, "openAttrDialogNoTypes"); + return; + } + + if (gameObject == null || gameObject.hasUndefinedArchetype()) { + ACTION_FACTORY.showMessageDialog(parent, "openAttrDialogNoDefaultArch"); + return; + } + synchronized (dialogs) { if (dialogs.containsKey(gameObject)) { dialogs.get(gameObject).toFront(); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |