Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Can't figure out why setEditable() doesn't work
Can't figure out why setEditable() doesn't work [message #159908] Fri, 21 November 2003 01:15 Go to next message
Eclipse UserFriend
Originally posted by: sma_r.hotmial.com

HI all,

I have asked this question so many times but all the solution and ideas
haev not yet worked the way they were suppose to.I have tried to debug it
or pinpoint what might be the reason for that it is not working,but
couldn't find it.

I like to lock/make my editor readonly in such away that for the duration
of teh condition the editor should stay locked or readonly and later on as
the condition changes the status of the editor changes also.

But the editor has to be locked/made reaonly after its creation not before.

I have used createpartControl to get hold of the SourceViewer.By that I
have called SetEditable(false) but I couldn't get the editor to be locked
or made readonly.
I have also used the following hack by Andrew that gets me the
sourceViewer but still setEditable() doesn't work.I have also tried to
call getTextWidget.setEditable(false) but no luck.

I like know why or how can I locate or find out why this method doesn't
work on my own created editor similar to javaEditor example extending
CompilationUnitEditor.

if (part instanceof CompilationUnitEditor) {
CompilationUnitEditor editor = (CompilationUnitEditor)part;
ITextViewer viewer =
(ITextViewer)editor.getAdapter(ITextOperationTarget.class);
}

I would really appreciate if anyone can help me out with this as it has
been very time since I have been trying to solve this.

Thanks

Syed
Re: Can't figure out why setEditable() doesn't work [message #159927 is a reply to message #159908] Fri, 21 November 2003 02:06 Go to previous message
Eclipse UserFriend
While going through newsgroup's prior questions I found out that there
were other programmers who were having the same problem.But if I use
getTextWidget().setEnabled(false),then I can get the editor to become
readonly.
What is the difference between both of these methods.

Thanks

Syed

Syed wrote:

> HI all,

> I have asked this question so many times but all the solution and ideas
> haev not yet worked the way they were suppose to.I have tried to debug it
> or pinpoint what might be the reason for that it is not working,but
> couldn't find it.

> I like to lock/make my editor readonly in such away that for the duration
> of teh condition the editor should stay locked or readonly and later on as
> the condition changes the status of the editor changes also.

> But the editor has to be locked/made reaonly after its creation not before.

> I have used createpartControl to get hold of the SourceViewer.By that I
> have called SetEditable(false) but I couldn't get the editor to be locked
> or made readonly.
> I have also used the following hack by Andrew that gets me the
> sourceViewer but still setEditable() doesn't work.I have also tried to
> call getTextWidget.setEditable(false) but no luck.

> I like know why or how can I locate or find out why this method doesn't
> work on my own created editor similar to javaEditor example extending
> CompilationUnitEditor.

> if (part instanceof CompilationUnitEditor) {
> CompilationUnitEditor editor = (CompilationUnitEditor)part;
> ITextViewer viewer =
> (ITextViewer)editor.getAdapter(ITextOperationTarget.class);
> }

> I would really appreciate if anyone can help me out with this as it has
> been very time since I have been trying to solve this.

> Thanks

> Syed
Previous Topic:Controlling Debug Classes
Next Topic:3.0M4 no longer running on Debian Sid
Goto Forum:
  


Current Time: Tue May 13 15:32:37 EDT 2025

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

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

Back to the top