Difference between revisions of "EEF/Migrating version"

From Eclipsepedia

< EEF
Jump to: navigation, search
(API changes)
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Back To|name=EEF|href=EEF}}
 
 
This page list all the migration process
 
This page list all the migration process
  
Line 10: Line 9:
 
==== Migrating from end-user point of view ====
 
==== Migrating from end-user point of view ====
  
*First, '''relaunch generation'''. Use the '''organize imports''' action of JDT if needed.  
+
* First, '''relaunch generation'''. Use the '''organize imports''' action of JDT if needed.  
*If you have user code lost in *.lost files, use components and views extension mechanism to '''reintegrate this code'''. '''Delete lost files'''.
+
* If you have user code lost in *.lost files, use components and views extension mechanism to '''reintegrate this code'''. '''Delete lost files'''.
*The components providing mechanism have been changed in 0.9. EEF don't use the XXXPackageEditionProvider and XXXPackagePolicyEditionProvider to get controller and editing policies but a generated AdapterFactory instead. '''Delete theses classes'''.
+
* The components providing mechanism have been changed in 0.9. EEF don't use the XXXPackagePropertiesEditionProvider and XXXPackagePropertiesEditionPolicyProvider to get controller and editing policies but a generated AdapterFactory instead. '''Delete theses classes'''.
 
[[Image:EEF_0.9_Migrating_-_Deleting_Providers.png|Delete unused providers in 0.9]]
 
[[Image:EEF_0.9_Migrating_-_Deleting_Providers.png|Delete unused providers in 0.9]]
  
  
  
*The sample plugin.xml generated file is updated with the new AdapterFactory declaration. '''Replace old EEF providers declaration by the generated AdapterFactory'''.
+
* The sample plugin.xml generated file is updated with the new AdapterFactory declaration. '''Replace old EEF providers declaration by the generated AdapterFactory'''.
 
[[Image:EEF_0.9_Migrating_-_Declare_the_generated_AdapterFactory.png|Replaced old EEF providers by the generated AdapterFactory]]
 
[[Image:EEF_0.9_Migrating_-_Declare_the_generated_AdapterFactory.png|Replaced old EEF providers by the generated AdapterFactory]]
  
  
  
*Finally, '''update the OpenWizardOnDoubleClick constructor cal'''l (if you use wizards). It takes now the adapterFactory to use in parameter.
+
* Finally, '''update the OpenWizardOnDoubleClick constructor call''' (if you use wizards). It takes now the adapterFactory to use in parameter.
 
[[Image:EEF_0.9_Migrating_-_Add_AdapterFactory_to_OpenWizardOnDoubleClick_listener_constructor.png|Add adapterFactory to OpenWizard listener constructor]]
 
[[Image:EEF_0.9_Migrating_-_Add_AdapterFactory_to_OpenWizardOnDoubleClick_listener_constructor.png|Add adapterFactory to OpenWizard listener constructor]]
  
 
It works ! If you have any other trouble, see API Changes section or ask on EMFT newsgroup
 
It works ! If you have any other trouble, see API Changes section or ask on EMFT newsgroup
  
==== API changes ====
+
==== API changes ====
  
The Batch mode in EEF have been redefined. It no longer use clone to compute difference before and after editing, but use ChangeRecorder instead. When opening an editing session in batch mode (basically editing a model element with the EEF wizard), changes are made in live, and if cancel button is used, all changes of the session are undone. This implies major API changes :
+
The Batch mode in EEF have been redefined. It no longer use clone to compute difference before and after editing, but use ChangeRecorder instead. When opening an editing session in batch mode (basically editing a model element with the EEF wizard), changes are made in live, and if cancel button is used, all changes of the session are undone. This implies major API changes&nbsp;:  
  
* IPropertiesEditionPolicy has been renamed PropertiesEditingPolicy
+
* '''IPropertiesEditionPolicy''' has been renamed '''PropertiesEditingPolicy'''
* StandardEditingPolicy and CreateEditingPolicy implements this interface
+
* '''StandardEditingPolicy''' and '''CreateEditingPolicy''' implements this interface  
* StandardEditingCommand and WizardEditingCommand are created
+
* '''StandardEditingCommand''' and '''WizardEditingCommand''' are created  
* OpenTransactionalWizardOnDoubleClick and WizardEditingOperation are created for EMF Workspace compliance
+
* '''OpenTransactionalWizardOnDoubleClick''' and '''WizardEditingOperation''' are created for EMF Workspace compliance  
 +
* '''EEFEditorSettings''' has been created
 +
* '''EObjectFlatComboSettings''' and '''ReferencesTableSettings''' are standard implementations of this interface
 +
* '''AdvancedEEFEditorContentProvider''', '''EEFEditorContentProvider''' and '''ReferencesTableContentProvider''' have been created to manage settings in viewers
 +
* '''EMFListEditUtil''' (clones manager) have been deleted
 +
* '''IPropertiesEditionPolicy''', '''IPropertiesEditionPolicyProvider''' and '''StandardPropertiesEditionPolicy''' have been deleted
 +
* ''getPropertiesEditionCommand()'' and ''getPropertiesEditionObject()'' are deleted from '''IPropertiesEditionComponent'''
  
* getPropertiesEditionCommand() and getPropertiesEditionObject() are deleted from IPropertiesEditionComponent
 
* EMFListEditUtil (clones manager) is removed
 
  
AdapterFactory are now used in order to replace PropertiesEditionProvider and PropertiesEditionPolicyProvider :
+
AdapterFactory are now used in order to replace PropertiesEditionProvider and PropertiesEditionPolicyProvider&nbsp;:  
* PropertiesEditingPolicy has been created
+
* '''PropertiesEditingPolicy''' has been created  
* PropertiesEditingPolicyImpl a standard implementation of this interface has been created
+
* '''PropertiesEditingPolicyImpl''' a standard implementation of this interface has been created  
 +
* '''IPropertiesEditionProvider''', '''IPropertiesEditionProviderFactory''' and '''IPropertiesEditionPolicyProviderFactory''' are deleted
 +
* '''RegistryPropertiesEditionProvider''', '''StandardPropertiesEditionPolicyProvider''', '''StandardPropertiesEditionPolicyProviderFactory''' and '''StandardPropertiesEditionProviderFactory''' are deleted
 +
* '''PropertiesEditionComponentService''' and '''PropertiesEditionPolicyProviderService''' are deleted
  
* IPropertiesEditionProvider, IPropertiesEditionProviderFactory and IPropertiesEditionPolicyProviderFactory are deleted
 
* RegistryPropertiesEditionProvider, StandardPropertiesEditionPolicyProvider, StandardPropertiesEditionPolicyProviderFactory and StandardPropertiesEditionProviderFactory are deleted
 
* PropertiesEditionComponentService and PropertiesEditionPolicyProviderService are deleted
 
  
A new layer of component have been introduce to reduce significantly the amount of generated code :
+
A new layer of component have been introduce to reduce significantly the amount of generated code&nbsp;:  
* PropertiesEditingSemanticListener have been created
+
* '''PropertiesEditingSemanticListener''' has been created
 +
* '''SinglePartPropertiesEditionComponent''' has been created
  
  
The editing context management have been improved. Associated API changes are :
+
A descriptive system for parts construction was created to make views more dynamic.  
* IPropertiesEditionContext renamed PropertiesEditingContext
+
*'''PartComposer''', '''CompositionStep''' and '''CompositionSequence''' have been created
* DomainPropertiesEditionContext, EObjectPropertiesEditionContext and EReferencePropertiesEditionContext implements this interface
+
* TypedEReferencePropertiesEditionContext is created as sub-class of EReferencePropertiesEditionContext
+
  
A "Extended" runtime (org.eclipse.emf.eef.runtime.extended) has been created to bring all the "third parties dependant" widgets and all elements needed for others concerns than properties view dans wizard (basically for editors) :
 
* AbstractEEFMDFormPage, EEFDetailsPage, EEFStandardFormPage, EEFPropertiesViewerMDFormPage, EEFTreeMDFormPage have been moved to extended runtime
 
* EEFFormLayoutFactory, EEFView have been moved to extended runtime
 
* AbstractEEFMasterDetailsBlock, AbstractEEFMasterPart, PropertiesViewerMasterDetailsBlock, PropertiesViewerMasterPart, EEFTreeMasterDetailsBlock, EEFTreeMasterPart have been moved to extended runtime
 
  
 +
Key of views are now java.lang.Object instead of java.lang.Class and java.lang.String
 +
* ''initPart()'', ''setPropertiesEditionPart()'', ''mustBeComposed()'', ''isRequired()'', ''getHelpContent()'' and ''translatePart()'' of '''IPropertiesEditionComponent''' have been modified
 +
* '''ComposedPropertiesEditionComponent''' and '''StandardPropertiesEditionComponent''' have been modify accordingly theses changes
 +
* ''getAffectedEditor()'' of '''IPropertiesEditionEvent''' has been modified
 +
* '''PropertiesEditionEvent''' and '''PropertiesValidationEditionEvent''' have been updated accordingly to this change
 +
* ''provides()'' and  ''getPropertiesEditionPart()'' of '''IPropertiesEditionPartProvider''' have been modified
 +
* ''provides()'' and ''getProvider()'' of '''IPropertiesEditionPartProviderFactory''' have been modified
 +
* '''PropertiesEditionPartProviderService''' has been updated accordingly to theses changes
  
* DropDownSelectionListener have been moved to the extended runtime
 
  
Some Obsolete classes have been deleted :
+
The editing context management have been improved. Associated API changes are&nbsp;:
* EMFPropertiesRuntime
+
* PropertiesEditionComponent own a '''IPropertiesEditingContext''' accessible via ''getPropertiesEditingContext()''
* EEFMessageManager
+
* '''IPropertiesEditionContext''' renamed '''PropertiesEditingContext'''
*
+
* '''DomainPropertiesEditionContext''', '''EObjectPropertiesEditionContext''' and '''EReferencePropertiesEditionContext''' implements this interface
 +
* '''TypedEReferencePropertiesEditionContext''' is created as sub-class of '''EReferencePropertiesEditionContext'''
  
 +
 +
A "Extended" runtime (org.eclipse.emf.eef.runtime.extended) has been created to bring all the "third parties dependant" widgets and all elements needed for others concerns than properties view dans wizard (basically for editors)&nbsp;:
 +
* '''AbstractEEFMDFormPage''', '''EEFDetailsPage''', '''EEFStandardFormPage''', '''EEFPropertiesViewerMDFormPage''', '''EEFTreeMDFormPage''' have been moved to extended runtime
 +
* '''EEFFormLayoutFactory''', '''EEFView''' have been moved to extended runtime
 +
* '''AbstractEEFMasterDetailsBlock''', '''AbstractEEFMasterPart''', '''PropertiesViewerMasterDetailsBlock''', '''PropertiesViewerMasterPart''', '''EEFTreeMasterDetailsBlock''', '''EEFTreeMasterPart''' have been moved to extended runtime
 +
 +
 +
And miscellaneous changes have been performed to improve existing features
 +
* '''EEFWizardDialog''' have been created
 +
* The package of '''DropDownSelectionListener''' have been changed
 +
 +
 +
Some Obsolete classes have been deleted&nbsp;:
 +
*'''EMFPropertiesRuntime'''
 +
*'''EEFMessageManager'''
  
 
[[Category:EEF]]
 
[[Category:EEF]]

Latest revision as of 04:13, 19 April 2011

This page list all the migration process

Contents

[edit] From v0.8.X to v0.9.X

[edit] Migrating models

There was no regressive changes in EEF metamodels in 0.9 version.

[edit] Migrating from end-user point of view

  • First, relaunch generation. Use the organize imports action of JDT if needed.
  • If you have user code lost in *.lost files, use components and views extension mechanism to reintegrate this code. Delete lost files.
  • The components providing mechanism have been changed in 0.9. EEF don't use the XXXPackagePropertiesEditionProvider and XXXPackagePropertiesEditionPolicyProvider to get controller and editing policies but a generated AdapterFactory instead. Delete theses classes.

Delete unused providers in 0.9


  • The sample plugin.xml generated file is updated with the new AdapterFactory declaration. Replace old EEF providers declaration by the generated AdapterFactory.

Replaced old EEF providers by the generated AdapterFactory


  • Finally, update the OpenWizardOnDoubleClick constructor call (if you use wizards). It takes now the adapterFactory to use in parameter.

Add adapterFactory to OpenWizard listener constructor

It works ! If you have any other trouble, see API Changes section or ask on EMFT newsgroup

[edit] API changes

The Batch mode in EEF have been redefined. It no longer use clone to compute difference before and after editing, but use ChangeRecorder instead. When opening an editing session in batch mode (basically editing a model element with the EEF wizard), changes are made in live, and if cancel button is used, all changes of the session are undone. This implies major API changes :

  • IPropertiesEditionPolicy has been renamed PropertiesEditingPolicy
  • StandardEditingPolicy and CreateEditingPolicy implements this interface
  • StandardEditingCommand and WizardEditingCommand are created
  • OpenTransactionalWizardOnDoubleClick and WizardEditingOperation are created for EMF Workspace compliance
  • EEFEditorSettings has been created
  • EObjectFlatComboSettings and ReferencesTableSettings are standard implementations of this interface
  • AdvancedEEFEditorContentProvider, EEFEditorContentProvider and ReferencesTableContentProvider have been created to manage settings in viewers
  • EMFListEditUtil (clones manager) have been deleted
  • IPropertiesEditionPolicy, IPropertiesEditionPolicyProvider and StandardPropertiesEditionPolicy have been deleted
  • getPropertiesEditionCommand() and getPropertiesEditionObject() are deleted from IPropertiesEditionComponent


AdapterFactory are now used in order to replace PropertiesEditionProvider and PropertiesEditionPolicyProvider :

  • PropertiesEditingPolicy has been created
  • PropertiesEditingPolicyImpl a standard implementation of this interface has been created
  • IPropertiesEditionProvider, IPropertiesEditionProviderFactory and IPropertiesEditionPolicyProviderFactory are deleted
  • RegistryPropertiesEditionProvider, StandardPropertiesEditionPolicyProvider, StandardPropertiesEditionPolicyProviderFactory and StandardPropertiesEditionProviderFactory are deleted
  • PropertiesEditionComponentService and PropertiesEditionPolicyProviderService are deleted


A new layer of component have been introduce to reduce significantly the amount of generated code :

  • PropertiesEditingSemanticListener has been created
  • SinglePartPropertiesEditionComponent has been created


A descriptive system for parts construction was created to make views more dynamic.

  • PartComposer, CompositionStep and CompositionSequence have been created


Key of views are now java.lang.Object instead of java.lang.Class and java.lang.String

  • initPart(), setPropertiesEditionPart(), mustBeComposed(), isRequired(), getHelpContent() and translatePart() of IPropertiesEditionComponent have been modified
  • ComposedPropertiesEditionComponent and StandardPropertiesEditionComponent have been modify accordingly theses changes
  • getAffectedEditor() of IPropertiesEditionEvent has been modified
  • PropertiesEditionEvent and PropertiesValidationEditionEvent have been updated accordingly to this change
  • provides() and getPropertiesEditionPart() of IPropertiesEditionPartProvider have been modified
  • provides() and getProvider() of IPropertiesEditionPartProviderFactory have been modified
  • PropertiesEditionPartProviderService has been updated accordingly to theses changes


The editing context management have been improved. Associated API changes are :

  • PropertiesEditionComponent own a IPropertiesEditingContext accessible via getPropertiesEditingContext()
  • IPropertiesEditionContext renamed PropertiesEditingContext
  • DomainPropertiesEditionContext, EObjectPropertiesEditionContext and EReferencePropertiesEditionContext implements this interface
  • TypedEReferencePropertiesEditionContext is created as sub-class of EReferencePropertiesEditionContext


A "Extended" runtime (org.eclipse.emf.eef.runtime.extended) has been created to bring all the "third parties dependant" widgets and all elements needed for others concerns than properties view dans wizard (basically for editors) :

  • AbstractEEFMDFormPage, EEFDetailsPage, EEFStandardFormPage, EEFPropertiesViewerMDFormPage, EEFTreeMDFormPage have been moved to extended runtime
  • EEFFormLayoutFactory, EEFView have been moved to extended runtime
  • AbstractEEFMasterDetailsBlock, AbstractEEFMasterPart, PropertiesViewerMasterDetailsBlock, PropertiesViewerMasterPart, EEFTreeMasterDetailsBlock, EEFTreeMasterPart have been moved to extended runtime


And miscellaneous changes have been performed to improve existing features

  • EEFWizardDialog have been created
  • The package of DropDownSelectionListener have been changed


Some Obsolete classes have been deleted :

  • EMFPropertiesRuntime
  • EEFMessageManager