|Re: Eclipse STP SCA [message #576884 is a reply to message #576871]
||Tue, 09 February 2010 10:16
| Vincent Zurczak
Registered: July 2009
Hi Philippe, Stéphane,|
The line resolution for errors indeed relies on the Eclipse XML editor.
I have succefully put this mecanism in place for other tools I'm working
on. And I plan to put it in SCA Tools very soon. But I don't think this
implementation works outside Eclipse. Or, at least, you won't be able to
compile it with Maven. Besides, line resolution won't be part of the SCA
builder (validator) but a part of the XML editor.
If we want to add line resolution directly in EMF, there might be a
solution, but I have just seen the hint and no code. It consists in
replacing the XmlHandler in the EMF parser and in storing line numbers
for every element. Since FraSCAti only uses EMF for reading, it would
not be too painful to use (in writing mode, we would also have to update
the line number on every save action).
However, how to do that concretely, I don't know.
You can check org.eclipse.emf.ecore.xmi.impl.XMLHandler for more details.
Also, check these answers from Ed Merks.
The WTP DOM implementation is indeed excellent in getting the line
numbers (even for attributes).
Le 08/02/2010 16:30, Stephane Drapeau a écrit :
> Hi Philippe,
> You're right. Can you please open one bug for each issue? I'll fix all
> of them this month.
> I have also a question concerning FraSCAti: do you plan to support
> SCA-OASIS in the short term? before June?
> Concerning the possibility to know the file and the line where there are
> errors, Vincent will contribute some code for this in the following weeks.
> However, I'm not sure that it'll be directly useable by FraSCAti. The
> code is based on the XML editor.
> I let Vincent say more about it.
> Stephane Drapeau
> Philippe Merle a écrit :
> > Hi Stéphane,
> > Currently I'm working on the next version of the FraSCAti assembly
> > During this work, I see some issues about the Eclipse STP SCA metamodel.
> > Perhaps you are already aware of some of these issues :
> > 1) A composite reference should have an 'autowire' attribute.
> > But class ...sca.Reference has no a such feature.
> > 2) The 'target' feature of class BaseReference should be moved to
> class ComponentReference as composite references should not have a
> 'target' feature.
> > 3) The 'promoted2' feature of class Reference should be a list of
> ComponentReference instead of a single ComponentReference.
> > This is for when a composite reference promotes several component
> > e.g. to support <sca:reference name="r" promote="c1/s c2/s c3/s"/>
> > 4) The 'target2' feature of the class ComponentReference should be a
> list of ComponentService.
> > e.g. to support <sca:reference name="r" multiplicity="0..n"
> target="c1/s c2/s c3/s"/>
> > I have also a question: is it possible to know the file and the line
> where an SCA object where declared?
> > I would like indicate file and line when reporting errors and
> warnings in FraSCAti.
> > Thank you in advance and A+
> > Philippe Merle
Powered by FUDForum
. Page generated in 0.01878 seconds