Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Eclipse editors save as functionality
Eclipse editors save as functionality [message #1778356] Wed, 13 December 2017 11:44 Go to next message
ayman salah is currently offline ayman salahFriend
Messages: 92
Registered: June 2015
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.

Thanks.
Re: Eclipse editors save as functionality [message #1778368 is a reply to message #1778356] Wed, 13 December 2017 14:16 Go to previous message
ayman salah is currently offline ayman salahFriend
Messages: 92
Registered: June 2015
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:The appearance of markers depend on the editor.
Next Topic:Strange Behavior of ade tools
Goto Forum:
  


Current Time: Sun Sep 23 06:16:03 GMT 2018

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

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

Back to the top