Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Struggling with IEditorInput
Struggling with IEditorInput [message #285665] Sun, 22 May 2005 17:06 Go to next message
Mike Capp is currently offline Mike CappFriend
Messages: 3
Registered: July 2009
Junior Member
Hi all,

I'm just starting my first attempt at building an Eclipse plugin and after
a few minor issues have hit a wall with the IEditorInput parameter to my
IEditorPart.init implementation. The interface itself supplies no useful
methods. In the debugger I can see that I'm actually being given a
FileEditorInput which _does_ have useful methods, but despite what the
debugger and docs say, I can't get at either an
org.eclipse.ui.IFileEditorInput or an org.eclipse.ui.part.FileEditorInput
- they don't show up in my workbench.jar dependency and attempts to import
them into a .java file are reported as errors.

Can some kind soul suggest what I'm doing wrong? I'm not an experienced
Java dev by any means, so cataclysmically stupid newbie mistakes are
entirely possible.

cheers,
Mike
Re: Struggling with IEditorInput [message #285666 is a reply to message #285665] Sun, 22 May 2005 19:27 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: stephan.vern.chem.tu-berlin.de

Mike wrote:
> I'm just starting my first attempt at building an Eclipse plugin and after
> a few minor issues have hit a wall with the IEditorInput parameter to my
> IEditorPart.init implementation. The interface itself supplies no useful
> methods. In the debugger I can see that I'm actually being given a
> FileEditorInput which _does_ have useful methods, but despite what the
> debugger and docs say, I can't get at either an
> org.eclipse.ui.IFileEditorInput or an org.eclipse.ui.part.FileEditorInput
> - they don't show up in my workbench.jar dependency and attempts to import
> them into a .java file are reported as errors.

As far as I know IFileEditorInput is part of the
org.eclipse.core.resources .
So you must have a plugin dependency to this plugin, if you want to use
it. You can add an entry to the dependencies, if you edit your
plugin.xml.

Stephan Michels.
Re: Struggling with IEditorInput [message #285667 is a reply to message #285666] Sun, 22 May 2005 22:21 Go to previous messageGo to next message
Mike Capp is currently offline Mike CappFriend
Messages: 3
Registered: July 2009
Junior Member
Stephan - thanks for the reply, but neither FileEditorInput nor
IFileEditorInput is in org.eclipse.core.resources. (You may be thinking of
IFile, which is.) The docs
( http://www.eclipse.org/documentation/html/plugins/org.eclips e.platform.doc.isv/doc/reference/api/org/eclipse/ui/part/Fil eEditorInput.html)
and debugger both seem pretty sure that it's in ui.part.
Re: Struggling with IEditorInput [message #285668 is a reply to message #285667] Sun, 22 May 2005 22:42 Go to previous messageGo to next message
Mike Capp is currently offline Mike CappFriend
Messages: 3
Registered: July 2009
Junior Member
Got it - it IS in the org.eclipse.ui{.part} PACKAGE, but I needed a
dependency on the org.eclipse.ui.ide PLUGIN. My newbie mistake was
assuming that there was some correlation between packages and plugin
jars, whereas in fact the classes in a given package seem to be randomly
scattered all over the place.

Is there some straightforward way to find this kind of information, short
of grepping the whole plugins directory tree? (Which is what I ultimately
resorted to.)
Re: Struggling with IEditorInput [message #285675 is a reply to message #285668] Mon, 23 May 2005 06:35 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: bob.objfac.com

Mike wrote:
> Got it - it IS in the org.eclipse.ui{.part} PACKAGE, but I needed a
> dependency on the org.eclipse.ui.ide PLUGIN. My newbie mistake was
> assuming that there was some correlation between packages and plugin
> jars, whereas in fact the classes in a given package seem to be randomly
> scattered all over the place.
>
> Is there some straightforward way to find this kind of information,
> short of grepping the whole plugins directory tree? (Which is what I
> ultimately resorted to.)

Simplest way is to import all the installed plugins as projects (well,
that part isn't so simple, but a plugin developer should do it anyway)
then Open Type on the class and Show in Explorer.

That will show you the plugin the class is actually in.

Bob Foster
Re: Struggling with IEditorInput [message #547167 is a reply to message #285675] Thu, 15 July 2010 19:03 Go to previous messageGo to next message
Alireza  is currently offline Alireza Friend
Messages: 8
Registered: July 2010
Junior Member
Hello.

Can you please tell me what the role of a IEditorInput is ? What does it do ?

Sorry that the question is very Basic.
Many thanks for your help.
Bye.
Re: Struggling with IEditorInput [message #548709 is a reply to message #547167] Thu, 22 July 2010 17:20 Go to previous messageGo to next message
Mark Storer is currently offline Mark StorerFriend
Messages: 46
Registered: May 2010
Location: Vista, CA
Member

Alireza wrote on Thu, 15 July 2010 12:03
Hello.

Can you please tell me what the role of a IEditorInput is ? What does it do ?

Sorry that the question is very Basic.
Many thanks for your help.
Bye.


Have a look.


--Mark Storer
Senior Software Engineer
Autonomy Cardiff

import legalese.disclaimer;
Disclaimer<Cardiff> disCard = null;

Google Code Search
Re: Struggling with IEditorInput [message #548749 is a reply to message #548709] Thu, 22 July 2010 20:29 Go to previous message
Alireza  is currently offline Alireza Friend
Messages: 8
Registered: July 2010
Junior Member
Thanks Very Happy
Previous Topic:How to debug Command Core Expressions
Next Topic:DebugPlugin.getDefault().addDebugEventListener
Goto Forum:
  


Current Time: Mon Nov 24 01:21:57 GMT 2014

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

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