Skip to main content
Jump to: navigation, search

Difference between revisions of "EMF Facet/Table/UI Test"

(Drag and Drop)
m (Editability)
Line 32: Line 32:
 
** To validate the modification, either press "Enter" or click outside the cell (both should be working)
 
** To validate the modification, either press "Enter" or click outside the cell (both should be working)
 
** You should be able to cancel your action, either with the "CTRL+Z" shorcut, or through the usual Edit menu
 
** You should be able to cancel your action, either with the "CTRL+Z" shorcut, or through the usual Edit menu
** The editor state should switch to "dirty", and you sould be able to save modification.
+
=> The editor state should switch to "dirty", and you sould be able to save modification.
  
  
 
* Move the Table horizontal scroll bar so that it does not stick to its initial position, and change Class2 name for "Class20"
 
* Move the Table horizontal scroll bar so that it does not stick to its initial position, and change Class2 name for "Class20"
** The horizontal scrollBar should stay at its current position.
+
=> The horizontal scrollBar should stay at its current position.
  
 
=== Drag and Drop===
 
=== Drag and Drop===

Revision as of 09:03, 16 March 2011

Ui Tests

Create a Java project named test

In the project test001, create an ecore model: File > New > Other > Eclipse Modeling Framework > Ecore Model

  • name: MyEcoreModel

Press Next

  • Model Object : EPackage
  • XML Encoding : UTF-8

Press Finish

In MyEcoreModel.ecore, fill the newly created package inforamtion:

  • name : MyPackage
  • Ns Prefix : MyNsPrefix
  • NS URI : MyNsURI

Right click on MyPackage, "New Child" > "EClass"

  • name : Class1

Right click on MyPackage, "New Child" > "EClass"

  • name : Class2

Select Class1 and Class2, right click on them and select "Edit in a Table Editor" You should obtain this result :TABLE UI TEST OPEN CLASSES.png


Serialization

Test that you can serialize the Table using either the Shortcut "CRTL + S", or the usual menu button.

  • Name it "classes.table", press "Enter", the editor's state has to change from dirty to clean.

Editability

  • Edit Class1 name (Shortcut F2 and double click on the cell name have to be working), change it for Class10.
    • To validate the modification, either press "Enter" or click outside the cell (both should be working)
    • You should be able to cancel your action, either with the "CTRL+Z" shorcut, or through the usual Edit menu

=> The editor state should switch to "dirty", and you sould be able to save modification.


  • Move the Table horizontal scroll bar so that it does not stick to its initial position, and change Class2 name for "Class20"

=> The horizontal scrollBar should stay at its current position.

Drag and Drop

Go back to MyEcoreModel.ecore, and add a new EDataType child

  • name : EDataType1
  • Arrange the editor window so that you can see both ecore and table editor.
  • Drag EDataType1 over the table editor and drop it in an empty area.

=>A new line should be added to the table (check that undo is possible), save this new table state

  • Drag again EDataType1 over the table editor and drop it in an empty area

=> Nothing should happen, it is not possible to add an already contained element.

Menu Button

Customization

EMF Facet project comes with an example of ECore Customization on Classes

  • Open classes.table
  • Press "Load a Customization" in the main Eclipse toolbar EMF FACET TABLE uiCustom.gif
  • Choose "Ecore" customization, you should obtain the following result :

TABLE UI TEST LOAD CUSTOMIZATION.png

  • Test that unload works as well, returning to a "non customized" table (no undo at the time)

Hide Empty Column

Click on the "Hide Empty Column" menu button in the main toolbar EMF FACET TABLE non-zero.gif

All empty column, and column with every value set to null should be hidden, you should be able to save this state, or undo this action.

Sort Column by type

Click on the "Sort Column by Type" menu button in the main toolbar EMF FACET TABLE sort links by type.gif

The column should be sorted by type, you should be able to save this state, or undo this action.

Only Show common Column

Click on the "SOnly Show common Column" menu button in the main toolbar EMF FACET TABLE commonColumns.gif

Only the common column between EClass an EDataType should be visible, you should be able to save this state, or undo this action.

Back to the top