本文整理汇总了Java中org.eclipse.ui.part.MultiPageEditorActionBarContributor类的典型用法代码示例。如果您正苦于以下问题:Java MultiPageEditorActionBarContributor类的具体用法?Java MultiPageEditorActionBarContributor怎么用?Java MultiPageEditorActionBarContributor使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
MultiPageEditorActionBarContributor类属于org.eclipse.ui.part包,在下文中一共展示了MultiPageEditorActionBarContributor类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setActivePage
import org.eclipse.ui.part.MultiPageEditorActionBarContributor; //导入依赖的package包/类
@Override
public void setActivePage(IEditorPart page) {
for (MultiPageEditorActionBarContributor c : INSTANCES) {
c.setActivePage(page);
}
IActionBars bars = getActionBars();
if (bars != null) {
if (page instanceof IEnsembleEditorPart) {
((IEnsembleEditorPart)page).updateActionBars(bars);
}
bars.setGlobalActionHandler(IPlanEditorConstants.ACTION_SET_COLLAPSE_ALL_RETARGET, collapseActionHandler);
bars.setGlobalActionHandler(IPlanEditorConstants.ACTION_SET_EXPAND_ALL_RETARGET, expandActionHandler);
// bars.setGlobalActionHandler(IPlanEditorConstants.ACTION_SET_VALIDATE_PLAN_RETARGET, validatePlanActionHandler);
bars.updateActionBars();
}
}
示例2: postPageChange
import org.eclipse.ui.part.MultiPageEditorActionBarContributor; //导入依赖的package包/类
@Override
protected void postPageChange(int newPageIndex, int oldPageIndex) {
AbstractVisualEditor activeEditor = editors.get(newPageIndex);
//request the rapaint of the element on the main editor node when switching between the subeditors, supposing they were modified in the subeditor
if (oldPageIndex > 0){
AbstractVisualEditor oldEditor = editors.get(oldPageIndex);
INode subModel = getInnerModel(oldEditor.getModel());
((JRChangeEventsSupport)subModel.getValue()).getEventSupport().firePropertyChange(MGraphicElement.FORCE_GRAPHICAL_REFRESH, null, null);
}
IEditorActionBarContributor contributor = parent.getEditorSite().getActionBarContributor();
if (contributor != null && contributor instanceof MultiPageEditorActionBarContributor) {
((MultiPageEditorActionBarContributor) contributor).setActivePage(activeEditor);
}
}
示例3: init
import org.eclipse.ui.part.MultiPageEditorActionBarContributor; //导入依赖的package包/类
@Override
public void init(IActionBars bars) {
super.init(bars);
for (MultiPageEditorActionBarContributor c : INSTANCES) {
c.init(bars);
}
}
示例4: dispose
import org.eclipse.ui.part.MultiPageEditorActionBarContributor; //导入依赖的package包/类
@Override
public void dispose() {
super.dispose();
for (MultiPageEditorActionBarContributor c : INSTANCES) {
c.dispose();
}
}
示例5: pageChange
import org.eclipse.ui.part.MultiPageEditorActionBarContributor; //导入依赖的package包/类
protected void pageChange(final int newPageIndex, final int oldPageIndex) {
getActiveEditor();
deactivateSite(false, false);
IPartService partService = (IPartService) getSite().getService(IPartService.class);
if (partService.getActivePart() == this) {
setFocus();
}
IEditorPart activeEditor = getEditor(newPageIndex);
IEditorActionBarContributor contributor = getEditorSite().getActionBarContributor();
if (contributor != null && contributor instanceof MultiPageEditorActionBarContributor) {
((MultiPageEditorActionBarContributor) contributor).setActivePage(activeEditor);
}
if (activeEditor != null) {
ISelectionProvider selectionProvider = activeEditor.getSite().getSelectionProvider();
if (selectionProvider != null) {
ISelectionProvider outerProvider = getSite().getSelectionProvider();
if (outerProvider instanceof MultiPageToolbarSelectionProvider) {
SelectionChangedEvent event = new SelectionChangedEvent(selectionProvider, selectionProvider.getSelection());
MultiPageToolbarSelectionProvider provider = (MultiPageToolbarSelectionProvider) outerProvider;
provider.fireSelectionChanged(event);
provider.firePostSelectionChanged(event);
} else {
if (Policy.DEBUG_MPE) {
Tracing.printTrace(TRACING_COMPONENT, "MultiPageEditorPart " + getTitle() //$NON-NLS-1$
+ " did not propogate selection for " //$NON-NLS-1$
+ activeEditor.getTitle());
}
}
}
}
activateSite();
postPageChange(newPageIndex, oldPageIndex);
Object selectedPage = getSelectedPage();
if (selectedPage != null) {
firePageChanged(new PageChangedEvent(this, selectedPage));
}
}
示例6: setActiveEditor
import org.eclipse.ui.part.MultiPageEditorActionBarContributor; //导入依赖的package包/类
@Override
public void setActiveEditor(IEditorPart part) {
super.setActiveEditor(part);
for (MultiPageEditorActionBarContributor c : INSTANCES)
c.setActiveEditor(part);
}