Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BPMN 2.0 Modeler » Opening BPMN2 in Eclipse view instead of editor
Opening BPMN2 in Eclipse view instead of editor [message #1246135] Fri, 14 February 2014 19:06 Go to next message
Rahul Shukla is currently offline Rahul ShuklaFriend
Messages: 12
Registered: April 2011
Location: Pune India
Junior Member


I want to open bpmn2 file in a view that does not have palette and dont allow editing of diagram .

I tried this way ...

private DiagramComposite diagramComposite;

public void createPartControl(Composite parent) {
diagramComposite = new DiagramComposite(this, parent, SWT.NONE);
diagramComposite.setLayout(new FillLayout());
diagramComposite.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true,true));
ISelection selection = PlatformUI.getWorkbench().getActiveWorkbenchWindow()


private Bpmn2DiagramEditorInput getEditorInput(ISelection sel)throws Exception {
// String contents = getContents(sel) // my logic of getting contents
IStorage storage = new StringStorage(contents, node.getName());
IStorageEditorInput input = new StringInput(storage);
return convertToDiagramEditorInput(input);

private Bpmn2DiagramEditorInput convertToDiagramEditorInput(IEditorInput input) throws PartInitException {
URI modelUri = FileService.getInputUri(input);
if (modelUri == null)
throw new PartInitException("Not able");
String modelName = modelUri.trimFragment().trimFileExtension().lastSegment();
// We still need to create a Diagram object for this editor
final Diagram diagram = Graphiti.getPeCreateService().createDiagram(
"BPMN2", modelName, true); //$NON-NLS-1$
String diagramName = FileService.createTempName(modelName);
URI diagramUri = URI.createFileURI(diagramName);
FileService.createEmfFileForDiagram(diagramUri, diagram, null);
String providerId = GraphitiUi.getExtensionManager()
return new Bpmn2DiagramEditorInput(modelUri, diagramUri, providerId);


As I found in code that... Type Provider ... Feature Provider are tightly coupled with editor as I am not opening it in editor so I am getting lot of issues....

I tried commenting out all code where it depending on editor (basically getting feature or tool for specific runtime)

Still not working ....

1. Is there any direct way or view available by bpmn2 so that I can use... ?
2. How can I restrict editing of diagram?

Thanks in advance
Re: Opening BPMN2 in Eclipse view instead of editor [message #1248765 is a reply to message #1246135] Mon, 17 February 2014 16:36 Go to previous message
Robert Brodt is currently offline Robert BrodtFriend
Messages: 811
Registered: August 2010
Location: Colorado Springs, CO
Senior Member

Hi Rahul,

Currently there is no viewer for BPMN2 files based on the editor, sorry Sad
I'm not sure if this will help, but there is an enhancement request in bugzilla to save a JPG (or similar) image file along with the process file, so essentially these should always be in sync. If this will suit your needs, please vote for the bug Smile

Previous Topic:Issue in CallActivity of a Process
Next Topic:How to access BPMN Resource
Goto Forum:

Current Time: Thu Jul 16 05:09:40 GMT 2020

Powered by FUDForum. Page generated in 0.01581 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top