Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » DTP » ODA Extension - how to access Data Source properties?
ODA Extension - how to access Data Source properties? [message #18800] Wed, 05 July 2006 12:14 Go to next message
Eclipse UserFriend
Originally posted by: polesen.nordija.com

Hi,

I'm trying to build my own ODA, by extending the
"org.eclipse.datatools.connectivity.oda.dataSource" extension point. I seem
to be unable to get access to the properties defined in the plugin.xml. I
have something like this in plugin.xml:

....
<properties>
<propertyGroup
defaultDisplayName="Connection Properties"
name="connectionProperties">
<property
canInherit="true"
defaultDisplayName="mondrian.catalog"
name="MONDRIAN_CATALOG_FILE"
type="string"/>
....

Now, when I define a new DataSource of my type, right-click it and chose
"Edit", I get a nice dialog with the above defined property. BUT: The value
I enter is *not* in the java.util.Properties instance i get in the call to
my implementation of "IConnection.open", which I thought they would be.

defaultValue="AutoStat.xml"

I think I've misunderstood something. I've used flatfile and jdbc ODAs for
examples and I can see the JDBC plugin defines a UI, with specific dialogs
for entering its properties.

I can also see that the value of the properties in my plugin are saved in
the report xml file under the element "<list-property
name="propertyBindings">".

And last: If I define the "defaultValue" property on my property elements in
my plugin.xml, these values *do* appear in the java.util.Properties
instance in open.

What am I missing?

Regards, Per
Re: ODA Extension - how to access Data Source properties? [message #18886 is a reply to message #18800] Thu, 06 July 2006 00:31 Go to previous messageGo to next message
Linda ChanFriend
Messages: 845
Registered: July 2009
Senior Member
Per,

>> when I define a new DataSource of my type, right-click it and chose "Edit", I
get a nice dialog with the above defined property.

Is this "nice dialog" from your custom implementation of the
oda.design.ui.dataSource and org.eclipse.ui.propertyPages extension points?
How are the extensions defined in your oda ui plugin.xml ? If you'd provided
your own custom implementation, your custom wizard and property page classes
need to implement the DataSourceWizardPage#collectCustomProperties() and
DataSourceEditorPage.collectCustomProperties(java.util.Prope rties) methods to
return the property values entered in the corresponding Data Source Connection
Properties dialog.
Note that these are different from the Property Binding node page that you may
see in BIRT Data Set Editor. That is BIRT-specific and is not part of a ODA
custom designer's extensions.

Alternatively, you can use the default implementation provided in DTP ODA for
your data source UI extension. It creates custom controls based on your oda
property definition, and collects user input to save in a BIRT report design.
It also has a "Test Connection" button to pass the user-entered values to your
ODA runtime driver's IConnection.open method.
For example:

<extension
point="org.eclipse.ui.propertyPages">
<page
id="%oda.data.source.id"
name="%profile.propertypage.name"

class=" org.eclipse.datatools.connectivity.oda.design.ui.pages.impl. DefaultDataSourcePropertyPage "

objectClass="org.eclipse.datatools.connectivity.IConnectionProfile ">

<filter
name="org.eclipse.datatools.profile.property.id"
value="%oda.data.source.id"/>
</page>
</extension>
<extension
point="org.eclipse.datatools.connectivity.oda.design.ui.dataSource ">
<dataSourceUI id="%oda.data.source.id">
<newDataSourceWizard
includesProgressMonitor="false"

pageClass=" org.eclipse.datatools.connectivity.oda.design.ui.pages.impl. DefaultDataSourceWizardPage "

pageTitle="%wizard.data.source.page.title"
windowTitle="%wizard.window.title"/>
</dataSourceUI>
<dataSetUI
.... [requires custom data set UI implementation]
</dataSetUI>
</extension>

Linda


Per Olesen wrote:

> Hi,
>
> I'm trying to build my own ODA, by extending the
> "org.eclipse.datatools.connectivity.oda.dataSource" extension point. I seem
> to be unable to get access to the properties defined in the plugin.xml. I
> have something like this in plugin.xml:
>
> ...
> <properties>
> <propertyGroup
> defaultDisplayName="Connection Properties"
> name="connectionProperties">
> <property
> canInherit="true"
> defaultDisplayName="mondrian.catalog"
> name="MONDRIAN_CATALOG_FILE"
> type="string"/>
> ...
>
> Now, when I define a new DataSource of my type, right-click it and chose
> "Edit", I get a nice dialog with the above defined property. BUT: The value
> I enter is *not* in the java.util.Properties instance i get in the call to
> my implementation of "IConnection.open", which I thought they would be.
>
> defaultValue="AutoStat.xml"
>
> I think I've misunderstood something. I've used flatfile and jdbc ODAs for
> examples and I can see the JDBC plugin defines a UI, with specific dialogs
> for entering its properties.
>
> I can also see that the value of the properties in my plugin are saved in
> the report xml file under the element "<list-property
> name="propertyBindings">".
>
> And last: If I define the "defaultValue" property on my property elements in
> my plugin.xml, these values *do* appear in the java.util.Properties
> instance in open.
>
> What am I missing?
>
> Regards, Per
Re: ODA Extension - how to access Data Source properties? [message #18910 is a reply to message #18886] Thu, 06 July 2006 08:48 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: polesen.nordija.com

--nextPart2372710.etOH0sACN4
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8Bit

Hi Linda,

Thank you, that brings light on the subject for me :-)
But not quite working yet.

Linda Chan wrote:
>> Per,
>>
>> when I define a new DataSource of my type, right-click it and chose
>> "Edit", I get a nice dialog with the above defined property.
>
> Is this "nice dialog" from your custom implementation of the
> oda.design.ui.dataSource and org.eclipse.ui.propertyPages extension
> points?

No it is not. I have not provided such ones. I was working under the (too
simple, I guess) assumption, that defining the properties in the plugin.xml
would make them available in the open() method. Guess not.

> How are the extensions defined in your oda ui plugin.xml ?

I've attached my plugin.xml as it looks now. I've tried to apply the default
UI implementations as you described. I've *not* provided custom
implementations in the <dataSetUI> element under the
"org.eclipse.datatools.connectivity.oda.design.ui.dataSource " extension. Is
this strictly neccessary?

My problem now is, that I'm getting an exception when I try to define a new
Data Source of my type.

org.eclipse.core.runtime.CoreException: Executable extension definition for
"class" not found.

I guess it has to do with the "class" and/or "pageClass" properties of the
<page> and <newDataSourceWizard> elements. But I'm only guessing.

Can you have a look at the exception and the stack-trace and tell me if
something looks wrong?

Here's the complete exception stack:

org.eclipse.core.runtime.CoreException: Executable extension definition for
"class" not found.
at
org.eclipse.core.internal.registry.ConfigurationElement.thro wException(ConfigurationElement.java:62)
at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:222)
at
org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 51)
at
org.eclipse.birt.report.designer.data.ui.datasource.DataSour ceSelectionPage.getNextPageODAV
(DataSourceSelectionPage.java:442)
at
org.eclipse.birt.report.designer.data.ui.datasource.DataSour ceSelectionPage.getNextPage(DataSourceSelectionPage.java:375 )
at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDial og.java:751)
at
org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDi alog.java:351)
at org.eclipse.jface.dialogs.Dialog$3.widgetSelected(Dialog.jav a:660)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:90)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3164)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2840)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820 )
at org.eclipse.jface.window.Window.open(Window.java:796)
at
org.eclipse.birt.report.designer.ui.actions.NewDataSourceAct ion.run(NewDataSourceAction.java:83)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:499 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:539)
at org.eclipse.jface.action.ActionContributionItem.access$
(ActionContributionItem.java:488)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3164)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2840)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)



--nextPart2372710.etOH0sACN4
Content-Type: text/plain; name="plugin.xml"
Content-Transfer-Encoding: 8Bit
Content-Disposition: attachment; filename="plugin.xml"

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
<extension
point="org.eclipse.datatools.connectivity.oda.dataSource">
<dataSource
defaultDisplayName="%datasource.name"
driverClass=" org.eclipse.datatools.connectivity.oda.mondrian.MondrianDriv er "
id="org.eclipse.datatools.connectivity.oda.mondrian"
odaVersion="3.0"
setThreadContextClassLoader="false">
<properties>
<propertyGroup
defaultDisplayName="Connection Properties"
name="connectionProperties">
<property
canInherit="true"
defaultDisplayName="%datasource.property.jdbc.driver"
name="JDBC_DRIVER"
type="string">
<choice
name="oracle.jdbc.driver.OracleDriver"
value="oracle.jdbc.driver.OracleDriver"/>
<choice
name="com.mysql.jdbc.Driver"
value="com.mysql.jdbc.Driver"/>
</property>
<property
canInherit="true"
defaultDisplayName="%datasource.property.jdbc.url"
name="JDBC_URL"
type="choice">
<choice
name="jdbc:oracle:thin:@192.168.25.34:1521:ATUDV"
value="jdbc:oracle:thin:@192.168.25.34:1521:ATUDV"/>
<choice
name="jdbc:mysql://192.168.3.129/olap"
value="jdbc:mysql://192.168.3.129/olap"/>
</property>
<property
canInherit="true"
defaultDisplayName="%datasource.property.jdbc.user"
defaultValue="olap"
name="JDBC_USER"
type="string"/>
<property
canInherit="true"
defaultDisplayName="%datasource.property.jdbc.password"
defaultValue="olap"
name="JDBC_PASSWORD"
type="string"/>
<property
canInherit="true"
defaultDisplayName="%datasource.property.mondrian.catalog"
name="MONDRIAN_CATALOG_FILE"
type="string">
</property>
<property
canInherit="true"
defaultDisplayName="MDX Query"
name="MDX_QUERY"
type="string"/>
</propertyGroup>
</properties>
</dataSource>
<dataSet
defaultDisplayName="%dataset.name"
id="org.eclipse.datatools.connectivity.oda.mondrian.dataSet ">
<dataTypeMapping
nativeDataType="INT"
nativeDataTypeCode="4"
odaScalarDataType="Integer"/>
<dataTypeMapping
nativeDataType="DOUBLE"
nativeDataTypeCode="8"
odaScalarDataType="Double"/>
<dataTypeMapping
nativeDataType="STRING"
nativeDataTypeCode="12"
odaScalarDataType="String"/>
<dataTypeMapping
nativeDataType="BIGDECIMAL"
nativeDataTypeCode="2"
odaScalarDataType="Decimal"/>
</dataSet>
</extension>
<extension
point="org.eclipse.datatools.connectivity.connectionProfile ">
<category
id="org.eclipse.datatools.connectivity.oda.mondrian"
name="Mondrian Cube"
parentCategory="org.eclipse.datatools.connectivity.oda.profileCategory "/>
<connectionProfile
category="org.eclipse.datatools.connectivity.oda.mondrian"
id="org.eclipse.datatools.connectivity.oda.mondrian"
name="ODA Mondrian Data Source Connection Profile"
pingFactory=" org.eclipse.datatools.connectivity.oda.profile.OdaConnection Factory "/>
<connectionFactory
class=" org.eclipse.datatools.connectivity.oda.profile.OdaConnection Factory "
id="org.eclipse.datatools.connectivity.oda.IConnection"
name="ODA Connection Factory"
profile="org.eclipse.datatools.connectivity.oda.mondrian"/ >
<newWizard
class=" org.eclipse.datatools.connectivity.oda.design.ui.wizards.New DataSourceWizard "
description="Create an ODA Mondrian connection profile"
id="org.eclipse.datatools.connectivity.oda.mondrian"
name="ODA Mondrian Data Source"
profile="org.eclipse.datatools.connectivity.oda.mondrian"/ >
</extension>
<extension
point="org.eclipse.ui.propertyPages">
<page
class=" org.eclipse.datatools.connectivity.oda.design.ui.pages.impl. DefaultDataSourcePropertyPage "
id="org.eclipse.datatools.connectivity.oda.mondrian"
name="ODA Mondrian Data Source Connection Properties"
objectClass="org.eclipse.datatools.connectivity.IConnectionProfile ">
<filter
name="org.eclipse.datatools.profile.property.id"
value="org.eclipse.datatools.connectivity.oda.mondrian"/>
</page>
</extension>
<extension
point="org.eclipse.datatools.connectivity.oda.design.ui.dataSource ">
<dataSourceUI id="org.eclipse.datatools.connectivity.oda.mondrian">
<newDataSourceWizard
includesProgressMonitor="false"
pageClass=" org.eclipse.datatools.connectivity.oda.design.ui.pages.impl. DefaultDataSourceWizardPage "
pageTitle="Select Connect Parameters and Query"
windowTitle="New Mondrian Data Source Profile"/>
</dataSourceUI>
</extension>

</plugin>

--nextPart2372710.etOH0sACN4--
Re: ODA Extension - how to access Data Source properties? [message #18932 is a reply to message #18886] Thu, 06 July 2006 08:53 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: polesen.nordija.com

A little question on developing plugins...

This is my first try on plugin development for eclipse. Am I doing the right
thing by checking out the source for other plugins and trying to mimick
what they do, or is there a better path to follow?

I'm having a bit of trouble determining exactly which extension points do
what and which I need to implement. As an example, it was nice to know the
default ui implementations for datatools that Linda mentioned, and how to
use them. Have I missed some important documentation somewhere?

Regards, Per
Re: ODA Extension - how to access Data Source properties? [message #18997 is a reply to message #18910] Fri, 07 July 2006 22:47 Go to previous messageGo to next message
Linda ChanFriend
Messages: 845
Registered: July 2009
Senior Member
>> I've *not* provided custom implementations in the <dataSetUI> element under the
>> "org.eclipse.datatools.connectivity.oda.design.ui.dataSource " extension. Is this strictly neccessary?

Yes, it is required, as defined in the oda.design.ui.dataSource extension point schema definition.
Otherwise, your plugin.xml extensions look fine.

Missing the <dataSetUI> element, your extension is considered invalid or incomplete, and had triggered BIRT Data Source Wizard
to go down a different code path (for backward compatibility)... and thus the exception.
You might want to put in some temporary entry for <dataSetUI>, just to get the data source wizard part going first.
From BIRT perspective, creating a data set design to associate with a data source is the ultimate objective of a custom ODA
designer (so that there are data to retrieve and report on).

Re: documentation, the oda.design.ui.dataSource extension point schema definition is documented in DTP on-line doc plugin,
distributed as part of the DTP SDK build. In Eclipse IDE, Help menu -> Help Contents. Select the "Data Tools" book, and
look under Reference -> Extension Points Reference .

Linda
Re: ODA Extension - how to access Data Source properties? [message #19343 is a reply to message #18997] Tue, 11 July 2006 19:23 Go to previous message
Eclipse UserFriend
Originally posted by: polesen.nordija.com

Hi Linda,

Thank you very much.
Downloaded the SDK plugin and found the docs you mentioned.

/Per

Linda Chan wrote:
>>> I've *not* provided custom implementations in the <dataSetUI> element under the
>>> "org.eclipse.datatools.connectivity.oda.design.ui.dataSource " extension. Is this strictly neccessary?
>
> Yes, it is required, as defined in the oda.design.ui.dataSource extension point schema definition.
> Otherwise, your plugin.xml extensions look fine.
>
> Missing the <dataSetUI> element, your extension is considered invalid or incomplete, and had triggered BIRT Data Source Wizard
> to go down a different code path (for backward compatibility)... and thus the exception.
> You might want to put in some temporary entry for <dataSetUI>, just to get the data source wizard part going first.
> From BIRT perspective, creating a data set design to associate with a data source is the ultimate objective of a custom ODA
> designer (so that there are data to retrieve and report on).
>
> Re: documentation, the oda.design.ui.dataSource extension point schema definition is documented in DTP on-line doc plugin,
> distributed as part of the DTP SDK build. In Eclipse IDE, Help menu -> Help Contents. Select the "Data Tools" book, and
> look under Reference -> Extension Points Reference .
>
> Linda
>
>
Re: ODA Extension - how to access Data Source properties? [message #580688 is a reply to message #18800] Thu, 06 July 2006 00:31 Go to previous message
Linda ChanFriend
Messages: 845
Registered: July 2009
Senior Member
Per,

>> when I define a new DataSource of my type, right-click it and chose "Edit", I
get a nice dialog with the above defined property.

Is this "nice dialog" from your custom implementation of the
oda.design.ui.dataSource and org.eclipse.ui.propertyPages extension points?
How are the extensions defined in your oda ui plugin.xml ? If you'd provided
your own custom implementation, your custom wizard and property page classes
need to implement the DataSourceWizardPage#collectCustomProperties() and
DataSourceEditorPage.collectCustomProperties(java.util.Prope rties) methods to
return the property values entered in the corresponding Data Source Connection
Properties dialog.
Note that these are different from the Property Binding node page that you may
see in BIRT Data Set Editor. That is BIRT-specific and is not part of a ODA
custom designer's extensions.

Alternatively, you can use the default implementation provided in DTP ODA for
your data source UI extension. It creates custom controls based on your oda
property definition, and collects user input to save in a BIRT report design.
It also has a "Test Connection" button to pass the user-entered values to your
ODA runtime driver's IConnection.open method.
For example:

<extension
point="org.eclipse.ui.propertyPages">
<page
id="%oda.data.source.id"
name="%profile.propertypage.name"

class=" org.eclipse.datatools.connectivity.oda.design.ui.pages.impl. DefaultDataSourcePropertyPage "

objectClass="org.eclipse.datatools.connectivity.IConnectionProfile ">

<filter
name="org.eclipse.datatools.profile.property.id"
value="%oda.data.source.id"/>
</page>
</extension>
<extension
point="org.eclipse.datatools.connectivity.oda.design.ui.dataSource ">
<dataSourceUI id="%oda.data.source.id">
<newDataSourceWizard
includesProgressMonitor="false"

pageClass=" org.eclipse.datatools.connectivity.oda.design.ui.pages.impl. DefaultDataSourceWizardPage "

pageTitle="%wizard.data.source.page.title"
windowTitle="%wizard.window.title"/>
</dataSourceUI>
<dataSetUI
.... [requires custom data set UI implementation]
</dataSetUI>
</extension>

Linda


Per Olesen wrote:

> Hi,
>
> I'm trying to build my own ODA, by extending the
> "org.eclipse.datatools.connectivity.oda.dataSource" extension point. I seem
> to be unable to get access to the properties defined in the plugin.xml. I
> have something like this in plugin.xml:
>
> ...
> <properties>
> <propertyGroup
> defaultDisplayName="Connection Properties"
> name="connectionProperties">
> <property
> canInherit="true"
> defaultDisplayName="mondrian.catalog"
> name="MONDRIAN_CATALOG_FILE"
> type="string"/>
> ...
>
> Now, when I define a new DataSource of my type, right-click it and chose
> "Edit", I get a nice dialog with the above defined property. BUT: The value
> I enter is *not* in the java.util.Properties instance i get in the call to
> my implementation of "IConnection.open", which I thought they would be.
>
> defaultValue="AutoStat.xml"
>
> I think I've misunderstood something. I've used flatfile and jdbc ODAs for
> examples and I can see the JDBC plugin defines a UI, with specific dialogs
> for entering its properties.
>
> I can also see that the value of the properties in my plugin are saved in
> the report xml file under the element "<list-property
> name="propertyBindings">".
>
> And last: If I define the "defaultValue" property on my property elements in
> my plugin.xml, these values *do* appear in the java.util.Properties
> instance in open.
>
> What am I missing?
>
> Regards, Per
Re: ODA Extension - how to access Data Source properties? [message #580726 is a reply to message #18886] Thu, 06 July 2006 08:48 Go to previous message
Eclipse UserFriend
Originally posted by: polesen.nordija.com

--nextPart2372710.etOH0sACN4
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8Bit

Hi Linda,

Thank you, that brings light on the subject for me :-)
But not quite working yet.

Linda Chan wrote:
>> Per,
>>
>> when I define a new DataSource of my type, right-click it and chose
>> "Edit", I get a nice dialog with the above defined property.
>
> Is this "nice dialog" from your custom implementation of the
> oda.design.ui.dataSource and org.eclipse.ui.propertyPages extension
> points?

No it is not. I have not provided such ones. I was working under the (too
simple, I guess) assumption, that defining the properties in the plugin.xml
would make them available in the open() method. Guess not.

> How are the extensions defined in your oda ui plugin.xml ?

I've attached my plugin.xml as it looks now. I've tried to apply the default
UI implementations as you described. I've *not* provided custom
implementations in the <dataSetUI> element under the
"org.eclipse.datatools.connectivity.oda.design.ui.dataSource " extension. Is
this strictly neccessary?

My problem now is, that I'm getting an exception when I try to define a new
Data Source of my type.

org.eclipse.core.runtime.CoreException: Executable extension definition for
"class" not found.

I guess it has to do with the "class" and/or "pageClass" properties of the
<page> and <newDataSourceWizard> elements. But I'm only guessing.

Can you have a look at the exception and the stack-trace and tell me if
something looks wrong?

Here's the complete exception stack:

org.eclipse.core.runtime.CoreException: Executable extension definition for
"class" not found.
at
org.eclipse.core.internal.registry.ConfigurationElement.thro wException(ConfigurationElement.java:62)
at
org.eclipse.core.internal.registry.ConfigurationElement.crea teExecutableExtension(ConfigurationElement.java:222)
at
org.eclipse.core.internal.registry.ConfigurationElementHandl e.createExecutableExtension(ConfigurationElementHandle.java: 51)
at
org.eclipse.birt.report.designer.data.ui.datasource.DataSour ceSelectionPage.getNextPageODAV
(DataSourceSelectionPage.java:442)
at
org.eclipse.birt.report.designer.data.ui.datasource.DataSour ceSelectionPage.getNextPage(DataSourceSelectionPage.java:375 )
at org.eclipse.jface.wizard.WizardDialog.nextPressed(WizardDial og.java:751)
at
org.eclipse.jface.wizard.WizardDialog.buttonPressed(WizardDi alog.java:351)
at org.eclipse.jface.dialogs.Dialog$3.widgetSelected(Dialog.jav a:660)
at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListe ner.java:90)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3164)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2840)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:820 )
at org.eclipse.jface.window.Window.open(Window.java:796)
at
org.eclipse.birt.report.designer.ui.actions.NewDataSourceAct ion.run(NewDataSourceAction.java:83)
at org.eclipse.jface.action.Action.runWithEvent(Action.java:499 )
at
org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:539)
at org.eclipse.jface.action.ActionContributionItem.access$
(ActionContributionItem.java:488)
at
org.eclipse.jface.action.ActionContributionItem$5.handleEven t(ActionContributionItem.java:400)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :66)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1085)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:3164)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2840)
at org.eclipse.ui.internal.Workbench.runEventLoop(Workbench.jav a:1914)
at org.eclipse.ui.internal.Workbench.runUI(Workbench.java:1878)
at
org.eclipse.ui.internal.Workbench.createAndRunWorkbench(Work bench.java:419)
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(PlatformUI.j ava:149)
at org.eclipse.ui.internal.ide.IDEApplication.run(IDEApplicatio n.java:95)
at
org.eclipse.core.internal.runtime.PlatformActivator$1.run(Pl atformActivator.java:78)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .runApplication(EclipseAppLauncher.java:92)
at
org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:68)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:400)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAcce ssorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMe thodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.eclipse.core.launcher.Main.invokeFramework(Main.java:336 )
at org.eclipse.core.launcher.Main.basicRun(Main.java:280)
at org.eclipse.core.launcher.Main.run(Main.java:977)
at org.eclipse.core.launcher.Main.main(Main.java:952)



--nextPart2372710.etOH0sACN4
Content-Type: text/plain; name="plugin.xml"
Content-Transfer-Encoding: 8Bit
Content-Disposition: attachment; filename="plugin.xml"

<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
<extension
point="org.eclipse.datatools.connectivity.oda.dataSource">
<dataSource
defaultDisplayName="%datasource.name"
driverClass=" org.eclipse.datatools.connectivity.oda.mondrian.MondrianDriv er "
id="org.eclipse.datatools.connectivity.oda.mondrian"
odaVersion="3.0"
setThreadContextClassLoader="false">
<properties>
<propertyGroup
defaultDisplayName="Connection Properties"
name="connectionProperties">
<property
canInherit="true"
defaultDisplayName="%datasource.property.jdbc.driver"
name="JDBC_DRIVER"
type="string">
<choice
name="oracle.jdbc.driver.OracleDriver"
value="oracle.jdbc.driver.OracleDriver"/>
<choice
name="com.mysql.jdbc.Driver"
value="com.mysql.jdbc.Driver"/>
</property>
<property
canInherit="true"
defaultDisplayName="%datasource.property.jdbc.url"
name="JDBC_URL"
type="choice">
<choice
name="jdbc:oracle:thin:@192.168.25.34:1521:ATUDV"
value="jdbc:oracle:thin:@192.168.25.34:1521:ATUDV"/>
<choice
name="jdbc:mysql://192.168.3.129/olap"
value="jdbc:mysql://192.168.3.129/olap"/>
</property>
<property
canInherit="true"
defaultDisplayName="%datasource.property.jdbc.user"
defaultValue="olap"
name="JDBC_USER"
type="string"/>
<property
canInherit="true"
defaultDisplayName="%datasource.property.jdbc.password"
defaultValue="olap"
name="JDBC_PASSWORD"
type="string"/>
<property
canInherit="true"
defaultDisplayName="%datasource.property.mondrian.catalog"
name="MONDRIAN_CATALOG_FILE"
type="string">
</property>
<property
canInherit="true"
defaultDisplayName="MDX Query"
name="MDX_QUERY"
type="string"/>
</propertyGroup>
</properties>
</dataSource>
<dataSet
defaultDisplayName="%dataset.name"
id="org.eclipse.datatools.connectivity.oda.mondrian.dataSet ">
<dataTypeMapping
nativeDataType="INT"
nativeDataTypeCode="4"
odaScalarDataType="Integer"/>
<dataTypeMapping
nativeDataType="DOUBLE"
nativeDataTypeCode="8"
odaScalarDataType="Double"/>
<dataTypeMapping
nativeDataType="STRING"
nativeDataTypeCode="12"
odaScalarDataType="String"/>
<dataTypeMapping
nativeDataType="BIGDECIMAL"
nativeDataTypeCode="2"
odaScalarDataType="Decimal"/>
</dataSet>
</extension>
<extension
point="org.eclipse.datatools.connectivity.connectionProfile ">
<category
id="org.eclipse.datatools.connectivity.oda.mondrian"
name="Mondrian Cube"
parentCategory="org.eclipse.datatools.connectivity.oda.profileCategory "/>
<connectionProfile
category="org.eclipse.datatools.connectivity.oda.mondrian"
id="org.eclipse.datatools.connectivity.oda.mondrian"
name="ODA Mondrian Data Source Connection Profile"
pingFactory=" org.eclipse.datatools.connectivity.oda.profile.OdaConnection Factory "/>
<connectionFactory
class=" org.eclipse.datatools.connectivity.oda.profile.OdaConnection Factory "
id="org.eclipse.datatools.connectivity.oda.IConnection"
name="ODA Connection Factory"
profile="org.eclipse.datatools.connectivity.oda.mondrian"/ >
<newWizard
class=" org.eclipse.datatools.connectivity.oda.design.ui.wizards.New DataSourceWizard "
description="Create an ODA Mondrian connection profile"
id="org.eclipse.datatools.connectivity.oda.mondrian"
name="ODA Mondrian Data Source"
profile="org.eclipse.datatools.connectivity.oda.mondrian"/ >
</extension>
<extension
point="org.eclipse.ui.propertyPages">
<page
class=" org.eclipse.datatools.connectivity.oda.design.ui.pages.impl. DefaultDataSourcePropertyPage "
id="org.eclipse.datatools.connectivity.oda.mondrian"
name="ODA Mondrian Data Source Connection Properties"
objectClass="org.eclipse.datatools.connectivity.IConnectionProfile ">
<filter
name="org.eclipse.datatools.profile.property.id"
value="org.eclipse.datatools.connectivity.oda.mondrian"/>
</page>
</extension>
<extension
point="org.eclipse.datatools.connectivity.oda.design.ui.dataSource ">
<dataSourceUI id="org.eclipse.datatools.connectivity.oda.mondrian">
<newDataSourceWizard
includesProgressMonitor="false"
pageClass=" org.eclipse.datatools.connectivity.oda.design.ui.pages.impl. DefaultDataSourceWizardPage "
pageTitle="Select Connect Parameters and Query"
windowTitle="New Mondrian Data Source Profile"/>
</dataSourceUI>
</extension>

</plugin>

--nextPart2372710.etOH0sACN4--
Re: ODA Extension - how to access Data Source properties? [message #580738 is a reply to message #18886] Thu, 06 July 2006 08:53 Go to previous message
Eclipse UserFriend
Originally posted by: polesen.nordija.com

A little question on developing plugins...

This is my first try on plugin development for eclipse. Am I doing the right
thing by checking out the source for other plugins and trying to mimick
what they do, or is there a better path to follow?

I'm having a bit of trouble determining exactly which extension points do
what and which I need to implement. As an example, it was nice to know the
default ui implementations for datatools that Linda mentioned, and how to
use them. Have I missed some important documentation somewhere?

Regards, Per
Re: ODA Extension - how to access Data Source properties? [message #580813 is a reply to message #18910] Fri, 07 July 2006 22:47 Go to previous message
Linda ChanFriend
Messages: 845
Registered: July 2009
Senior Member
>> I've *not* provided custom implementations in the <dataSetUI> element under the
>> "org.eclipse.datatools.connectivity.oda.design.ui.dataSource " extension. Is this strictly neccessary?

Yes, it is required, as defined in the oda.design.ui.dataSource extension point schema definition.
Otherwise, your plugin.xml extensions look fine.

Missing the <dataSetUI> element, your extension is considered invalid or incomplete, and had triggered BIRT Data Source Wizard
to go down a different code path (for backward compatibility)... and thus the exception.
You might want to put in some temporary entry for <dataSetUI>, just to get the data source wizard part going first.
From BIRT perspective, creating a data set design to associate with a data source is the ultimate objective of a custom ODA
designer (so that there are data to retrieve and report on).

Re: documentation, the oda.design.ui.dataSource extension point schema definition is documented in DTP on-line doc plugin,
distributed as part of the DTP SDK build. In Eclipse IDE, Help menu -> Help Contents. Select the "Data Tools" book, and
look under Reference -> Extension Points Reference .

Linda
Re: ODA Extension - how to access Data Source properties? [message #580917 is a reply to message #18997] Tue, 11 July 2006 19:23 Go to previous message
Eclipse UserFriend
Originally posted by: polesen.nordija.com

Hi Linda,

Thank you very much.
Downloaded the SDK plugin and found the docs you mentioned.

/Per

Linda Chan wrote:
>>> I've *not* provided custom implementations in the <dataSetUI> element under the
>>> "org.eclipse.datatools.connectivity.oda.design.ui.dataSource " extension. Is this strictly neccessary?
>
> Yes, it is required, as defined in the oda.design.ui.dataSource extension point schema definition.
> Otherwise, your plugin.xml extensions look fine.
>
> Missing the <dataSetUI> element, your extension is considered invalid or incomplete, and had triggered BIRT Data Source Wizard
> to go down a different code path (for backward compatibility)... and thus the exception.
> You might want to put in some temporary entry for <dataSetUI>, just to get the data source wizard part going first.
> From BIRT perspective, creating a data set design to associate with a data source is the ultimate objective of a custom ODA
> designer (so that there are data to retrieve and report on).
>
> Re: documentation, the oda.design.ui.dataSource extension point schema definition is documented in DTP on-line doc plugin,
> distributed as part of the DTP SDK build. In Eclipse IDE, Help menu -> Help Contents. Select the "Data Tools" book, and
> look under Reference -> Extension Points Reference .
>
> Linda
>
>
Previous Topic:postgres driver definitions?
Next Topic:postgres driver definitions?
Goto Forum:
  


Current Time: Fri Apr 19 10:57:20 GMT 2024

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

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

Back to the top