Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » save us action on editors ...
save us action on editors ... [message #335177] Wed, 25 March 2009 10:44 Go to next message
Carmelo  is currently offline Carmelo Friend
Messages: 224
Registered: July 2009
Senior Member
Hi all,
I have a question on editor / save as .

I'm opening xml editor / text editor or anyway the default editor for that
extension on files that are local on the file system.

I'm using an rcp application so I can easily remove the save us button from
the file menu .. The problem is with the action coming from the popup menu
....
I was wondering if there is a way to remove the save us action from the
popup menu or at least let the action perform my own save us operation.

What can I do?

Any help will be appreciated.
Kar


FileEditorInput finput = new FileEditorInput(file);
activePage.openEditor(finput, _editorDescriptor.getId());
Re: save us action on editors ... [message #335184 is a reply to message #335177] Wed, 25 March 2009 14:31 Go to previous messageGo to next message
Prakash G.R. is currently offline Prakash G.R.Friend
Messages: 621
Registered: July 2009
Senior Member
If you could subclass the editor, you can override isSaveAsAllowed() method
and return false.

- Prakash
--
http://blog.eclipse-tips.com
Re: save us action on editors ... [message #335198 is a reply to message #335177] Wed, 25 March 2009 16:23 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
Kar wrote:
> Hi all,
> I have a question on editor / save as .
>
> I'm opening xml editor / text editor or anyway the default editor for
> that extension on files that are local on the file system.
>
> I'm using an rcp application so I can easily remove the save us button
> from the file menu .. The problem is with the action coming from the
> popup menu ...
> I was wondering if there is a way to remove the save us action from
> the popup menu or at least let the action perform my own save us
> operation.
>
> What can I do?
I don't know which editor you really used but the default Eclipse
editors don't have 'Save As' in the context menu.

Dani
>
> Any help will be appreciated.
> Kar
>
>
> FileEditorInput finput = new FileEditorInput(file);
> activePage.openEditor(finput, _editorDescriptor.getId());
>
>
Re: save us action on editors ... [message #335227 is a reply to message #335198] Thu, 26 March 2009 15:46 Go to previous message
Carmelo  is currently offline Carmelo Friend
Messages: 224
Registered: July 2009
Senior Member
Hi guys ... sorry I was wrong ... text editor and wtp ones are free from the
save as ... so ok for me ( I will remove the other - internal - editor I was
using from the list)

sorry again ...


"Daniel Megert" <daniel_megert@ch.ibm.com> wrote in message
news:gqdlpm$p9j$1@build.eclipse.org...
> Kar wrote:
>> Hi all,
>> I have a question on editor / save as .
>>
>> I'm opening xml editor / text editor or anyway the default editor for
>> that extension on files that are local on the file system.
>>
>> I'm using an rcp application so I can easily remove the save us button
>> from the file menu .. The problem is with the action coming from the
>> popup menu ...
>> I was wondering if there is a way to remove the save us action from the
>> popup menu or at least let the action perform my own save us operation.
>>
>> What can I do?
> I don't know which editor you really used but the default Eclipse editors
> don't have 'Save As' in the context menu.
>
> Dani
>>
>> Any help will be appreciated.
>> Kar
>>
>>
>> FileEditorInput finput = new FileEditorInput(file);
>> activePage.openEditor(finput, _editorDescriptor.getId());
>>
>>
Previous Topic:Contributing content assist to any editor?
Next Topic:Can one preserve a custom format?
Goto Forum:
  


Current Time: Thu Apr 25 11:55:12 GMT 2024

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

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

Back to the top