Show BIRT editor preview tab in RCP [message #338634] |
Mon, 28 January 2008 11:10 |
Anders Vegh Messages: 507 Registered: July 2009 |
Senior Member |
|
|
Hi,
The code I used to get the BIRT designer integrated into my RCP are the
following 5 rows (which I put in an action):
IWorkbenchWindow win =
rcptest.Activator.getDefault().getWorkbench().getActiveWorkb enchWindow();
IWorkbenchPage page = win.getActivePage();
File f = new File("c:/temp/report.rptdesign");
ReportEditorInput rei = new ReportEditorInput(f);
page.openEditor(rei, "rcptest.editor1");
In plugin.xml I defined the following:
<extension
point="org.eclipse.ui.editors">
<editor
class=" org.eclipse.birt.report.designer.ui.editors.RCPMultiPageRepo rtEditor "
icon="icons/sample.gif"
id="edisonaid.editor1"
name="name">
</editor>
</extension>
...
<extension
point=" org.eclipse.birt.report.designer.ui.editors.multiPageEditorC ontributor ">
<targetEditor
targetEditorId="edisonaid.editor1">
<formPage
class=" org.eclipse.birt.report.designer.ui.editors.pages.ReportLayo utEditorFormPage "
id="edisonaid.formPage1">
</formPage>
</targetEditor>
</extension>
To show the preview tab I complemented the plugin.xml with the following
placed in the two extension tags above:
<editor
class=" org.eclipse.birt.report.designer.ui.preview.editors.ReportPr eviewEditor "
icon="icons/sample.gif"
id="rcptest.editor2"
name="name2">
</editor>
...
<targetEditor
targetEditorId="edisonaid.editor2">
<formPage
class=" org.eclipse.birt.report.designer.ui.preview.editors.ReportPr eviewFormPage "
id="edisonaid.formPage2">
</formPage>
</targetEditor>
Then I thought I just add something like
page.openEditor(rei, "rcptest.editor2");
to my action ... but that didn't give me a preview tab.
I have experimented now for quite some time but without knowing exactly
what I am doing it feels like I am fumbeling in the dark. Please spread
some light on how to use the
org.eclipse.birt.report.designer.ui.preview.web plugin.
Thanks in advance,
Anders
|
|
|
Powered by
FUDForum. Page generated in 0.02462 seconds