Hi Dimiter,
Take a look at bug 172965
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=172965) to read about
how the mechanism works. You don't actually extend the action, since
the action calls a method on the IJpaPlatformUi. This method will be
implemented in a given platform to perform platform-specific DDL
Generation. That way everyone uses the same menu item to generate DDL,
but what happens after calling that action will depend on what has been
implemented in a given platform.
To get the ConnectionProfile, you will have the IJpaProject already,
simply call
jpaProject.connectionProfile();
This will return our wrapped ConnectionProfile object, which from there
you can access the DTP connection if needed.
Neil
Dimitrov, Dimiter wrote:
Hi Neil,
What do you mean when you report that DDL generation
mechanism is added? I saw that you have included DDL generate action in
plugin.xml of org.eclipse.jpt.ui plugin. Is it enough to extend action
org.eclipse.jpt.ui.internal.actions.GenerateDDLAction
as well as to create my specific
JPA platform, implementing within specific functionality?
Or I’m in confusion and there is
other way to create my own DDL generation action. Could you elaborate
the topic or tell me where I can read about the extension mechanism.
A have another question too – is
there convenient way to get connection from IJpaProject or from
IJpaPlatform? Could you give me an example with a simple code snippet?
Thank you in advance,
Dimiter
For the week of May 7th:
- Added a variety of code-completion support for Columns and
Table metadata(see bug 181471 for details)
- Added UI support for Column insertable/updatable. Also
cleaning up several UI issues
- Added new project config options: List/Discover Entities, Use
Server Library
- Added UI support for secondary tables
- Updated copyrights
- Added secondary table pk joinColumns support to the model
- Model support for UniqueConstraints in Tables
- Model support for UniqueConstraints in TableGenerators
- Added Secondary table joinColumn defaults and validation
- Added DDL Gen and Entity Gen extension mechanisms
- Added basic MapKey model support for 1-m and m-m mappings
- Added basic model support for IdClass
- Enhanced validation
http://wiki.eclipse.org/index.php/Dali_1.0M7_Plan
Neil
_______________________________________________
dali-dev mailing list
dali-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dali-dev
_______________________________________________
dali-dev mailing list
dali-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/dali-dev
|