Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
Difference between revisions of "EMF Facet/Table/UI Test"
m (→Customization: added uiCustom ICon) |
(→Menu Button: added basics action test) |
||
Line 54: | Line 54: | ||
[[Image:TABLE UI TEST LOAD CUSTOMIZATION.png]] | [[Image:TABLE UI TEST LOAD CUSTOMIZATION.png]] | ||
* Test that unload works as well, returning to a "non customized" table (no undo at the time) | * 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 [[Image: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 [[Image: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 [[Image: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. |
Revision as of 08:53, 16 March 2011
Contents
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 :
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
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
- Choose "Ecore" customization, you should obtain the following result :
- 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
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
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
Only the common column between EClass an EDataType should be visible, you should be able to save this state, or undo this action.