Community
Participate
Working Groups
The SAX parsing used to count the main aird files relies on the presence of a "ownedViews" tag. An exception is thrown when this tag is encountered and the caollected data are stored only when this exception occurs. If an AIRD file does not contain this tag, the referenced analyses won't be collected and the error "Found X main representations files" will occur. The interesting classes are : org.eclipse.sirius.business.internal.session.parser.RepresentationsFileSaxParser and org.eclipse.sirius.business.internal.session.parser.RepresentationsFileHandler The easiest way to fix this bug is probably adding an "endDocument()" method in RepresentationsFileHandler which could throw a SiriusSaxParserNormalAbortException.
Technical issue
New Gerrit change created: https://git.eclipse.org/r/110513
(In reply to Eclipse Genie from comment #2) > New Gerrit change created: https://git.eclipse.org/r/110513 Untested draft corresponding to Stéphane idea for fixing this.
Created attachment 272001 [details] Sample project to reproduce the issue Steps to reproduce: 1. File > Import > Existing project into workspace... 2. Select the attached zip file, which contains 3 projects. Import all. 3. testEcore is imported correctly, but testEcore2 & testEcore3 raise errors (both in the error log and in an error dialog) with a message: One modeling project is invalid. Found 2 main representations files (that means not referenced by another) in "testEcore2": representations.airdand My_.aird. A modeling project must contain only one. They should both be imported/opened without errors, and the sessions correctly detect the referenced analyses.
Gerrit change https://git.eclipse.org/r/110513 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=6d06707b28d31a84125d5544ee66e7a3741a4523
New Gerrit change created: https://git.eclipse.org/r/114741
Gerrit change https://git.eclipse.org/r/114741 was merged to [master]. Commit: http://git.eclipse.org/c/sirius/org.eclipse.sirius.git/commit/?id=2da114f896d8ad761c9653d5e909109878529ab9
Test added by 2da114f896d8ad761c9653d5e909109878529ab9.
Verified on Sirius 5.1.1-rc2
Available in Sirius 5.1.1. See https://wiki.eclipse.org/Sirius/5.1.1 for details.