IEditorPart editor= (IEditorPart)unsavedEditors.get(elements.indexOf(elementsToSave[i])); editor.doSave(new SubProgressMonitor(pm, 1));
IEditorPart editor= findEditor(elementsToSave[i], unsavedEditors); if (editor != null) editor.doSave(new SubProgressMonitor(pm, 1)); else pm.worked(1);
			public void run(IProgressMonitor pm) {				pm.beginTask(ReorgMessages.getString("ReorgAction.task.saving"), elementsToSave.length); //$NON-NLS-1$				for (int i= 0; i < elementsToSave.length; i++) {					IEditorPart editor= (IEditorPart)unsavedEditors.get(elements.indexOf(elementsToSave[i]));					editor.doSave(new SubProgressMonitor(pm, 1));				}				pm.done();			}