Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

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

(Ui Tests)
Line 21: Line 21:
  
 
Select Class1 and Class2, right click on them and select "Edit in a Table Editor"
 
Select Class1 and Class2, right click on them and select "Edit in a Table Editor"
You should obtain this result :
+
You should obtain this result :[[Image:TABLE UI TEST OPEN CLASSES.png]]
 +
 
  
 
=== Serialization ===
 
=== Serialization ===
Line 49: Line 50:
 
* Press "Load a Customization" in the main Eclipse toolbar
 
* Press "Load a Customization" in the main Eclipse toolbar
 
* Choose "Ecore" customization, you should obtain the following result :  
 
* Choose "Ecore" customization, you should obtain the following result :  
 
+
[[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)

Revision as of 07:18, 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

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 :

TABLE UI TEST LOAD CUSTOMIZATION.png

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

Back to the top