@SuppressWarnings("unchecked") public void sync(int iPartition) { if (parentInputs.size() > 0 && _input.get() != null) { Input<?> input = parentInputs.get(iPartition); if (bIsList) { List<Object> list = (List<Object>) _input.get(); List<Object> targetList = ((List<Object>) input.get()); // targetList.clear(); // only clear former members for (BEASTInterface plugin : startInputs) { targetList.remove(plugin); } targetList.addAll(list); // sync outputs of items in list for (Object o : list) { if (o instanceof BEASTInterface) { ((BEASTInterface) o).getOutputs().add(parentPlugins.get(iPartition)); } } } else { try { // System.err.println("sync " + parentPlugins.get(iPartition) + "[" + input.getName() + "] // = " + _input.get()); input.setValue(_input.get(), parentPlugins.get(iPartition)); } catch (Exception e) { e.printStackTrace(); } } } }