svn commit: r17091 - trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/panel/XmlPropertyPanel.java

Christian López Espínola <[email protected]>
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: penyaskito
Date: 2009-04-10 08:05:47-0700
New Revision: 17091

Modified:
   trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/panel/XmlPropertyPanel.java

Log:
Prevent null exception with multiple selection. Added TODO for multiple selection.

Modified: trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/panel/XmlPropertyPanel.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/panel/XmlPropertyPanel.java?view=diff&pathrev=17091&r1=17090&r2=17091
==============================================================================
--- trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/panel/XmlPropertyPanel.java	(original)
+++ trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/panel/XmlPropertyPanel.java	2009-04-10 08:05:47-0700
@@ -84,6 +84,18 @@
     }
     
     public void build(Object target) {
+        // if we have anything or multiple elements selected,
+        // we don't do anything
+        // TODO: We need to support multiple selection.
+        // See issue 2552: http://argouml.tigris.org/issues/show_bug.cgi?id=2552        
+        if (target == null){
+            if (currentPanel != null){
+                this.getTitleLabel().setText("");
+                this.remove(currentPanel);
+            }
+            return;
+        }
+        
         LOG.info("[XMLPP] t is type:" + target.getClass());
         
         if (currentPanel != null) {

------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=1631801

To unsubscribe from this discussion, e-mail: [[email protected]].
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.