RCP中打开一个rptdesign的报表
String id = "org.eclipse.birt.report.designer.ui.editors.ReportEditor"; IProject project = null;IPath location = null; project = FileHelper.getReportPath();location = project.getLocation();location = location.append(reportName+ ".rptdesign");File file = location.makeAbsolute().toFile();String absultePath = file.getAbsolutePath(); IFile iFile = project.getFile(location.lastSegment());FileEditorInput fileEditorInput = new FileEditorInput(iFile);PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().openEditor(fileEditorInput, id);
FileHelper.getReportPath(){ //导出产品xxx[默认为eclipse]目录下的文件夹ReportIWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();IProject project = root.getProject("Report");if (!project.exists()) {project.create(null);}if (!project.isOpen()) {project.open(null);}return project; }