{"id":137,"date":"2014-02-07T14:42:33","date_gmt":"2014-02-07T12:42:33","guid":{"rendered":"http:\/\/www.descher.at\/descher-vu\/?p=137"},"modified":"2014-02-08T14:14:32","modified_gmt":"2014-02-08T12:14:32","slug":"exporting-model-element-ids","status":"publish","type":"post","link":"http:\/\/www.descher.at\/descher-vu\/2014\/02\/exporting-model-element-ids\/","title":{"rendered":"Exporting model element ids"},"content":{"rendered":"<p>In order to address model elements out of the application model itsef, and out of contributing classes, the resp. model element id is used. During development you often run into errors because of wrong id strings.<\/p>\n<p>To mitigate this problem a new action, called\u00a0<em>\u00a0Export Model Ids<\/em> is now available within the e4 tooling starting with this <a href=\"http:\/\/git.eclipse.org\/c\/e4\/org.eclipse.e4.tools.git\/tag\/?id=I20140206-2200\">build<\/a>.<\/p>\n<p><a href=\"http:\/\/www.descher.at\/descher-vu\/wp-content\/uploads\/2014\/02\/menu.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-140\" alt=\"Popup-Menu Command Export Element Id\" src=\"http:\/\/www.descher.at\/descher-vu\/wp-content\/uploads\/2014\/02\/menu.png\" width=\"455\" height=\"171\" srcset=\"http:\/\/www.descher.at\/descher-vu\/wp-content\/uploads\/2014\/02\/menu.png 455w, http:\/\/www.descher.at\/descher-vu\/wp-content\/uploads\/2014\/02\/menu-300x112.png 300w\" sizes=\"(max-width: 455px) 100vw, 455px\" \/><\/a><\/p>\n<p>On execution it selects all the element ids available within the application model, and presents it to the user:<\/p>\n<p><a href=\"http:\/\/www.descher.at\/descher-vu\/wp-content\/uploads\/2014\/02\/exportIds.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-141\" alt=\"Export Id Handler Dialog\" src=\"http:\/\/www.descher.at\/descher-vu\/wp-content\/uploads\/2014\/02\/exportIds.png\" width=\"863\" height=\"410\" srcset=\"http:\/\/www.descher.at\/descher-vu\/wp-content\/uploads\/2014\/02\/exportIds.png 863w, http:\/\/www.descher.at\/descher-vu\/wp-content\/uploads\/2014\/02\/exportIds-300x142.png 300w\" sizes=\"(max-width: 863px) 100vw, 863px\" \/><\/a><\/p>\n<p>In this table you see the type of element, the static key it is gonna have in the resulting java class, and the original id. Currently the key is built out of the element type and the element id.<\/p>\n<p>After execution you should find a java file called <em>AppModelId.java<\/em>, probably containing some errors due to you using duplicate ids, such as in the following image:<\/p>\n<p><a href=\"http:\/\/www.descher.at\/descher-vu\/wp-content\/uploads\/2014\/02\/output.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-142\" alt=\"ExportIdHandler OutputClass AppModelId.java\" src=\"http:\/\/www.descher.at\/descher-vu\/wp-content\/uploads\/2014\/02\/output.png\" width=\"910\" height=\"257\" srcset=\"http:\/\/www.descher.at\/descher-vu\/wp-content\/uploads\/2014\/02\/output.png 910w, http:\/\/www.descher.at\/descher-vu\/wp-content\/uploads\/2014\/02\/output-300x84.png 300w\" sizes=\"(max-width: 910px) 100vw, 910px\" \/><\/a><\/p>\n<p>There are several things I would like to change to this feature, but it seems a good start &#8211; thanks a lot to <a href=\"http:\/\/industrial-tsi-wim.blogspot.co.at\/\">Wim<\/a> for the feedbacks and reviews!<\/p>\n<p>Things I would like to add\/change in the future<\/p>\n<ul>\n<li>make the output class, package and project selectable (currently this would introduce too much dependencies)<\/li>\n<li>care for double occuring ids<\/li>\n<li>make subtrees of the application model exportable (currently the whole app model ids are exported)<\/li>\n<li>perform automatically configurable update of the target file(s)<\/li>\n<li>remove dependency to org.eclipse.jdt.core<\/li>\n<\/ul>\n<p>If you have any other feedback or comments, please put them on here!<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In order to address model elements out of the application model itsef, and out of contributing classes, the resp. model element id is used. During development you often run into errors because of wrong id strings. To mitigate this problem a new action, called\u00a0\u00a0Export Model Ids is now available within the e4 tooling starting with &hellip; <a href=\"http:\/\/www.descher.at\/descher-vu\/2014\/02\/exporting-model-element-ids\/\" class=\"more-link\"><span class=\"screen-reader-text\">Exporting model element ids<\/span> weiterlesen <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6,4],"tags":[],"_links":{"self":[{"href":"http:\/\/www.descher.at\/descher-vu\/wp-json\/wp\/v2\/posts\/137"}],"collection":[{"href":"http:\/\/www.descher.at\/descher-vu\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.descher.at\/descher-vu\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.descher.at\/descher-vu\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.descher.at\/descher-vu\/wp-json\/wp\/v2\/comments?post=137"}],"version-history":[{"count":7,"href":"http:\/\/www.descher.at\/descher-vu\/wp-json\/wp\/v2\/posts\/137\/revisions"}],"predecessor-version":[{"id":148,"href":"http:\/\/www.descher.at\/descher-vu\/wp-json\/wp\/v2\/posts\/137\/revisions\/148"}],"wp:attachment":[{"href":"http:\/\/www.descher.at\/descher-vu\/wp-json\/wp\/v2\/media?parent=137"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.descher.at\/descher-vu\/wp-json\/wp\/v2\/categories?post=137"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.descher.at\/descher-vu\/wp-json\/wp\/v2\/tags?post=137"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}