Problem with EditTemplateDialog [message #258049] |
Mon, 12 January 2009 10:57  |
Eclipse User |
|
|
|
Originally posted by: alamothe.ptt.yu
Hi,
I need to display java source in a dialog, let user edit it and also use
content assist. I copied the source of
org.eclipse.jdt.internal.ui.preferences.EditTemplateDialog and it works fine
except the following (this is also a problem with the original dialog).
Ctrl+Space activates content assist even when the source viewer doesn't have
focus. Also, Ctrl+Z does undo in the source viewer even when another text
field is focused. The problem is obviously due to this:
Expression expression = new
ActiveShellExpression(sourceViewer.getControl().getShell());
I'm figuring a way to fix this, any help is appreciated. Meanwhile, should I
submit a bug? You can check it yourself, go to window / preferences / java /
editor / templates / edit and press ctrl+space when name text field is
selected.
Thanks in advance
|
|
|
|
Re: Problem with EditTemplateDialog [message #258088 is a reply to message #258077] |
Tue, 13 January 2009 13:45  |
Eclipse User |
|
|
|
Originally posted by: alamothe.ptt.yu
Daniel Megert wrote:
> Nikola Mihajlovic wrote:
>> Hi,
>>
>> I need to display java source in a dialog, let user edit it and also
>> use content assist. I copied the source of
>> org.eclipse.jdt.internal.ui.preferences.EditTemplateDialog and it
>> works fine except the following (this is also a problem with the
>> original dialog). Ctrl+Space activates content assist even when the
>> source viewer doesn't have focus. Also, Ctrl+Z does undo in the
>> source viewer even when another text field is focused. The problem
>> is obviously due to this: Expression expression = new
>> ActiveShellExpression(sourceViewer.getControl().getShell());
>>
>> I'm figuring a way to fix this, any help is appreciated. Meanwhile,
>> should I submit a bug?
> I filed https://bugs.eclipse.org/bugs/show_bug.cgi?id=260816 for you.
>
> Dani
Thanks Dani, I didn't know if the bug had already existed. This could be
fixed by activating / deactivating the handler from a focus listener, this
is the approach I found in org.eclipse.ui.contentassist.ContentAssistHandler
|
|
|
Powered by
FUDForum. Page generated in 0.04300 seconds