protecting regions of java code from editing [message #181341] |
Thu, 07 October 2004 09:08 |
Eclipse User |
|
|
|
Originally posted by: edoardoATenigmatecDOTnet.no.spam
Hi
how could I prevent some "parts" of a java source from being
edited/changed while leaving the rest of the file normally editable ??
TIA,
Edo
PS - I had defining a custom annotation and a custom marker,
and then lattaching listsners to the sourceviewer to set doit=false to
verify events.
this only stops some typing in the java editor, while other actions (eg
text move/up and down) are still doable and "screw" the source.
So I am looking at some "veto" coming frm the Document or ... the Java
Model/Java DOM/AST ?
|
|
|
|
Re: protecting regions of java code from editing [message #181365 is a reply to message #181352] |
Thu, 07 October 2004 10:13 |
Eclipse User |
|
|
|
Originally posted by: edoardoATenigmatecDOTnet.no.spam
Tom,
(don't know how to get to that thread using the hyperlink you posted,
anyway)
that was a thread I started some time ago and I thank you for your answer.
The problem I have is that there are lots of "actions" (*)
that do not fire VerifyEvent event and so I can't block them.
I must also worry about refactorings - as my source would be changed
even if there is no editor open on it!!
this is why I am tring to block these changes at a different level.
any ideas (from anyone in the community) ?
Edo
(*)e.g. cut (this may be a bug I submitted in bugzilla),
move selected lines up/down etc
refactorings!
Tom Eicher wrote:
> See the thread at
>
> news://news.eclipse.org:119/cj1ici$cng$1@eclipse.org
>
> -tom
>
> Edoardo Comar wrote:
>
>> Hi
>>
>> how could I prevent some "parts" of a java source from being
>> edited/changed while leaving the rest of the file normally editable ??
>>
>> TIA,
>> Edo
>>
>> PS - I had defining a custom annotation and a custom marker,
>> and then lattaching listsners to the sourceviewer to set doit=false to
>> verify events.
>> this only stops some typing in the java editor, while other actions
>> (eg text move/up and down) are still doable and "screw" the source.
>>
>> So I am looking at some "veto" coming frm the Document or ... the Java
>> Model/Java DOM/AST ?
|
|
|
|
Powered by
FUDForum. Page generated in 0.02800 seconds