本文整理汇总了Java中org.eclipse.jface.viewers.StructuredSelection.EMPTY属性的典型用法代码示例。如果您正苦于以下问题:Java StructuredSelection.EMPTY属性的具体用法?Java StructuredSelection.EMPTY怎么用?Java StructuredSelection.EMPTY使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.eclipse.jface.viewers.StructuredSelection
的用法示例。
在下文中一共展示了StructuredSelection.EMPTY属性的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: update
@Override
public void update ()
{
final ISelectionProvider selectionProvider = this.activeEditorPart instanceof ISelectionProvider ? (ISelectionProvider)this.activeEditorPart : this.activeEditorPart.getSite ().getSelectionProvider ();
if ( selectionProvider != null )
{
final ISelection selection = selectionProvider.getSelection ();
final IStructuredSelection structuredSelection = selection instanceof IStructuredSelection ? (IStructuredSelection)selection : StructuredSelection.EMPTY;
this.deleteAction.updateSelection ( structuredSelection );
this.cutAction.updateSelection ( structuredSelection );
this.copyAction.updateSelection ( structuredSelection );
this.pasteAction.updateSelection ( structuredSelection );
if ( this.validateAction != null )
{
this.validateAction.updateSelection ( structuredSelection );
}
if ( this.controlAction != null )
{
this.controlAction.updateSelection ( structuredSelection );
}
if ( this.saveAsAction != null )
{
this.saveAsAction.selectionChanged ( structuredSelection );
}
}
this.undoAction.update ();
this.redoAction.update ();
if ( this.loadResourceAction != null )
{
this.loadResourceAction.update ();
}
}