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


Java FormEditor类代码示例

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


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


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