當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。