Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Making IEditorPart Read Only
Making IEditorPart Read Only [message #331077] Sat, 23 August 2008 09:01 Go to next message
Eclipse UserFriend
Hi,

how to disable any editor given it's IEditorPart so that it's read only?

Yau.
Re: Making IEditorPart Read Only [message #331082 is a reply to message #331077] Sun, 24 August 2008 06:18 Go to previous messageGo to next message
Eclipse UserFriend
The readonly behaviour is determined by whether the IEditorInput is
returning null or not for the getPersistable() method.

So override the method and return null.

- Prakash

www.eclipse-tips.com


Yau wrote:
> Hi,
>
> how to disable any editor given it's IEditorPart so that it's read only?
>
> Yau.
>
>
Re: Making IEditorPart Read Only [message #331088 is a reply to message #331082] Mon, 25 August 2008 01:40 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

thanks for your reply, but how about it's a third party editor, i.e. without
any control of the editor?

Yau.

"Prakash G.R." <grprakash@gmail.com> wrote in message
news:g8quf6$695$1@build.eclipse.org...
> The readonly behaviour is determined by whether the IEditorInput is
> returning null or not for the getPersistable() method.
>
> So override the method and return null.
>
> - Prakash
>
> www.eclipse-tips.com
>
>
> Yau wrote:
> > Hi,
> >
> > how to disable any editor given it's IEditorPart so that it's read only?
> >
> > Yau.
> >
> >
Re: Making IEditorPart Read Only [message #331234 is a reply to message #331088] Thu, 28 August 2008 14:43 Go to previous messageGo to next message
Eclipse UserFriend
For 3rd party editors, you would have to see if they allow you to set
them to read-only.

Aside from somehow making the incoming IEditorInput readonly (not sure
how, and it's probably not valid for all kinds of IEditorInput) there's
no framework way to say this is read-only.

PW


--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench.htm
Re: Making IEditorPart Read Only [message #331297 is a reply to message #331234] Fri, 29 August 2008 09:31 Go to previous message
Eclipse UserFriend
Hi,

thanks for your reply, so "Eclipse's Activities" won't help?

Yau.


"Paul Webster" <pwebster@ca.ibm.com> wrote in message
news:g96drq$atp$2@build.eclipse.org...
> For 3rd party editors, you would have to see if they allow you to set
> them to read-only.
>
> Aside from somehow making the incoming IEditorInput readonly (not sure
> how, and it's probably not valid for all kinds of IEditorInput) there's
> no framework way to say this is read-only.
>
> PW
>
>
> --
> Paul Webster
> http://wiki.eclipse.org/Platform_Command_Framework
> http://wiki.eclipse.org/Command_Core_Expressions
> http://wiki.eclipse.org/Menu_Contributions
> http://wiki.eclipse.org/Menus_Extension_Mapping
>
http://help.eclipse.org/help33/index.jsp?topic=/org.eclipse. platform.doc.isv/guide/workbench.htm
Previous Topic:ILazyContentProvider updateElement(index) gets called for non-existent elements
Next Topic:Eclipse 3.4 on Windows XP Pro 64-bit
Goto Forum:
  


Current Time: Tue Feb 18 13:33:30 GMT 2025

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

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

Back to the top