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


Java IWorkbenchPage.showView方法代码示例

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


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

示例1: openView

import org.eclipse.ui.IWorkbenchPage; //导入方法依赖的package包/类
/**
 * Opens the view with the given identifier.
 * 
 * @param viewId
 *            The view to open; must not be <code>null</code>
 * @throws PartInitException
 *             If the part could not be initialized.
 */
private final void openView ( final String viewId, final String secondaryId, final IWorkbenchWindow activeWorkbenchWindow ) throws PartInitException
{

    final IWorkbenchPage activePage = activeWorkbenchWindow.getActivePage ();
    if ( activePage == null )
    {
        return;
    }
    if ( secondaryId != null )
    {
        activePage.showView ( viewId, secondaryId, IWorkbenchPage.VIEW_ACTIVATE );
    }
    else
    {
        activePage.showView ( viewId );
    }

}
 
开发者ID:eclipse,项目名称:neoscada,代码行数:27,代码来源:ShowViewHandler.java

示例2: getInstance

import org.eclipse.ui.IWorkbenchPage; //导入方法依赖的package包/类
/**
 * Returns the instance of this view in the active workbench page. Will open the view if not open already. Returns
 * <code>null</code> on error (e.g. not invoked from UI thread).
 *
 * @param activate
 *            if true, the view will be brought to the front.
 */
public static TestResultsView getInstance(boolean activate) {
	try {
		final IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
		final TestResultsView view = (TestResultsView) page.showView(ID);
		if (activate)
			page.activate(view);
		return view;
	} catch (Exception e) {
		return null;
	}
}
 
开发者ID:eclipse,项目名称:n4js,代码行数:19,代码来源:TestResultsView.java

示例3: execute

import org.eclipse.ui.IWorkbenchPage; //导入方法依赖的package包/类
@Execute 
public void execute() {
	
	try {
		// --- Show or hide the console view ----------
		IWorkbenchPage wbPage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
		IViewPart viewConsole = wbPage.findView(AppModelId.PART_ORG_AGENTGUI_CORE_PART_CONSOLE);
		if (viewConsole==null) {
			// --- Open console view ------------------
			wbPage.showView(AppModelId.PART_ORG_AGENTGUI_CORE_PART_CONSOLE);
			
		} else {
			// --- Close console view -----------------
			int currentState = wbPage.getPartState(wbPage.getReference(viewConsole));
			if (currentState==IWorkbenchPage.STATE_MAXIMIZED) {
				wbPage.activate(viewConsole);
				wbPage.setPartState(wbPage.getReference(viewConsole), IWorkbenchPage.STATE_RESTORED);
				// --- To be progressed! --------------
				wbPage.resetPerspective(); 
			}
			wbPage.hideView(viewConsole);
			
		}
		
	} catch (PartInitException e) {
		e.printStackTrace();
	}
	
}
 
开发者ID:EnFlexIT,项目名称:AgentWorkbench,代码行数:30,代码来源:ViewConsole.java

示例4: performFinish

import org.eclipse.ui.IWorkbenchPage; //导入方法依赖的package包/类
@Override
public boolean performFinish() {

    ZooKeeperConnectionDescriptor connectionDescriptor = _Page1.getConnectionDescriptor();

    List<AuthInfo> authInfos = _Page2.getAuthInfos();
    if (authInfos != null && authInfos.size() > 0) {
        connectionDescriptor.setAuthInfos(authInfos);
    }

    ZooKeeperActivator plugin = ZooKeeperActivator.getDefault();

    DataModelManager<ZooKeeperConnectionModel, ZooKeeperConnectionDescriptor, ZooKeeperConnection> zooKeeperConnectionModelManager = plugin
            .getZooKeeperConnectionModelManager();

    zooKeeperConnectionModelManager.insertData(connectionDescriptor, null);

    // Force the new model creation
    zooKeeperConnectionModelManager.getModel(connectionDescriptor);

    IWorkbenchPage page = plugin.getWorkbench().getActiveWorkbenchWindow().getActivePage();
    try {
        page.showView(ZooKeeperExplorerView.ID);
    }
    catch (PartInitException e) {
        ZooKeeperActivator.reportError(e);
    }

    return true;
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:31,代码来源:ZooKeeperConnectionNewWizard.java

示例5: performFinish

import org.eclipse.ui.IWorkbenchPage; //导入方法依赖的package包/类
@Override
public boolean performFinish() {

    
    String name = _Page1.getConnectionName();
    JMXServiceURL serviceURL = _Page1.getServiceUrl();
    String userName = _Page1.getUserName();
    String password = (userName != null) ? _Page1.getPassword() : null;

    JmxConnectionDescriptor connectionDescriptor = new JmxConnectionDescriptor(name, serviceURL, userName, password);
    
    JmxActivator plugin = JmxActivator.getDefault();

    DataModelManager<JmxConnectionModel, JmxConnectionDescriptor, JmxConnection> zooKeeperConnectionModelManager = plugin
            .getJmxConnectionModelManager();

    zooKeeperConnectionModelManager.insertData(connectionDescriptor, null);

    // Force the new model creation
    zooKeeperConnectionModelManager.getModel(connectionDescriptor);

    IWorkbenchPage page = plugin.getWorkbench().getActiveWorkbenchWindow().getActivePage();
    try {
        page.showView(JmxExplorerView.ID);
    }
    catch (PartInitException e) {
        JmxActivator.reportError(e);
    }

    return true;
}
 
开发者ID:baloise,项目名称:eZooKeeper,代码行数:32,代码来源:JmxConnectionNewWizard.java

示例6: performRequest

import org.eclipse.ui.IWorkbenchPage; //导入方法依赖的package包/类
@Override
public void performRequest(Request req) {
	if (req.getType().equals(RequestConstants.REQ_OPEN)) {
		try {
			IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
			page.showView(IPageLayout.ID_PROP_SHEET);
		} catch (PartInitException e) {
			e.printStackTrace();
		}
	}
}
 
开发者ID:dstl,项目名称:Open_Source_ECOA_Toolset_AS5,代码行数:12,代码来源:AppAbstractEditPart.java

示例7: showView

import org.eclipse.ui.IWorkbenchPage; //导入方法依赖的package包/类
public static IViewPart showView(String viewId) {		
	IWorkbenchWindow activeWorkbenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();		
	if (activeWorkbenchWindow != null) {			
		IWorkbenchPage activePage = activeWorkbenchWindow.getActivePage();			
		if (activePage != null) {				
			try {
				return activePage.showView(viewId);
			} catch (PartInitException e) {					
				e.printStackTrace();
			}			
		}		
	}		
	return null;		
}
 
开发者ID:Talend,项目名称:avro-schema-editor,代码行数:15,代码来源:UIUtils.java


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