Changes between Version 10 and Version 11 of E4_Notes_Future_Migration


Ignore:
Timestamp:
09/21/2016 05:11:42 PM (4 years ago)
Author:
shan
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • E4_Notes_Future_Migration

    v10 v11  
    33Here we discuss some of the things that should be noted while working on e4 architecture in future.
    44
    5 == Migrating Preference Page ==
    6 - Preference Pages should be done using the e4 (currently uses ''org.eclipse.ui.preferencePages'' extension point)
    7 - command ''org.eclipse.ui.window.preferences'', labelled as '''Preference''' should be removed from the '''Application.e4xmi''' file
     5== ~~Migrating Preference Page~~ ==
     6- Get rid of extension point "''org.eclipse.ui.preferencePages''" as it is a dependency on 3.x plugin
     7
     8=== Current Status ===
     9- MIGRATED TO A NEW SIMILAR PREFERENCE EXTENSION POINT PROVIDED BY GRITS CORE PLUGIN
    810
    911== Running a Pure E4 Application ==
    1012When All the plugins are migrated to E4, then we should get rid of the ''Classical Eclipse Application'' and use a pure E4 Application instead. Some of the steps to migrate this to pure E4 application would be to get rid of the Application class along with the application extension. An ''Application Manager'' class instead should create the ''workspace chooser'' dialog and then start the application. this should be registered in the product extension to the product as lifeCycleURI property.
    1113
     14=== Current Status ===
     15- PARTLY TESTED IN BRANCH "''e4migration_branch2_e4_application''"
     16 - grits core and sample plugin are e4 plugin that were run in pure e4 application
     17
    1218=== Helpful Links ===
    13 Here are few helpful links for this migration[[BR]]
     19Here are few helpful links for this migration:
     20
    1421[http://www.vogella.com/tutorials/Eclipse4LifeCycle/article.html#lifecycle E4 Lifecycle][[BR]]
    1522[https://dirksmetric.wordpress.com/2012/08/01/tutorial-eclipse-rcp-e4-with-3-x-views-like-project-explorer-properties-etc/ Eclipse 4 with 3.x Views][[BR]]
    1623[http://www.eclipsecon.org/france2013/sites/default/files/ECF2013_MigrationE3toE4.pdf Migration Eclipse 3.x to E4][[BR]]
    1724
    18 === Progress Bar to splash screen in e4 ===
    19 Pure Eclipse 4 application would need to add a progressbar to the splash. Below are few of the links to the problem and suggested solution.[[BR]]
     25== Progress Bar to splash screen in e4 ==
     26Pure Eclipse 4 application would need to add a progressbar to the splash. Below are few of the links to the problem and suggested solution:
     27
    2028[http://www.eclipse.org/forums/index.php/m/884574/][[BR]]
    2129[https://www.eclipse.org/forums/index.php/t/413100/][[BR]]
     
    2331
    2432== E4 Dialogs and Wizards ==
    25 E4 Dialogs and Wizards are broken and have open bugs. It is being reworked with target milestone eclipse 4.7. We can consider migrating dialogs and wizards once this is done. Here is the link to the bug report :
     33E4 Dialogs and Wizards are broken and have open bugs. It is being reworked with target milestone of eclipse 4.7. We can consider migrating dialogs and wizards once this is done. Here is the link to the bug report and discussion:
     34
    2635[https://bugs.eclipse.org/bugs/show_bug.cgi?id=460826][[BR]]
    2736[https://bugs.eclipse.org/bugs/show_bug.cgi?id=460826#c18][[BR]]
    2837[https://www.eclipse.org/forums/index.php?t=msg&th=1074946&goto=1724062&#msg_1724062][[BR]]
    2938
    30 == Toolbar for Section ==
    31 In eclipse 3.x implementation the ''ToolBarManager'' class (org.eclipse.jface.action.ToolBarManager) that is added to the ''Section'' class (org.eclipse.ui.forms.widgets.Section) used ''Action'' class (org.eclipse.jface.action.Action) for doing some action. For now, in our current e4 migration we have created ''ToolItem'' (org.eclipse.swt.widgets.ToolItem) from toolbar and in its selection listener, we execute commands that are defined in the e4xmi file. If one finds a better way to use the e4 architecture for achieving this goal, we should change it to that implementation.
    32 
    33 === Current E4 Implementation ===
    34 
    35 {{{
    36 
    37 
    38         Section section = (Section) eventsTableViewer.getTable().getParent().getParent();
    39         ToolBarManager toolBarManager = new ToolBarManager(SWT.FLAT);
    40         ToolBar toolbar = toolBarManager.createControl(section);
    41         section.setTextClient(toolbar);
    42 
    43         // define a commandId
    44         ToolItem toolItem = new ToolItem(toolbar, SWT.PUSH);
    45         toolItem.setImage(icon);
    46         toolItem.setToolTipText(toolTipText);
    47         toolItem.addSelectionListener(new SelectionListener()
    48         {
    49                 @Override
    50                 public void widgetSelected(SelectionEvent e)
    51                 {
    52                         executeCommand(e, commandId);
    53                 }
    54 
    55                 @Override
    56                 public void widgetDefaultSelected(SelectionEvent e)
    57                 {
    58                         executeCommand(e, commandId);
    59                 }
    60 
    61                 private void executeCommand(Object eventObject, String commandId)
    62                 {
    63                         selectionService.setSelection(eventObject);
    64                         eHandlerService.executeHandler(
    65                                         eCommandService.createCommand(commandId, null));
    66                 }
    67         });
    68 
    69 }}}