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


Java IFormPage类代码示例

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


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

示例1: addPage

import org.eclipse.ui.forms.editor.IFormPage; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void addPage(int index, IFormPage page) throws PartInitException {

    if (!(page instanceof DataModelFormPage<?>)) {
        throw new PartInitException("Invalid Page: Must be " + DataModelFormPage.class.getName());
    }

    DataModelFormPage<M> dataModelFormPage = (DataModelFormPage<M>) page;

    super.addPage(index, page);

    _Pages.add(index, dataModelFormPage);

    Image pageImage = dataModelFormPage.getImage();
    if (pageImage != null) {
        setPageImage(index, pageImage);
    }
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:20,代码来源:DataModelFormEditor.java

示例2: setFocus

import org.eclipse.ui.forms.editor.IFormPage; //导入依赖的package包/类
@SuppressWarnings("unchecked")
@Override
public void setFocus() {
    super.setFocus();

    RefreshAction refreshAction = getRefreshAction();
    if (refreshAction != null) {
        refreshAction.updateState();
    }

    IFormPage formPage = getActivePageInstance();
    if (formPage == null) {
        return;
    }

    if (!(formPage instanceof DataModelFormPage<?>)) {
        return;
    }

    DataModelFormPage<M> dataModelFormPage = (DataModelFormPage<M>) formPage;
    dataModelFormPage.forceLayout();
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:23,代码来源:DataModelFormEditor.java

示例3: showResultPage

import org.eclipse.ui.forms.editor.IFormPage; //导入依赖的package包/类
/**
 * Show the result page of the editor    
 */
public void showResultPage()
{
    // goto result page
    IFormPage resultPage = setActivePage(ResultPage.ID);
    if (resultPage != null)
    {
        try
        {
            ((ResultPage) resultPage).loadData();
        } catch (CoreException e)
        {
            TLCUIActivator.getDefault().logError("Error refreshing the result page", e);
        }
    }
}
 
开发者ID:tlaplus,项目名称:tlaplus,代码行数:19,代码来源:ModelEditor.java

示例4: execute

import org.eclipse.ui.forms.editor.IFormPage; //导入依赖的package包/类
public Object execute(ExecutionEvent event) throws ExecutionException
{
    IEditorPart activeEditor = UIHelper.getActiveEditor();
    if (activeEditor != null)
    {
        if (activeEditor instanceof ModelEditor)
        {
            ModelEditor activeModelEditor = (ModelEditor) activeEditor;
            IFormPage page = activeModelEditor.getActivePageInstance();
            if (page instanceof BasicFormPage)
            {
                BasicFormPage activePage = (BasicFormPage) page;
                activePage.doRun();
            }
        }
    }
    return null;
}
 
开发者ID:tlaplus,项目名称:tlaplus,代码行数:19,代码来源:CheckModelHandler.java

示例5: commitFormPages

import org.eclipse.ui.forms.editor.IFormPage; //导入依赖的package包/类
/**
 * 모든 폼 페이지의 변경사항을 모델에 반영
 * 
 * void
 */
protected void commitFormPages() {
    IFormPage[] pages = getFormPages();
    IFormPage page = null;
    IManagedForm managedForm = null;

    for (int i = 0; i < pages.length; i++) {
        page = pages[i];
        managedForm = page.getManagedForm();

        if (managedForm != null && managedForm.isDirty()) {
            managedForm.commit(true);

            // managedForm.refresh();
        }
    }
}
 
开发者ID:SK-HOLDINGS-CC,项目名称:NEXCORE-UML-Modeler,代码行数:22,代码来源:AbstractMultiPageFormEditor.java

示例6: saveModel

import org.eclipse.ui.forms.editor.IFormPage; //导入依赖的package包/类
/**
 * Saves input code to model
 */
private void saveModel( )
{
	if ( isCodeModified( ) && editObject instanceof DesignElementHandle )
	{
		saveEditorContentsDE( (DesignElementHandle) editObject,
				isSaveScript );
	}

	setIsModified( false );

	( (IFormPage) getParentEditor( ) ).getEditor( )
			.editorDirtyStateChanged( );

	firePropertyChange( PROP_DIRTY );

	SourceViewer viewer = getViewer( );
	IUndoManager undoManager = viewer == null ? null
			: viewer.getUndoManager( );

	if ( undoManager != null )
	{
		undoManager.endCompoundChange( );
	}
	cleanPoint = getUndoLevel( );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:29,代码来源:JSEditor.java

示例7: markDirty

import org.eclipse.ui.forms.editor.IFormPage; //导入依赖的package包/类
protected void markDirty( )
{
	if ( !isModified )
	{
		setIsModified( true );
		( (IFormPage) getParentEditor( ) ).getEditor( )
				.editorDirtyStateChanged( );

		firePropertyChange( PROP_DIRTY );
	}

	if ( cleanPoint > getUndoLevel( ) && !undoing )
	{
		cleanPoint = -1;
	}
}
 
开发者ID:eclipse,项目名称:birt,代码行数:17,代码来源:JSEditor.java

示例8: updateActionBarContributor

import org.eclipse.ui.forms.editor.IFormPage; //导入依赖的package包/类
/**
 * Notifies action bar contributor about page change.
 * 
 * @param pageIndex
 *            the index of the new page
 */
protected void updateActionBarContributor( int pageIndex )
{
	super.updateActionBarContributor( pageIndex );
	// Overwrite this method to implement multi-editor action bar
	// contributor
	IEditorActionBarContributor contributor = getEditorSite( ).getActionBarContributor( );
	if ( contributor instanceof IMultiPageEditorActionBarContributor
			&& pageIndex >= 0
			&& pageIndex < pages.size( ) )
	{
		Object page = pages.get( pageIndex );
		if ( page instanceof IFormPage )
		{
			( (IMultiPageEditorActionBarContributor) contributor ).setActivePage( (IFormPage) page );
		}
	}

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

示例9: updateOutLineView

import org.eclipse.ui.forms.editor.IFormPage; //导入依赖的package包/类
private void updateOutLineView( IFormPage activePageInstance )
{
	if ( outlinePage == null )
	{
		return;
	}

	if ( reloadOutlinePage( ) )
	{
		return;
	}
	Object designOutLinePage = activePageInstance.getAdapter( IContentOutlinePage.class );
	if ( designOutLinePage instanceof DesignerOutlinePage )
	{
		( (DesignerOutlinePage) designOutLinePage ).setBackupState( outlineBackup );
	}
	outlinePage.setActivePage( (IPageBookViewPage) designOutLinePage );
}
 
开发者ID:eclipse,项目名称:birt,代码行数:19,代码来源:MultiPageReportEditor.java

示例10: refreshGraphicalEditor

import org.eclipse.ui.forms.editor.IFormPage; //导入依赖的package包/类
private void refreshGraphicalEditor( )
{
	for ( int i = 0; i < pages.size( ); i++ )
	{
		Object page = pages.get( i );
		if ( page instanceof IFormPage )
		{

			if ( isGraphicalEditor( page ) )
			{
				if ( ( (GraphicalEditorWithFlyoutPalette) page ).getGraphicalViewer( ) != null )
				{
					EditPart root = ( (GraphicalEditorWithFlyoutPalette) page ).getGraphicalViewer( )
							.getRootEditPart( );
					refreshResourceEditPart( root );
				}
			}
		}
	}
}
 
开发者ID:eclipse,项目名称:birt,代码行数:21,代码来源:MultiPageReportEditor.java

示例11: removeMetamodel

import org.eclipse.ui.forms.editor.IFormPage; //导入依赖的package包/类
protected void removeMetamodel() {
	if (listMetamodels.getSelection() instanceof IStructuredSelection) {
		Iterator it = ((IStructuredSelection) listMetamodels.getSelection()).iterator();
		while (it.hasNext()) {
			Metamodel mm = (Metamodel) it.next();
			if (atlTransformation.getMetamodels().remove(mm)) {
				IFormPage p = this.getEditor().findPage(mm.getName());
				if (p != null)
					this.getEditor().removePage(p.getIndex());
			}
		}

		markAsDirty();
		listMetamodels.refresh();
	}
}
 
开发者ID:jesusc,项目名称:bento,代码行数:17,代码来源:TransformationConfigurationPage.java

示例12: IvyInfoSection

import org.eclipse.ui.forms.editor.IFormPage; //导入依赖的package包/类
public IvyInfoSection(IFormPage page, Composite parent, int style, boolean titleBar) {
    super(parent, page.getManagedForm().getToolkit(),
            titleBar ? (ExpandableComposite.TITLE_BAR | style) : style);
    this.page = page;
    createClient(getSection(), page.getEditor().getToolkit());
    getSection().setText("General Information");
    // ((IvyFileEditorInput)page.getEditorInput()).addPropertyChangeListener(this);
}
 
开发者ID:apache,项目名称:ant-ivyde,代码行数:9,代码来源:IvyInfoSection.java

示例13: preview

import org.eclipse.ui.forms.editor.IFormPage; //导入依赖的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

示例14: removePage

import org.eclipse.ui.forms.editor.IFormPage; //导入依赖的package包/类
/**
 * Remove report editor page.
 * 
 * @param id
 *            the page id.
 */
public void removePage( String id )
{
	IFormPage page = findPage( id );
	if ( page != null )
	{
		removePage( page.getIndex( ) );
	}
}
 
开发者ID:eclipse,项目名称:birt,代码行数:15,代码来源:MultiPageReportEditor.java

示例15: removeAllPages

import org.eclipse.ui.forms.editor.IFormPage; //导入依赖的package包/类
/**
 * Remove all report editor page.
 */
public void removeAllPages( )
{
	for ( int i = pages.toArray( ).length - 1; i >= 0; i-- )
	{
		if ( pages.get( i ) != null )
			this.removePage( ( (IFormPage) pages.get( i ) ).getId( ) );
	}
}
 
开发者ID:eclipse,项目名称:birt,代码行数:12,代码来源:MultiPageReportEditor.java


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