Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [dali-dev] Question about reusing JPA details view object


Hi Neil,

Thanks for pointing out the classes, really appreciate it.

As I am not familiar with the JPA model, I need more your help. You mentioned to add a listener to the model, is it "addPropertyChangeListener" API? I tried to add a PropertyChangeListener to a "JpaStructureNode", but the listener didn't get notified after the change was made to the field, if the JpaNode is not the correct location, where should I start from? Thanks for your time.

Thanks.

Benson Ning
IBM Toronto Lab
8200 Warden Ave. Markam, Ontario L6G 1C7
Phone: 905-413-3606
Email: bensonn@xxxxxxxxxx



Neil Hauge <neil.hauge@xxxxxxxxxx>
Sent by: dali-dev-bounces@xxxxxxxxxxx

10/03/2008 05:51 PM

Please respond to
"General Dali EJB ORM developer discussion." <dali-dev@xxxxxxxxxxx>

To
"General Dali EJB ORM developer discussion." <dali-dev@xxxxxxxxxxx>
cc
Subject
Re: [dali-dev] Question about reusing JPA details view object





Benson,

I'll try to take a stab at some of your questions.

>>can I create a new "Details View instance" and put it onto this UI composite?


I don't think so.  You could try some things out, but since the Details View is a ViewPart, I don't know that you could just drop it into a composite somewhere.

>>is there a way for me to add a listener to the controls from the view to monitor all the changes?

I'm not sure why you would want to listen to the UI instead of listening to our model for changes.  The model would be a better place to listen for a great number of reasons.  I suppose you could add listeners to the UI controls externally, but i would not want to prescribe a method for this.  The Details UI interacts with our Model API, using PropertyValueModels to manage property access and change notification in a pluggable fashion.  You could re-implement the model, and in doing so deal with the UI changes in any way you see fit.  You could also take a look at our PropertyValueModels for some ideas I suppose.

>>if the view is using the working copy of "
CompilationUnit" for updating the Java model, is there a way I can get this working copy?

If you take a look at our class org.eclipse.jpt.core.internal.utility.jdt.JDTMember, you will see how we and how you can get the working copy in the edit related code.


Neil


Benson Ning wrote:


Hi Neil,


Thanks for your reply. I am interested in the "Details View content".


For example, If I have a Java resource, such as IFile, and a UI composite (SWT widget), can I create a new "Details View instance" and put it onto this UI composite? If somehow I can do that, then back to my original questions, since this view instance contains some UI controls (e.g. for @Entity, view contains "Name" - combox box, "Primary Key Class" - text field with Browse button etc.), is there a way for me to add a listener to the controls from the view to monitor all the changes? and another one is if the view is using the working copy of "
CompilationUnit" for updating the Java model, is there a way I can get this working copy? Thanks for your help.

Thanks.

Benson Ning
IBM Toronto Lab
8200 Warden Ave. Markam, Ontario L6G 1C7
Phone: 905-413-3606
Email:
bensonn@xxxxxxxxxx

Neil Hauge <neil.hauge@xxxxxxxxxx>
Sent by:
dali-dev-bounces@xxxxxxxxxxx

10/02/2008 03:53 PM

Please respond to
"General Dali EJB ORM developer discussion."
<dali-dev@xxxxxxxxxxx>


To
"General Dali EJB ORM developer discussion." <dali-dev@xxxxxxxxxxx>
cc
Subject
Re: [dali-dev] Question about reusing JPA details view object







Benson,

I'm not sure I understand the context of your question.  Are you interested in the Details View concept, or the specific content of the view?  Another way to say it would be, are you interested specifically in JPA related content, or just the details view concept of editing Java source?

Neil

Benson Ning wrote:


Hi,


I am thinking to reuse the JPA details view object to some other place (for expamle, I have a Java IFile, put the object to a composite), I have following questions, really appreciate the help


1. Is there a way I can add a listener to the view object in order to get the notification whenever the UI (e.g. field, checkbox ...) is changed?

2. Is there a way I can get the Java model object ("
CompilationUnit") wihic the view is working on?

Thanks.

Benson Ning
IBM Toronto Lab
8200 Warden Ave. Markam, Ontario L6G 1C7
Phone: 905-413-3606
Email:
bensonn@xxxxxxxxxx



_______________________________________________
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




_______________________________________________
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


Back to the top