当前位置: 首页>>代码示例>>Java>>正文


Java ICommonActionConstants类代码示例

本文整理汇总了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();
}
 
开发者ID:Nextzero,项目名称:hadoop-2.6.0-cdh5.4.3,代码行数:23,代码来源:ActionProvider.java

示例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);
    }
}
 
开发者ID:fabioz,项目名称:Pydev,代码行数:19,代码来源:PythonActionProvider.java

示例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);
		}
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:12,代码来源:N4JSOpenActions.java

示例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 );
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:9,代码来源:CommonActionProvider.java

示例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);
	}

}
 
开发者ID:angelozerr,项目名称:jsbuild-eclipse,代码行数:14,代码来源:PackageExplorerOpenActionProvider.java

示例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);
    }
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:11,代码来源:BaseUMLTreeActionProvider.java

示例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);
	}
}
 
开发者ID:spoenemann,项目名称:xtext-gef,代码行数:16,代码来源:StatemachineNavigatorActionProvider.java

示例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);
	}
}
 
开发者ID:Yakindu,项目名称:statecharts,代码行数:13,代码来源:NavigatorActionProvider.java

示例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);
	}

}
 
开发者ID:gama-platform,项目名称:gama,代码行数:11,代码来源:OpenActionProvider.java

示例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();
	}
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:10,代码来源:EnsembleCommonNavigator.java

示例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);
	}

}
 
开发者ID:heartsome,项目名称:translationstudio8,代码行数:12,代码来源:OpenActionProvider.java

示例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);
	}
}
 
开发者ID:GoClipse,项目名称:goclipse,代码行数:9,代码来源:GoNavigatorActionProvider.java

示例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);
	}
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:14,代码来源:ICSE15_SequenceDiagram_MAVONavigatorActionProvider.java

示例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);
	}
}
 
开发者ID:adisandro,项目名称:MMINT,代码行数:14,代码来源:MIDNavigatorActionProvider.java


注:本文中的org.eclipse.ui.navigator.ICommonActionConstants类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。