X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=plugins%2Forg.argeo.slc.client.ui%2Fsrc%2Fmain%2Fjava%2Forg%2Fargeo%2Fslc%2Fclient%2Fui%2Fmodel%2FResultParent.java;h=a616cc4ff7c085a153f2f90bd30c3af66ded049d;hb=018795e1c7fb82445c43dcb28fdc515e8cb624ac;hp=0e4899c710e379c421fe4c7a5b515d44d6c14f10;hpb=2bdb18c75fc87cd78ed18843149c469c180f3830;p=gpl%2Fargeo-slc.git diff --git a/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/model/ResultParent.java b/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/model/ResultParent.java index 0e4899c71..a616cc4ff 100644 --- a/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/model/ResultParent.java +++ b/plugins/org.argeo.slc.client.ui/src/main/java/org/argeo/slc/client/ui/model/ResultParent.java @@ -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(); - }