*/
private IEditorReference openExternalEditor(final EditorDescriptor desc,
IEditorInput input) throws PartInitException {
final CoreException ex[] = new CoreException[1];
final IPathEditorInput pathInput = getPathEditorInput(input);
if (pathInput != null && pathInput.getPath() != null) {
BusyIndicator.showWhile(getDisplay(), new Runnable() {
public void run() {
try {
if (desc.getLauncher() != null) {
// open using launcher
Object launcher = WorkbenchPlugin.createExtension(
desc.getConfigurationElement(), "launcher"); //$NON-NLS-1$
((IEditorLauncher) launcher).open(pathInput
.getPath());
} else {
// open using command
ExternalEditor oEditor = new ExternalEditor(
pathInput.getPath(), desc);
oEditor.open();
}
} catch (CoreException e) {
ex[0] = e;
}