Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Couldn't find "IFileEditorInput"
Couldn't find "IFileEditorInput" [message #282697] Thu, 17 March 2005 21:55 Go to next message
Eclipse User
Originally posted by: zyang.bsu.edu

I’m writing a plugin with a text editor in it using Eclipse 3.0.1.
Everything works perfect when I debug the plugin using Run-time Workbench.
But after I exported the plugin, added to the plugins directory, and
restarted Eclipse, the plugin doesn’t work anymore. It told me that
“IFileEditorInput” couldn’t be found. Here is the error message from the
log file:

….

!MESSAGE Problems occurred when invoking code from plug-in:
"org.eclipse.core.runtime".
!STACK 0
java.lang.NoClassDefFoundError: org/eclipse/ui/IFileEditorInput
at UMBuilder.editors.TTPEditor.createPages(TTPEditor.java:42)
at
org.eclipse.ui.part.MultiPageEditorPart.createPartControl(Mu ltiPageEditorPart.java:187)
at org.eclipse.ui.internal.PartPane$2.run(PartPane.java:137)
at
org.eclipse.core.internal.runtime.InternalPlatform.run(Inter nalPlatform.java:616)
at org.eclipse.core.runtime.Platform.run(Platform.java:747)
…


Here is the code causing the problem:
….

public class TTPEditor extends MultiPageEditorPart {
….

protected void createPages(){

if(this.getEditorInput() instanceof IFileEditorInput){
IFileEditorInput editorInput = (IFileEditorInput) this.getEditorInput();
IFile file = editorInput.getFile();
….
}

I checked my dependencies in the plugin.xml, “org.eclipse.ui.ide” was
there. What else could I miss? I searched the previous posts. There were
some similar questions. No answers could fit into my case.

Anybody here has any thoughts that why there is no trouble to find
“IFileEditorInput” at all when I debug the plugin using Run-time Workbench?

Any input is appreciated!
Re: Couldn't find "IFileEditorInput" [message #282702 is a reply to message #282697] Fri, 18 March 2005 00:04 Go to previous messageGo to next message
Eclipse User
Originally posted by: zyang.bsu.edu

I knid of slove the problem, although I still don't know the rationale
behind it.

These are the steps I made the plugin work:
1)remove the plugin from plugins directory
2)restart Eclipse
3)add the plugin back to the plugins directory,
4)restart Eclipse again.


Rui k-yang wrote:

> I’m writing a plugin with a text editor in it using Eclipse 3.0.1.
> Everything works perfect when I debug the plugin using Run-time Workbench.
> But after I exported the plugin, added to the plugins directory, and
> restarted Eclipse, the plugin doesn’t work anymore. It told me that
> “IFileEditorInput” couldn’t be found. Here is the error message from the
> log file:

> ….

> !MESSAGE Problems occurred when invoking code from plug-in:
> "org.eclipse.core.runtime".
> !STACK 0
> java.lang.NoClassDefFoundError: org/eclipse/ui/IFileEditorInput
> at UMBuilder.editors.TTPEditor.createPages(TTPEditor.java:42)
> at
>
org.eclipse.ui.part.MultiPageEditorPart.createPartControl(Mu ltiPageEditorPart.java:187)
> at org.eclipse.ui.internal.PartPane$2.run(PartPane.java:137)
> at
>
org.eclipse.core.internal.runtime.InternalPlatform.run(Inter nalPlatform.java:616)
> at org.eclipse.core.runtime.Platform.run(Platform.java:747)
> …


> Here is the code causing the problem:
> ….

> public class TTPEditor extends MultiPageEditorPart {
> ….

> protected void createPages(){

> if(this.getEditorInput() instanceof IFileEditorInput){
> IFileEditorInput editorInput = (IFileEditorInput) this.getEditorInput();
> IFile file = editorInput.getFile();
> ….
> }

> I checked my dependencies in the plugin.xml, “org.eclipse.ui.ide” was
> there. What else could I miss? I searched the previous posts. There were
> some similar questions. No answers could fit into my case.

> Anybody here has any thoughts that why there is no trouble to find
> “IFileEditorInput” at all when I debug the plugin using Run-time Workbench?

> Any input is appreciated!
Re: Couldn't find "IFileEditorInput" [message #820730 is a reply to message #282697] Wed, 14 March 2012 13:52 Go to previous messageGo to next message
Christoph Schmidt is currently offline Christoph Schmidt
Messages: 2
Registered: March 2012
Junior Member
Thank you for pointing in the right direction. I had problems opening files programmatically, due to ClassNotFoundExceptions and NoClassDefFoundErrors regarding IFileEditorInput and FileEditorInput, although all the dependencies WERE there. Your remove-plugin-restart-add-it-again approach made me try to start the host eclipse with the "-clean" parameter ("eclipse -clean") and all those insane errors and exceptions went away!

Thank you Smile


Markers for SEO:

* java.lang.NoClassDefFoundError: org/eclipse/ui/part/FileEditorInput
* java.lang.NoClassDefFoundError: org/eclipse/ui/IFileEditorInput
* java.lang.ClassNotFoundException: org.eclipse.ui.part.FileEditorInput
* open eclipse editor programmatically
* IFile, IPath, IResource

Re: Couldn't find "IFileEditorInput" [message #820731 is a reply to message #820730] Wed, 14 March 2012 13:54 Go to previous message
Christoph Schmidt is currently offline Christoph Schmidt
Messages: 2
Registered: March 2012
Junior Member
Oh, forgot a detail over a crashed Firefox tab and me retyping the entire post...

Looks like the problem originates with Eclipse caching the dependencies of its plugins, which is overridden by -clean'ing or changing the set of available plugins (ie. removing and readding one).
Previous Topic:Display description for collapse comment block
Next Topic:Indigo and Maven (m2e) Integration suddenly stopped working
Goto Forum:
  


Current Time: Fri Oct 31 10:07:32 GMT 2014

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

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