Commit 19d9fb0f authored by Romain Bioteau's avatar Romain Bioteau

open document from explorer

parent 947ed580
......@@ -76,7 +76,10 @@ public class BonitaExplorerLabelProvider extends JavaNavigatorLabelProvider {
if (element instanceof IResource) {
IRepositoryFileStore fileStore = repositoryManager.getCurrentRepository().getFileStore((IResource) element);
if (fileStore != null) {
return packageExplorerProblemsDecorator.decorateImage(fileStore.getIcon(), element);
if (fileStore.getIcon() != null) {
return packageExplorerProblemsDecorator.decorateImage(fileStore.getIcon(), element);
}
return super.getImage(element);
}
}
Optional<IRepositoryStore<? extends IRepositoryFileStore>> repositoryStore = repositoryManager
......
......@@ -23,6 +23,9 @@ import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.ide.IDE;
/**
* @author Romain Bioteau
......@@ -85,7 +88,11 @@ public class DocumentFileStore extends AbstractFileStore implements IRepositoryF
@Override
protected IWorkbenchPart doOpen() {
return null ;
try {
return IDE.openEditor(PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage(), getResource());
} catch (PartInitException e) {
return null;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment