automatic ports creation after loading one of the diagrams [message #1067895] |
Thu, 11 July 2013 07:32 |
abdallah Q Messages: 14 Registered: May 2013 |
Junior Member |
|
|
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 08:34] Report message to a moderator
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03137 seconds