	public void doOpen(final URI uri) {
		IFile file = getContainingResourceSetFile(uri);
		IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
		IEditorPart openEditor = null;
		try {
			if (file != null) {
				openEditor = IDE.openEditor(page, file);
			} else if (uri.isArchive()) {
				IEditorInput input = new XtextReadonlyEditorInput(new ReadonlyArchiveStorage(uri));
				openEditor = IDE.openEditor(page, input, PlatformUI.getWorkbench().getEditorRegistry()
						.getDefaultEditor(uri.lastSegment()).getId());
			} else {
				URL url = FileLocator.toFileURL(new URL(uri.scheme()+ ":" +uri.devicePath()));
				URI urlAsUri = URI.createURI(url.toString());
				String path = urlAsUri.toFileString();
				File ioFile = new File(path);
				IEditorInput input = new XtextReadonlyEditorInput(new ReadonlyFileStorage(ioFile, uri));
				openEditor = IDE.openEditor(page, input, PlatformUI.getWorkbench().getEditorRegistry()
						.getDefaultEditor(uri.lastSegment()).getId());
			}
		} catch (PartInitException partInitException) {
			logger.error("Error while opening editor part for EMF URI '" + uri + "'",
					partInitException);
		} catch (IOException e) {
			logger.error("Error while opening editor part for EMF URI '" + uri + "'", e);
		}
		if (openEditor != null && openEditor instanceof XtextEditor) {
			final XtextEditor edit = (XtextEditor) openEditor;
			if (uri.fragment()!=null) {
				edit.getDocument().readOnly(new UnitOfWork<Object>(){
				public Object exec(XtextResource resource) throws Exception {
					EObject object = resource.getEObject(uri.fragment());
					Region region = locationProvider.getLocation(object);
					edit.selectAndReveal(region.getOffset(),region.getLength());
					return null;
				}});
			}
		} else if (openEditor instanceof ISelectionProvider) {
		}
	}

	public void doOpen(final URI uri) {
		IFile file = getContainingResourceSetFile(uri);
		IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
		IEditorPart openEditor = null;
		try {
			if (file != null) {
				openEditor = IDE.openEditor(page, file);
			} else if (uri.isArchive()) {
				IEditorInput input = new XtextReadonlyEditorInput(new ReadonlyArchiveStorage(uri));
				openEditor = IDE.openEditor(page, input, PlatformUI.getWorkbench().getEditorRegistry()
						.getDefaultEditor(uri.lastSegment()).getId());
			} else {
				URL url = FileLocator.toFileURL(new URL(uri.scheme()+ ":" +uri.devicePath()));
				URI urlAsUri = URI.createURI(url.toString());
				String path = urlAsUri.toFileString();
				if (path != null) {
					File ioFile = new File(path);
					IEditorInput input = new XtextReadonlyEditorInput(new ReadonlyFileStorage(ioFile, uri));
					openEditor = IDE.openEditor(page, input, PlatformUI.getWorkbench().getEditorRegistry()
							.getDefaultEditor(uri.lastSegment()).getId());
				}
			}
		} catch (PartInitException partInitException) {
			logger.error("Error while opening editor part for EMF URI '" + uri + "'",
					partInitException);
		} catch (IOException e) {
			logger.error("Error while opening editor part for EMF URI '" + uri + "'", e);
		}
		if (openEditor != null && openEditor instanceof XtextEditor) {
			final XtextEditor edit = (XtextEditor) openEditor;
			if (uri.fragment()!=null) {
				edit.getDocument().readOnly(new UnitOfWork<Object>(){
				public Object exec(XtextResource resource) throws Exception {
					EObject object = resource.getEObject(uri.fragment());
					Region region = locationProvider.getLocation(object);
					edit.selectAndReveal(region.getOffset(),region.getLength());
					return null;
				}});
			}
		} else if (openEditor instanceof ISelectionProvider) {
		}
	}
