Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Eclipse editors save as functionality
Eclipse editors save as functionality [message #1778357] Wed, 13 December 2017 12:05 Go to next message
ayman salah is currently offline ayman salahFriend
Messages: 100
Registered: June 2015
Senior Member
Hello all,

We had a project that was built on eclipse 3. Now we started to migrate to eclipse 4. We are still using the compatibility layer though.

Previously we have implemented the save as functionality this way:
IEditorInput newInput = new FileEditorInput((IFile) newFileResource);
((EditorReference) editorRef).setInput(newInput);


Now in eclipse 4 things doesn't work that way anymore.
setInput is not visible for EditorReference.

I want to know how should I achieve the saveAs functionality programmatically in Eclipse 4.

I have posted the same post in PDE forum but after checking similar posts I guess e4 group is more appropriate. I am really sorry about that.

Thanks.
Re: Eclipse editors save as functionality [message #1778367 is a reply to message #1778357] Wed, 13 December 2017 14:16 Go to previous message
ayman salah is currently offline ayman salahFriend
Messages: 100
Registered: June 2015
Senior Member
For the record if anyone faced the same issue,
I have got to fix this by doing the following:
editor.init((IEditorSite)editor.getSite(), newInput);


Thanks to Martti Käärik from https://stackoverflow.com/questions/8786141/reload-compare-editor-input
Previous Topic:View Docking Issues
Next Topic:e4.ui.progress final version?
Goto Forum:
  


Current Time: Wed Nov 14 13:04:11 GMT 2018

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

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

Back to the top