svn commit: r13190 - branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/JavaBeansFigNodeStrategy.java

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: maurelio1234
Date: 2007-07-31 04:17:51-0700
New Revision: 13190

Modified:
   branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/JavaBeansFigNodeStrategy.java

Log:
solving stereotypes bug

Modified: branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/JavaBeansFigNodeStrategy.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/JavaBeansFigNodeStrategy.java?view=diff&rev=13190&p1=branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/JavaBeansFigNodeStrategy.java&p2=branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/JavaBeansFigNodeStrategy.java&r1=13189&r2=13190
==============================================================================
--- branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/JavaBeansFigNodeStrategy.java	(original)
+++ branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/JavaBeansFigNodeStrategy.java	2007-07-31 04:17:51-0700
@@ -44,13 +44,19 @@
      * @see org.argouml.uml.profile.FigNodeStrategy#getIconForStereotype(java.lang.Object)

      */

     public Image getIconForStereotype(Object stereotype) {

-	if ("Bean".equals(Model.getFacade().getName(stereotype))) {

-	    return iconBean;

-	} else 	if ("Event".equals(Model.getFacade().getName(stereotype))) {

-	    return iconRay;

-	} else {

-	    return null;

+		if (stereotype != null) {

+			try {

+				if ("Bean".equals(Model.getFacade().getName(stereotype))) {

+					return iconBean;

+				} else if ("Event"

+						.equals(Model.getFacade().getName(stereotype))) {

+					return iconRay;

+				}

+			} catch (Throwable e) {

+

+			}

+		}

+		return null;

 	}

-    }

     

 }
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.