Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » BIRT » Scripting access to plugins
Scripting access to plugins [message #928150] Sun, 30 September 2012 10:58 Go to next message
Steve Farmwald is currently offline Steve FarmwaldFriend
Messages: 3
Registered: May 2012
Junior Member
I'm attempting to use the 3.7 RCP Report Designer in a project. I've developed
a series of plugins to access a legacy database. For a demo, I wanted to use
a Scripted Data Source/Set, but the scripts don't have access to the bundles.
Is there a solution? I've googled and searched the forums, but haven't seen
anything that appeared to help.

Thanks
Re: Scripting access to plugins [message #928438 is a reply to message #928150] Sun, 30 September 2012 16:26 Go to previous messageGo to next message
Steve Farmwald is currently offline Steve FarmwaldFriend
Messages: 3
Registered: May 2012
Junior Member
I worked around the problem by creating a fragment hosted by org.eclipse.birt.core.

Not very clean, but I'm under time pressure. If anyone has a better solution,
please....
Re: Scripting access to plugins [message #929627 is a reply to message #928438] Mon, 01 October 2012 16:12 Go to previous message
Jason Weathersby is currently offline Jason WeathersbyFriend
Messages: 9167
Registered: July 2009
Senior Member

You should be able to use the runtime classes to locate a plugin that is already in the runtime:
I have done this in the past like.
importPackage(Packages.org.eclipse.core.runtime);
mybundle = Packages.org.eclipse.core.runtime.Platform.getBundle("org.eclipse.birt.report.viewer");
furl = FileLocator.find(mybundle, new Path("/birt/webcontent"), null);
myfolder = FileLocator.toFileURL(furl).getPath();

mc = mybundle.loadClass( "org.eclipse.birt.report.viewer.utilities.WebViewer");
mi = mc.newInstance();
xyz = mi.getCurrentWebApp().getName();


Jason
Previous Topic:react on pagebreak inside table via js
Next Topic:Birt - Oracle forms
Goto Forum:
  


Current Time: Thu Apr 18 21:13:45 GMT 2024

Powered by FUDForum. Page generated in 0.02071 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top