View | Details | Raw Unified | Return to bug 131762 | Differences between
and this patch

Collapse All | Expand All

(-)src/org/eclipse/gmf/tests/gen/CodegenReconcileTest.java (-1 / +10 lines)
Lines 105-113 Link Here
105
		myEditorGen = diaGenSetup.getGenDiagram().getEditorGen();
105
		myEditorGen = diaGenSetup.getGenDiagram().getEditorGen();
106
			
106
			
107
		class ListLayoutChange extends Assert implements UserChange {
107
		class ListLayoutChange extends Assert implements UserChange {
108
			//FIXME: "MyCanonicalEditPolicy" or "MyGraphiclNodeEditPolicy" will break the magic
109
			private final String NEW_CANONICAL_EP = "MyCanonicalPolicy";
108
			private final String NEW_CANONICAL_EP = "MyCanonicalPolicy";
110
			private final String NEW_GRAPHICAL_EP = "MyGraphicalPolicy";
109
			private final String NEW_GRAPHICAL_EP = "MyGraphicalPolicy";
110
			private final String BAD_CANONICAL_EP = "MyCanonicalEditPolicy"; //changed but still follows "(.*)CanonicalEditPolicy" pattern
111
			private final String BAD_GRAPHICAL_EP = "MyGraphicalNodeEditPolicy"; //changed but still follows "(.*)GraphicalNodeEditPolicy" pattern
111
			
112
			
112
			public void applyChanges(GenEditorGenerator old) {
113
			public void applyChanges(GenEditorGenerator old) {
113
				EList oldNodes = old.getDiagram().getAllNodes();
114
				EList oldNodes = old.getDiagram().getAllNodes();
Lines 120-125 Link Here
120
				
121
				
121
				nodeA.setCanonicalEditPolicyClassName(NEW_CANONICAL_EP);
122
				nodeA.setCanonicalEditPolicyClassName(NEW_CANONICAL_EP);
122
				nodeA.setGraphicalNodeEditPolicyClassName(NEW_GRAPHICAL_EP);
123
				nodeA.setGraphicalNodeEditPolicyClassName(NEW_GRAPHICAL_EP);
124
				
125
				nodeB.setCanonicalEditPolicyClassName(BAD_CANONICAL_EP);
126
				nodeB.setGraphicalNodeEditPolicyClassName(BAD_GRAPHICAL_EP);
123
			}
127
			}
124
			
128
			
125
			public void assertChangesPreserved(GenEditorGenerator current) {
129
			public void assertChangesPreserved(GenEditorGenerator current) {
Lines 133-138 Link Here
133
				
137
				
134
				assertEquals(NEW_CANONICAL_EP, nodeA.getCanonicalEditPolicyClassName());
138
				assertEquals(NEW_CANONICAL_EP, nodeA.getCanonicalEditPolicyClassName());
135
				assertEquals(NEW_GRAPHICAL_EP, nodeA.getGraphicalNodeEditPolicyClassName());
139
				assertEquals(NEW_GRAPHICAL_EP, nodeA.getGraphicalNodeEditPolicyClassName());
140
				
141
				//FIXME: the checks below handle the problem with string-pattern reconciling approach
142
				//remove this checks when we will be able to reconcile this correctly
143
				assertFalse(BAD_CANONICAL_EP.equals(nodeB.getCanonicalEditPolicyClassName()));
144
				assertFalse(BAD_GRAPHICAL_EP.equals(nodeB.getGraphicalNodeEditPolicyClassName()));
136
			}
145
			}
137
			
146
			
138
			public ReconcilerConfigBase getReconcilerConfig() {
147
			public ReconcilerConfigBase getReconcilerConfig() {

Return to bug 131762