Skip to main content



      Home
Home » Language IDEs » Java Development Tools (JDT) » Problem with EditTemplateDialog
Problem with EditTemplateDialog [message #258049] Mon, 12 January 2009 10:57 Go to next message
Eclipse UserFriend
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 #258077 is a reply to message #258049] Tue, 13 January 2009 03:30 Go to previous messageGo to next message
Eclipse UserFriend
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
> 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 Go to previous message
Eclipse UserFriend
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
Previous Topic:IPackageFragment's getCompilationUnit is buggy
Next Topic:How to stop java indexer working when lanunching PDE debugger?
Goto Forum:
  


Current Time: Wed Apr 30 04:29:39 EDT 2025

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

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

Back to the top