Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » IFileEditorInput cannot be resolved to a type
IFileEditorInput cannot be resolved to a type [message #336447] Fri, 12 June 2009 09:45 Go to next message
Chris Turner is currently offline Chris Turner
Messages: 9
Registered: July 2009
Junior Member
Hi Everyone!


I am trying to make my GEF-Editor saveable (or serializable) and I'm using
the sourcecode from the org.eclipse.gef.examples.shapes Example.

But eclipse seems not to find all necessary classes. Here is the code:

ByteArrayOutputStream out = new ByteArrayOutputStream();
try {
createOutputStream(out);
IFile file = ((IFileEditorInput) getEditorInput()).getFile();
file.setContents(new ByteArrayInputStream(out.toByteArray()), true,
false, monitor);
getCommandStack().markSaveLocation();
} catch (CoreException ce) {
ce.printStackTrace();
} catch (IOException ioe) {
ioe.printStackTrace();
}

Eclsipe can't reslove the IFile and the IFileEditorInput.

So does somebody have a clue what i m doing wrong?!

Thanks in advance!
Chris
Re: IFileEditorInput cannot be resolved to a type [message #336449 is a reply to message #336447] Fri, 12 June 2009 10:51 Go to previous message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Make sure you depend on the packages or bundles needed for IFileEditorInput.

http://wiki.eclipse.org/FAQ_How_do_I_find_a_particular_class _from_an_Eclipse_plug-in%3F

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/ganymede/index.jsp?topic=/org.eclips e.platform.doc.isv/guide/workbench.htm


Previous Topic:Disable a contributed Activity
Next Topic:fire a ResourceChangeEvent programmatically
Goto Forum:
  


Current Time: Mon Jul 28 20:36:03 EDT 2014

Powered by FUDForum. Page generated in 0.02171 seconds