*
*/
private void applyfilter() {
-
RootEditPart rootEditPart = getRootEditPart();
List children = rootEditPart.getChildren();
if (children != null) {
}
}
}
- Tree contentTree = (Tree) getControl();
- contentTree.pack();
+
+ refreshTree();
+ refreshContextMenu();
}
}
-
+
+ /**
+ * Refresh tree
+ */
+ private void refreshTree() {
+ Tree contentTree = (Tree) getControl();
+ contentTree.pack();
+ }
+
+ /**
+ * Refresh ContextMenu
+ */
+ private void refreshContextMenu() {
+ //refresh contextMenu
+
+ this.getControl().setMenu(getContextMenu().createContextMenu(this.getControl()));
+
+ RootEditPart rootEditPart = getRootEditPart();
+ List children = rootEditPart.getChildren();
+ if (children != null) {
+ List<TimelineEditPart> editParts = ((EditPart) children.get(0)).getChildren();
+ for (TimelineEditPart editPart : editParts) {
+ List<TimelineEditPart> childEditParts = editPart.getChildren();
+ for(TimelineEditPart treeEditPart : childEditParts) {
+ TimeTreeElement treeElement = treeEditPart.getTimeElement();
+ if(treeElement != null) {
+ treeElement.createContextMenu();
+ }
+ }
+ }
+ }
+ }
+
/**
* applyNonFilter
*/