• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Java FormEditor类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中org.eclipse.ui.forms.editor.FormEditor的典型用法代码示例。如果您正苦于以下问题:Java FormEditor类的具体用法?Java FormEditor怎么用?Java FormEditor使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



FormEditor类属于org.eclipse.ui.forms.editor包,在下文中一共展示了FormEditor类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: MasterPageSelectionAction

import org.eclipse.ui.forms.editor.FormEditor; //导入依赖的package包/类
public MasterPageSelectionAction( MasterPageHandle handle )
{
	super( DEUtil.getDisplayLabel( handle ), IAction.AS_RADIO_BUTTON );
	this.handle = handle;
	boolean checked = false;
	FormEditor formEditor = UIUtil.getActiveReportEditor( );
	if ( formEditor != null )
	{
		if ( ReportMasterPageEditorFormPage.ID.equals( formEditor.getActivePageInstance( )
				.getId( ) ) )
		{
			checked = ( ( (ReportMasterPageEditorFormPage) ( formEditor.getActivePageInstance( ) ) ).getGraphicalViewer( )
					.getContents( )
					.getModel( ) == handle );
		}
	}
	setChecked( checked );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:19,代码来源:MasterPageSelectionAction.java


示例2: setSelection

import org.eclipse.ui.forms.editor.FormEditor; //导入依赖的package包/类
public void setSelection( ISelection selection )
{
	IEditorPart activeEditor = ( (FormEditor) getMultiPageEditor( ) ).getActivePageInstance( );
	if ( activeEditor != null )
	{
		ISelectionProvider selectionProvider = activeEditor.getSite( )
				.getSelectionProvider( );
		if ( selectionProvider != null )
			selectionProvider.setSelection( selection );
	}
	else
	{
		this.globalSelection = selection;
		fireSelectionChanged( new SelectionChangedEvent( this,
				globalSelection ) );
	}
}
 
开发者ID:eclipse,项目名称:birt,代码行数:18,代码来源:MultiPageReportEditor.java


示例3: run

import org.eclipse.ui.forms.editor.FormEditor; //导入依赖的package包/类
public void run( IAction action )
{
	ModuleHandle handle = null;

	if (handle == null )
	{
		FormEditor editor = UIUtil.getActiveReportEditor( false );
		if (editor instanceof MultiPageReportEditor)
		{
			handle = ((MultiPageReportEditor)editor).getModel( );
		}
	}
	if (handle != null)
	{
		String fileName = handle.getFileName( );
		
		ILaunchConfiguration config = ScriptLaunchShortcut.findLaunchConfiguration( fileName, ScriptLaunchShortcut.getConfigurationType( ) );
		if (config != null) {
			DebugUITools.launch(config, "debug");//$NON-NLS-1$
		}	
	}
}
 
开发者ID:eclipse,项目名称:birt,代码行数:23,代码来源:DebugScriptAction.java


示例4: open

import org.eclipse.ui.forms.editor.FormEditor; //导入依赖的package包/类
protected IEditorPart open(Object object, IEditorInput input, String editorId, String pageId) throws Exception {
    IEditorPart editor = openEditor(input, editorId, true);
    if (pageId != null && editor instanceof FormEditor) {
        ((FormEditor) editor).setActivePage(pageId);
    }

    return editor;
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:9,代码来源:BaseOpenAction.java


示例5: AdvancedModelPage

import org.eclipse.ui.forms.editor.FormEditor; //导入依赖的package包/类
/**
 * Constructs the page
 * 
 * @param editor
 */
public AdvancedModelPage(FormEditor editor)
{
    super(editor, AdvancedModelPage.ID, "Advanced Options");
    this.helpId = IHelpConstants.ADVANCED_MODEL_PAGE;
    this.imagePath = "icons/full/choice_sc_obj.gif";
}
 
开发者ID:tlaplus,项目名称:tlaplus,代码行数:12,代码来源:AdvancedModelPage.java


示例6: ResultPage

import org.eclipse.ui.forms.editor.FormEditor; //导入依赖的package包/类
/**
 * Constructor for the page
 * @param editor
 */
public ResultPage(FormEditor editor)
{
    super(editor, ID, "Model Checking Results");
    this.helpId = IHelpConstants.RESULT_MODEL_PAGE;
    this.imagePath = "icons/full/choice_sc_obj.gif";
}
 
开发者ID:tlaplus,项目名称:tlaplus,代码行数:11,代码来源:ResultPage.java


示例7: init

import org.eclipse.ui.forms.editor.FormEditor; //导入依赖的package包/类
public void init( IEditorSite site, IEditorInput input )
		throws PartInitException
{
	super.init( site, input );
	initialize( (FormEditor) ( (MultiPageEditorSite) site ).getMultiPageEditor( ) );
	// Initializes command stack
	// WrapperCommandStack stack = (WrapperCommandStack) getCommandStack( );
	// if ( stack != null )
	// {
	// stack.addCommandStackListener( getCommandStackListener( ) );
	// }
}
 
开发者ID:eclipse,项目名称:birt,代码行数:13,代码来源:LibraryLayoutEditorFormPage.java


示例8: preview

import org.eclipse.ui.forms.editor.FormEditor; //导入依赖的package包/类
protected void preview( String format, boolean allowPage )
{
	if ( !prePreview( ) )
	{
		return;
	}

	FormEditor editor = UIUtil.getActiveReportEditor( false );
	ModuleHandle model = null;

	if ( editor instanceof MultiPageReportEditor )
	{
		model = ( (MultiPageReportEditor) editor ).getModel( );
	}

	if ( !UIUtil.canPreviewWithErrors( model ) )
		return;

	if ( editor != null )
	{
		IFormPage activePageInstance=editor.getActivePageInstance();
		if ( model.needsSave( ) ||(activePageInstance!=null && activePageInstance.isDirty()))//Do save when current active page is dirty.
		{
			editor.doSave( null );
		}
	}
	Map<String, Object> options = new HashMap<String, Object>( );
	options.put( WebViewer.FORMAT_KEY, format );
	options.put( WebViewer.ALLOW_PAGE_KEY, Boolean.valueOf( allowPage ) );
	options.put( WebViewer.RESOURCE_FOLDER_KEY, ReportPlugin.getDefault( )
			.getResourceFolder( ) );
	if (hasParameters(model)) {
		options.put(WebViewer.SHOW_PARAMETER_PAGE_KEY, "true");
	}
	WebViewer.display( model.getFileName( ), options );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:37,代码来源:PreviewSupport.java


示例9: getProjectFolder

import org.eclipse.ui.forms.editor.FormEditor; //导入依赖的package包/类
/**
 * Return the project folder if current edited report file is in eclipse
 * project, else return the report file's folder.
 * 
 * This method is used for set IModuleOption.RESOURCE_FOLDER_KEY property
 * when open report.
 * 
 * @return
 */
public static String getProjectFolder( )
{
	FormEditor editor = getActiveReportEditor( );
	if ( editor != null )
	{
		IEditorInput input = editor.getEditorInput( );
		if ( input != null )
		{
			return getProjectFolder( input );
		}
	}
	return null;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:23,代码来源:UIUtil.java


示例10: refreshCurrentEditorMarkers

import org.eclipse.ui.forms.editor.FormEditor; //导入依赖的package包/类
public static void refreshCurrentEditorMarkers( )
{
	FormEditor editor = UIUtil.getActiveReportEditor( );
	if ( editor instanceof AbstractMultiPageEditor )
	{
		try
		{
			( (AbstractMultiPageEditor) editor ).refreshMarkers( editor.getEditorInput( ) );
		}
		catch ( CoreException e )
		{
		}
	}
}
 
开发者ID:eclipse,项目名称:birt,代码行数:15,代码来源:UIUtil.java


示例11: update

import org.eclipse.ui.forms.editor.FormEditor; //导入依赖的package包/类
public void update( )
{
	FormEditor editor = UIUtil.getActiveReportEditor( );
	setEnabled( editor != null );
	//Add judge the id is null,see https://bugs.eclipse.org/bugs/show_bug.cgi?id=305851
	//It is a strange because  the BIRD editor is not null.Maybe conflict with others product?Need deeply research.
	if ( editor != null && editor.getActivePageInstance( )!= null && editor.getActivePageInstance( ).getId( ) != null)
	{
		setChecked( editor.getActivePageInstance( )
				.getId( )
				.equals( pageId ) );
	}
}
 
开发者ID:eclipse,项目名称:birt,代码行数:14,代码来源:PageSetAction.java


示例12: getSelection

import org.eclipse.ui.forms.editor.FormEditor; //导入依赖的package包/类
public ISelection getSelection( )
{
	IEditorPart activeEditor = ( (FormEditor) getMultiPageEditor( ) ).getActivePageInstance( );
	// IEditorPart activeEditor = getActivePageInstance( );
	if ( activeEditor != null )
	{
		ISelectionProvider selectionProvider = activeEditor.getSite( )
				.getSelectionProvider( );
		if ( selectionProvider != null )
			return selectionProvider.getSelection( );
	}
	return globalSelection;
}
 
开发者ID:eclipse,项目名称:birt,代码行数:14,代码来源:MultiPageReportEditor.java


示例13: getActiveReportEditor

import org.eclipse.ui.forms.editor.FormEditor; //导入依赖的package包/类
/**
 * Returns the current active report editor in current active page or
 * current active workbench.
 * 
 * @return
 */
public static FormEditor getActiveReportEditor( )
{
	IWorkbenchWindow window = PlatformUI.getWorkbench( )
			.getActiveWorkbenchWindow( );

	if ( window != null )
	{

		IWorkbenchPage pg = window.getActivePage( );

		if ( pg != null )
		{
			IEditorPart editor = pg.getActiveEditor( );

			if ( editor != null )
			{
				if ( editor instanceof ReportEditorProxy )
				{
					IEditorPart part = ( (ReportEditorProxy) editor ).getEditorPart( );
					if ( part instanceof FormEditor )
					{
						return (FormEditor) part;
					}
				}
				else if ( editor instanceof FormEditor )
				{
					return (FormEditor) editor;
				}
			}

		}
	}
	return null;

}
 
开发者ID:eclipse,项目名称:birt,代码行数:42,代码来源:DebugStartupClass.java


示例14: contributeToToolBar

import org.eclipse.ui.forms.editor.FormEditor; //导入依赖的package包/类
@Override
public void contributeToToolBar(IToolBarManager manager) {
	manager.add(Actions.create("Run", Icon.RUN.descriptor(), () -> {
		FormEditor editor = Editors.getActive();
		if (!(editor instanceof IScriptEditor))
			return;
		IScriptEditor scriptEditor = (IScriptEditor) editor;
		scriptEditor.evalContent();
	}));
}
 
开发者ID:GreenDelta,项目名称:olca-app,代码行数:11,代码来源:Toolbar.java


示例15: TotalImpactResultPage

import org.eclipse.ui.forms.editor.FormEditor; //导入依赖的package包/类
public TotalImpactResultPage(FormEditor editor, ContributionResultProvider<?> result,
		DQResult dqResult, CalculationSetup setup, ImpactFactorProvider impactFactors) {
	super(editor, "ImpactTreePage", M.ImpactAnalysis);
	this.result = result;
	this.setup = setup;
	this.dqResult = dqResult;
	this.impactFactors = impactFactors;
}
 
开发者ID:GreenDelta,项目名称:olca-app,代码行数:9,代码来源:TotalImpactResultPage.java


示例16: InventoryPage

import org.eclipse.ui.forms.editor.FormEditor; //导入依赖的package包/类
public InventoryPage(FormEditor editor, ContributionResultProvider<?> result, DQResult dqResult,
		CalculationSetup setup) {
	super(editor, "InventoryPage", M.InventoryResults);
	this.result = result;
	this.setup = setup;
	this.dqResult = dqResult;
}
 
开发者ID:GreenDelta,项目名称:olca-app,代码行数:8,代码来源:InventoryPage.java


示例17: ContributionTreePage

import org.eclipse.ui.forms.editor.FormEditor; //导入依赖的package包/类
public ContributionTreePage(FormEditor editor, FullResultProvider result, CalculationSetup setup) {
	super(editor, "analysis.ContributionTreePage", M.ContributionTree);
	this.result = result;
	this.setup = setup;
	for (ProcessDescriptor desc : result.getProcessDescriptors())
		processDescriptors.put(desc.getId(), desc);
	Iterator<FlowDescriptor> it = result.getFlowDescriptors().iterator();
	if (it.hasNext())
		selection = it.next();
}
 
开发者ID:GreenDelta,项目名称:olca-app,代码行数:11,代码来源:ContributionTreePage.java


示例18: ProcessResultPage

import org.eclipse.ui.forms.editor.FormEditor; //导入依赖的package包/类
public ProcessResultPage(FormEditor editor, FullResultProvider result, CalculationSetup setup) {
	super(editor, ProcessResultPage.class.getName(), M.ProcessResults);
	this.result = result;
	this.setup = setup;
	for (ProcessDescriptor desc : result.getProcessDescriptors())
		processDescriptors.put(desc.getId(), desc);
	this.flowResult = new ResultProvider(result);
	this.impactResult = new ResultProvider(result);
}
 
开发者ID:GreenDelta,项目名称:olca-app,代码行数:10,代码来源:ProcessResultPage.java


示例19: DeploymentPage

import org.eclipse.ui.forms.editor.FormEditor; //导入依赖的package包/类
public DeploymentPage(FormEditor editor,GraphicalViewer graphicalViewer,String title) {
	super(editor,DeploymentPage.class.getName(), title);
	this.graphicalViewer=graphicalViewer;
}
 
开发者ID:bsteker,项目名称:bdf2,代码行数:5,代码来源:DeploymentPage.java


示例20: OverviewPage

import org.eclipse.ui.forms.editor.FormEditor; //导入依赖的package包/类
public OverviewPage(FormEditor editor, String id, String title, Node solution) {
	super(editor, id, title);
	this.solution = solution;
}
 
开发者ID:Itema-as,项目名称:dawn-marketplace-server,代码行数:5,代码来源:OverviewPage.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java PrinterIOException类代码示例发布时间:2022-05-21
下一篇:
Java CreatureType类代码示例发布时间:2022-05-21
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap