Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Editors
Editors [message #464238] Wed, 28 February 2007 07:24
Eclipse UserFriend
Hi,
How can i get the editor input.Like i have associated a file format
for the editor,so that when i open the file from Eclipse ide File -> open
it automatically opens in that editor.I want to get that file or its
context at run time..Iam trying to use the below code
IEditorPart part = page.getActiveEditor();
if (part != null)
{ if (!(part instanceof TextEditor))
return;
TextEditor editor = (TextEditor) part;
if (editor != null)
{
IDocumentProvider dp = editor.getDocumentProvider();
IDocument doc = dp.getDocument(editor.getEditorInput()
wat am i doing wrong in the above code,it is fetching input only if i
open the file before in some other editor then the one linked.

Thanks in advance
kris
Previous Topic:Calling helpsystem out of dialog
Next Topic:Workbench state restoration and intro
Goto Forum:
  


Current Time: Thu Mar 27 17:09:21 EDT 2025

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

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

Back to the top