IWorkbenchWindow window = ... MyEditorInput myEditorInput = ... window.getActivePage().openEditor(myEditorInput, ICrystalReportsEditor.CR_EDITOR_ID);
import org.eclipse.jface.action.IAction; import org.eclipse.jface.viewers.ISelection; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.IWorkbenchWindowActionDelegate; import org.eclipse.ui.PartInitException; import com.businessobjects.crystalreports.designer.sdk.ICrystalReportsEditor; public class MyInputAction implements IWorkbenchWindowActionDelegate { IWorkbenchWindow workbenchWindow = null; public void init(IWorkbenchWindow window) { this.workbenchWindow = window; } public void run (IAction action) { try { workbenchWindow.getActivePage().openEditor(new MyEditorInput(), ICrystalReportsEditor.CR_EDITOR_ID); } catch (PartInitException e) { e.printStackTrace(); } } public void dispose() { } public void selectionChanged(IAction action, ISelection selection) { } }
SAP BusinessObjects http://www.sap.com/sapbusinessobjects/ Support services http://service.sap.com/bosap-support/ Product Documentation on the Web http://help.sap.com/ |