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


Java IWorkbenchPart类代码示例

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


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

示例1: execute

import org.eclipse.ui.IWorkbenchPart; //导入依赖的package包/类
@Override
public Object execute(ExecutionEvent event) {
    IWorkbenchPart part = HandlerUtil.getActiveEditor(event);

    if (part instanceof SQLEditor){
        SQLEditor sqlEditor = (SQLEditor) part;

        if (sqlEditor.getCurrentDb() != null) {
            sqlEditor.updateDdl();
        } else {
            MessageBox mb = new MessageBox(HandlerUtil.getActiveShell(event), SWT.ICON_INFORMATION);
            mb.setText(Messages.UpdateDdl_select_source);
            mb.setMessage(Messages.UpdateDdl_select_source_msg);
            mb.open();
        }
    }
    return null;
}
 
开发者ID:pgcodekeeper,项目名称:pgcodekeeper,代码行数:19,代码来源:UpdateDdl.java

示例2: partActivated

import org.eclipse.ui.IWorkbenchPart; //导入依赖的package包/类
public void partActivated(IWorkbenchPart p) {
	if (p instanceof ContentOutline) {
		if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) {
			getActionBarContributor().setActiveEditor(GrmEditor.this);

			setCurrentViewer(contentOutlineViewer);
		}
	}
	else if (p instanceof PropertySheet) {
		if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) {
			getActionBarContributor().setActiveEditor(GrmEditor.this);
			handleActivate();
		}
	}
	else if (p == GrmEditor.this) {
		handleActivate();
	}
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:19,代码来源:GrmEditor.java

示例3: partActivated

import org.eclipse.ui.IWorkbenchPart; //导入依赖的package包/类
public void partActivated(IWorkbenchPart p) {
	if (p instanceof ContentOutline) {
		if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) {
			getActionBarContributor().setActiveEditor(TracingannotationsEditor.this);

			setCurrentViewer(contentOutlineViewer);
		}
	}
	else if (p instanceof PropertySheet) {
		if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) {
			getActionBarContributor().setActiveEditor(TracingannotationsEditor.this);
			handleActivate();
		}
	}
	else if (p == TracingannotationsEditor.this) {
		handleActivate();
	}
}
 
开发者ID:eclipse,项目名称:gemoc-studio-modeldebugging,代码行数:19,代码来源:TracingannotationsEditor.java

示例4: setupControls

import org.eclipse.ui.IWorkbenchPart; //导入依赖的package包/类
/**
 * Recursive function for setting up children controls for a control if it is
 * a composite and setting up the main control's manager.
 * @param part
 * @param control
 */
private void setupControls(IWorkbenchPart part, Control control) {
	//If composite, setup children controls.
    if (control instanceof Composite) {
        Composite composite = (Composite) control;

        Control[] children = composite.getChildren();
        if (children.length > 0 && children[0] != null) {
           for (Control curControl : children)
               setupControls(part, curControl);
        }
    }
    
    if (control instanceof StyledText) {
    	//set up styled text manager if there is one
    	setupStyledText((IEditorPart) part, (StyledText) control);
    	
    } else if (control instanceof Browser) {
    	//set up browser manager if there is one
    	setupBrowser((Browser) control);
    }
    //TODO: no control set up for a ProjectExplorer, since there isn't an need for 
    //a Manager right now, might be needed in the future
}
 
开发者ID:SERESLab,项目名称:iTrace-Archive,代码行数:30,代码来源:ControlView.java

示例5: partActivated

import org.eclipse.ui.IWorkbenchPart; //导入依赖的package包/类
@Override
public void partActivated ( final IWorkbenchPart p )
{
    if ( p instanceof ContentOutline )
    {
        if ( ( (ContentOutline)p ).getCurrentPage () == ChartEditor.this.contentOutlinePage )
        {
            getActionBarContributor ().setActiveEditor ( ChartEditor.this );

            setCurrentViewer ( ChartEditor.this.contentOutlineViewer );
        }
    }
    else if ( p instanceof PropertySheet )
    {
        if ( ChartEditor.this.propertySheetPages.contains ( ( (PropertySheet)p )
                .getCurrentPage () ) )
        {
            getActionBarContributor ().setActiveEditor ( ChartEditor.this );
            handleActivate ();
        }
    }
    else if ( p == ChartEditor.this )
    {
        handleActivate ();
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:27,代码来源:ChartEditor.java

示例6: partActivated

import org.eclipse.ui.IWorkbenchPart; //导入依赖的package包/类
public void partActivated(IWorkbenchPart p) {
	if (p instanceof ContentOutline) {
		if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) {
			getActionBarContributor().setActiveEditor(SrmEditor.this);

			setCurrentViewer(contentOutlineViewer);
		}
	}
	else if (p instanceof PropertySheet) {
		if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) {
			getActionBarContributor().setActiveEditor(SrmEditor.this);
			handleActivate();
		}
	}
	else if (p == SrmEditor.this) {
		handleActivate();
	}
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:19,代码来源:SrmEditor.java

示例7: partActivated

import org.eclipse.ui.IWorkbenchPart; //导入依赖的package包/类
public void partActivated ( IWorkbenchPart p )
{
    if ( p instanceof ContentOutline )
    {
        if ( ( (ContentOutline)p ).getCurrentPage () == contentOutlinePage )
        {
            getActionBarContributor ().setActiveEditor ( DeploymentEditor.this );

            setCurrentViewer ( contentOutlineViewer );
        }
    }
    else if ( p instanceof PropertySheet )
    {
        if ( propertySheetPages.contains ( ( (PropertySheet)p ).getCurrentPage () ) )
        {
            getActionBarContributor ().setActiveEditor ( DeploymentEditor.this );
            handleActivate ();
        }
    }
    else if ( p == DeploymentEditor.this )
    {
        handleActivate ();
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:25,代码来源:DeploymentEditor.java

示例8: partActivated

import org.eclipse.ui.IWorkbenchPart; //导入依赖的package包/类
public void partActivated ( IWorkbenchPart p )
{
    if ( p instanceof ContentOutline )
    {
        if ( ( (ContentOutline)p ).getCurrentPage () == contentOutlinePage )
        {
            getActionBarContributor ().setActiveEditor ( ProfileEditor.this );

            setCurrentViewer ( contentOutlineViewer );
        }
    }
    else if ( p instanceof PropertySheet )
    {
        if ( propertySheetPages.contains ( ( (PropertySheet)p ).getCurrentPage () ) )
        {
            getActionBarContributor ().setActiveEditor ( ProfileEditor.this );
            handleActivate ();
        }
    }
    else if ( p == ProfileEditor.this )
    {
        handleActivate ();
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:25,代码来源:ProfileEditor.java

示例9: partActivated

import org.eclipse.ui.IWorkbenchPart; //导入依赖的package包/类
public void partActivated ( IWorkbenchPart p )
{
    if ( p instanceof ContentOutline )
    {
        if ( ( (ContentOutline)p ).getCurrentPage () == contentOutlinePage )
        {
            getActionBarContributor ().setActiveEditor ( ItemEditor.this );

            setCurrentViewer ( contentOutlineViewer );
        }
    }
    else if ( p instanceof PropertySheet )
    {
        if ( propertySheetPages.contains ( ( (PropertySheet)p ).getCurrentPage () ) )
        {
            getActionBarContributor ().setActiveEditor ( ItemEditor.this );
            handleActivate ();
        }
    }
    else if ( p == ItemEditor.this )
    {
        handleActivate ();
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:25,代码来源:ItemEditor.java

示例10: partActivated

import org.eclipse.ui.IWorkbenchPart; //导入依赖的package包/类
public void partActivated(IWorkbenchPart p) {
	if (p instanceof ContentOutline) {
		if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) {
			getActionBarContributor().setActiveEditor(GqamEditor.this);

			setCurrentViewer(contentOutlineViewer);
		}
	}
	else if (p instanceof PropertySheet) {
		if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) {
			getActionBarContributor().setActiveEditor(GqamEditor.this);
			handleActivate();
		}
	}
	else if (p == GqamEditor.this) {
		handleActivate();
	}
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:19,代码来源:GqamEditor.java

示例11: createActions

import org.eclipse.ui.IWorkbenchPart; //导入依赖的package包/类
protected void createActions() {
	super.createActions();
	ActionRegistry registry = getActionRegistry();

	IAction action = new DirectEditAction((IWorkbenchPart) this);
	registry.registerAction(action);
	getSelectionActions().add(action.getId());

	action = new CopyNodeAction(this);
	registry.registerAction(action);
	getSelectionActions().add(action.getId());

	action = new PasteNodeAction(this);
	registry.registerAction(action);
	getSelectionActions().add(action.getId());

	action = new ClearEdgeBendpointLayoutAction(this);
	registry.registerAction(action);
	getSelectionActions().add(action.getId());
	
	
}
 
开发者ID:gw4e,项目名称:gw4e.project,代码行数:23,代码来源:GW4EEditor.java

示例12: partActivated

import org.eclipse.ui.IWorkbenchPart; //导入依赖的package包/类
public void partActivated(IWorkbenchPart p) {
	if (p instanceof ContentOutline) {
		if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) {
			getActionBarContributor().setActiveEditor(HrmEditor.this);

			setCurrentViewer(contentOutlineViewer);
		}
	}
	else if (p instanceof PropertySheet) {
		if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) {
			getActionBarContributor().setActiveEditor(HrmEditor.this);
			handleActivate();
		}
	}
	else if (p == HrmEditor.this) {
		handleActivate();
	}
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:19,代码来源:HrmEditor.java

示例13: partActivated

import org.eclipse.ui.IWorkbenchPart; //导入依赖的package包/类
public void partActivated(IWorkbenchPart p) {
	if (p instanceof ContentOutline) {
		if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) {
			getActionBarContributor().setActiveEditor(LibraryEditor.this);

			setCurrentViewer(contentOutlineViewer);
		}
	}
	else if (p instanceof PropertySheet) {
		if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) {
			getActionBarContributor().setActiveEditor(LibraryEditor.this);
			handleActivate();
		}
	}
	else if (p == LibraryEditor.this) {
		handleActivate();
	}
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:19,代码来源:LibraryEditor.java

示例14: partActivated

import org.eclipse.ui.IWorkbenchPart; //导入依赖的package包/类
public void partActivated(IWorkbenchPart p) {
	if (p instanceof ContentOutline) {
		if (((ContentOutline)p).getCurrentPage() == contentOutlinePage) {
			getActionBarContributor().setActiveEditor(NfpEditor.this);

			setCurrentViewer(contentOutlineViewer);
		}
	}
	else if (p instanceof PropertySheet) {
		if (propertySheetPages.contains(((PropertySheet)p).getCurrentPage())) {
			getActionBarContributor().setActiveEditor(NfpEditor.this);
			handleActivate();
		}
	}
	else if (p == NfpEditor.this) {
		handleActivate();
	}
}
 
开发者ID:polarsys,项目名称:time4sys,代码行数:19,代码来源:NfpEditor.java

示例15: partActivated

import org.eclipse.ui.IWorkbenchPart; //导入依赖的package包/类
public void partActivated ( IWorkbenchPart p )
{
    if ( p instanceof ContentOutline )
    {
        if ( ( (ContentOutline)p ).getCurrentPage () == contentOutlinePage )
        {
            getActionBarContributor ().setActiveEditor ( GlobalizeEditor.this );

            setCurrentViewer ( contentOutlineViewer );
        }
    }
    else if ( p instanceof PropertySheet )
    {
        if ( propertySheetPages.contains ( ( (PropertySheet)p ).getCurrentPage () ) )
        {
            getActionBarContributor ().setActiveEditor ( GlobalizeEditor.this );
            handleActivate ();
        }
    }
    else if ( p == GlobalizeEditor.this )
    {
        handleActivate ();
    }
}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:25,代码来源:GlobalizeEditor.java


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