Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » CNF view activatation
CNF view activatation [message #488259] Sat, 26 September 2009 23:33 Go to next message
Greg Babcock is currently offline Greg Babcock
Messages: 53
Registered: July 2009
Member
I built a simple RCP application that uses the CNF to display a data model.
When a CNF node is double clicked an editor is opened and the focus is
changed to the editor. If select another node, or click anywhere in the CNF
viewer without first clicking in the active view the CNF view does not
become active. I tried the same thing in Package Explorer and it worked
correctly. Is there a listener that I need to add to fix this?

Thanks,

GB
Re: CNF view activatation [message #488262 is a reply to message #488259] Sun, 27 September 2009 01:59 Go to previous messageGo to next message
Francis Upton IV is currently offline Francis Upton IV
Messages: 472
Registered: July 2009
Location: Oakland, CA
Senior Member
As far as I know there is no other listener required for this. Can you say the version you are running and the platform?

Re: CNF view activatation [message #488506 is a reply to message #488262] Tue, 29 September 2009 00:48 Go to previous messageGo to next message
Greg Babcock is currently offline Greg Babcock
Messages: 53
Registered: July 2009
Member
I am running version 3.5 on Windows.


"Francis Upton" <francisu@ieee.org> wrote in message
news:h9mgu4$kbv$1@build.eclipse.org...
> As far as I know there is no other listener required for this. Can you
> say the version you are running and the platform?
Re: CNF view activatation [message #489046 is a reply to message #488506] Thu, 01 October 2009 11:10 Go to previous messageGo to next message
Mark Miller is currently offline Mark Miller
Messages: 5
Registered: July 2009
Junior Member
I have exactly the same problem. I am also on 3.5 but i also had this under ganymede.
This appears to happen under windows and linux.

The strange thing is that this only happens in an RCP and not in the eclipse application itself.

Any help would be greatly appreciated as this leads to a problem of the selection not becoming active and so a double click (which opens the editor using a command) fails saying that the command was not found (as i have an activeWhen defined which requires a selection).

All the best,

Mark

[Updated on: Thu, 01 October 2009 11:11]

Report message to a moderator

Re: CNF view activatation [message #489048 is a reply to message #489046] Thu, 01 October 2009 11:23 Go to previous messageGo to next message
Francis Upton IV is currently offline Francis Upton IV
Messages: 472
Registered: July 2009
Location: Oakland, CA
Senior Member
Please file a bug about this to platform/ui.

Re: CNF view activatation [message #489074 is a reply to message #489048] Thu, 01 October 2009 12:53 Go to previous messageGo to next message
Mark Miller is currently offline Mark Miller
Messages: 5
Registered: July 2009
Junior Member
I have finally figured this out.

If anyone else is interested the issue is with setFocus in editors. Editors inheriting from FormEditor with pages added extending from FormPage, set the focus to the pages scrolled form. This seems to cause problems.

Overriding the setFocus method in the subclassed FormEditor and explicitly delegating setFocus to the subclassed FormPage (which then sets the focus to an internal control) seems to get rid of the problem.

[Updated on: Thu, 01 October 2009 12:54]

Report message to a moderator

Re: CNF view activatation [message #489475 is a reply to message #489048] Sat, 03 October 2009 17:24 Go to previous message
Greg Babcock is currently offline Greg Babcock
Messages: 53
Registered: July 2009
Member
I have resolved this issue. I am new to RCP so I had stubbed out an editor
that consisted of only a Label. When I changed that to a Text the focus
worked as expected. The setFocus method must set focus to a component that
can accept focus.

GB



"Francis Upton" <francisu@ieee.org> wrote in message
news:ha23f1$hll$1@build.eclipse.org...
> Please file a bug about this to platform/ui.
Previous Topic:Sudden Abort of Application
Next Topic:Properties not displayed in property page
Goto Forum:
  


Current Time: Mon Sep 22 00:24:01 GMT 2014

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

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