Skip to main content



      Home
Home » Newcomers » Newcomers » Opening an editor
Opening an editor [message #252823] Mon, 31 March 2008 22:57 Go to next message
Eclipse UserFriend
Originally posted by: daved99.comcast.net

I am missing something here. I need to be able to programmatically open
an editor, but whenever I attempt to use any of the snippets here they
will NOT compile.

Most recently I tried this:

page.openEditor
(new FileEditorInput(modelFile),

workbench.getEditorRegistry().getDefaultEditor(modelFile.get FullPath().toString()).getId());
}

Eclipse gets all excited about "FileEditorInput". Does NOT recognize this
as a class. I look it up and it is supposed to be in
"org.eclipse.ui.part" which IS imported - still won't find it.

I have the same problem with the IDE.method - Eclipse can't find "IDE".

Same story with IStorageEditorInput.

What am I missing?
Re: Opening an editor [message #252827 is a reply to message #252823] Tue, 01 April 2008 03:31 Go to previous messageGo to next message
Eclipse UserFriend
Dave wrote:
> I am missing something here. I need to be able to programmatically
> open an editor, but whenever I attempt to use any of the snippets here
> they will NOT compile.
>
> Most recently I tried this:
>
> page.openEditor
> (new FileEditorInput(modelFile),
>
> workbench.getEditorRegistry().getDefaultEditor(modelFile.get FullPath().toString()).getId());
>
> }
>
> Eclipse gets all excited about "FileEditorInput". Does NOT recognize
> this as a class. I look it up and it is supposed to be in
> "org.eclipse.ui.part" which IS imported - still won't find it.
>
> I have the same problem with the IDE.method - Eclipse can't find "IDE".
>
> Same story with IStorageEditorInput.
>
> What am I missing?
At least you miss org.eclipse.ui.ide in the list of required bundles.

Dani
Re: Opening an editor [message #252993 is a reply to message #252823] Wed, 02 April 2008 18:44 Go to previous messageGo to next message
Eclipse UserFriend
Hey Dave,

Have you set your plugin to require the org.eclipse.ui plugins that contain
the imported classes?
Check out the Dependencies tab on your Plug-in Manifest editor opened on the
plugin.xml of your plugin.

HTH
Darins
http://runnerwhocodes.blogspot.com

"Dave" <daved99@comcast.net> wrote in message
news:8f606aea2d4ef3581e42e900be5a3421$1@www.eclipse.org...
>I am missing something here. I need to be able to programmatically open an
>editor, but whenever I attempt to use any of the snippets here they will
>NOT compile.
>
> Most recently I tried this:
>
> page.openEditor
> (new FileEditorInput(modelFile),
>
> workbench.getEditorRegistry().getDefaultEditor(modelFile.get FullPath().toString()).getId());
> }
>
> Eclipse gets all excited about "FileEditorInput". Does NOT recognize this
> as a class. I look it up and it is supposed to be in
> "org.eclipse.ui.part" which IS imported - still won't find it.
>
> I have the same problem with the IDE.method - Eclipse can't find "IDE".
>
> Same story with IStorageEditorInput.
>
> What am I missing?
>
Re: Opening an editor [message #253093 is a reply to message #252993] Thu, 03 April 2008 16:53 Go to previous message
Eclipse UserFriend
Originally posted by: daved99.comcast.net

I eventually got it to work, but I'm not sure how
Previous Topic:JUnit refuses to work
Next Topic:gnatbench
Goto Forum:
  


Current Time: Fri Jul 18 18:45:12 EDT 2025

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

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

Back to the top