CDT CEditor typing preferences [message #202724] |
Thu, 11 October 2007 00:27  |
Eclipse User |
|
|
|
have created an multipage editor plugin with page 1 being object of
CEditor.
When i change the source coloring using C/C++ Preferences, i can see that
my editor takes the new colors. This means, my editor is able to taks
changes from C/C++ Preferences.
But i have an issue with C/C++ typing preferences.
Though all the items in C/C++ typing preferences are enabled, i am not
able to see the effect in my editor.
In C/C++ editor, if i type main() { and press enter key, it adds a closing
bracket } on the next line.
But in my editor, this does not have any effect.
When the color preferences are taking effect in my editor, what is the
issue with the typing preferences?
I spent lot of time debugging as well as searching for some inputs on the
net. But i did not see any useful information.
I just happened to see your article and thought i can check with you.
Please advise me.
|
|
|
Re: CDT CEditor typing preferences [message #202765 is a reply to message #202724] |
Thu, 11 October 2007 04:39   |
Eclipse User |
|
|
|
Raghavendra wrote:
> have created an multipage editor plugin with page 1 being object of
> CEditor.
> When i change the source coloring using C/C++ Preferences, i can see
> that my editor takes the new colors. This means, my editor is able to
> taks changes from C/C++ Preferences.
> But i have an issue with C/C++ typing preferences.
> Though all the items in C/C++ typing preferences are enabled, i am not
> able to see the effect in my editor.
> In C/C++ editor, if i type main() { and press enter key, it adds a
> closing bracket } on the next line.
> But in my editor, this does not have any effect.
> When the color preferences are taking effect in my editor, what is the
> issue with the typing preferences?
> I spent lot of time debugging as well as searching for some inputs on
> the net. But i did not see any useful information.
> I just happened to see your article and thought i can check with you.
> Please advise me.
>
>
Do you reuse the CEditor without changes?
I have no experience with embedding a text editor in a multi-page
editor, but I believe that it does not work out-of-the box.
Most of the editor features (including the auto edit features) are
configured by the CSourceViewerConfiguration class.
Maybe this gives you a first starting point.
--
Anton Leherbauer
Wind River CDT Team, Austria
|
|
|
|
Re: CDT CEditor typing preferences [message #202844 is a reply to message #202780] |
Fri, 12 October 2007 04:38  |
Eclipse User |
|
|
|
Raghavendra wrote:
> Hello Anton,
> Thanks for your time.
> I use this without any changes.
>
> In the createPages method, i use the code below:
>
> c_Editor = new CEditor(); // c_Editor is of type TextEditor
> int index = addPage(c_Editor, getEditorInput());
> setPageText(index,tabName);
> I even tried to change c_Editor to type CEditor. Even this does not work
> for me.
>
> Thanks and regards
> Raghavendra.
>
I suppose you need to run it in the debugger.
I'd start putting a breakpoint at BracketInserter.verifyKey() to see
what keeps it from inserting the closing brackets.
--
Anton Leherbauer
Wind River CDT Team, Austria
|
|
|
Powered by
FUDForum. Page generated in 0.04690 seconds