[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] Re: Ecllipse editor

If you create an IStorageEditorInput, and open an editor on that, it will be read only. See IWorkbenchPage.openEditor(IEditorInput, ...). IFile extends IStorage so you can still use the same file as in your snippet here.
--


Dheepu wrote:
Hi ,

I have a problem in my application. In that i used to read a file through a stream and display it in a IDE editor. the content is read and displayed well but i need to make it as non-editable editor such that it can't be editable.

Please help me int he above said aspect.

Thanks in advance.

Note :
i have used private IWorkbenchPage active_page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();


final IFile file = container.getFile(new Path(fileName));

org.eclipse.ui.ide.IDE.openEditor(active_page, file);