Community
Participate
Working Groups
Currently the BPMN2 editor creates files with extension .bpmn2. Although the spec does not explicitly indicate what file extension should be used, the examples distributed by the OMG use the .bpmn extension. The issue is that currently this would conflict with users of the existing BPMN1 Eclipse editor. Robert (Bob) Brodt added a comment - 09/Jun/11 5:23 PM Still need to handle the case of files with .bpmn2 extension, which do not actually contain BPMN2 content. This shouldn't happen if new BPMN2 files are created with the wizard. Downgrading to minor. Brian Fitzpatrick added a comment - 30/Jun/11 1:16 PM There's some bizarre code around this issue in BPMN2Editor's getModelPathFromInput, which does a strange dance of adding the "bpmn2" file extension, then replacing it with a blank?? Something's off there.
Created attachment 219483 [details] Fix in BPMN2ContentDescriber Modification done is, @Override public int describe(Reader contents, IContentDescription description) throws IOException { if(doDescribe(contents) == null){ //Show error if the file does not have BPMN2 content MessageDialog.openError(PlatformUI.getWorkbench().getDisplay().getActiveShell(), "Unsupported Content Type", "Unsupported content type in editor.\nThe file content will be lost if user modifies the file with BPMN2 editor."); return INVALID; } return VALID; }
(In reply to comment #1) > Created attachment 219483 [details] Fix in BPMN2ContentDescriber > Modification done is, @Override public int describe(Reader contents, > IContentDescription description) throws IOException { > if(doDescribe(contents) == null){ //Show error if the file does not > have BPMN2 content > MessageDialog.openError(PlatformUI.getWorkbench().getDisplay(). > getActiveShell(), "Unsupported Content Type", "Unsupported content > type in editor.\nThe file content will be lost if user modifies the file > with BPMN2 editor."); return INVALID; } return VALID; } The above proposed solution is to alert the user that file content is invalid and if he attempts to add elements from the palette the existing content will be lost, ie. replaced with new BPMN2 content. Note that the message in the problems view is not in detail and clear.
Patch applied. Thanks again!