|
Re: Some modifications for the SCA 1.0 model [message #636876 is a reply to message #636684] |
Wed, 03 November 2010 08:09 |
Stephane Drapeau Messages: 199 Registered: July 2009 |
Senior Member |
|
|
Hi Damien,
Le 02/11/2010 14:18, Damien Fournier a écrit :
> Hello,
>
> We are actually working on FraSCAti in order to support the latest
> revision of the SCA model. However we've found that the plugin
> org.eclipse.stp.sca cannot be used outside of an eclipse environment.
> When loading a composite the SCAResourceImpl class uses the static
> method Platform.getLocation() which only works in an eclipse editor.
> This can be fixed by having an alternative when Platform.getLocation()
> doesn't work.
>
> for example:
>
>
> public static void prepareCompositeFile(URI uri) {
> try {
> File file;
> try {
> IPath path = Platform.getLocation();
> file = new File(path.toString() + uri.toPlatformString(true));
> }
> // Load file from the system if Eclipse platform is not running or present
> catch (NoClassDefFoundError e) {
> file = new File(uri.toFileString());
> }
> ..
Please, open a bug.
>
>
> We have also started a prototype of a new language which uses the Xtext
> framework and the sca ecore model. Using this new editor we've found
> some problems with the sca ecore :
>
> * The implementation reference in a Component class has the 'changeable'
> property set to false. This does not allow to set an Implementation once
> a component has been declared. (no setter method)
This is not a bug. To set the implementation, you must use the
implementationGroup, like this:
CPPImplementation newValue = ScaFactory.eINSTANCE.createCPPImplementation();
((FeatureMap.Internal) component.getImplementationGroup()).clear();
((FeatureMap.Internal) component.getImplementationGroup()).add(
ScaPackage.Literals.COMPONENT__IMPLEMENTATION_GROUP,
FeatureMapUtil.createEntry(
ScaPackage.Literals.DOCUMENT_ROOT__IMPLEMENTATION,
newValue)
);
>
> * A source/target of a Wire must be defined with an
> EReference(attributes source2/target2) and its corresponding string
> representation (attributes source/target). A Wire is not valid if
> attributes source and target do not have values, while source2 and
> target2 have an EReference. Attributes 'source' and 'target' are
> useless, they can be removed from the sca model or set as optional
> attributes.
Please, open a bug.
>
> I'm not sure if there's an big impact on other modules for these
> modifications of the sca ecore model.
>
> Regards.
>
> Damien
Best regards,
Stephane Drapeau
Obeo
|
|
|
Powered by
FUDForum. Page generated in 0.03289 seconds