本文整理汇总了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;
}
示例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();
}
}
示例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();
}
}
示例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
}
示例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 ();
}
}
示例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();
}
}
示例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 ();
}
}
示例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 ();
}
}
示例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 ();
}
}
示例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();
}
}
示例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());
}
示例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();
}
}
示例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();
}
}
示例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();
}
}
示例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 ();
}
}