when you something action.you hope disable other action.
at first i didn't found them. finally i found that.
I don't know ,is that right?
but i use that code.
you call this method from view,or change 'this'.
on id-String .use Action ID.
private void setEnabled(boolean bool,String id){
IContributionItem ic=this.getViewSite().getActionBars().getToolBarManager().find(id);
if(ic!=null && ic instanceof ActionContributionItem){
IAction iaction=((ActionContributionItem)ic).getAction();
iaction.setEnabled(bool);
}
}
about my opensource eclipse java applications recently i'm studying GWT and Android
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment