本文整理汇总了Java中org.eclipse.ui.part.IPageSite.getActionBars方法的典型用法代码示例。如果您正苦于以下问题:Java IPageSite.getActionBars方法的具体用法?Java IPageSite.getActionBars怎么用?Java IPageSite.getActionBars使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.eclipse.ui.part.IPageSite
的用法示例。
在下文中一共展示了IPageSite.getActionBars方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: init
import org.eclipse.ui.part.IPageSite; //导入方法依赖的package包/类
public void init(IPageSite pageSite) {
super.init(pageSite);
IActionBars bars = pageSite.getActionBars();
bars.getToolBarManager().add(getActionRegistry().getAction(ClearEdgeBendpointLayoutAction.ID));
bars.getToolBarManager().add(getActionRegistry().getAction(ActionFactory.DELETE.getId()));
bars.getToolBarManager().add(getActionRegistry().getAction(ActionFactory.UNDO.getId()));
bars.getToolBarManager().add(getActionRegistry().getAction(ActionFactory.REDO.getId()));
bars.setGlobalActionHandler(ClearEdgeBendpointLayoutAction.ID,
getActionRegistry().getAction(ClearEdgeBendpointLayoutAction.ID));
bars.setGlobalActionHandler(ActionFactory.UNDO.getId(),
getActionRegistry().getAction(ActionFactory.UNDO.getId()));
bars.setGlobalActionHandler(ActionFactory.REDO.getId(),
getActionRegistry().getAction(ActionFactory.REDO.getId()));
bars.setGlobalActionHandler(ActionFactory.DELETE.getId(),
getActionRegistry().getAction(ActionFactory.DELETE.getId()));
bars.updateActionBars();
getViewer().setKeyHandler(keyHandler);
pageSite.setSelectionProvider(getViewer());
}
示例2: init
import org.eclipse.ui.part.IPageSite; //导入方法依赖的package包/类
public void init(IPageSite pageSite) {
super.init(pageSite);
ActionRegistry registry = editor.getEditorActionRegistry();
IActionBars bars = pageSite.getActionBars();
String id = ActionFactory.UNDO.getId();
bars.setGlobalActionHandler(id, registry.getAction(id));
id = ActionFactory.REDO.getId();
bars.setGlobalActionHandler(id, registry.getAction(id));
id = ActionFactory.DELETE.getId();
bars.setGlobalActionHandler(id, registry.getAction(id));
bars.setGlobalActionHandler(ActionFactory.COPY.getId(),
registry.getAction(ActionFactory.COPY.getId()));
bars.setGlobalActionHandler(ActionFactory.PASTE.getId(),
registry.getAction(ActionFactory.PASTE.getId()));
}
示例3: init
import org.eclipse.ui.part.IPageSite; //导入方法依赖的package包/类
/**
* Initializes the outline; addes undo/redo/delete keyhandlers.
*/
public void init(IPageSite pageSite) {
super.init(pageSite);
ActionRegistry registry = multieditor.getActionRegistry();
IActionBars bars = pageSite.getActionBars();
String id = ActionFactory.UNDO.getId();
bars.setGlobalActionHandler(id, registry.getAction(id));
id = ActionFactory.REDO.getId();
bars.setGlobalActionHandler(id, registry.getAction(id));
id = ActionFactory.DELETE.getId();
bars.setGlobalActionHandler(id, registry.getAction(id));
id = ActionFactory.PASTE.getId();
bars.setGlobalActionHandler(id, registry.getAction(id));
id = ActionFactory.COPY.getId();
bars.setGlobalActionHandler(id, registry.getAction(id));
id = ActionFactory.CUT.getId();
bars.setGlobalActionHandler(id, registry.getAction(id));
}
示例4: createActions
import org.eclipse.ui.part.IPageSite; //导入方法依赖的package包/类
private void createActions() {
IPageSite site = getSite();
IActionBars actionBars = site.getActionBars();
IToolBarManager toolBarManager = actionBars.getToolBarManager();
List<IAction> actions = new de.darwinspl.preferences.resource.dwprofile.ui.DwprofileOutlinePageActionProvider().getActions(treeViewer);
for (IAction action : actions) {
toolBarManager.add(action);
}
}
示例5: createActions
import org.eclipse.ui.part.IPageSite; //导入方法依赖的package包/类
private void createActions() {
IPageSite site = getSite();
IActionBars actionBars = site.getActionBars();
IToolBarManager toolBarManager = actionBars.getToolBarManager();
List<IAction> actions = new eu.hyvar.feature.expression.resource.hyexpression.ui.HyexpressionOutlinePageActionProvider().getActions(treeViewer);
for (IAction action : actions) {
toolBarManager.add(action);
}
}
示例6: createActions
import org.eclipse.ui.part.IPageSite; //导入方法依赖的package包/类
private void createActions() {
IPageSite site = getSite();
IActionBars actionBars = site.getActionBars();
IToolBarManager toolBarManager = actionBars.getToolBarManager();
List<IAction> actions = new eu.hyvar.context.contextValidity.resource.hyvalidityformula.ui.HyvalidityformulaOutlinePageActionProvider().getActions(treeViewer);
for (IAction action : actions) {
toolBarManager.add(action);
}
}
示例7: createActions
import org.eclipse.ui.part.IPageSite; //导入方法依赖的package包/类
private void createActions() {
IPageSite site = getSite();
IActionBars actionBars = site.getActionBars();
IToolBarManager toolBarManager = actionBars.getToolBarManager();
List<IAction> actions = new eu.hyvar.dataValues.resource.hydatavalue.ui.HydatavalueOutlinePageActionProvider().getActions(treeViewer);
for (IAction action : actions) {
toolBarManager.add(action);
}
}
示例8: createActions
import org.eclipse.ui.part.IPageSite; //导入方法依赖的package包/类
private void createActions() {
IPageSite site = getSite();
IActionBars actionBars = site.getActionBars();
IToolBarManager toolBarManager = actionBars.getToolBarManager();
List<IAction> actions = new eu.hyvar.feature.mapping.resource.hymapping.ui.HymappingOutlinePageActionProvider().getActions(treeViewer);
for (IAction action : actions) {
toolBarManager.add(action);
}
}
示例9: createActions
import org.eclipse.ui.part.IPageSite; //导入方法依赖的package包/类
private void createActions() {
IPageSite site = getSite();
IActionBars actionBars = site.getActionBars();
IToolBarManager toolBarManager = actionBars.getToolBarManager();
List<IAction> actions = new eu.hyvar.feature.constraint.resource.hyconstraints.ui.HyconstraintsOutlinePageActionProvider().getActions(treeViewer);
for (IAction action : actions) {
toolBarManager.add(action);
}
}
示例10: createActions
import org.eclipse.ui.part.IPageSite; //导入方法依赖的package包/类
private void createActions() {
IPageSite site = getSite();
IActionBars actionBars = site.getActionBars();
IToolBarManager toolBarManager = actionBars.getToolBarManager();
List<IAction> actions = new eu.hyvar.mspl.manifest.resource.hymanifest.ui.HymanifestOutlinePageActionProvider().getActions(treeViewer);
for (IAction action : actions) {
toolBarManager.add(action);
}
}
示例11: init
import org.eclipse.ui.part.IPageSite; //导入方法依赖的package包/类
/**
* Is used to register several global action handlers (UNDO, REDO, COPY, PASTE, ...) on initialization of this outline page. This activates for example the
* undo-action in the central Eclipse-Menu.
*
* @param pageSite
* the page site
* @see org.eclipse.ui.part.Page#init(IPageSite)
*/
@Override
public void init(IPageSite pageSite) {
super.init(pageSite);
IActionBars actionBars = pageSite.getActionBars();
registerGlobalActionHandler(actionBars, ActionFactory.UNDO.getId());
registerGlobalActionHandler(actionBars, ActionFactory.REDO.getId());
registerGlobalActionHandler(actionBars, ActionFactory.COPY.getId());
registerGlobalActionHandler(actionBars, ActionFactory.PASTE.getId());
registerGlobalActionHandler(actionBars, ActionFactory.PRINT.getId());
registerGlobalActionHandler(actionBars, ActionFactory.SAVE_AS.getId());
actionBars.updateActionBars();
}
示例12: init
import org.eclipse.ui.part.IPageSite; //导入方法依赖的package包/类
/**
* Is used to register several global action handlers (UNDO, REDO, COPY,
* PASTE, ...) on initialization of this outline page. This activates for
* example the undo-action in the central Eclipse-Menu.
*
* @param pageSite
* the page site
*
* @see org.eclipse.ui.part.Page#init(IPageSite)
*/
@Override
public void init(IPageSite pageSite) {
super.init(pageSite);
IActionBars actionBars = pageSite.getActionBars();
registerGlobalActionHandler(actionBars, ActionFactory.UNDO.getId());
registerGlobalActionHandler(actionBars, ActionFactory.REDO.getId());
registerGlobalActionHandler(actionBars, ActionFactory.COPY.getId());
registerGlobalActionHandler(actionBars, ActionFactory.PASTE.getId());
registerGlobalActionHandler(actionBars, ActionFactory.PRINT.getId());
registerGlobalActionHandler(actionBars, ActionFactory.SAVE_AS.getId());
actionBars.updateActionBars();
}
示例13: init
import org.eclipse.ui.part.IPageSite; //导入方法依赖的package包/类
@Override
public void init(IPageSite pageSite) {
super.init(pageSite);
ActionRegistry registry = editor.getActionRegistry();
IActionBars bars = pageSite.getActionBars();
for (Iterator<IAction> it = registry.getActions(); it.hasNext();) {
IAction ia = it.next();
bars.setGlobalActionHandler(ia.getId(), ia);
}
bars.updateActionBars();
}
示例14: handleGlobalAction
import org.eclipse.ui.part.IPageSite; //导入方法依赖的package包/类
/**
* Handles all global actions
*/
private void handleGlobalAction( )
{
IPageSite pageSite = page == null ? null : page.getSite( );
IActionBars actionBars = pageSite == null ? null
: pageSite.getActionBars( );
if ( actionBars != null )
{
String copyID = ActionFactory.COPY.getId( );
String pasteID = ActionFactory.PASTE.getId( );
String deleteID = ActionFactory.DELETE.getId( );
String moveID = ActionFactory.MOVE.getId( );
String renameID = ActionFactory.RENAME.getId( );
String refreshID = ActionFactory.REFRESH.getId( );
actionBars.setGlobalActionHandler( copyID, copyResourceAction );
actionBars.setGlobalActionHandler( pasteID, pasteResourceAction );
actionBars.setGlobalActionHandler( deleteID, deleteResourceAction );
actionBars.setGlobalActionHandler( moveID, moveResourceAction );
actionBars.setGlobalActionHandler( renameID, renameResourceAction );
actionBars.setGlobalActionHandler( refreshID, refreshExplorerAction );
IMenuManager menuManager = actionBars.getMenuManager( );
IToolBarManager toolBarManager = actionBars.getToolBarManager( );
if ( menuManager != null )
{
menuManager.add( filterAction );
}
if ( toolBarManager != null )
{
toolBarManager.add( refreshExplorerAction );
}
}
}
示例15: updateActionBars
import org.eclipse.ui.part.IPageSite; //导入方法依赖的package包/类
/**
* Updates the action bars for this page site.
*/
private void updateActionBars( )
{
IPageSite site = page == null ? null : page.getSite( );
IActionBars actionBars = site == null ? null : site.getActionBars( );
if ( actionBars != null )
{
actionBars.updateActionBars( );
}
}