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

[email protected]
Newsgroups gmane.comp.lang.uml.argouml.cvs
Message-ID <[email protected]>
Author: maurelio1234
Date: 2007-08-14 11:08:17-0700
New Revision: 13346

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

Log:
updating example

Modified: branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/ProfileJavaBeans.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/ProfileJavaBeans.java?view=diff&rev=13346&p1=branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/ProfileJavaBeans.java&p2=branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/ProfileJavaBeans.java&r1=13345&r2=13346
==============================================================================
--- branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/ProfileJavaBeans.java	(original)
+++ branches/gsoc2007/maurelio1234/examples/javabeans/src/org/argouml/uml/profile/javabeans/ProfileJavaBeans.java	2007-08-14 11:08:17-0700
@@ -44,7 +44,7 @@
     private Collection model;

     private FigNodeStrategy figStrategy = new JavaBeansFigNodeStrategy();

 

-    private ProfileJavaBeans() {

+    private ProfileJavaBeans() throws ProfileException {

 	    profileModelLoader = new ResourceModelLoader(this.getClass());

 	    model = profileModelLoader.loadModel("JavaBeans.xmi");	

 	    

@@ -56,11 +56,16 @@
     }

 

     public static ProfileJavaBeans getInstance() {

-	if (instance == null) {

-	    instance = new ProfileJavaBeans();

+		if (instance == null) {

+			try {

+				instance = new ProfileJavaBeans();

+			} catch (ProfileException e) {

+				e.printStackTrace();

+				instance = null;

+			}

+		}

+		return instance;

 	}

-	return instance;

-    }

     

     public FormatingStrategy getFormatingStrategy() {

 	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.