]> git.argeo.org Git - gpl/argeo-slc.git/blobdiff - plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/model/ResultParent.java
enhance management of context menus and commands. Remove a few bugs.
[gpl/argeo-slc.git] / plugins / org.argeo.slc.client.ui / src / main / java / org / argeo / slc / client / ui / model / ResultParent.java
index 0e4899c710e379c421fe4c7a5b515d44d6c14f10..a616cc4ff7c085a153f2f90bd30c3af66ded049d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2007-2012 Mathieu Baudier
+ * Copyright (C) 2007-2012 Argeo GmbH
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -28,7 +28,6 @@ public abstract class ResultParent extends TreeParent {
        }
 
        private boolean isPassed = true;
-       private boolean isDisposed = false;
 
        protected synchronized void setPassed(boolean isPassed) {
                this.isPassed = isPassed;
@@ -40,27 +39,19 @@ public abstract class ResultParent extends TreeParent {
 
        @Override
        public synchronized boolean hasChildren() {
-               // sometimes in UI, disposed objects are still called.
-               if (isDisposed)
-                       return false;
+               // only initialize when needed : correctly called by the jface framework
                if (!isLoaded())
                        initialize();
                return super.hasChildren();
        }
 
        public void forceFullRefresh() {
-               if (isDisposed)
-                       return;
+               // if (isDisposed)
+               // return;
                if (hasChildren())
                        clearChildren();
                initialize();
        }
 
-       public synchronized void dispose() {
-               super.dispose();
-               isDisposed = true;
-       }
-
        protected abstract void initialize();
-
 }