Skip to main content



      Home
Home » Eclipse Projects » Rich Client Platform (RCP) » how to get input for the edior
how to get input for the edior [message #464005] Thu, 22 February 2007 05:35 Go to next message
Eclipse UserFriend
Hi,

My class extends the rcp based Text editor.In the plugin.xml i have set
the extension of the file and editor for which it is to be opened.Sice i
cannot format the text in the editor ,iam trying to use bufferredreader
for which i need to pass the input file.Iam using getEditorInput().getname
to get the file name ,but it is not working.
How can i get the input file which is passed to the editor?

Thanks in advance
kris
Re: how to get input for the edior [message #464007 is a reply to message #464005] Thu, 22 February 2007 05:43 Go to previous messageGo to next message
Eclipse UserFriend
kris wrote:

>
> Hi,
>
> My class extends the rcp based Text editor.In the plugin.xml i have
> set the extension of the file and editor for which it is to be
> opened.Sice i cannot format the text in the editor ,iam trying to use
> bufferredreader for which i need to pass the input file.Iam using
> getEditorInput().getname to get the file name ,but it is not working.

What do you mean by "not working"?

Dani

> How can i get the input file which is passed to the editor?
>
> Thanks in advance
> kris
>
>
Re: how to get input for the edior [message #464011 is a reply to message #464007] Thu, 22 February 2007 06:17 Go to previous messageGo to next message
Eclipse UserFriend
Actually getEditorInput is returning null.I wanted to use it as
getEditorInput.getName() which will return the file name.I wanted to pass
this returned file name as input to bufferred reader so that i can format
it,but getEditorinput itself is returning null.
Re: how to get input for the edior [message #464015 is a reply to message #464011] Thu, 22 February 2007 08:01 Go to previous messageGo to next message
Eclipse UserFriend
kris wrote:

>
>
> Actually getEditorInput is returning null.I wanted to use it as
> getEditorInput.getName() which will return the file name.I wanted to
> pass this returned file name as input to bufferred reader so that i
> can format it,but getEditorinput itself is returning null.
>
The editor input should not be null.

Dani
Re: how to get input for the edior [message #464020 is a reply to message #464005] Thu, 22 February 2007 08:38 Go to previous messageGo to next message
Eclipse UserFriend
Does this help?

String fileName =
Activator.getDefault().getWorkbench().getActiveWorkbenchWind ow().getActivePage().getActiveEditor().getEditorInput().getN ame();
Re: how to get input for the edior [message #464028 is a reply to message #464020] Thu, 22 February 2007 10:07 Go to previous message
Eclipse UserFriend
with this one ,if i open another text editor before opening of the
required editor,the value is not coming null.

any how thanks for the snippet!
Previous Topic:Problem with an eclipse tutorial
Next Topic:Relaunching Application
Goto Forum:
  


Current Time: Thu Mar 27 03:48:24 EDT 2025

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

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

Back to the top