svn commit: r18812 - trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/model/MetaDataCache.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: tfmorris
Date: 2010-10-26 20:51:59-0700
New Revision: 18812

Modified:
   trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/model/MetaDataCache.java

Log:
Log missing property panel info

Modified: trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/model/MetaDataCache.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/model/MetaDataCache.java?view=diff&pathrev=18812&r1=18811&r2=18812
==============================================================================
--- trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/model/MetaDataCache.java	(original)
+++ trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/model/MetaDataCache.java	2010-10-26 20:51:59-0700
@@ -124,31 +124,34 @@
             final String name = 
     	        panelNode.getAttributes().getNamedItem("name").getNodeValue();
             Class<?> clazz = metaTypeByName.get(name);
-            
-            PanelData pm = new PanelData(clazz, name);
-            map.put(clazz, pm);
-            
-            final NodeList controlNodes = panelNode.getElementsByTagName("*");
-            for (int j = 0; j < controlNodes.getLength(); ++j) {
-                Element controlNode = (Element) controlNodes.item(j);
-                
-                final String propertyName = controlNode.getAttribute("name");
-                final String label = controlNode.getAttribute("label");
-                
-                final ControlData controlData =
-                    new ControlData(controlNode.getTagName(), propertyName, label);
+
+            if (clazz == null) {
+                LOG.warn("No class name translation found for panel: " + name);
+            } else {
+                PanelData pm = new PanelData(clazz, name);
+                map.put(clazz, pm);
                 
-                final String types = controlNode.getAttribute("type");
-                StringTokenizer st = new StringTokenizer(types, ",");
-                while (st.hasMoreTokens()) {
-                    controlData.addType(metaTypeByName.get(st.nextToken()));
+                final NodeList controlNodes = panelNode.getElementsByTagName("*");
+                for (int j = 0; j < controlNodes.getLength(); ++j) {
+                    Element controlNode = (Element) controlNodes.item(j);
+                    
+                    final String propertyName = controlNode.getAttribute("name");
+                    final String label = controlNode.getAttribute("label");
+                    
+                    final ControlData controlData =
+                        new ControlData(controlNode.getTagName(), propertyName, label);
+                    
+                    final String types = controlNode.getAttribute("type");
+                    StringTokenizer st = new StringTokenizer(types, ",");
+                    while (st.hasMoreTokens()) {
+                        controlData.addType(metaTypeByName.get(st.nextToken()));
+                    }
+                    
+                    if (controlNode.getTagName().equals("checkgroup")) {
+                        addCheckboxes(controlData, controlNode);
+                    }
+                    pm.addControlData(controlData);
                 }
-                
-                if (controlNode.getTagName().equals("checkgroup")) {
-                    addCheckboxes(controlData, controlNode);
-                }
-                
-                pm.addControlData(controlData);
             }
         }

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

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.