Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 402875 - Importing model elements from legacy RCP
Summary: Importing model elements from legacy RCP
Status: RESOLVED FIXED
Alias: None
Product: e4
Classification: Eclipse Project
Component: Tools (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Wim Jongman CLA
QA Contact:
URL:
Whiteboard:
Keywords:
: 392820 (view as bug list)
Depends on:
Blocks:
 
Reported: 2013-03-11 06:01 EDT by Wim Jongman CLA
Modified: 2014-02-13 13:43 EST (History)
4 users (show)

See Also:


Attachments
Patch with three new components (16.03 KB, patch)
2013-03-11 06:12 EDT, Wim Jongman CLA
no flags Details | Diff
Patch that modifies VCommandEditor to enable the import for commands (2.37 KB, patch)
2013-03-11 06:13 EDT, Wim Jongman CLA
no flags Details | Diff
Patch for Sopots change (10.11 KB, patch)
2013-03-17 09:56 EDT, Thomas Schindl CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wim Jongman CLA 2013-03-11 06:01:54 EDT
Converting your 3x RCP to e4 requires transformation to the application model.

It would be nice to have some tools to help this process. 

I have created a little prototype that enables the import of commands into the model. This could easily be extended to other areas like views and editors. 

I think commands, handlers, views and editors are the parts of interest and I will focus on these first.
Comment 1 Wim Jongman CLA 2013-03-11 06:11:30 EDT
Example video:

http://www.youtube.com/watch?v=lHu-aYEc88Y
Comment 2 Wim Jongman CLA 2013-03-11 06:12:27 EDT
Created attachment 228185 [details]
Patch with three new components
Comment 3 Wim Jongman CLA 2013-03-11 06:13:50 EDT
Created attachment 228186 [details]
Patch that modifies VCommandEditor to enable the import for commands
Comment 4 Wim Jongman CLA 2013-03-11 06:24:33 EDT
I think a lot of work already has been done in this area. I have found some early code that PW provided[1][2] but I am unable to find it. I assume it has been moved to platform somewhere or refactored. @PW, can you point me to the stuff that could be useful for this?

[1] https://bugs.eclipse.org/bugs/show_bug.cgi?id=263090
[2] https://bugs.eclipse.org/bugs/attachment.cgi?id=124323
Comment 5 Paul Webster CLA 2013-03-11 13:54:44 EDT
That kind of code ended up in the model processors.  ex: org.eclipse.ui.internal.CommandToModelProcessor, org.eclipse.ui.internal.ContextToModelProcessor, etc

PW
Comment 6 Wim Jongman CLA 2013-03-16 18:29:56 EDT
Implemented import support for Command Categories and Commands.
http://git.eclipse.org/c/e4/org.eclipse.e4.tools.git/commit/?id=12d71f4a0814299f451d6ae1242862c06157263e
Comment 7 Paul Webster CLA 2013-03-16 21:32:48 EDT
Are you sure you want to add the dependency to org.eclipse.pde.core?  Won't that prevent this bundle from running in most of the Release Train packages, restricting it to products built on the whole classic SDK?

PW
Comment 8 Thomas Schindl CLA 2013-03-17 03:22:12 EDT
Paul is right - you should not add a dependency on PDE-Core into this bundle. It should stay as light weight as possible! We normally abstract those services and provide a concrete implementation in the bundle which does the IDE integration.
Comment 9 Lars Vogel CLA 2013-03-17 07:00:18 EDT
I agree with Paul and Tom, such a dependency should be avoided.
Comment 10 Wim Jongman CLA 2013-03-17 08:41:03 EDT
There already is a dependency on pde in the e4.tools project. 

pde <- e4.tools <-e4.tools.emf.ui

So I don't think it makes any difference.
Comment 11 Wim Jongman CLA 2013-03-17 09:01:18 EDT
(In reply to comment #8)
> We normally abstract those services and
> provide a concrete implementation in the bundle which does the IDE integration.

That would be e4.tools?
Comment 12 Thomas Schindl CLA 2013-03-17 09:12:07 EDT
So the one who introduced this dependency is also wrong!
Comment 13 Thomas Schindl CLA 2013-03-17 09:17:01 EDT
Sopot made the change in bug 395371! This needs to be reverted!!!!
Comment 14 Nobody - feel free to take it CLA 2013-03-17 09:43:25 EDT
This slipped out of my promise here http://dev.eclipse.org/mhonarc/lists/e4-dev/msg06989.html to take the look at the UI thing. As soon I saw the issue that unkept promise came to mind. I'll re-open bug 395371 and find a way around this dependency.
Comment 15 Thomas Schindl CLA 2013-03-17 09:56:36 EDT
Created attachment 228540 [details]
Patch for Sopots change

Here's how Sopots change should integrate into EMF-UI
Comment 17 Wim Jongman CLA 2013-03-17 20:05:37 EDT
Added support for handlers, perspectives and views
http://git.eclipse.org/c/e4/org.eclipse.e4.tools.git/commit/?id=ff55e2853be0606226374a4ef3f07f855ddc2877
Comment 18 Wim Jongman CLA 2013-03-18 17:47:17 EDT
Added support for editors

can import editors and views  in partstacks and part descriptors, general clean-up. Wizard description, javadoc.

http://git.eclipse.org/c/e4/org.eclipse.e4.tools.git/commit/?id=d94be04547b2f6c757a9b2accea934f3ce6c0467
Comment 19 Lars Vogel CLA 2013-03-18 17:54:42 EDT
Great work Wim! 

Maybe a little bit more descriptive Git commit message would be nice, I was just looking at the Git commit history and tried to figure out what "Added support for editors" means.
Comment 20 Wim Jongman CLA 2013-03-19 05:05:35 EDT
Do we have some standards describing the commit message? I normally commit like this:

bug xxx: describe what this patch did in one line
description of the bug
bug url
Comment 21 Wim Jongman CLA 2013-03-19 06:23:30 EDT
*** Bug 392820 has been marked as a duplicate of this bug. ***
Comment 22 Paul Webster CLA 2013-03-19 06:59:27 EDT
Our standard commit message (such as it is) is the full bug title, a blank line, and then whatever description you want to put about the fix or patch:

Bug 402875 - Importing model elements from legacy RCP

Added support for reading the commands extension point.
Comment 23 Wim Jongman CLA 2013-03-19 07:10:16 EDT
(In reply to comment #22)
Thanks I will use that pattern from now on. I suggest to also add the bug url, maybe as the last line. Not having the bug url in the message will make it hard for people to link to the issue. For an example see [1]


[1] https://github.com/eclipse/eclipse.platform.ui/commit/21121bd72dc7c1a271ccb9d681ba4a0ded7b44bc
Comment 24 Nobody - feel free to take it CLA 2013-03-19 07:14:39 EDT
If you use Mylyn you can link the commit to the bug (task) and it's fairly easy to provide a template and it adds it automatically. Something like ${bug number} - ${bug title} \n ${bug link}.
Comment 25 Paul Webster CLA 2013-03-19 07:28:25 EDT
While you can put it in there if you want, it's not hard for people to go from the title to the bug.  Also, when viewed in git.eclipse.org/c "Bug XXXX" is enough to automatically get a link.

PW
Comment 26 Wim Jongman CLA 2013-03-22 18:46:45 EDT
Added preview functionality to add compatibility views to shared area and part descriptor. This to experiment with mixed mode.

All imported part and partdescriptors now also get a toolbar and viewmenu with the same id.

pushed to master: 
http://git.eclipse.org/c/e4/org.eclipse.e4.tools.git/commit/?id=71eeea902eb307e0f6728baf7931a8e725f1ab50
Comment 27 Wim Jongman CLA 2014-02-13 13:43:40 EST
I think this one is fixed.