Home » Eclipse Projects » Dali » How to get started with building Dali?
How to get started with building Dali? [message #434824] |
Fri, 28 March 2008 22:07 |
Mike Yawn Messages: 50 Registered: July 2009 |
Member |
|
|
I've installed Dali and run through some simple examples.
I'm going to have a need to do some customizations. (Essentially, we
have our own implementation of a JPA provider that I want to use Dali as
a front-end for).
So I think the first thing I need to do is learn how to download the
Dali sources, build it, and get that running, so I've got a starting
point from which to begin making modifications.
I'm sure it's probably the same process as for getting set up to
contribute to any other Eclipse project, but I haven't done that yet, so
I need the basic info on accessing the cvs repository, setting up
workbench, etc. Any pointers to documents, tutorials, newsgroups,
etc. greatly appreciated.
As far as the Dali work, here are some of the things I'll be starting
off with. I'm sure there will be lots of questions. Anything that
looks generally useful I'd be happy to contribute back, and anything
that isn't I'll just keep part of our own development.
In no particular order:
- Need to have a 'Generate Interface' capability that works much like
the existing 'Generate Entities', except that it generates a
JPA-annotated interface rather than an annotated class.
- Since our implementation supports only a subset of the JPA
annotations, we would like to disable controls (mostly in JPA Details
view) for options we won't support. (I suspect that means changes to
the view, although perhaps there is a way to control some of this via model)
- - we would also want to change code completion suggestions so that
unsupported options aren't suggested
- We also have some non-standard annotations, or annotations with added
attributes, so we'd like to be able to generate these where appropriate.
So once I get the project set up, any help in locating the right places
for addressing these types of changes would be appreciated.
Thanks
Mike
|
|
|
Re: How to get started with building Dali? [message #434826 is a reply to message #434824] |
Sat, 29 March 2008 14:29 |
Karen Butzke Messages: 220 Registered: July 2009 |
Senior Member |
|
|
Hi Mike,
> So I think the first thing I need to do is learn how to download the
> Dali sources, build it, and get that running, so I've got a starting
> point from which to begin making modifications.
> I'm sure it's probably the same process as for getting set up to
> contribute to any other Eclipse project, but I haven't done that yet, so
> I need the basic info on accessing the cvs repository, setting up
> workbench, etc. Any pointers to documents, tutorials, newsgroups,
> etc. greatly appreciated.
http://wiki.eclipse.org/Dali_Project
http://wiki.eclipse.org/index.php/CVS_Howto
The CVS repository path is /cvsroot/webtools and then browse to
org.eclipse.jpa/components/jpa/plugins. Grab all of the plugins in that
folder and you will have the head code. This is probably your best option
if you are going to be contributing patches. There are plugins in the
tests folder as well. You will also need a target platform
(Preferences->Plugin Development->Target Platform) set to a recent WTP
build. At the moment I am targeting this ibuild :
http://download.eclipse.org/webtools/downloads/drops/R3.0/I- I20080321174820-20080321174820/
You could also just target that ibuild and not download the Dali plug-ins
in to your workspace, you really only need them if you want to contribute
patches, though it's probably easier to browse the code that way. It can
be difficult to keep current code in your workspace :). This is how we
consume the rest of WTP, we only have the Dali plugins in our workspaces
and grab other WTP plug-ins as needed to patch bugs.
I am running with Eclipse 3.4M5, I believe there was a compatibility issue
with seeing source code of the SDK builds, so we had to upgrade to that
milestone. And we haven't quite figured it out yet, but because of
p2(changes in installation) I have the feeling we will have to move up to
3.4M6 to be able to properly set target platforms. This is a lot of
information, things are changing so much right now. I would point you at
more documents, but most of these things we have just learned along the
way stumbling through eclipse development :) We still aren't always sure
how other groups develop for Eclipse!
> As far as the Dali work, here are some of the things I'll be starting
> off with. I'm sure there will be lots of questions. Anything that
> looks generally useful I'd be happy to contribute back, and anything
> that isn't I'll just keep part of our own development.
Contributions are of course appreciated!
> In no particular order:
> - Need to have a 'Generate Interface' capability that works much like
> the existing 'Generate Entities', except that it generates a
> JPA-annotated interface rather than an annotated class.
As of M6(and in current code), Dali will have provisional API that can be
found in any of the non-internal packages. You will want to look at our
org.eclipse.jpt.core.jpaPlatform and org.eclipse.jpt.ui.jpaPlatform
extension points. These provide you a way to implement your own platform
which will appear as an option in the JpaProject wizard. you will have to
implement the JpaPlatform and JpaPlatformUi interfaces (or extend our
internal implementations of these at your own risk :)) Replacing 'Generate
Entities' with your own action can be done by implementing
JpaPlatformUi.generateEntities(JpaProject, StructuredSelection).
> - Since our implementation supports only a subset of the JPA
> annotations, we would like to disable controls (mostly in JPA Details
> view) for options we won't support. (I suspect that means changes to
> the view, although perhaps there is a way to control some of this via model)
Again, this will be possible through implementation of JpaPlatform and
JpaPlatformUi where you can define the mappings that you support.
JpaPlatform is more defined and commented than JpaPlatformUi (too many
uncommented interfaces at the moment). And of course they are subject to
change since they are provisional, but that should probably help you out
if anything. We need all the feedback we can get before we commit to our
API.
It sounds like you will need to implement JpaPlatform.jpaFactory() with
your own JpaFactory so that you can replace some of our model objects with
your own. Also see JpaPlatform
buildJavaTypeMapping/buildJavaAttributeMapping methods, you would
implement these to only support the mappings of your platform.
In the UI you will be able to write your own MappingUiProvider
implementations to handle replacing/removing pieces of our UI.
> - - we would also want to change code completion suggestions so that
> unsupported options aren't suggested
Look at the implementations of
JavaJpaContextNode.javaCompletionProposals(int, Filter, CompilationUnit)
for how we do code completion. We currently only support this in Java,
but are planning to support it in orm.xml in a future release. Does your
implementation support an xml file or only annotations?
> - We also have some non-standard annotations, or annotations with added
> attributes, so we'd like to be able to generate these where appropriate.
This is similar to what I explained above.
> So once I get the project set up, any help in locating the right places
> for addressing these types of changes would be appreciated.
> Thanks
> Mike
I hope this at least gets you going in the right direction. Good luck!
I'm sure we'll be hearing from you soon :)
|
|
|
Re: How to get started with building Dali? [message #434829 is a reply to message #434826] |
Mon, 31 March 2008 16:32 |
Mike Yawn Messages: 50 Registered: July 2009 |
Member |
|
|
Karen Butzke wrote:
>> - - we would also want to change code completion suggestions so that
>> unsupported options aren't suggested
>
> Look at the implementations of
> JavaJpaContextNode.javaCompletionProposals(int, Filter, CompilationUnit)
> for how we do code completion. We currently only support this in Java,
> but are planning to support it in orm.xml in a future release. Does your
> implementation support an xml file or only annotations?
We're annotations only.
>
> I hope this at least gets you going in the right direction. Good luck!
> I'm sure we'll be hearing from you soon :)
>
Thanks for the detailed write-up, that is definitely getting me moving
in the right direction.
I've noticed that when I check out all of the jpa/jpt projects at the
location you suggest, I'm getting some compilation errors due to
unresolved external references -- a few I noticed are imports for
org.eclipse.datatools.connectivity and org.eclipse.jst.j2ee.project.
I'm currently running Eclipse 3.3.1.1, will I need to be on a 3.4
version in order to build these packages, or do I just need to download
some additional plug-ins?
(Which brings up the follow-up question: if I build the Dali plug-ins
from the current HEAD, will they need to be deployed in 3.4 or will they
be compatible with 3.3? I don't think our internal developer community
has started evaluating 3.4 yet, I may need to try to accelerate that
process).
Thanks,
Mike
|
|
|
Re: How to get started with building Dali? [message #434831 is a reply to message #434829] |
Mon, 31 March 2008 22:25 |
Mike Yawn Messages: 50 Registered: July 2009 |
Member |
|
|
I think I found most of my answers just by reading more carefully and
then trying a few things.
- I've successfully downloaded and built the Dali plug-ins.
- I've defined a plugin that implements core.jpaPlatform and
ui.jpaPlatform. When I run the JPA Wizard, I see my platform as a
selection.
So I guess from this point it's merely implementation details :-D.
I am still wondering about the backward compatibility of the current
Dali plug-in to an Eclipse 3.3 environment -- will that be supported (or
is it likely to work, even if not supported?)
Mike
Mike Yawn wrote:
> Karen Butzke wrote:
> >> - - we would also want to change code completion suggestions so that
>>> unsupported options aren't suggested
>>
>> Look at the implementations of
>> JavaJpaContextNode.javaCompletionProposals(int, Filter,
>> CompilationUnit) for how we do code completion. We currently only
>> support this in Java, but are planning to support it in orm.xml in a
>> future release. Does your implementation support an xml file or only
>> annotations?
>
> We're annotations only.
>
>>
>> I hope this at least gets you going in the right direction. Good
>> luck! I'm sure we'll be hearing from you soon :)
>>
>
> Thanks for the detailed write-up, that is definitely getting me moving
> in the right direction.
>
> I've noticed that when I check out all of the jpa/jpt projects at the
> location you suggest, I'm getting some compilation errors due to
> unresolved external references -- a few I noticed are imports for
> org.eclipse.datatools.connectivity and org.eclipse.jst.j2ee.project.
>
> I'm currently running Eclipse 3.3.1.1, will I need to be on a 3.4
> version in order to build these packages, or do I just need to download
> some additional plug-ins?
>
> (Which brings up the follow-up question: if I build the Dali plug-ins
> from the current HEAD, will they need to be deployed in 3.4 or will they
> be compatible with 3.3? I don't think our internal developer community
> has started evaluating 3.4 yet, I may need to try to accelerate that
> process).
>
>
> Thanks,
> Mike
>
|
|
| | |
Re: How to get started with building Dali? [message #609892 is a reply to message #434824] |
Sat, 29 March 2008 14:29 |
Karen Butzke Messages: 220 Registered: July 2009 |
Senior Member |
|
|
Hi Mike,
> So I think the first thing I need to do is learn how to download the
> Dali sources, build it, and get that running, so I've got a starting
> point from which to begin making modifications.
> I'm sure it's probably the same process as for getting set up to
> contribute to any other Eclipse project, but I haven't done that yet, so
> I need the basic info on accessing the cvs repository, setting up
> workbench, etc. Any pointers to documents, tutorials, newsgroups,
> etc. greatly appreciated.
http://wiki.eclipse.org/Dali_Project
http://wiki.eclipse.org/index.php/CVS_Howto
The CVS repository path is /cvsroot/webtools and then browse to
org.eclipse.jpa/components/jpa/plugins. Grab all of the plugins in that
folder and you will have the head code. This is probably your best option
if you are going to be contributing patches. There are plugins in the
tests folder as well. You will also need a target platform
(Preferences->Plugin Development->Target Platform) set to a recent WTP
build. At the moment I am targeting this ibuild :
http://download.eclipse.org/webtools/downloads/drops/R3.0/I- I20080321174820-20080321174820/
You could also just target that ibuild and not download the Dali plug-ins
in to your workspace, you really only need them if you want to contribute
patches, though it's probably easier to browse the code that way. It can
be difficult to keep current code in your workspace :). This is how we
consume the rest of WTP, we only have the Dali plugins in our workspaces
and grab other WTP plug-ins as needed to patch bugs.
I am running with Eclipse 3.4M5, I believe there was a compatibility issue
with seeing source code of the SDK builds, so we had to upgrade to that
milestone. And we haven't quite figured it out yet, but because of
p2(changes in installation) I have the feeling we will have to move up to
3.4M6 to be able to properly set target platforms. This is a lot of
information, things are changing so much right now. I would point you at
more documents, but most of these things we have just learned along the
way stumbling through eclipse development :) We still aren't always sure
how other groups develop for Eclipse!
> As far as the Dali work, here are some of the things I'll be starting
> off with. I'm sure there will be lots of questions. Anything that
> looks generally useful I'd be happy to contribute back, and anything
> that isn't I'll just keep part of our own development.
Contributions are of course appreciated!
> In no particular order:
> - Need to have a 'Generate Interface' capability that works much like
> the existing 'Generate Entities', except that it generates a
> JPA-annotated interface rather than an annotated class.
As of M6(and in current code), Dali will have provisional API that can be
found in any of the non-internal packages. You will want to look at our
org.eclipse.jpt.core.jpaPlatform and org.eclipse.jpt.ui.jpaPlatform
extension points. These provide you a way to implement your own platform
which will appear as an option in the JpaProject wizard. you will have to
implement the JpaPlatform and JpaPlatformUi interfaces (or extend our
internal implementations of these at your own risk :)) Replacing 'Generate
Entities' with your own action can be done by implementing
JpaPlatformUi.generateEntities(JpaProject, StructuredSelection).
> - Since our implementation supports only a subset of the JPA
> annotations, we would like to disable controls (mostly in JPA Details
> view) for options we won't support. (I suspect that means changes to
> the view, although perhaps there is a way to control some of this via model)
Again, this will be possible through implementation of JpaPlatform and
JpaPlatformUi where you can define the mappings that you support.
JpaPlatform is more defined and commented than JpaPlatformUi (too many
uncommented interfaces at the moment). And of course they are subject to
change since they are provisional, but that should probably help you out
if anything. We need all the feedback we can get before we commit to our
API.
It sounds like you will need to implement JpaPlatform.jpaFactory() with
your own JpaFactory so that you can replace some of our model objects with
your own. Also see JpaPlatform
buildJavaTypeMapping/buildJavaAttributeMapping methods, you would
implement these to only support the mappings of your platform.
In the UI you will be able to write your own MappingUiProvider
implementations to handle replacing/removing pieces of our UI.
> - - we would also want to change code completion suggestions so that
> unsupported options aren't suggested
Look at the implementations of
JavaJpaContextNode.javaCompletionProposals(int, Filter, CompilationUnit)
for how we do code completion. We currently only support this in Java,
but are planning to support it in orm.xml in a future release. Does your
implementation support an xml file or only annotations?
> - We also have some non-standard annotations, or annotations with added
> attributes, so we'd like to be able to generate these where appropriate.
This is similar to what I explained above.
> So once I get the project set up, any help in locating the right places
> for addressing these types of changes would be appreciated.
> Thanks
> Mike
I hope this at least gets you going in the right direction. Good luck!
I'm sure we'll be hearing from you soon :)
|
|
|
Re: How to get started with building Dali? [message #609893 is a reply to message #434826] |
Mon, 31 March 2008 16:32 |
Mike Yawn Messages: 50 Registered: July 2009 |
Member |
|
|
Karen Butzke wrote:
>> - - we would also want to change code completion suggestions so that
>> unsupported options aren't suggested
>
> Look at the implementations of
> JavaJpaContextNode.javaCompletionProposals(int, Filter, CompilationUnit)
> for how we do code completion. We currently only support this in Java,
> but are planning to support it in orm.xml in a future release. Does your
> implementation support an xml file or only annotations?
We're annotations only.
>
> I hope this at least gets you going in the right direction. Good luck!
> I'm sure we'll be hearing from you soon :)
>
Thanks for the detailed write-up, that is definitely getting me moving
in the right direction.
I've noticed that when I check out all of the jpa/jpt projects at the
location you suggest, I'm getting some compilation errors due to
unresolved external references -- a few I noticed are imports for
org.eclipse.datatools.connectivity and org.eclipse.jst.j2ee.project.
I'm currently running Eclipse 3.3.1.1, will I need to be on a 3.4
version in order to build these packages, or do I just need to download
some additional plug-ins?
(Which brings up the follow-up question: if I build the Dali plug-ins
from the current HEAD, will they need to be deployed in 3.4 or will they
be compatible with 3.3? I don't think our internal developer community
has started evaluating 3.4 yet, I may need to try to accelerate that
process).
Thanks,
Mike
|
|
|
Re: How to get started with building Dali? [message #609894 is a reply to message #434829] |
Mon, 31 March 2008 22:25 |
Mike Yawn Messages: 50 Registered: July 2009 |
Member |
|
|
I think I found most of my answers just by reading more carefully and
then trying a few things.
- I've successfully downloaded and built the Dali plug-ins.
- I've defined a plugin that implements core.jpaPlatform and
ui.jpaPlatform. When I run the JPA Wizard, I see my platform as a
selection.
So I guess from this point it's merely implementation details :-D.
I am still wondering about the backward compatibility of the current
Dali plug-in to an Eclipse 3.3 environment -- will that be supported (or
is it likely to work, even if not supported?)
Mike
Mike Yawn wrote:
> Karen Butzke wrote:
> >> - - we would also want to change code completion suggestions so that
>>> unsupported options aren't suggested
>>
>> Look at the implementations of
>> JavaJpaContextNode.javaCompletionProposals(int, Filter,
>> CompilationUnit) for how we do code completion. We currently only
>> support this in Java, but are planning to support it in orm.xml in a
>> future release. Does your implementation support an xml file or only
>> annotations?
>
> We're annotations only.
>
>>
>> I hope this at least gets you going in the right direction. Good
>> luck! I'm sure we'll be hearing from you soon :)
>>
>
> Thanks for the detailed write-up, that is definitely getting me moving
> in the right direction.
>
> I've noticed that when I check out all of the jpa/jpt projects at the
> location you suggest, I'm getting some compilation errors due to
> unresolved external references -- a few I noticed are imports for
> org.eclipse.datatools.connectivity and org.eclipse.jst.j2ee.project.
>
> I'm currently running Eclipse 3.3.1.1, will I need to be on a 3.4
> version in order to build these packages, or do I just need to download
> some additional plug-ins?
>
> (Which brings up the follow-up question: if I build the Dali plug-ins
> from the current HEAD, will they need to be deployed in 3.4 or will they
> be compatible with 3.3? I don't think our internal developer community
> has started evaluating 3.4 yet, I may need to try to accelerate that
> process).
>
>
> Thanks,
> Mike
>
|
|
| | |
Goto Forum:
Current Time: Thu Apr 25 10:10:48 GMT 2024
Powered by FUDForum. Page generated in 0.03153 seconds
|