Author: thomasobrien95
Date: Thu Apr 23 11:14:19 2009
New Revision: 2997

Modified:
   trunk/src/ca/sqlpower/architect/swingui/ArchitectSwingSessionImpl.java

Log:
Removed a listener that was throwing exceptions if the
childrenInaccessibleReason was set. The setChildrenInacceessibleReason
throws exceptions when necessary which removes the need of this listener.
The listener was also leaking memory.

Modified: trunk/src/ca/sqlpower/architect/swingui/ArchitectSwingSessionImpl.java
==============================================================================
--- trunk/src/ca/sqlpower/architect/swingui/ArchitectSwingSessionImpl.java (original) +++ trunk/src/ca/sqlpower/architect/swingui/ArchitectSwingSessionImpl.java Thu Apr 23 11:14:19 2009
@@ -66,7 +66,6 @@
 import ca.sqlpower.sqlobject.SQLObject;
 import ca.sqlpower.sqlobject.SQLObjectEvent;
 import ca.sqlpower.sqlobject.SQLObjectException;
-import ca.sqlpower.sqlobject.SQLObjectHierarchyListener;
 import ca.sqlpower.sqlobject.SQLObjectListener;
 import ca.sqlpower.sqlobject.SQLObjectRoot;
 import ca.sqlpower.sqlobject.SQLObjectUtils;
@@ -178,21 +177,6 @@
      * for Architect.
      */
     private final SwingUIUserPrompterFactory swinguiUserPrompterFactory;
-
-    /**
- * This listener will listen to the SQLObject hierarchy and display exception windows when
-     * an object's children are not accessible.
-     */
- private final SQLObjectListener childrenInaccessibleListener = new SQLObjectHierarchyListener() {
-        @Override
-        public void dbObjectChanged(SQLObjectEvent e) {
-            super.dbObjectChanged(e);
- logger.debug("Object " + e.getSource() + " changed in the SQLObject hierarchy."); - if (e.getPropertyName().equals("childrenInaccessibleReason") && e.getNewValue() != null) { - SPSUtils.showExceptionDialogNoReport(frame, "Children of " + e.getSource() + " are inaccessible due to the following exception.", (Throwable) e.getNewValue());
-            }
-        }
-    };

     /**
* Creates a new swing session, including a new visible architect frame, with
@@ -208,7 +192,6 @@
         this.isNew = true;
         this.context = context;
         this.delegateSession = new ArchitectSessionImpl(context, name);
- SQLObjectUtils.listenToHierarchy(childrenInaccessibleListener, getRootObject());
         this.olapRootObject = new OLAPRootObject(delegateSession);
((ArchitectSessionImpl)delegateSession).setProfileManager(new ProfileManagerImpl(this)); ((ArchitectSessionImpl)delegateSession).setUserPrompterFactory(this);

Reply via email to