[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools] (One more thing) Re: How to disable a TextEditor

I was going through the tutorial of Eclipse and I found out that when the
editor is active then the view is disable and vice versa,so there has to
be some method that does that.

Syed


 Syed wrote:

> I have tried to get hold of the protected getSourceViewer() method but get
> a NullpointerException for no reason,I was told about this method earlier
> on teh newsgroup,I have tried to debug it but for some reason the Debugger
> hangs,So I am not sure how to address this,secondly I was thinking is
> there nay method like setFocus() that does the opposite,so that I can do
> teh oposite of setfocus on the editor and then work on the file from
> behind.I apprecaite your reply.Looking forward for pointers.
> Thanks

> Syed
> Alex Chapiro wrote:

> > Seems like for your case there is no any other good way than to get access
> > to AbstractTextEditor protected method getSourceViewer() and then use
> > setEditable() method of ITextViewer method.
> > Doesn't sounds pretty good, by the way. But as to me,  I don't know any
> > other way to do it still keeping the ability to modify file from the
> > program.

> > "Syed" <sma_r@xxxxxxxxxxx> wrote in message
> > news:b2a2r7$7sa$1@xxxxxxxxxxxxxxxx
> > > Hi all,
> > > I like to know how to disable a texteditor,as I just ned to see if I can
> > > enter text in the Editor from another Eclipse while my present Editor is
> > > Disabled.
> > >
> > > Syed
> > >
> > >