1

这就是我想要做的:我有一个包含某些数据的 Eclipse 插件(实际上是代表项目文件结构的字符串)。这些字符串可以通过普通的 getter 访问并存储在列表中。我现在想将这些字符串放入 BIRT 以获取pdfhtml。从我目前发现的情况来看,我需要以某种方式将 BIRT 集成到插件中(我想像你必须使用 BIRD 的 UI 那样选择数据源和数据集等等 - 这应该自动发生在我的代码中)。此外,我不想使用BIRT 运行时,但只能使用通过eclispe->help->istall 新软件从通用安装方式获得的普通 jar. 如果没有运行时并且没有深入挖掘 BIRT 源文件,这是否可能?我实际上正在寻找类似的东西:

Datasource source = new DataSource();
/* put somehow the strings into the data source */
DataSet set = new DataSet();
/* connect set to source, create layout and so on */

这是我目前正在使用的方法:

@Override
public Object execute(ExecutionEvent event) throws ExecutionException {

    /* the strings are accessible over "fs" */
    FileStructure fs = extractFileStructure(event);

    /* TODO: Implement the layout */
}

我希望我的问题足够清楚:)。

4

1 回答 1

0

Alright, I managed to answer this question myself, so I'm going to answer it in case someone has the same problem.
Actually my question was slightly silly because I didn't really know what I was talking about. I don't think it's very wise to try to implement this without using the BIRT runtime. What I was talking about was the installation of the BIRT runtime environment (where you had to set a HOME variable and so on) which was only necessary before version 3.7 of BIRT. Now you can just skip this step which is exactly what I wanted. Actually it's not such a big deal. All the information I needed could be found in this eclipse tutorial. But I recommend you not to copy the code straight away because the tutorial seems to be a little older, so some of the methods used there are deprecated in the current BIRT version (they actually might have been disappeared if you read this post later).
I hope that this was/is helpful for some of you. :)

于 2013-08-27T05:48:48.473 回答