Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Migrate Eclipse RCP application from Eclipse 3.7 to eclipse e4 SDK(Want to use e4 CSS Styling so migrating to Eclipse e4 from 3.7, but having issues in that)
Migrate Eclipse RCP application from Eclipse 3.7 to eclipse e4 SDK [message #838012] Fri, 06 April 2012 12:38 Go to next message
Kuldeep Jain is currently offline Kuldeep JainFriend
Messages: 6
Registered: December 2011
Junior Member
I have my Eclipse RCP application created on Eclipse 3.7 . But in order to use Eclipse e4 CSS Styling and for some other reasons, We want to migrate our application to Eclipse e4(4.1.2) version. In doing so, I have tried moving my code to Eclipse e4 4.1.2 and when I run my RCP application now it gets launched but it is showing these unwanted Coolbar/Toolbar items/preference pages which I was hiding through code in my overriden method WorkbenchWindowAdvisor.postWindowCreate(). On some digging into the issue I found out that
WorkbenchWindowAdvisor.postWindowCreate()
method is not used in e4 and it does not get called at all. So what is the alternative way of doing this in Eclipse e4?

Additionally what all things I need to do and know about migrating from Eclipse 3.7 to eclipse e4? as there could be more such issues in migration.
Re: Migrate Eclipse RCP application from Eclipse 3.7 to eclipse e4 SDK [message #840556 is a reply to message #838012] Tue, 10 April 2012 08:21 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5463
Registered: July 2009
Senior Member
You can:
a) use a custom Legacy.e4xmi file which has none of those items
b) use a model processor to remove those items programmatically from the
model

I've not tried those possibilities but I think they could work.

Tom

Am 06.04.12 14:38, schrieb Kuldeep Jain:
> I have my Eclipse RCP application created on Eclipse 3.7 . But in order
> to use Eclipse e4 CSS Styling and for some other reasons, We want to
> migrate our application to Eclipse e4(4.1.2) version. In doing so, I
> have tried moving my code to Eclipse e4 4.1.2 and when I run my RCP
> application now it gets launched but it is showing these unwanted
> Coolbar/Toolbar items/preference pages which I was hiding through code
> in my overriden method WorkbenchWindowAdvisor.postWindowCreate(). On
> some digging into the issue I found out that
> WorkbenchWindowAdvisor.postWindowCreate() method is not used in e4 and
> it does not get called at all. So what is the alternative way of doing
> this in Eclipse e4?
>
> Additionally what all things I need to do and know about migrating from
> Eclipse 3.7 to eclipse e4? as there could be more such issues in migration.
Re: Migrate Eclipse RCP application from Eclipse 3.7 to eclipse e4 SDK [message #840702 is a reply to message #840556] Tue, 10 April 2012 12:12 Go to previous messageGo to next message
Kuldeep Jain is currently offline Kuldeep JainFriend
Messages: 6
Registered: December 2011
Junior Member
Thanks for your reply Tom, As I have migrated(directly moved without any changes) my code that was developed on Eclipse 3.7 to Eclipse 4, so I do not have Legacy.e4xmi file already present. I am a novice to Eclipse 4 and want to know:

  1. Is simply moving the code like this from 3.7 to e4 is the correct way of migrating ? Or do I need to do something more?
  2. How do I get Legacy.e4xmi file?

Re: Migrate Eclipse RCP application from Eclipse 3.7 to eclipse e4 SDK [message #840778 is a reply to message #840702] Tue, 10 April 2012 13:50 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5463
Registered: July 2009
Senior Member
The compat layer is falling back to a Legacy.e4xmi if you are not
setting a custom one.

I need to look up where it is located later and come back to you once I
figured it out.

Tom

Am 10.04.12 14:12, schrieb Kuldeep Jain:
> Thanks for your reply Tom, As I have migrated(directly moved without any
> changes) my code that was developed on Eclipse 3.7 to Eclipse 4, so I do
> not have Legacy.e4xmi file already present. I am a novice to Eclipse 4
> and want to know:
>
> Is simply moving the code like this from 3.7 to e4 is the correct way of
> migrating ? Or do I need to do something more?
> How do I get Legacy.e4xmi file?
>
>
Re: Migrate Eclipse RCP application from Eclipse 3.7 to eclipse e4 SDK [message #841328 is a reply to message #840778] Wed, 11 April 2012 06:58 Go to previous messageGo to next message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1049
Registered: July 2009
Senior Member

The LegacyIDE.e4xmi file is located here: ./eclipse.platform.ui/bundles/org.eclipse.ui.workbench/LegacyIDE.e4xmi

In addition to Toms proposal ou should be able to use a Lifecyle hook to remove the items. The Lifecycle hooks are described here: Eclipse 4 Tutorial - Lifecycle
Re: Migrate Eclipse RCP application from Eclipse 3.7 to eclipse e4 SDK [message #841522 is a reply to message #841328] Wed, 11 April 2012 12:23 Go to previous messageGo to next message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1049
Registered: July 2009
Senior Member

Lifecycle will not work, see Bug - Eclipse 4 IDE not extendable via fragments or processors


I document the mixed mode a little bit here: Eclipse 4 Compatibility Mode
Re: Migrate Eclipse RCP application from Eclipse 3.7 to eclipse e4 SDK [message #843877 is a reply to message #840556] Fri, 13 April 2012 13:04 Go to previous messageGo to next message
Kuldeep Jain is currently offline Kuldeep JainFriend
Messages: 6
Registered: December 2011
Junior Member
Hi Tom & Lars,

I tried using a custom Legacy.e4xmi file, but have no clue about how to edit that, neither found any documentation about it. I tried to modify it but still seeing Run and Search menus. Could you please let me know about what to change in Legacy.e4xmi file to remove the menubar all together and some of the toolbar items. I also want to mention that in my RCP application I am having an Xtext plugin, if that makes any difference.

[Updated on: Fri, 13 April 2012 13:05]

Report message to a moderator

Re: Migrate Eclipse RCP application from Eclipse 3.7 to eclipse e4 SDK [message #843895 is a reply to message #843877] Fri, 13 April 2012 13:20 Go to previous messageGo to next message
Thomas Schindl is currently offline Thomas SchindlFriend
Messages: 5463
Registered: July 2009
Senior Member
Install the e4 tools - I think you'll find how to install it in the
tutorials from Lars Vogel.

Tom

Am 13.04.12 15:04, schrieb Kuldeep Jain:
> Hi Tom,
>
> I tried using a custom Legacy.e4xmi file, but have no clue about how to
> edit that, neither found any documentation about it. I tried to modify
> it but still seeing Run and Search menus. Could you please let me know
> about what to change in Legacy.e4xmi file to remove the menubar all
> together and some of the toolbar items. I also want to mention that in
> my RCP application I am having an Xtext plugin, if that makes any
> difference.
Re: Migrate Eclipse RCP application from Eclipse 3.7 to eclipse e4 SDK [message #847335 is a reply to message #843895] Tue, 17 April 2012 07:55 Go to previous messageGo to next message
Kuldeep Jain is currently offline Kuldeep JainFriend
Messages: 6
Registered: December 2011
Junior Member
hi Lars & Tom,

Thanks for the information. I installed e4 tools on my Eclipse 4.2 and was able to change stuff in Legacy.e4xmi file. But even if I make the menu bar invisible or mark toBeRendered as false, and then first time when I launch the Application, it does not show the Menu bar, which is correct, but when I relaunch it without making any change then it starts showing the Menu bar with Search and Run menu items. And I am unable to figure out from where they are coming from.
Note: I also want to mention that in my RCP application I am having Xtext plugin.

[Updated on: Tue, 17 April 2012 08:06]

Report message to a moderator

Re: Migrate Eclipse RCP application from Eclipse 3.7 to eclipse e4 SDK [message #847340 is a reply to message #847335] Tue, 17 April 2012 08:03 Go to previous message
Lars Vogel is currently offline Lars VogelFriend
Messages: 1049
Registered: July 2009
Senior Member

Hi Kuldeep,

sounds like a bug to me. Could you create a small example with this behavior and open a bug for it?

Best regards, Lars
Previous Topic:RAP application with XWT
Next Topic:XWT loaded event lookup problem
Goto Forum:
  


Current Time: Mon Nov 24 03:14:28 GMT 2014

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

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