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


Java MultiPageEditorActionBarContributor类代码示例

本文整理汇总了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();
		}
	}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:17,代码来源:MultiPagePlanEditorContributor.java

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

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

示例4: dispose

import org.eclipse.ui.part.MultiPageEditorActionBarContributor; //导入依赖的package包/类
@Override
public void dispose() {
	super.dispose();
	for (MultiPageEditorActionBarContributor c : INSTANCES) {
		c.dispose();
	}		
}
 
开发者ID:nasa,项目名称:OpenSPIFe,代码行数:8,代码来源:MultiPagePlanEditorContributor.java

示例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));
	}
}
 
开发者ID:OpenSoftwareSolutions,项目名称:PDFReporter-Studio,代码行数:46,代码来源:MultiPageToolbarEditorPart.java

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


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