本文整理汇总了Java中org.eclipse.ui.navigator.ICommonActionConstants类的典型用法代码示例。如果您正苦于以下问题:Java ICommonActionConstants类的具体用法?Java ICommonActionConstants怎么用?Java ICommonActionConstants使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
ICommonActionConstants类属于org.eclipse.ui.navigator包,在下文中一共展示了ICommonActionConstants类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fillActionBars
import org.eclipse.ui.navigator.ICommonActionConstants; //导入依赖的package包/类
@Override
public void fillActionBars(IActionBars actionBars) {
actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(),
new DFSAction(DFSActions.DELETE));
actionBars.setGlobalActionHandler(ActionFactory.REFRESH.getId(),
new DFSAction(DFSActions.REFRESH));
if (site == null)
return;
if ((site.getStructuredViewer().getSelection() instanceof IStructuredSelection)
&& (((IStructuredSelection) site.getStructuredViewer()
.getSelection()).size() == 1)
&& (((IStructuredSelection) site.getStructuredViewer()
.getSelection()).getFirstElement() instanceof DFSFile)) {
actionBars.setGlobalActionHandler(ICommonActionConstants.OPEN,
new DFSAction(DFSActions.OPEN));
}
actionBars.updateActionBars();
}
示例2: fillActionBars
import org.eclipse.ui.navigator.ICommonActionConstants; //导入依赖的package包/类
@Override
public void fillActionBars(IActionBars actionBars) {
if (openResourceAction.isEnabled()) {
actionBars.setGlobalActionHandler(ICommonActionConstants.OPEN, openResourceAction);
}
if (copyResourceAction.isEnabled()) {
actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), copyResourceAction);
}
if (pasteAction.isEnabled()) {
actionBars.setGlobalActionHandler(ActionFactory.PASTE.getId(), pasteAction);
}
if (deleteResourceAction.isEnabled()) {
actionBars.setGlobalActionHandler(ActionFactory.DELETE.getId(), deleteResourceAction);
}
if (moveResourceAction.isEnabled()) {
actionBars.setGlobalActionHandler(ActionFactory.MOVE.getId(), moveResourceAction);
}
}
示例3: fillActionBars
import org.eclipse.ui.navigator.ICommonActionConstants; //导入依赖的package包/类
@Override
public void fillActionBars(final IActionBars actionBars) {
if (inViewPart && canEnableOpenAction()) {
openGroup.fillActionBars(actionBars);
if (openAndExpandAction == null && openGroup.getOpenAction().isEnabled()) {
actionBars.setGlobalActionHandler(ICommonActionConstants.OPEN, openGroup.getOpenAction());
} else if (openAndExpandAction != null && openAndExpandAction.isEnabled()) {
actionBars.setGlobalActionHandler(ICommonActionConstants.OPEN, openAndExpandAction);
}
}
}
示例4: fillActionBars
import org.eclipse.ui.navigator.ICommonActionConstants; //导入依赖的package包/类
@Override
public void fillActionBars ( final IActionBars actionBars )
{
if ( this.openAction.isEnabled () )
{
actionBars.setGlobalActionHandler ( ICommonActionConstants.OPEN, this.openAction );
}
}
示例5: fillActionBars
import org.eclipse.ui.navigator.ICommonActionConstants; //导入依赖的package包/类
public void fillActionBars(IActionBars actionBars) {
if (fInViewPart) {
fOpenGroup.fillActionBars(actionBars);
if (fOpenAndExpand == null) // TODO: is not updated!
actionBars.setGlobalActionHandler(ICommonActionConstants.OPEN,
fOpenGroup.getOpenAction());
else if (fOpenAndExpand != null)
actionBars.setGlobalActionHandler(ICommonActionConstants.OPEN,
fOpenAndExpand);
}
}
示例6: fillActionBars
import org.eclipse.ui.navigator.ICommonActionConstants; //导入依赖的package包/类
/**
* @see org.eclipse.ui.actions.ActionGroup#fillActionBars(org.eclipse.ui.IActionBars)
*/
@Override
public void fillActionBars(IActionBars actionBars) {
if (openAction.isEnabled()) {
actionBars.setGlobalActionHandler(ICommonActionConstants.OPEN, openAction);
}
}
示例7: fillActionBars
import org.eclipse.ui.navigator.ICommonActionConstants; //导入依赖的package包/类
/**
* @generated
*/
public void fillActionBars(IActionBars actionBars) {
if (!myContribute) {
return;
}
IStructuredSelection selection = (IStructuredSelection) getContext()
.getSelection();
myOpenDiagramAction.selectionChanged(selection);
if (myOpenDiagramAction.isEnabled()) {
actionBars.setGlobalActionHandler(ICommonActionConstants.OPEN,
myOpenDiagramAction);
}
}
示例8: fillActionBars
import org.eclipse.ui.navigator.ICommonActionConstants; //导入依赖的package包/类
public void fillActionBars(IActionBars actionBars) {
if (!myContribute) {
return;
}
IStructuredSelection selection = (IStructuredSelection) getContext()
.getSelection();
myOpenDiagramAction.selectionChanged(selection);
if (myOpenDiagramAction.isEnabled()) {
actionBars.setGlobalActionHandler(ICommonActionConstants.OPEN,
myOpenDiagramAction);
}
}
示例9: fillActionBars
import org.eclipse.ui.navigator.ICommonActionConstants; //导入依赖的package包/类
@Override
public void fillActionBars(final IActionBars theActionBars) {
if (!contribute) { return; }
final IStructuredSelection selection = (IStructuredSelection) getContext().getSelection();
if (selection.size() == 1 && selection.getFirstElement() instanceof WrappedFile) {
openFileAction.selectionChanged(selection);
theActionBars.setGlobalActionHandler(ICommonActionConstants.OPEN, openFileAction);
}
}
示例10: handleDoubleClick
import org.eclipse.ui.navigator.ICommonActionConstants; //导入依赖的package包/类
@Override
protected void handleDoubleClick(DoubleClickEvent anEvent) {
IAction openHandler = getViewSite().getActionBars().getGlobalActionHandler(ICommonActionConstants.OPEN);
if(openHandler == null) {
super.handleDoubleClick(anEvent);
} else {
openHandler.run();
}
}
示例11: fillActionBars
import org.eclipse.ui.navigator.ICommonActionConstants; //导入依赖的package包/类
@Override
public void fillActionBars(IActionBars actionBars) {
if (fInViewPart) {
fOpenGroup.fillActionBars(actionBars);
if (fOpenAndExpand == null && fOpenGroup.getOpenAction().isEnabled()) // TODO: is not updated!
actionBars.setGlobalActionHandler(ICommonActionConstants.OPEN, fOpenGroup.getOpenAction());
else if (fOpenAndExpand != null && fOpenAndExpand.isEnabled())
actionBars.setGlobalActionHandler(ICommonActionConstants.OPEN, fOpenAndExpand);
}
}
开发者ID:trylimits,项目名称:Eclipse-Postfix-Code-Completion,代码行数:13,代码来源:PackageExplorerOpenActionProvider.java
示例12: fillActionBars
import org.eclipse.ui.navigator.ICommonActionConstants; //导入依赖的package包/类
public void fillActionBars(IActionBars theActionBars) {
if (!contribute) {
return;
}
IStructuredSelection selection = (IStructuredSelection) getContext().getSelection();
if (selection.size() == 1 && selection.getFirstElement() instanceof IFile) {
openFileAction.selectionChanged(selection);
theActionBars.setGlobalActionHandler(ICommonActionConstants.OPEN, openFileAction);
}
}
示例13: fillActionBars
import org.eclipse.ui.navigator.ICommonActionConstants; //导入依赖的package包/类
@Override
public void fillActionBars(IActionBars actionBars) {
super.fillActionBars(actionBars);
if(navigatorOpenAction.isEnabled()) {
actionBars.setGlobalActionHandler(ICommonActionConstants.OPEN, navigatorOpenAction);
}
}
示例14: fillActionBars
import org.eclipse.ui.navigator.ICommonActionConstants; //导入依赖的package包/类
/**
* @generated
*/
public void fillActionBars(IActionBars actionBars) {
if (!myContribute) {
return;
}
IStructuredSelection selection = (IStructuredSelection) getContext().getSelection();
myOpenDiagramAction.selectionChanged(selection);
if (myOpenDiagramAction.isEnabled()) {
actionBars.setGlobalActionHandler(ICommonActionConstants.OPEN, myOpenDiagramAction);
}
}
示例15: fillActionBars
import org.eclipse.ui.navigator.ICommonActionConstants; //导入依赖的package包/类
/**
* @generated
*/
public void fillActionBars(IActionBars actionBars) {
if (!myContribute) {
return;
}
IStructuredSelection selection = (IStructuredSelection) getContext().getSelection();
myOpenDiagramAction.selectionChanged(selection);
if (myOpenDiagramAction.isEnabled()) {
actionBars.setGlobalActionHandler(ICommonActionConstants.OPEN, myOpenDiagramAction);
}
}