[GEF5] AbstractVisualPart activate while addChild [message #1775104] |
Tue, 24 October 2017 11:05  |
Eclipse User |
|
|
|
Hi.
Why activate child part invoke after child refreshVisual?
Now i'm add code to init field which depends on getContent().
i'm using this field in refreshVisual, but it's null because doActivate() not invoke.
@Override
public void addChild(IVisualPart<? extends Node> child, int index) {
if (children.contains(child)) {
throw new IllegalArgumentException("Cannot add " + child
+ " as child of " + this + " because its already a child.");
}
// System.out.println(
// "Add child " + child + " to " + this + " with index " + index);
children.add(index, child);
child.setParent(this);
refreshVisual();
doAddChildVisual(child, index);
child.refreshVisual();
if (isActive()) {
child.activate();
}
}
Is it bug or special?
If it not a bug, where i can init my field which depends on getContent()? Thanks.
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03905 seconds