Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Visual Editor (VE) » ComponentAdded event not being received during design time?
ComponentAdded event not being received during design time? [message #94313] Fri, 17 June 2005 15:11 Go to next message
Eclipse UserFriend
Originally posted by: no.ddress.here

VE1.1M2

Thought this was working before.

My bean is a JPanel extension. During design time, I need to take
certain actions whenever a component is dropped on or removed from my
bean/JPanel. I am adding a container event listener
(addContainerListener) to the JPanel, but it is not receiving any event
calls when components are added or removed.

The JTestPanel2 test case earlier provided has this code in the
JTestPanel2.java file.

Is VE not generating container events?

Thanks,
Gerald
Re: ComponentAdded event not being received during design time? [message #94439 is a reply to message #94313] Mon, 20 June 2005 09:13 Go to previous messageGo to next message
Joe Winchester is currently offline Joe WinchesterFriend
Messages: 496
Registered: July 2009
Senior Member
Hi Gerald,

> My bean is a JPanel extension. During design time, I need to take
> certain actions whenever a component is dropped on or removed from my
> bean/JPanel. I am adding a container event listener
> (addContainerListener) to the JPanel, but it is not receiving any event
> calls when components are added or removed.

What occurs when you drop something is two steps. First it gets added
to the IDE's EMF model of the class and the bean proxy gets notified
which is responsible for mediating between the IDE and the target VM.
The class that you should look at is
org.eclipse.ve.internal.jfc.core.ContainerProxyAdapter. This uses the
method addComponentWithCosntraint(...) to build up an expression that is
executed on the target VM. A helper class
org.eclipse.ve.internal.jfc.vm.ContainerManager is used that receives
the expression and does the actual adding of beans.

Things did change in this area quite a bit (Rich did the work so he'd be
able to help more with the details) but this was all related to
performance where requests between the two VMs are batched up to reduce
latency and the ContainerManager class is new. However I can't think
why this would have stopped any event firing from occuring. It is
possible you might need to put a debugger on the target VM - if you look
in the help there are instructions on how to put a remote debugger onto
it at "Using the visual editor for Java/Editing Java in the Visual
Editor/Testing and debugging in the visual editor/Advanced options for
debugging JavaBeans". This should let you put breakpoints on
ContainerManager and then step into the actual JFC code that does the
firing of the event.

Best regards,

Joe Winchester
Re: ComponentAdded event not being received during design time? [message #94840 is a reply to message #94439] Fri, 24 June 2005 21:58 Go to previous message
Eclipse UserFriend
Originally posted by: no.ddress.here

I can now confirm that the container listener in the bean is not
receiving component added or removed events. Just not happening. A bug
report has been opened:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=101566

Even with your help below, I have not been able to figure out the
problem with VE.

This *appears* to be the last stumbling block to a first release of my
JGoodies FormLayout bean for VE. Without being able to receive these
events, I cannot monitor component deletes or implement DnD on the bean
container.

Any idea what it will take to fix this problem and where it might stand
in the priority queue?

Thanks,
Gerald


In article <d961ch$mr4$1@news.eclipse.org>, winchest@uk.ibm.com says...
> Hi Gerald,
>
> > My bean is a JPanel extension. During design time, I need to take
> > certain actions whenever a component is dropped on or removed from my
> > bean/JPanel. I am adding a container event listener
> > (addContainerListener) to the JPanel, but it is not receiving any event
> > calls when components are added or removed.
>
> What occurs when you drop something is two steps. First it gets added
> to the IDE's EMF model of the class and the bean proxy gets notified
> which is responsible for mediating between the IDE and the target VM.
> The class that you should look at is
> org.eclipse.ve.internal.jfc.core.ContainerProxyAdapter. This uses the
> method addComponentWithCosntraint(...) to build up an expression that is
> executed on the target VM. A helper class
> org.eclipse.ve.internal.jfc.vm.ContainerManager is used that receives
> the expression and does the actual adding of beans.
>
> Things did change in this area quite a bit (Rich did the work so he'd be
> able to help more with the details) but this was all related to
> performance where requests between the two VMs are batched up to reduce
> latency and the ContainerManager class is new. However I can't think
> why this would have stopped any event firing from occuring. It is
> possible you might need to put a debugger on the target VM - if you look
> in the help there are instructions on how to put a remote debugger onto
> it at "Using the visual editor for Java/Editing Java in the Visual
> Editor/Testing and debugging in the visual editor/Advanced options for
> debugging JavaBeans". This should let you put breakpoints on
> ContainerManager and then step into the actual JFC code that does the
> firing of the event.
>
> Best regards,
>
> Joe Winchester
>
Re: ComponentAdded event not being received during design time? [message #607996 is a reply to message #94313] Mon, 20 June 2005 09:13 Go to previous message
Joe Winchester is currently offline Joe WinchesterFriend
Messages: 496
Registered: July 2009
Senior Member
Hi Gerald,

> My bean is a JPanel extension. During design time, I need to take
> certain actions whenever a component is dropped on or removed from my
> bean/JPanel. I am adding a container event listener
> (addContainerListener) to the JPanel, but it is not receiving any event
> calls when components are added or removed.

What occurs when you drop something is two steps. First it gets added
to the IDE's EMF model of the class and the bean proxy gets notified
which is responsible for mediating between the IDE and the target VM.
The class that you should look at is
org.eclipse.ve.internal.jfc.core.ContainerProxyAdapter. This uses the
method addComponentWithCosntraint(...) to build up an expression that is
executed on the target VM. A helper class
org.eclipse.ve.internal.jfc.vm.ContainerManager is used that receives
the expression and does the actual adding of beans.

Things did change in this area quite a bit (Rich did the work so he'd be
able to help more with the details) but this was all related to
performance where requests between the two VMs are batched up to reduce
latency and the ContainerManager class is new. However I can't think
why this would have stopped any event firing from occuring. It is
possible you might need to put a debugger on the target VM - if you look
in the help there are instructions on how to put a remote debugger onto
it at "Using the visual editor for Java/Editing Java in the Visual
Editor/Testing and debugging in the visual editor/Advanced options for
debugging JavaBeans". This should let you put breakpoints on
ContainerManager and then step into the actual JFC code that does the
firing of the event.

Best regards,

Joe Winchester
Re: ComponentAdded event not being received during design time? [message #608071 is a reply to message #94439] Fri, 24 June 2005 21:58 Go to previous message
Gerald Rosenberg is currently offline Gerald RosenbergFriend
Messages: 106
Registered: July 2009
Senior Member
I can now confirm that the container listener in the bean is not
receiving component added or removed events. Just not happening. A bug
report has been opened:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=101566

Even with your help below, I have not been able to figure out the
problem with VE.

This *appears* to be the last stumbling block to a first release of my
JGoodies FormLayout bean for VE. Without being able to receive these
events, I cannot monitor component deletes or implement DnD on the bean
container.

Any idea what it will take to fix this problem and where it might stand
in the priority queue?

Thanks,
Gerald


In article <d961ch$mr4$1@news.eclipse.org>, winchest@uk.ibm.com says...
> Hi Gerald,
>
> > My bean is a JPanel extension. During design time, I need to take
> > certain actions whenever a component is dropped on or removed from my
> > bean/JPanel. I am adding a container event listener
> > (addContainerListener) to the JPanel, but it is not receiving any event
> > calls when components are added or removed.
>
> What occurs when you drop something is two steps. First it gets added
> to the IDE's EMF model of the class and the bean proxy gets notified
> which is responsible for mediating between the IDE and the target VM.
> The class that you should look at is
> org.eclipse.ve.internal.jfc.core.ContainerProxyAdapter. This uses the
> method addComponentWithCosntraint(...) to build up an expression that is
> executed on the target VM. A helper class
> org.eclipse.ve.internal.jfc.vm.ContainerManager is used that receives
> the expression and does the actual adding of beans.
>
> Things did change in this area quite a bit (Rich did the work so he'd be
> able to help more with the details) but this was all related to
> performance where requests between the two VMs are batched up to reduce
> latency and the ContainerManager class is new. However I can't think
> why this would have stopped any event firing from occuring. It is
> possible you might need to put a debugger on the target VM - if you look
> in the help there are instructions on how to put a remote debugger onto
> it at "Using the visual editor for Java/Editing Java in the Visual
> Editor/Testing and debugging in the visual editor/Advanced options for
> debugging JavaBeans". This should let you put breakpoints on
> ContainerManager and then step into the actual JFC code that does the
> firing of the event.
>
> Best regards,
>
> Joe Winchester
>
Previous Topic:Does VE work with 3.1RC3?
Next Topic:is ve parsing deterministic?
Goto Forum:
  


Current Time: Thu Apr 25 20:29:27 GMT 2024

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

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

Back to the top