682 |
682 |
*/
|
683 |
683 |
public void setDirty() {
|
684 |
684 |
this.dirty = true;
|
|
685 |
for (TXMResult c : getChildren()) {
|
|
686 |
c.setDirty();
|
|
687 |
}
|
685 |
688 |
}
|
686 |
689 |
|
687 |
690 |
|
... | ... | |
1676 |
1679 |
* @throws Exception
|
1677 |
1680 |
*/
|
1678 |
1681 |
public boolean compute(IProgressMonitor monitor) throws Exception {
|
1679 |
|
return this.compute(monitor, false);
|
|
1682 |
return this.compute(monitor, true);
|
1680 |
1683 |
}
|
1681 |
1684 |
|
1682 |
1685 |
|
... | ... | |
1774 |
1777 |
this.dirty = false; // the computing was successful, the result is no more dirty
|
1775 |
1778 |
this.hasBeenComputedOnce = true;
|
1776 |
1779 |
Log.finest("TXMResult.compute(): " + this.getClass().getSimpleName() + ": computing of result type " + this.getClass() + " done.");
|
1777 |
|
}
|
1778 |
|
|
1779 |
|
// Children cascade computing
|
1780 |
|
if (deepComputing && !skipComputing) {
|
1781 |
|
|
1782 |
|
Log.finest("TXMResult.compute(): " + this.getClass().getSimpleName() + ": cascade computing of " + this.children.size() + " children.");
|
1783 |
|
|
|
1780 |
|
1784 |
1781 |
for (int i = 0; i < this.children.size(); i++) {
|
1785 |
|
// FIXME: may be better to add a member needFullRecomputing in TXMResult?
|
1786 |
1782 |
this.getChild(i).setDirty(); // force recomputing even if some parameters of the result itself have not changed
|
1787 |
|
//this.getChild(i).setHasBeenComputedOnce(false); // force recomputing even if some parameters of the result itself have not changed
|
1788 |
|
this.getChild(i).compute(monitor, deepComputing, updateLastParameters);
|
1789 |
1783 |
}
|
|
1784 |
|
|
1785 |
// Children cascade computing
|
|
1786 |
if (deepComputing) {
|
|
1787 |
|
|
1788 |
Log.finest("TXMResult.compute(): " + this.getClass().getSimpleName() + ": cascade computing of " + this.children.size() + " children.");
|
|
1789 |
|
|
1790 |
for (TXMResult child : getChildren()) {
|
|
1791 |
// FIXME: may be better to add a member needFullRecomputing in TXMResult?
|
|
1792 |
// this.getChild(i).setDirty(); // force recomputing even if some parameters of the result itself have not changed
|
|
1793 |
//this.getChild(i).setHasBeenComputedOnce(false); // force recomputing even if some parameters of the result itself have not changed
|
|
1794 |
if (child.hasBeenComputedOnce()) {
|
|
1795 |
child.compute(monitor, deepComputing, updateLastParameters);
|
|
1796 |
}
|
|
1797 |
}
|
|
1798 |
}
|
1790 |
1799 |
}
|
|
1800 |
|
1791 |
1801 |
|
1792 |
1802 |
return true;
|
1793 |
1803 |
}
|
... | ... | |
1995 |
2005 |
|
1996 |
2006 |
/**
|
1997 |
2007 |
* Gets a boolean state defining if the result has already been computed at least once or not.
|
|
2008 |
*
|
|
2009 |
* true if the result has already been lazy LOADED...........
|
1998 |
2010 |
* @return
|
1999 |
2011 |
*/
|
2000 |
2012 |
public boolean hasBeenComputedOnce() {
|