| Summary: | The model and the target ref have no path | ||
|---|---|---|---|
| Product: | [Modeling] Sirius | Reporter: | Verena Käfer <verena.kaefer> |
| Component: | Diagram | Assignee: | Project Inbox <sirius.diagram-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | cedric.brun, maxime.porhel, pierre-charles.david |
| Version: | 1.0.1 | Keywords: | triaged |
| Target Milestone: | 2.0.0 | ||
| Hardware: | PC | ||
| OS: | Linux | ||
| Whiteboard: | |||
|
Description
Verena Käfer
Hi Verena, In your case, how do you use the AddSemanticResourceCommand ? With which kind of URI ? Hi Maxime, I use URI newFileUri = (URI.createURI(newFile.getLocationURI().toString())); AddSemanticResourceCommand addResourceToSession = new AddSemanticResourceCommand(session, newFileUri, new NullProgressMonitor()); session.getTransactionalEditingDomain().getCommandStack() .execute(addResourceToSession); It looks like you would be bettter of creating a platform resource uri instead of a file URI URI.createPlatformResourceURI(newFile.getFullPath().toString(), true) That being said, we should check that fileURIs are kept and serialized correctly. I agree with Cedric, I was about to propose the same snippet. Ah thanks. I didn't think of a platform resource uri (In reply to Verena Käfer from comment #6) > Ah thanks. I didn't think of a platform resource uri Hi. Did the suggestions fix your issue, and if so can we close this ticket? Yes, it works with createPlatformResourceURI (In reply to Verena Käfer from comment #8) > Yes, it works with createPlatformResourceURI Thanks for the confirmation; closing. Available in Sirius 2.0.0. |