Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Lock Lines in TextEditor
Lock Lines in TextEditor [message #663657] Wed, 06 April 2011 01:49 Go to next message
Eclipse UserFriend
Hello,
I want to lock lines in an text editor. The text editor is the standard java editor (CompilationUnitEditor).

I want the user just to be able to write for example code in a method. Everything else in the editor should be locken. The user should really just be able to code the method body, nothing else.

I've seen editors locking lines, but I do not want to overwrite the hole javaeditor.
Is there any possibility to block lines just via the IEditorPart object of the editor?

Thanks in advance
Alex
Re: Lock Lines in TextEditor [message #663677 is a reply to message #663657] Wed, 06 April 2011 03:38 Go to previous messageGo to next message
Eclipse UserFriend
On 06.04.2011 07:49, Alexander Mack wrote:
> Hello,
> I want to lock lines in an text editor. The text editor is the
> standard java editor (CompilationUnitEditor).
>
> I want the user just to be able to write for example code in a method.
> Everything else in the editor should be locken. The user should really
> just be able to code the method body, nothing else.
>
> I've seen editors locking lines, but I do not want to overwrite the
> hole javaeditor.
> Is there any possibility to block lines just via the IEditorPart
> object of the editor?
No.

Dani
>
> Thanks in advance
> Alex
Re: Lock Lines in TextEditor [message #663855 is a reply to message #663657] Wed, 06 April 2011 12:09 Go to previous messageGo to next message
Eclipse UserFriend
Oh I got it implicit by adding a IEventConsumer to the TextViewer.

Within the IEVentConsumer, I set the event.doit = false if I am within a region which I do not want to be enabled for editing.

Thanks anyway for your help!

Kind regards
Alex

[Updated on: Wed, 06 April 2011 12:10] by Moderator

Re: Lock Lines in TextEditor [message #764827 is a reply to message #663855] Mon, 12 December 2011 18:03 Go to previous message
Eclipse UserFriend
Dear Alex,

I have the same problem with my Editor.

Can you please explain, where you added the listener, and how you found out the current partition, where the event occured?

Thanks!
Previous Topic:Creating problem markers referring to files outside workspace
Next Topic:System property https.proxyPort is not set but should be 3128
Goto Forum:
  


Current Time: Sat Aug 30 09:04:55 EDT 2025

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

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

Back to the top