Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » How to implement Save As for our Part.(How to implement Save As for our Part.)
How to implement Save As for our Part. [message #1151184] Wed, 23 October 2013 07:19 Go to next message
Sumit Singh is currently offline Sumit SinghFriend
Messages: 141
Registered: October 2012
Location: Bangalore
Senior Member

Hi *,

I'm creating E4 RCP application in that I have one part. I want to implement "Save As" functionality for my Part As it is implemented for Editors (Like:Java file Editor).


Requirements:
1. When user click on my part "Save As" option should be enable.
2. When user click on "Save As" option my code should run so that I can do what I want.


So my question is for this what should I do, is I have to implement any extension point or any this else. ?

Thanks & regards,
Sumit Singh
Re: How to implement Save As for our Part. [message #1180197 is a reply to message #1151184] Sun, 10 November 2013 21:13 Go to previous messageGo to next message
Eclipse UserFriend
You can accomplish both using a simple e4 handler. Implement the @CanExecute and @Execute (you can have your MPart injected there) well and that's all you need.
Re: How to implement Save As for our Part. [message #1180902 is a reply to message #1180197] Mon, 11 November 2013 08:29 Go to previous messageGo to next message
Sumit Singh is currently offline Sumit SinghFriend
Messages: 141
Registered: October 2012
Location: Bangalore
Senior Member

@Sopot Cela Hi,

Yes I know this approach, But I want it to be as in Eclipse, Because if i'll implement it then it will not work for other other source file let say for java script,

Because In my RCP i also have JavaScript perspective.
Re: How to implement Save As for our Part. [message #1181230 is a reply to message #1180902] Mon, 11 November 2013 13:15 Go to previous messageGo to next message
Eclipse UserFriend
What do you mean 'will not work for other source file'? The Save as ... is the same for both cases. Just dump the contents of the editor into a disk file. Also if you have Eclipse editors yours is likely not a pure Eclipse 4 RCP application. If you're doing a mix of 3.x and 4.x things are different.
Re: How to implement Save As for our Part. [message #1182338 is a reply to message #1181230] Tue, 12 November 2013 05:51 Go to previous message
Sumit Singh is currently offline Sumit SinghFriend
Messages: 141
Registered: October 2012
Location: Bangalore
Senior Member

Exactly I'm mixing 3.x and 4.x. Because by default there is no support for SaveAs in Eclipse 4.x.

So I'm asking if there is any way so that i can use 3.x SaveAs implementation for My E4 part..?
Previous Topic:bundle javax.annotation not updated
Next Topic:DI Injection for Handlers
Goto Forum:
  


Current Time: Thu Apr 25 07:28:46 GMT 2024

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

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

Back to the top