Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 352555 - [SysML Static Profile] Improvement of the AdapterFactories (used to get SysML ItemProviders) in oep.sysml.edit
Summary: [SysML Static Profile] Improvement of the AdapterFactories (used to get SysML...
Status: CLOSED FIXED
Alias: None
Product: Papyrus
Classification: Modeling
Component: Core (show other bugs)
Version: 0.8.0   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Arthur Daussy CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-20 06:05 EDT by Arthur Daussy CLA
Modified: 2011-11-22 04:39 EST (History)
5 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Arthur Daussy CLA 2011-07-20 06:05:37 EDT
Build Identifier: 

The sysml.edit plugin is not fully functionnal because it only works with stereotype application object (for example a Block EObject). And it do not work on items with SysML stereotypes applied on it (for example a class EObject with the Block stereotype applied on it).
The aim of the enhancement will be to:
 - Display in a same way a stereotype object and an object with this stereotype applied on it ( It should display the same way a Block EObject and a Class EObject with the Block stereotype applied on it)
    * It should display correctly names of objects ( <<Block>><Class>Block0 should become <Block> Block0 )
    * It should display correctly the icon of objects ( A Class EObject with the Block stereotype should have a Block Icon)

It good to notice that it will exist two ItemProviderAdapterFactory for the EOBject which are based element for SysML stereotypes. One will be in the UML plugin and the other in the SysML plugin. ( For a Class EObject there will be one ItemProviderAdapterFactory in the UML plugin which handle most of the case and one ItemProviderAdapterFactory  in the SYSML plugin which only handle the case where it has a Block stereotype).

Hoping it will be clear enough to be understood


Reproducible: Always
Comment 1 Arthur Daussy CLA 2011-09-21 03:43:34 EDT
A big improvement has been committed on the trunk:
 ->SysML IPAF can handle stereotyped UML element
 ->A new IPAF for all SysML elements is available
Comment 2 Arthur Daussy CLA 2011-09-21 03:45:36 EDT
Improvement:
 -> The itemProvider of the plug-in will now handle correctly the property descriptor of a stereotyped UML element.

Example:
 -> A ViewPoint will display the class property and also the ViewPoint attributes (etc concern, language etc...).
Comment 3 Alain Le Guennec CLA 2011-11-09 06:02:46 EST
You forgot to add "custom-src" to the list of source directories in file build.properties:

### Eclipse Workspace Patch 1.0
#P org.eclipse.papyrus.sysml.edit
Index: build.properties
===================================================================
--- build.properties	(revision 6190)
+++ build.properties	(working copy)
@@ -13,5 +13,5 @@
                META-INF/,\
                about.html,\
                plugin.xml
-source..=src/
+source..=src/,custom-src/
 bin..=bin/
Comment 4 Yann Tanguy CLA 2011-11-09 08:21:55 EST
Arthur, can you provide a simple example showing how these improvement can be used ?

Regarding FlowPort or FlowProperty, does your provider return an image that shows the direction ? Do you provide an image registry for stereotyped element icons in the sysml (or edit) plug-in ?
Comment 5 Arthur Daussy CLA 2011-11-09 09:03:34 EST
@Yan Tangui:
This implementation is for the moment only use in EMF Compare SysML integration which not yet published.
But in MDT Papyrus I think the best way to use it could be to integrate it to the property view.
In the current implementation the label (in the blue square on top) displayed:

<<Block>><Class> Block 1
with this Item Provider Adapter Factory it could display
<Block> Block 1

For the moment this IPAF is not registered into the EMF service to avoid to be too much intrusive. 
So if you manually register this IPAF into the property view it could give a better way to display SysML elements.

Regarding FlowPort or FlowProperty I have not modify the behavior that was implemented before. So it returns the same image than before. So if you give to this PAF a port stereotyped with FlowPort profile it will return the icon of FlowPort. So I guess the answer is no. But this enhancement can still be improved.

If you want to improve it. Don't forget to use the custom template available in plugin oep.sysml.sysmloveruml.codegen.

@Alain Le Guennec :
 I will commit your patch as soon as I can commit on the trunk (that is to say normally on monday)
Comment 6 Arthur Daussy CLA 2011-11-22 04:39:16 EST
I have just seen that the patch have already been applied.
So I close this bug because I guess the enhancement is over.