automatic ports creation after loading one of the diagrams [message #1067895] |
Thu, 11 July 2013 03:32  |
Eclipse User |
|
|
|
hey all,
am working with ports right now and what am trying to do is to load ports from the upper level diagrams and add them inside the selected elements after selecting the type at the property using the refresh() function, the problem is the following:
- i tried to add the port to the diagram its self and its working but adding it to the element container ship is not working and i don't know why :/
here is a code that can help you to understand the idea:
-this code works :
AddContext context = new AddContext();
context.setTargetContainer((ContainerShape) getdiagram());<-----------------
context.setNewObject(ob);
getFeatureProvider().addIfPossible( new AddContext(context, fp));
but this one does not :
PictogramElement pe = getSelectedPictogramElement();
.
.....
.
AddContext context = new AddContext();
context.setTargetContainer((ContainerShape) pe);<-----------
context.setNewObject(ob);
getFeatureProvider().addIfPossible( new AddContext(context, fp));
any idea about what is wrong?
[Updated on: Thu, 11 July 2013 04:34] by Moderator
|
|
|
|
Re: automatic ports creation after loading on of the diagrams [message #1070168 is a reply to message #1067895] |
Wed, 17 July 2013 07:30  |
Eclipse User |
|
|
|
Abdallah,
not sure if I understood your issue...
I assume you have 2 diagram types, one showing some kind of overview the
other a detail. An element of the overview is also part of the details
diagram (visualized as "ports" there).
To automatically add the ports, you should have an update feature in place
in your details diagram that adds the ports as they are defined in the
overview.
Not sure if that helps...
Michael
|
|
|
Powered by
FUDForum. Page generated in 0.12314 seconds