final int j = destRowObjects.length;
for (int i = j - 1; i >= 0; i--) {
final int f_i = i;
final Object sobj = destRowObjects[i];
if (sobj instanceof ContextEditableSample) {
IsolatedSample is = null;
try {
if (i == 0)
is = ips.getIsolatedSample(i);
else
is = ips.getIsolatedSample(i);
is.doAssert();
} catch (IsolatedSampleUnavailableException e) {
e.printStackTrace();
} finally {
z.updateProgressElement(progressOwner);
if (is == null) {
z.updateProgressElement(progressOwner);
if (i >= j - 1)
z.endProgressElement(progressOwner);
errors++;
continue;
}
}
final IsolatedSample f_is = is;
// new ZDBModifyThread("D&D: New Samples from IsolatedSamples") {
// public void run() {
// TODO!! should use a signal here to achieve correct ordering of threads
try {
z.setProgressElementIndeterminate(progressOwner, true);
z.updateProgressElementTitle(progressOwner, "Copying " + f_is.getName() + " to " + ((ContextEditableSample) sobj).getSampleDisplayName());
((ContextEditableSample) sobj).newSample(f_is, f_is.getName());
f_is.zDispose();
} catch (NoSuchSampleException e) {
JOptionPane.showMessageDialog(ZoeosFrame.getInstance(), e.getMessage(), "Problem", JOptionPane.ERROR_MESSAGE);
errors++;
continue;
} catch (IsolatedSampleUnavailableException e) {