// Path: e3-based-application/org.fipro.eclipse.migration.model/src/org/fipro/eclipse/migration/model/Person.java
// public class Person extends ModelObject {
// 
// 	public enum Gender {
// 		MALE, FEMALE
// 	}
// 	
// 	private final int id;
// 	private String firstName;
// 	private String lastName;
// 	private Gender gender;
// 	private boolean married;
// 	private Date birthday;
// 	
// 	public Person(int id) { 
// 		this.id = id;
// 	}
// 	
// 	public Person(int id, String firstName, String lastName, Gender gender, boolean married, Date birthday) {
// 		this.id = id;
// 		this.firstName = firstName;
// 		this.lastName = lastName;
// 		this.gender = gender;
// 		this.married = married;
// 		this.birthday = birthday;
// 	}
// 	
// 	public Person(Person base) {
// 		this.id = base.id;
// 		this.firstName = base.firstName;
// 		this.lastName = base.lastName;
// 		this.gender = base.gender;
// 		this.married = base.married;
// 		this.birthday = base.birthday;
// 	}
// 	
// 	public int getId() {
// 		return id;
// 	}
// 	
// 	public String getFirstName() {
// 		return firstName;
// 	}
// 	
// 	public void setFirstName(String firstName) {
// 		firePropertyChange("firstName", this.firstName, this.firstName = firstName);
// 	}
// 	
// 	public String getLastName() {
// 		return lastName;
// 	}
// 	
// 	public void setLastName(String lastName) {
// 		firePropertyChange("lastName", this.lastName, this.lastName = lastName);
// 	}
// 	
// 	public Gender getGender() {
// 		return gender;
// 	}
// 	
// 	public void setGender(Gender gender) {
// 		firePropertyChange("gender", this.gender, this.gender = gender);
// 	}
// 	
// 	public boolean isMarried() {
// 		return married;
// 	}
// 	
// 	public void setMarried(boolean married) {
// 		firePropertyChange("married", this.married, this.married = married);
// 	}
// 	
// 	public Date getBirthday() {
// 		return birthday;
// 	}
// 	
// 	public void setBirthday(Date birthday) {
// 		this.birthday = birthday;
// 	}
// 	 
// 	@Override
// 	public int hashCode() {
// 		final int prime = 31;
// 		int result = 1;
// 		result = prime * result + id;
// 		return result;
// 	}
// 
// 	@Override
// 	public boolean equals(Object obj) {
// 		if (this == obj)
// 			return true;
// 		if (obj == null)
// 			return false;
// 		if (getClass() != obj.getClass())
// 			return false;
// 		Person other = (Person) obj;
// 		if (id != other.id)
// 			return false;
// 		return true;
// 	}
// 
// }
// 
// Path: e3-based-application/org.fipro.eclipse.migration.model/src/org/fipro/eclipse/migration/model/Person.java
// public enum Gender {
// 	MALE, FEMALE
// }


import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import org.eclipse.core.databinding.DataBindingContext;
import org.eclipse.core.databinding.beans.BeanProperties;
import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.databinding.swt.WidgetProperties;
import org.eclipse.jface.databinding.viewers.ViewersObservables;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.viewers.ArrayContentProvider;
import org.eclipse.jface.viewers.ComboViewer;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.part.EditorPart;
import org.fipro.eclipse.migration.model.Person;
import org.fipro.eclipse.migration.model.Person.Gender;
package org.fipro.eclipse.migration.ui.editor;




public class PersonEditor extends EditorPart {

	public static final String ID = "org.fipro.eclipse.migration.ui.editor.personeditor";
	
	Person person;
	Person activePerson;
	
	boolean dirty = false;
	
	@Override
	public void init(IEditorSite site, IEditorInput input) throws PartInitException {
		if (!(input instanceof PersonEditorInput)) {
			throw new RuntimeException("Wrong input");
		}
		
		this.person = ((PersonEditorInput) input).person;
// Path: e3-based-application/org.fipro.eclipse.migration.model/src/org/fipro/eclipse/migration/model/Person.java
// public class Person extends ModelObject {
// 
// 	public enum Gender {
// 		MALE, FEMALE
// 	}
// 	
// 	private final int id;
// 	private String firstName;
// 	private String lastName;
// 	private Gender gender;
// 	private boolean married;
// 	private Date birthday;
// 	
// 	public Person(int id) { 
// 		this.id = id;
// 	}
// 	
// 	public Person(int id, String firstName, String lastName, Gender gender, boolean married, Date birthday) {
// 		this.id = id;
// 		this.firstName = firstName;
// 		this.lastName = lastName;
// 		this.gender = gender;
// 		this.married = married;
// 		this.birthday = birthday;
// 	}
// 	
// 	public Person(Person base) {
// 		this.id = base.id;
// 		this.firstName = base.firstName;
// 		this.lastName = base.lastName;
// 		this.gender = base.gender;
// 		this.married = base.married;
// 		this.birthday = base.birthday;
// 	}
// 	
// 	public int getId() {
// 		return id;
// 	}
// 	
// 	public String getFirstName() {
// 		return firstName;
// 	}
// 	
// 	public void setFirstName(String firstName) {
// 		firePropertyChange("firstName", this.firstName, this.firstName = firstName);
// 	}
// 	
// 	public String getLastName() {
// 		return lastName;
// 	}
// 	
// 	public void setLastName(String lastName) {
// 		firePropertyChange("lastName", this.lastName, this.lastName = lastName);
// 	}
// 	
// 	public Gender getGender() {
// 		return gender;
// 	}
// 	
// 	public void setGender(Gender gender) {
// 		firePropertyChange("gender", this.gender, this.gender = gender);
// 	}
// 	
// 	public boolean isMarried() {
// 		return married;
// 	}
// 	
// 	public void setMarried(boolean married) {
// 		firePropertyChange("married", this.married, this.married = married);
// 	}
// 	
// 	public Date getBirthday() {
// 		return birthday;
// 	}
// 	
// 	public void setBirthday(Date birthday) {
// 		this.birthday = birthday;
// 	}
// 	 
// 	@Override
// 	public int hashCode() {
// 		final int prime = 31;
// 		int result = 1;
// 		result = prime * result + id;
// 		return result;
// 	}
// 
// 	@Override
// 	public boolean equals(Object obj) {
// 		if (this == obj)
// 			return true;
// 		if (obj == null)
// 			return false;
// 		if (getClass() != obj.getClass())
// 			return false;
// 		Person other = (Person) obj;
// 		if (id != other.id)
// 			return false;
// 		return true;
// 	}
// 
// }
// 
// Path: e3-based-application/org.fipro.eclipse.migration.model/src/org/fipro/eclipse/migration/model/Person.java
// public enum Gender {
// 	MALE, FEMALE
// }


// Path: e3-based-application/org.fipro.eclipse.migration.ui/src/org/fipro/eclipse/migration/ui/editor/PersonEditor.java
import java.beans.PropertyChangeEvent;
import java.beans.PropertyChangeListener;
import org.eclipse.core.databinding.DataBindingContext;
import org.eclipse.core.databinding.beans.BeanProperties;
import org.eclipse.core.databinding.observable.value.IObservableValue;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.databinding.swt.WidgetProperties;
import org.eclipse.jface.databinding.viewers.ViewersObservables;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.viewers.ArrayContentProvider;
import org.eclipse.jface.viewers.ComboViewer;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.swt.SWT;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.part.EditorPart;
import org.fipro.eclipse.migration.model.Person;
import org.fipro.eclipse.migration.model.Person.Gender;

package org.fipro.eclipse.migration.ui.editor;




public class PersonEditor extends EditorPart {

	public static final String ID = "org.fipro.eclipse.migration.ui.editor.personeditor";
	
	Person person;
	Person activePerson;
	
	boolean dirty = false;
	
	@Override
	public void init(IEditorSite site, IEditorInput input) throws PartInitException {
		if (!(input instanceof PersonEditorInput)) {
			throw new RuntimeException("Wrong input");
		}
		
		this.person = ((PersonEditorInput) input).person;
		this.activePerson = new Person(this.person);