|
|
Re: Edit: problems with copy and paste containment [message #1759503 is a reply to message #1759492] |
Wed, 12 April 2017 12:04 |
Martin Jacob Messages: 191 Registered: July 2009 |
Senior Member |
|
|
Hi Ed,
thanks for your answer.
Its just a Tree like this
ClassA
-- ClassB containmentOne
-- ClassB containmentTwo
The Item provider of ClassA handles the displayed text
public String getCreateChildText(Object owner, Object feature, Object child, Collection<?> selection) {
Object childFeature = feature;
Object childObject = child;
boolean qualify =
childFeature == XyzPackage.Literals.CLASS_A__CONATINMENT_ONE ||
childFeature == XyzPackage.Literals.CLASS_A__CONATINMENT_TWO ;
if (qualify) {
return getString
("_UI_CreateChild_text2",
new Object[] { getTypeText(childObject), getFeatureText(childFeature), getTypeText(owner) });
}
return super.getCreateChildText(owner, feature, child, selection);
}
in plugin.properties I modified the value of _UI_CreateChild_text2={1} to display the feature text only.
I thought the copied object may know where it comes from and tries to be copied to the same feature at the new container.
|
|
|
|
Powered by
FUDForum. Page generated in 0.03942 seconds