Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » BIRT » Problem to use the RCPMultiPageReportEditor in a RCP application
Problem to use the RCPMultiPageReportEditor in a RCP application [message #1064517] Wed, 19 June 2013 11:30
werner heisenberg is currently offline werner heisenberg
Messages: 3
Registered: June 2013
Junior Member
Hi everybody !
I've a little problem to open a rptdesign file in a BIRT editor (RCPMultiPageReportEditor) in my own RCP application. I've got the following message :
Unable to create editor ID org.eclipse.birt.report.designer.ui.editors.ReportEditor: The editor class could not be instantiated. This usually indicates a missing no-arg constructor or that the editor's class name was mistyped in plugin.xml. + java.lang.ClassNotFoundException: org.eclipse.birt.report.designer.ui.editors.RCPMultiPageReportEditor

here's my code in the handler which open the editor :
 IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
        IWorkbenchPage page = window.getActivePage();
        IWorkspace ws = ResourcesPlugin.getWorkspace();
        IProject project = ws.getRoot().getProject("External Files");
        IPath location = new Path("/src/stock_report.rptdesign");
        IFile file = project.getFile(location.lastSegment());
        IEditorDescriptor desc = PlatformUI.getWorkbench().getEditorRegistry().getDefaultEditor(file.getName());
        File fileToOpen = new File("bob.rptdesign");
        try {
            fileToOpen.createNewFile();
        } catch (IOException e1) {
            // TODO Auto-generated catch block
            e1.printStackTrace();
        }
        try {
            page.openEditor(new ReportEditorInput(fileToOpen), IReportEditorContants.DESIGN_EDITOR_ID);
        } catch (PartInitException e) {
            // TODO Auto-generated catch block
            e.printStackTrace();
        }

the IReportEditorContants.DESIGN_EDITOR_ID is in the package org.eclipse.birt.report.designer.ui.editors and = String DESIGN_EDITOR_ID = "org.eclipse.birt.report.designer.ui.editors.ReportEditor";

here's my code in the plugin.xml :
   <extension
         point="org.eclipse.ui.editors">
      <editor
            class="org.eclipse.birt.report.designer.ui.editors.RCPMultiPageReportEditor"
            default="true"
            icon="platform:/plugin/org.eclipse.birt.report.designer.ui/icons/eview16/report.gif"
            id="org.eclipse.birt.report.designer.ui.editors.ReportEditor"
            name="%ReportEditor">
         
      </editor>
         </extension>

the .jar org.eclipse.birt.report.designer.ui.rcp (where we can find RCPMultiPageReportEditor) is added in the class path of the plugin, the package org.eclipse.birt.report.designer.ui.rcp is added in the imported packages , and the plugin org.eclipse.birt.report.designer.ui.rcp is added in the Required plug-ins.

Anyone have ever tried that, or at least see where is the problem? Any help would be most welcome.
Previous Topic:populate a textbox
Next Topic:Maximo-BIRT Previous or Next Record
Goto Forum:
  


Current Time: Wed Aug 27 19:11:31 EDT 2014

Powered by FUDForum. Page generated in 0.01554 seconds