} if (!status.isOK()) { IStatus[] children= status.getChildren(); ErrorDialog.openError(getShell(), getDialogTitle(), ActionMessages.OpenAction_erro_message, children.length == 1 ? children[0] : status);
IJavaElement element= elements[0]; if (elements.length > 1) { element= SelectionConverter.selectJavaElement(elements, getShell(), getDialogTitle(), ActionMessages.OpenAction_select_element); if (element == null) return; }  int type= element.getElementType(); if (type == IJavaElement.JAVA_PROJECT || type == IJavaElement.PACKAGE_FRAGMENT_ROOT || type == IJavaElement.PACKAGE_FRAGMENT) element= EditorUtility.getEditorInputJavaElement(fEditor, false); run(new Object[] {element} ); } catch (InvocationTargetException e) { ExceptionHandler.handle(e, getShell(), getDialogTitle(), ActionMessages.OpenAction_error_message); } catch (InterruptedException e) {
	public void run(Object[] elements) {		if (elements == null)			return;				MultiStatus status= new MultiStatus(JavaUI.ID_PLUGIN, IStatus.OK, ActionMessages.OpenAction_multistatus_message, null);				for (int i= 0; i < elements.length; i++) {			Object element= elements[i];			try {				element= getElementToOpen(element);				boolean activateOnOpen= fEditor != null ? true : OpenStrategy.activateOnOpen();				IEditorPart part= EditorUtility.openInEditor(element, activateOnOpen);				if (part != null && element instanceof IJavaElement)					JavaUI.revealInEditor(part, (IJavaElement)element);				} catch (CoreException e) {				String message= Messages.format(ActionMessages.OpenAction_error_problem_opening_editor, new String[] { new JavaUILabelProvider().getText(element), e.getStatus().getMessage() });				status.add(new Status(IStatus.ERROR, JavaUI.ID_PLUGIN, IStatus.ERROR, message, null));				JavaPlugin.log(e);			}		}		if (!status.isOK()) {			IStatus[] children= status.getChildren();			ErrorDialog.openError(getShell(), getDialogTitle(), ActionMessages.OpenAction_erro_message, children.length == 1 ? children[0] : status);		}	}