@Override
protected JPopupMenu createPopupMenu() {
FeatureDescriptor fd = getSelection();
if (fd != null) {
if (fd instanceof RuleEditorNode.DeclarationProperty) {
//property
//
//actions:
//remove
//hide
//????
//custom popop for the whole panel
JPopupMenu pm = new JPopupMenu();
if(!addPropertyMode) {
pm.add(new GoToSourceAction(RuleEditorPanel.this, (RuleEditorNode.DeclarationProperty) fd));
pm.addSeparator();
pm.add(new RemovePropertyAction(RuleEditorPanel.this, (RuleEditorNode.DeclarationProperty) fd));
}
return pm;
} else if (fd instanceof RuleEditorNode.PropertyCategoryPropertySet) {
//property category
//TODO possibly add "add property" action which would
//preselect the css category in the "add property dialog".
}
}
//no context popup - create the generic popup
return genericPopupMenu;
}
RuleEditorPanel.java 文件源码
java
阅读 26
收藏 0
点赞 0
评论 0
项目:incubator-netbeans
作者:
评论列表
文章目录