// ============================================================================ // // Copyright (C) 2006-2012 Talend Inc. - www.talend.com // // This source code is available under agreement available at // %InstallDIR%\features\org.talend.rcp.branding.%PRODUCTNAME%\%PRODUCTNAME%license.txt // // You should have received a copy of the agreement // along with this program; if not, write to Talend SA // 9 rue Pages 92150 Suresnes, France // // ============================================================================ package org.talend.designer.core.ui.action; import org.eclipse.jface.action.Action; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.PlatformUI; import org.talend.designer.core.ui.MultiPageTalendEditor; /** * DOC smallet class global comment. Detailled comment <br/> * * $Id$ * */ public class ShowDesignerPageAction extends Action { public ShowDesignerPageAction() { super(); this.setActionDefinitionId("showEditorDesignerPage"); //$NON-NLS-1$ } @Override public void run() { IWorkbench workbench = PlatformUI.getWorkbench(); IWorkbenchPage page = workbench.getActiveWorkbenchWindow().getActivePage(); IEditorPart editorPart = page.getActiveEditor(); if (editorPart instanceof MultiPageTalendEditor) { ((MultiPageTalendEditor) editorPart).showDesignerPage(); } } }