| Summary: | Change file extension from .bpmn2 to .bpmn and use content descriptors to associate with correct editor | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [SOA] BPMN2Modeler | Reporter: | Robert Brodt <bbrodt> | ||||
| Component: | UI | Assignee: | Robert Brodt <bbrodt> | ||||
| Status: | RESOLVED FIXED | QA Contact: | |||||
| Severity: | minor | ||||||
| Priority: | P3 | CC: | robin7013 | ||||
| Version: | 0.0.1 | Flags: | bbrodt:
iplog+
|
||||
| Target Milestone: | 0.0.1-M2 | ||||||
| Hardware: | PC | ||||||
| OS: | Windows 7 | ||||||
| URL: | https://issues.jboss.org/browse/JBPM-3108 | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Robert Brodt
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! |