Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Inconsistency after deleting element based edge
Inconsistency after deleting element based edge [message #1787251] Tue, 22 May 2018 19:13 Go to next message
Tom Brandenburg is currently offline Tom BrandenburgFriend
Messages: 2
Registered: May 2018
Junior Member
Hello,

I am currently making my first steps with Sirius and I am quite impressed.
On my way I found some strange behaviour.

1. I am starting with a clean model:
<?xml version="1.0" encoding="UTF-8"?>
<mbse:Package xmi:version="2.0" xmlns:xmi="..." xmlns:xsi="..." xmlns:mbse="tb.mbse">
  <packagedElement xsi:type="mbse:Component"/>
  <packagedElement xsi:type="mbse:Component"/>
  <packagedElement xsi:type="mbse:Component"/>
</mbse:Package>


2. I am adding an element based edge between a bordered node (Port is a connection end) and a container (an invisible connection end is created in the context of the container during creation of the edge):
index.php/fa/32882/0/

3. In the model tree editor it looks like:
index.php/fa/32883/0/

4. Now I am deleting the node based edge with:
index.php/fa/32885/0/

5. It (and the connection ends) seems to be removed in the diagram and in the project explorer:
index.php/fa/32884/0/

6. But in the model editor and in the XMI file the elements are remaining:
index.php/fa/32886/0/

<?xml version="1.0" encoding="UTF-8"?>
<mbse:Package xmi:version="2.0" xmlns:xmi="..." xmlns:xsi="..." xmlns:mbse="tb.mbse">
  <packagedElement xsi:type="mbse:Component">
    <ownedFeature xsi:type="mbse:Port" connection="//@packagedElement.3"/>
  </packagedElement>
  <packagedElement xsi:type="mbse:Component">
    <ownedFeature xsi:type="mbse:ConnectionEnd" connection="//@packagedElement.3"/>
  </packagedElement>
  <packagedElement xsi:type="mbse:Component"/>
  <packagedElement xsi:type="mbse:Connection" end="//@packagedElement.0/@ownedFeature.0 //@packagedElement.1/@ownedFeature.0"/>
</mbse:Package>


Do you have any clue on what is going on there? :)
Do I have to unset something before removing?

Thanks a lot and best regards,
Tom
Re: Inconsistency after deleting element based edge [message #1789941 is a reply to message #1787251] Fri, 01 June 2018 06:20 Go to previous messageGo to next message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 458
Registered: July 2009
Location: Nantes, France
Senior Member
Hi Tom,

The Remove operation removes each elements from its container, then at the end of the tool operations, Sirius is supposed to remove the references from the model to the removed elements.

It seems that the model file as not been saved : did you save it ?
Do you still have the '*' in your editor tab ?

Could you check if something has been reported in the error log ?


Regards,

Maxime


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius

Join the Sirius community at SiriusCon. Register for free: Nov. 9th Paris
http://www.siriuscon.org/
Re: Inconsistency after deleting element based edge [message #1801373 is a reply to message #1789941] Thu, 17 January 2019 19:36 Go to previous message
Tom Brandenburg is currently offline Tom BrandenburgFriend
Messages: 2
Registered: May 2018
Junior Member
Hello,

I looked into that project with Eclipse 4.8 again and the issue is still there.

During deleting I can see following error messages during saving:

!ENTRY org.eclipse.sirius 4 0 2019-01-17 21:41:59.991
!MESSAGE Error saving resource
!STACK 0
org.eclipse.emf.ecore.resource.Resource$IOWrappedException: The object 'com.tb.mbse.impl.ConnectionImpl@17aa498e (description: null, URI: null) (name: Name, visibility: public)' is not contained in a resource.
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.endSave(XMLSaveImpl.java:301)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl.java:265)
	at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doSave(XMLResourceImpl.java:389)
	at org.eclipse.emf.ecore.resource.impl.ResourceImpl.save(ResourceImpl.java:1475)
	at org.eclipse.sirius.business.internal.session.danalysis.ResourceSaveDiagnose.hasDifferentSerialization(ResourceSaveDiagnose.java:84)
	at org.eclipse.sirius.business.internal.session.IsModifiedSavingPolicy.hasDifferentSerialization(IsModifiedSavingPolicy.java:211)
	at org.eclipse.sirius.business.internal.session.IsModifiedSavingPolicy.computeResourcesToSave(IsModifiedSavingPolicy.java:192)
	at org.eclipse.sirius.business.api.session.AbstractSavingPolicy.save(AbstractSavingPolicy.java:57)
	at org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl$1.run(DAnalysisSessionImpl.java:829)
	at org.eclipse.emf.transaction.impl.TransactionalEditingDomainImpl.runExclusive(TransactionalEditingDomainImpl.java:328)
	at org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl.doSave(DAnalysisSessionImpl.java:838)
	at org.eclipse.sirius.business.internal.session.danalysis.Saver.wrappedSave(Saver.java:142)
	at org.eclipse.sirius.business.internal.session.danalysis.Saver.access$0(Saver.java:131)
	at org.eclipse.sirius.business.internal.session.danalysis.Saver$1.run(Saver.java:119)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2289)
	at org.eclipse.core.internal.resources.Workspace.run(Workspace.java:2311)
	at org.eclipse.sirius.business.internal.session.danalysis.Saver.saveNow(Saver.java:116)
	at org.eclipse.sirius.business.internal.session.danalysis.Saver.save(Saver.java:93)
	at org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl.save(DAnalysisSessionImpl.java:802)
	at org.eclipse.sirius.business.internal.session.danalysis.DAnalysisSessionImpl.save(DAnalysisSessionImpl.java:797)
	at org.eclipse.sirius.diagram.ui.tools.internal.resource.CustomSiriusDocumentProvider.doSaveDocument(CustomSiriusDocumentProvider.java:279)
	at org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider$1SaveOperation.execute(AbstractDocumentProvider.java:596)
	at org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider$DocumentProviderOperation.run(AbstractDocumentProvider.java:66)
	at org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider.executeOperation(AbstractDocumentProvider.java:530)
	at org.eclipse.gmf.runtime.diagram.ui.resources.editor.document.AbstractDocumentProvider.saveDocument(AbstractDocumentProvider.java:579)
	at org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor.performSave(DiagramDocumentEditor.java:864)
	at org.eclipse.gmf.runtime.diagram.ui.resources.editor.parts.DiagramDocumentEditor.doSave(DiagramDocumentEditor.java:684)
	at org.eclipse.sirius.ui.business.internal.session.SaveSessionRunnable.run(SaveSessionRunnable.java:62)
	at org.eclipse.ui.internal.SaveableHelper$2.run(SaveableHelper.java:370)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:60)
Caused by: org.eclipse.emf.ecore.xmi.DanglingHREFException: The object 'com.tb.mbse.impl.ConnectionImpl@17aa498e (description: null, URI: null) (name: Name, visibility: public)' is not contained in a resource.
	at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.handleDanglingHREF(XMLHelperImpl.java:754)
	at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.getURIFragment(XMLHelperImpl.java:725)
	at org.eclipse.emf.ecore.xmi.impl.XMLHelperImpl.getIDREF(XMLHelperImpl.java:747)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveIDRefMany(XMLSaveImpl.java:2023)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLSaveImpl.java:1370)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLSaveImpl.java:1224)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementID(XMLSaveImpl.java:2716)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSaveImpl.java:1181)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSaveImpl.java:1042)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveContainedMany(XMLSaveImpl.java:2417)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLSaveImpl.java:1553)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLSaveImpl.java:1224)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementID(XMLSaveImpl.java:2716)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSaveImpl.java:1181)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElement(XMLSaveImpl.java:1042)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveContainedMany(XMLSaveImpl.java:2417)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLSaveImpl.java:1553)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveFeatures(XMLSaveImpl.java:1224)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.saveElementID(XMLSaveImpl.java:2716)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.writeTopObject(XMLSaveImpl.java:683)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.traverse(XMLSaveImpl.java:591)
	at org.eclipse.emf.ecore.xmi.impl.XMLSaveImpl.save(XMLSaveImpl.java:251)
	... 28 more


Does somebody have an idea?

Thanks and best regards,
Tom

[Updated on: Thu, 17 January 2019 20:44]

Report message to a moderator

Previous Topic:Material for using two or more metamodels in one diagram
Next Topic:Representation diagram in Tree Description
Goto Forum:
  


Current Time: Fri Aug 23 06:50:24 GMT 2019

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

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

Back to the top