Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Service Component Architecture (SCA) Tools » Some modifications for the SCA 1.0 model
Some modifications for the SCA 1.0 model [message #636684] Tue, 02 November 2010 13:18 Go to next message
Damien Fournier is currently offline Damien FournierFriend
Messages: 12
Registered: July 2009
Location: Lille, France
Junior Member
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());
		}
...


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)

* 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.

I'm not sure if there's an big impact on other modules for these modifications of the sca ecore model.

Regards.

Damien
Re: Some modifications for the SCA 1.0 model [message #636876 is a reply to message #636684] Wed, 03 November 2010 08:09 Go to previous message
Stephane Drapeau is currently offline Stephane DrapeauFriend
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
Previous Topic:Promoting a Reference ?
Next Topic:eclipse SCA tools vs IBM sca tools
Goto Forum:
  


Current Time: Fri Mar 29 16:04:00 GMT 2024

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

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

Back to the top