Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Epsilon » Strange Model Artifacts(Objects unintentionally created and stored somewhere in my model)
Strange Model Artifacts [message #890158] Thu, 21 June 2012 10:10 Go to next message
Lukas Baron is currently offline Lukas BaronFriend
Messages: 10
Registered: June 2012
Junior Member
Hi there,

I discovered maybe a strange bug:

This Code:...

operation utileti!ModelDescriptionRepository createDescription(id,type,path,filename) : utileti!ModelDescription
	{
	var util = new Native("de.baron.plugin.EOLUtil");
	
	id=id.asString();
	type=type.asString();
	path=path.asString();
	filename=filename.asString();
	
	var newDescription : utileti!ModelDescription =  self.checkRepository(id,type);
	if (newDescription.isDefined()) return newDescription;
	
	newDescription = new utileti!ModelDescription;
	newDescription.xmiId = id;
	newDescription.type = type.toMariaModelType();
	newDescription.path = path;
	newDescription.name = filename;
	newDescription.date = util.getCurrentDateTime();
	
	self.modelDescriptions.add(newDescription);
	
	("created new modeldescription: '"+filename+"'").println();
	
	return newDescription;
	}


... changes this Model:...

...
  <utileti:UTILETI xmi:id="_GJyToLq_EeGaffhEG04fxw">
    <synchronisationModelRepository xmi:id="_Hgp_8Lq_EeGaffhEG04fxw"/>
    <modelDescriptionRepository xmi:id="_IAYo4Lq_EeGaffhEG04fxw">
    </modelDescriptionRepository>
  </utileti:UTILETI>
</xmi:XMI>


...into this one:
...
  <utileti:UTILETI xmi:id="_GJyToLq_EeGaffhEG04fxw">
    <synchronisationModelRepository xmi:id="_Hgp_8Lq_EeGaffhEG04fxw"/>
    <modelDescriptionRepository xmi:id="_IAYo4Lq_EeGaffhEG04fxw">
      <modelDescriptions xmi:id="_LjXWcLt6EeG0NJdSKkYuCQ" path="C:/Users/Lukas/Programming/Eclipse-Workspace/SA/de.baron/model/aui.model" name="aui.model" xmiId="_9oArcHgFEeGEQaFIIY_fFA" date="21.06.2012-10:22:03"/>
      <modelDescriptions xmi:id="_Lji8oLt6EeG0NJdSKkYuCQ" path="C:/Users/Lukas/Programming/Eclipse-Workspace/SA/de.baron/model/cui.model" type="cuiDesktop" name="cui.model" xmiId="_ph2vsLpXEeGrA7-mH7AzEg" date="21.06.2012-10:22:03"/>
    </modelDescriptionRepository>
  </utileti:UTILETI>
  <utileti:ModelDescription xmi:id="_qN7bwbt5EeG0NJdSKkYuCQ" path="C:/Users/Lukas/Programming/Eclipse-Workspace/SA/de.baron/model/aui.model" name="aui.model" xmiId="_9oArcHgFEeGEQaFIIY_fFA"/>
  <utileti:ModelDescription xmi:id="__PkCgLt5EeG0NJdSKkYuCQ" path="C:/Users/Lukas/Programming/Eclipse-Workspace/SA/de.baron/model/aui.model" name="aui.model" xmiId="_9oArcHgFEeGEQaFIIY_fFA"/>
</xmi:XMI>

Note: utileti is an acronym and therefore not incorectly spelled. Razz

One can see two tags "modelDescriptions" as children of "modelDescriptionRepository" appear as it is intended. The same Method createDescription has been executed twice.

Where are these strange Objects "ModelDescription" as children of the root-element from?, which have by the way totally different xmi:id s.

Thanks in Advance
Lukas

[Updated on: Thu, 21 June 2012 10:11]

Report message to a moderator

Re: Strange Model Artifacts [message #890245 is a reply to message #890158] Thu, 21 June 2012 15:15 Go to previous message
Lukas Baron is currently offline Lukas BaronFriend
Messages: 10
Registered: June 2012
Junior Member
Ah ok, I got it. This just happens when errors occur after creating a new object. Running the Programm without errors will lead to a valid model.

No Bug here Rolling Eyes
Previous Topic:Checking a single element using EVL
Next Topic:EGL/EOL java code
Goto Forum:
  


Current Time: Mon Dec 22 22:56:29 GMT 2014

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

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