Lines 153-485
Link Here
|
153 |
protected final String TEXT_132 = ";"; |
153 |
protected final String TEXT_132 = ";"; |
154 |
protected final String TEXT_133 = NL + "\t\t"; |
154 |
protected final String TEXT_133 = NL + "\t\t"; |
155 |
protected final String TEXT_134 = " figure = new "; |
155 |
protected final String TEXT_134 = " figure = new "; |
156 |
protected final String TEXT_135 = "();" + NL + " \t\tfigure.setUseLocalCoordinates("; |
156 |
protected final String TEXT_135 = "();"; |
157 |
protected final String TEXT_136 = ");" + NL + " \t\tprimaryShape = figure;"; |
157 |
protected final String TEXT_136 = NL + " \t\tfigure.setUseLocalCoordinates(true);"; |
158 |
protected final String TEXT_137 = NL + "\t\treturn primaryShape;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; |
158 |
protected final String TEXT_137 = NL + " \t\tprimaryShape = figure;"; |
159 |
protected final String TEXT_138 = " createDecorationPane() {" + NL + "\t\t"; |
159 |
protected final String TEXT_138 = NL + "\t\treturn primaryShape;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; |
160 |
protected final String TEXT_139 = " view = ("; |
160 |
protected final String TEXT_139 = " createDecorationPane() {" + NL + "\t\t"; |
161 |
protected final String TEXT_140 = ") getModel();" + NL + "\t\t"; |
161 |
protected final String TEXT_140 = " view = ("; |
162 |
protected final String TEXT_141 = " annotation = view.getEAnnotation(\"Shortcut\"); //$NON-NLS-1$" + NL + "\t\tif (annotation == null) {" + NL + "\t\t\treturn null;" + NL + "\t\t}" + NL + "\t\t" + NL + "\t\t"; |
162 |
protected final String TEXT_141 = ") getModel();" + NL + "\t\t"; |
163 |
protected final String TEXT_142 = " decorationPane = new "; |
163 |
protected final String TEXT_142 = " annotation = view.getEAnnotation(\"Shortcut\"); //$NON-NLS-1$" + NL + "\t\tif (annotation == null) {" + NL + "\t\t\treturn null;" + NL + "\t\t}" + NL + "\t\t" + NL + "\t\t"; |
164 |
protected final String TEXT_143 = "();" + NL + "\t\tdecorationPane.setLayoutManager(new "; |
164 |
protected final String TEXT_143 = " decorationPane = new "; |
165 |
protected final String TEXT_144 = "());" + NL + "" + NL + "\t\t"; |
165 |
protected final String TEXT_144 = "();" + NL + "\t\tdecorationPane.setLayoutManager(new "; |
166 |
protected final String TEXT_145 = " imageFigure = new "; |
166 |
protected final String TEXT_145 = "());" + NL + "" + NL + "\t\t"; |
167 |
protected final String TEXT_146 = "("; |
167 |
protected final String TEXT_146 = " imageFigure = new "; |
168 |
protected final String TEXT_147 = ".getInstance().getBundledImage(\"icons/shortcut.gif\"), "; |
168 |
protected final String TEXT_147 = "("; |
169 |
protected final String TEXT_148 = ".EAST);" + NL + "\t\tdecorationPane.add(imageFigure, "; |
169 |
protected final String TEXT_148 = ".getInstance().getBundledImage(\"icons/shortcut.gif\"), "; |
170 |
protected final String TEXT_149 = ".BOTTOM);" + NL + " \t\treturn decorationPane;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Default implementation treats passed figure as content pane." + NL + "\t * Respects layout one may have set for generated figure." + NL + "\t * @param nodeShape instance of generated figure class" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; |
170 |
protected final String TEXT_149 = ".EAST);" + NL + "\t\tdecorationPane.add(imageFigure, "; |
171 |
protected final String TEXT_150 = " setupContentPane("; |
171 |
protected final String TEXT_150 = ".BOTTOM);" + NL + " \t\treturn decorationPane;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Default implementation treats passed figure as content pane." + NL + "\t * Respects layout one may have set for generated figure." + NL + "\t * @param nodeShape instance of generated figure class" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; |
172 |
protected final String TEXT_151 = " nodeShape) {" + NL + "\t\tif (nodeShape.getLayoutManager() == null) {"; |
172 |
protected final String TEXT_151 = " setupContentPane("; |
173 |
protected final String TEXT_152 = NL + "\t\t\t"; |
173 |
protected final String TEXT_152 = " nodeShape) {" + NL + "\t\tif (nodeShape.getLayoutManager() == null) {"; |
174 |
protected final String TEXT_153 = " layout = new "; |
174 |
protected final String TEXT_153 = NL + "\t\t\t"; |
175 |
protected final String TEXT_154 = "();" + NL + "\t\t\tlayout.setSpacing(5);" + NL + "\t\t\tnodeShape.setLayoutManager(layout);"; |
175 |
protected final String TEXT_154 = " layout = new "; |
176 |
protected final String TEXT_155 = NL + "\t\tnodeShape.setLayoutManager(new "; |
176 |
protected final String TEXT_155 = "();" + NL + "\t\t\tlayout.setSpacing(5);" + NL + "\t\t\tnodeShape.setLayoutManager(layout);"; |
177 |
protected final String TEXT_156 = "() {" + NL + "" + NL + "\t\t\tpublic Object getConstraint("; |
177 |
protected final String TEXT_156 = NL + "\t\tnodeShape.setLayoutManager(new "; |
178 |
protected final String TEXT_157 = " figure) {" + NL + "\t\t\t\tObject result = constraints.get(figure);" + NL + "\t\t\t\tif (result == null) {" + NL + "\t\t\t\t\tresult = new "; |
178 |
protected final String TEXT_157 = "() {" + NL + "" + NL + "\t\t\tpublic Object getConstraint("; |
179 |
protected final String TEXT_158 = "(0, 0, -1, -1);" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn result;" + NL + "\t\t\t}" + NL + "\t\t});"; |
179 |
protected final String TEXT_158 = " figure) {" + NL + "\t\t\t\tObject result = constraints.get(figure);" + NL + "\t\t\t\tif (result == null) {" + NL + "\t\t\t\t\tresult = new "; |
180 |
protected final String TEXT_159 = NL + "\t\t}" + NL + "\t\treturn nodeShape; // use nodeShape itself as contentPane" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; |
180 |
protected final String TEXT_159 = "(0, 0, -1, -1);" + NL + "\t\t\t\t}" + NL + "\t\t\t\treturn result;" + NL + "\t\t\t}" + NL + "\t\t});"; |
181 |
protected final String TEXT_160 = " getContentPane() {" + NL + "\t\tif (contentPane == null) {" + NL + "\t\t\treturn super.getContentPane();" + NL + "\t\t}" + NL + "\t\treturn contentPane;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; |
181 |
protected final String TEXT_160 = NL + "\t\t}" + NL + "\t\treturn nodeShape; // use nodeShape itself as contentPane" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; |
182 |
protected final String TEXT_161 = " getDiagramNode() {" + NL + "\t\treturn ("; |
182 |
protected final String TEXT_161 = " getContentPane() {" + NL + "\t\tif (contentPane == null) {" + NL + "\t\t\treturn super.getContentPane();" + NL + "\t\t}" + NL + "\t\treturn contentPane;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; |
183 |
protected final String TEXT_162 = ") getModel();" + NL + "\t}" + NL; |
183 |
protected final String TEXT_162 = " getDiagramNode() {" + NL + "\t\treturn ("; |
184 |
protected final String TEXT_163 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean addFixedChild("; |
184 |
protected final String TEXT_163 = ") getModel();" + NL + "\t}" + NL; |
185 |
protected final String TEXT_164 = " childEditPart) {"; |
185 |
protected final String TEXT_164 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean addFixedChild("; |
186 |
protected final String TEXT_165 = NL + "\t\tif (childEditPart instanceof "; |
186 |
protected final String TEXT_165 = " childEditPart) {"; |
187 |
protected final String TEXT_166 = ") {"; |
187 |
protected final String TEXT_166 = NL + "\t\tif (childEditPart instanceof "; |
188 |
protected final String TEXT_167 = NL + "\t\t\t(("; |
188 |
protected final String TEXT_167 = ") {"; |
189 |
protected final String TEXT_168 = ") childEditPart).setLabel((("; |
189 |
protected final String TEXT_168 = NL + "\t\t\t(("; |
190 |
protected final String TEXT_169 = ") primaryShape).getFigure"; |
190 |
protected final String TEXT_169 = ") childEditPart).setLabel((("; |
191 |
protected final String TEXT_170 = "());"; |
191 |
protected final String TEXT_170 = ") primaryShape).getFigure"; |
192 |
protected final String TEXT_171 = NL + "\t\t\t(("; |
192 |
protected final String TEXT_171 = "());"; |
193 |
protected final String TEXT_172 = ") childEditPart).setLabel(new "; |
193 |
protected final String TEXT_172 = NL + "\t\t\t(("; |
194 |
protected final String TEXT_173 = "());"; |
194 |
protected final String TEXT_173 = ") childEditPart).setLabel(new "; |
195 |
protected final String TEXT_174 = NL + "\t\t\treturn true;" + NL + "\t\t}"; |
195 |
protected final String TEXT_174 = "());"; |
196 |
protected final String TEXT_175 = NL + "\t\treturn false;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Returns the label which should be direct-edited by default." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; |
196 |
protected final String TEXT_175 = NL + "\t\t\treturn true;" + NL + "\t\t}"; |
197 |
protected final String TEXT_176 = " getPrimaryLabelEditPart() {"; |
197 |
protected final String TEXT_176 = NL + "\t\treturn false;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * Returns the label which should be direct-edited by default." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; |
198 |
protected final String TEXT_177 = NL + "\t\tfor("; |
198 |
protected final String TEXT_177 = " getPrimaryLabelEditPart() {"; |
199 |
protected final String TEXT_178 = " it = getDiagramNode().getChildren().iterator(); it.hasNext(); ) {" + NL + "\t\t\t"; |
199 |
protected final String TEXT_178 = NL + "\t\tfor("; |
200 |
protected final String TEXT_179 = " nextChild = ("; |
200 |
protected final String TEXT_179 = " it = getDiagramNode().getChildren().iterator(); it.hasNext(); ) {" + NL + "\t\t\t"; |
201 |
protected final String TEXT_180 = ")it.next();" + NL + "\t\t\tif ("; |
201 |
protected final String TEXT_180 = " nextChild = ("; |
202 |
protected final String TEXT_181 = ".getVisualID(nextChild) == "; |
202 |
protected final String TEXT_181 = ")it.next();" + NL + "\t\t\tif ("; |
203 |
protected final String TEXT_182 = ".VISUAL_ID) {" + NL + "\t\t\t\treturn ("; |
203 |
protected final String TEXT_182 = ".getVisualID(nextChild) == "; |
204 |
protected final String TEXT_183 = ") getViewer().getEditPartRegistry().get(nextChild);" + NL + "\t\t\t}" + NL + "\t\t}"; |
204 |
protected final String TEXT_183 = ".VISUAL_ID) {" + NL + "\t\t\t\treturn ("; |
205 |
protected final String TEXT_184 = NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void performRequest("; |
205 |
protected final String TEXT_184 = ") getViewer().getEditPartRegistry().get(nextChild);" + NL + "\t\t\t}" + NL + "\t\t}"; |
206 |
protected final String TEXT_185 = " req) {" + NL + "\t\tif ("; |
206 |
protected final String TEXT_185 = NL + "\t\treturn null;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void performRequest("; |
207 |
protected final String TEXT_186 = ".REQ_DIRECT_EDIT == req.getType()) {" + NL + "\t\t\t"; |
207 |
protected final String TEXT_186 = " req) {" + NL + "\t\tif ("; |
208 |
protected final String TEXT_187 = " labelToEdit;" + NL + "\t\t\tif (req instanceof "; |
208 |
protected final String TEXT_187 = ".REQ_DIRECT_EDIT == req.getType()) {" + NL + "\t\t\t"; |
209 |
protected final String TEXT_188 = ") {" + NL + "\t\t\t\tlabelToEdit = getLabelEditPart(("; |
209 |
protected final String TEXT_188 = " labelToEdit;" + NL + "\t\t\tif (req instanceof "; |
210 |
protected final String TEXT_189 = ")req);" + NL + "\t\t\t} else {" + NL + "\t\t\t\tlabelToEdit = getPrimaryLabelEditPart();" + NL + "\t\t\t}" + NL + "\t\t\tif (labelToEdit != null) {" + NL + "\t\t\t\tlabelToEdit.performRequest(req);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; |
210 |
protected final String TEXT_189 = ") {" + NL + "\t\t\t\tlabelToEdit = getLabelEditPart(("; |
211 |
protected final String TEXT_190 = " getLabelEditPart("; |
211 |
protected final String TEXT_190 = ")req);" + NL + "\t\t\t} else {" + NL + "\t\t\t\tlabelToEdit = getPrimaryLabelEditPart();" + NL + "\t\t\t}" + NL + "\t\t\tif (labelToEdit != null) {" + NL + "\t\t\t\tlabelToEdit.performRequest(req);" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; |
212 |
protected final String TEXT_191 = " req) {" + NL + "\t\t"; |
212 |
protected final String TEXT_191 = " getLabelEditPart("; |
213 |
protected final String TEXT_192 = " result = getViewer().findObjectAt(req.getLocation());" + NL + "\t\tif (result != null) {" + NL + "\t\t\t"; |
213 |
protected final String TEXT_192 = " req) {" + NL + "\t\t"; |
214 |
protected final String TEXT_193 = " view = ("; |
214 |
protected final String TEXT_193 = " result = getViewer().findObjectAt(req.getLocation());" + NL + "\t\tif (result != null) {" + NL + "\t\t\t"; |
215 |
protected final String TEXT_194 = ") result.getModel();" + NL + "\t\t\tif (getDiagramNode().getChildren().contains(view)) {" + NL + "\t\t\t\tint visualId = "; |
215 |
protected final String TEXT_194 = " view = ("; |
216 |
protected final String TEXT_195 = ".getVisualID(view);" + NL + "\t\t\t\tswitch (visualId) {"; |
216 |
protected final String TEXT_195 = ") result.getModel();" + NL + "\t\t\tif (getDiagramNode().getChildren().contains(view)) {" + NL + "\t\t\t\tint visualId = "; |
217 |
protected final String TEXT_196 = NL + "\t\t\t\tcase "; |
217 |
protected final String TEXT_196 = ".getVisualID(view);" + NL + "\t\t\t\tswitch (visualId) {"; |
218 |
protected final String TEXT_197 = ".VISUAL_ID:" + NL + "\t\t\t\t\treturn result;"; |
218 |
protected final String TEXT_197 = NL + "\t\t\t\tcase "; |
219 |
protected final String TEXT_198 = NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn getPrimaryLabelEditPart();" + NL + "\t}" + NL; |
219 |
protected final String TEXT_198 = ".VISUAL_ID:" + NL + "\t\t\t\t\treturn result;"; |
220 |
protected final String TEXT_199 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void addChildVisual("; |
220 |
protected final String TEXT_199 = NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t\treturn getPrimaryLabelEditPart();" + NL + "\t}" + NL; |
221 |
protected final String TEXT_200 = " childEditPart, int index) {" + NL + "\t\tif (isExternalLabel(childEditPart)) {" + NL + "\t\t\t"; |
221 |
protected final String TEXT_200 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void addChildVisual("; |
222 |
protected final String TEXT_201 = " labelFigure = (("; |
222 |
protected final String TEXT_201 = " childEditPart, int index) {" + NL + "\t\tif (isExternalLabel(childEditPart)) {" + NL + "\t\t\t"; |
223 |
protected final String TEXT_202 = ") childEditPart).getFigure();" + NL + "\t\t\tgetExternalLabelsContainer().add(labelFigure);" + NL + "\t\t} else {"; |
223 |
protected final String TEXT_202 = " labelFigure = (("; |
224 |
protected final String TEXT_203 = NL + "\t\t\tif (!addFixedChild(childEditPart)) {" + NL + "\t\t\t\tsuper.addChildVisual(childEditPart, -1);" + NL + "\t\t\t}"; |
224 |
protected final String TEXT_203 = ") childEditPart).getFigure();" + NL + "\t\t\tgetExternalLabelsContainer().add(labelFigure);" + NL + "\t\t} else {"; |
225 |
protected final String TEXT_204 = NL + "\t\t\tsuper.addChildVisual(childEditPart, -1);"; |
225 |
protected final String TEXT_204 = NL + "\t\t\tif (!addFixedChild(childEditPart)) {" + NL + "\t\t\t\tsuper.addChildVisual(childEditPart, -1);" + NL + "\t\t\t}"; |
226 |
protected final String TEXT_205 = NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void removeChildVisual("; |
226 |
protected final String TEXT_205 = NL + "\t\t\tsuper.addChildVisual(childEditPart, -1);"; |
227 |
protected final String TEXT_206 = " childEditPart) {" + NL + "\t\tif (isExternalLabel(childEditPart)) {" + NL + "\t\t\t"; |
227 |
protected final String TEXT_206 = NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void removeChildVisual("; |
228 |
protected final String TEXT_207 = " labelFigure = (("; |
228 |
protected final String TEXT_207 = " childEditPart) {" + NL + "\t\tif (isExternalLabel(childEditPart)) {" + NL + "\t\t\t"; |
229 |
protected final String TEXT_208 = ") childEditPart).getFigure();" + NL + "\t\t\tgetExternalLabelsContainer().remove(labelFigure);" + NL + "\t\t} else {" + NL + "\t\t\tsuper.removeChildVisual(childEditPart);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean isExternalLabel("; |
229 |
protected final String TEXT_208 = " labelFigure = (("; |
230 |
protected final String TEXT_209 = " childEditPart) {"; |
230 |
protected final String TEXT_209 = ") childEditPart).getFigure();" + NL + "\t\t\tgetExternalLabelsContainer().remove(labelFigure);" + NL + "\t\t} else {" + NL + "\t\t\tsuper.removeChildVisual(childEditPart);" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected boolean isExternalLabel("; |
231 |
protected final String TEXT_210 = NL + "\t\tif (childEditPart instanceof "; |
231 |
protected final String TEXT_210 = " childEditPart) {"; |
232 |
protected final String TEXT_211 = ") {" + NL + "\t\t\treturn true;" + NL + "\t\t}"; |
232 |
protected final String TEXT_211 = NL + "\t\tif (childEditPart instanceof "; |
233 |
protected final String TEXT_212 = NL + "\t\treturn false;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; |
233 |
protected final String TEXT_212 = ") {" + NL + "\t\t\treturn true;" + NL + "\t\t}"; |
234 |
protected final String TEXT_213 = " getExternalLabelsContainer() {" + NL + "\t\t"; |
234 |
protected final String TEXT_213 = NL + "\t\treturn false;" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; |
235 |
protected final String TEXT_214 = " root = ("; |
235 |
protected final String TEXT_214 = " getExternalLabelsContainer() {" + NL + "\t\t"; |
236 |
protected final String TEXT_215 = ") getRoot();" + NL + "\t\treturn root.getLayer("; |
236 |
protected final String TEXT_215 = " root = ("; |
237 |
protected final String TEXT_216 = ".EXTERNAL_NODE_LABELS_LAYER);" + NL + "\t}" + NL; |
237 |
protected final String TEXT_216 = ") getRoot();" + NL + "\t\treturn root.getLayer("; |
238 |
protected final String TEXT_217 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void addChildVisual("; |
238 |
protected final String TEXT_217 = ".EXTERNAL_NODE_LABELS_LAYER);" + NL + "\t}" + NL; |
239 |
protected final String TEXT_218 = " childEditPart, int index) {" + NL + "\t\tif (!addFixedChild(childEditPart)) {" + NL + "\t\t\tsuper.addChildVisual(childEditPart, -1);" + NL + "\t\t}" + NL + "\t}"; |
239 |
protected final String TEXT_218 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void addChildVisual("; |
240 |
protected final String TEXT_219 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisuals() {" + NL + "\t\tsuper.refreshVisuals();" + NL + "\t\trefreshBounds();" + NL + "\t\trefreshBackgroundColor();" + NL + "\t\trefreshForegroundColor();" + NL + "\t\trefreshFont();" + NL + "\t\trefreshVisibility();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisibility() {" + NL + "\t\tboolean isVisible = getDiagramNode().isVisible();" + NL + "\t\tboolean wasVisible = getFigure().isVisible();" + NL + "\t\tif (isVisible == wasVisible) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\tif (!isVisible && (getSelected() != SELECTED_NONE)) {" + NL + "\t\t\tgetViewer().deselect(this);" + NL + "\t\t}" + NL + "" + NL + "\t\tgetFigure().setVisible(isVisible);" + NL + "\t\tgetFigure().revalidate();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshBounds() {" + NL + "\t\t"; |
240 |
protected final String TEXT_219 = " childEditPart, int index) {" + NL + "\t\tif (!addFixedChild(childEditPart)) {" + NL + "\t\t\tsuper.addChildVisual(childEditPart, -1);" + NL + "\t\t}" + NL + "\t}"; |
241 |
protected final String TEXT_220 = " node = getDiagramNode();" + NL + "\t\tassert node.getLayoutConstraint() instanceof "; |
241 |
protected final String TEXT_220 = NL + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisuals() {" + NL + "\t\tsuper.refreshVisuals();" + NL + "\t\trefreshBounds();" + NL + "\t\trefreshBackgroundColor();" + NL + "\t\trefreshForegroundColor();" + NL + "\t\trefreshFont();" + NL + "\t\trefreshVisibility();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshVisibility() {" + NL + "\t\tboolean isVisible = getDiagramNode().isVisible();" + NL + "\t\tboolean wasVisible = getFigure().isVisible();" + NL + "\t\tif (isVisible == wasVisible) {" + NL + "\t\t\treturn;" + NL + "\t\t}" + NL + "\t\tif (!isVisible && (getSelected() != SELECTED_NONE)) {" + NL + "\t\t\tgetViewer().deselect(this);" + NL + "\t\t}" + NL + "" + NL + "\t\tgetFigure().setVisible(isVisible);" + NL + "\t\tgetFigure().revalidate();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshBounds() {" + NL + "\t\t"; |
242 |
protected final String TEXT_221 = ";" + NL + "\t\t"; |
242 |
protected final String TEXT_221 = " node = getDiagramNode();" + NL + "\t\tassert node.getLayoutConstraint() instanceof "; |
243 |
protected final String TEXT_222 = " bounds = ("; |
243 |
protected final String TEXT_222 = ";" + NL + "\t\t"; |
244 |
protected final String TEXT_223 = ") node.getLayoutConstraint();" + NL + "\t\t(("; |
244 |
protected final String TEXT_223 = " bounds = ("; |
245 |
protected final String TEXT_224 = ") getParent()).setLayoutConstraint(this, getFigure(), " + NL + "\t\t\tnew "; |
245 |
protected final String TEXT_224 = ") node.getLayoutConstraint();" + NL + "\t\t(("; |
246 |
protected final String TEXT_225 = "(bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight()));" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; |
246 |
protected final String TEXT_225 = ") getParent()).setLayoutConstraint(this, getFigure(), " + NL + "\t\t\tnew "; |
247 |
protected final String TEXT_226 = " getModelChildren() {" + NL + "\t\treturn getDiagramNode().getVisibleChildren();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; |
247 |
protected final String TEXT_226 = "(bounds.getX(), bounds.getY(), bounds.getWidth(), bounds.getHeight()));" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; |
248 |
protected final String TEXT_227 = " getModelSourceConnections() {" + NL + "\t\treturn getDiagramNode().getSourceEdges();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; |
248 |
protected final String TEXT_227 = " getModelChildren() {" + NL + "\t\treturn getDiagramNode().getVisibleChildren();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; |
249 |
protected final String TEXT_228 = " getModelTargetConnections() {" + NL + "\t\treturn getDiagramNode().getTargetEdges();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; |
249 |
protected final String TEXT_228 = " getModelSourceConnections() {" + NL + "\t\treturn getDiagramNode().getSourceEdges();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected "; |
250 |
protected final String TEXT_229 = " getSourceConnectionAnchor("; |
250 |
protected final String TEXT_229 = " getModelTargetConnections() {" + NL + "\t\treturn getDiagramNode().getTargetEdges();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; |
251 |
protected final String TEXT_230 = " connection) {" + NL + "\t\treturn new "; |
251 |
protected final String TEXT_230 = " getSourceConnectionAnchor("; |
252 |
protected final String TEXT_231 = "(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; |
252 |
protected final String TEXT_231 = " connection) {" + NL + "\t\treturn new "; |
253 |
protected final String TEXT_232 = " getSourceConnectionAnchor("; |
253 |
protected final String TEXT_232 = "(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; |
254 |
protected final String TEXT_233 = " request) {" + NL + "\t\treturn new "; |
254 |
protected final String TEXT_233 = " getSourceConnectionAnchor("; |
255 |
protected final String TEXT_234 = "(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; |
255 |
protected final String TEXT_234 = " request) {" + NL + "\t\treturn new "; |
256 |
protected final String TEXT_235 = " getTargetConnectionAnchor("; |
256 |
protected final String TEXT_235 = "(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; |
257 |
protected final String TEXT_236 = " connection) {" + NL + "\t\treturn new "; |
257 |
protected final String TEXT_236 = " getTargetConnectionAnchor("; |
258 |
protected final String TEXT_237 = "(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; |
258 |
protected final String TEXT_237 = " connection) {" + NL + "\t\treturn new "; |
259 |
protected final String TEXT_238 = " getTargetConnectionAnchor("; |
259 |
protected final String TEXT_238 = "(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic "; |
260 |
protected final String TEXT_239 = " request) {" + NL + "\t\treturn new "; |
260 |
protected final String TEXT_239 = " getTargetConnectionAnchor("; |
261 |
protected final String TEXT_240 = "(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Object getAdapter(Class key) {"; |
261 |
protected final String TEXT_240 = " request) {" + NL + "\t\treturn new "; |
262 |
protected final String TEXT_241 = NL + "\t\treturn super.getAdapter(key);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void activate() {" + NL + "\t\tsuper.activate();" + NL + "\t\tgetDiagramNode().getElement().eAdapters().add(domainModelRefresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void deactivate() {" + NL + "\t\tgetDiagramNode().getElement().eAdapters().remove(domainModelRefresher);" + NL + "\t\tsuper.deactivate();" + NL + "\t}" + NL; |
262 |
protected final String TEXT_241 = "(getFigure());" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Object getAdapter(Class key) {"; |
263 |
protected final String TEXT_242 = NL; |
263 |
protected final String TEXT_242 = NL + "\t\treturn super.getAdapter(key);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void activate() {" + NL + "\t\tsuper.activate();" + NL + "\t\tgetDiagramNode().getElement().eAdapters().add(domainModelRefresher);" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic void deactivate() {" + NL + "\t\tgetDiagramNode().getElement().eAdapters().remove(domainModelRefresher);" + NL + "\t\tsuper.deactivate();" + NL + "\t}" + NL; |
264 |
protected final String TEXT_243 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate DomainModelRefresher domainModelRefresher = new DomainModelRefresher();" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class DomainModelRefresher extends "; |
264 |
protected final String TEXT_243 = NL; |
265 |
protected final String TEXT_244 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void notifyChanged("; |
265 |
protected final String TEXT_244 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate DomainModelRefresher domainModelRefresher = new DomainModelRefresher();" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate class DomainModelRefresher extends "; |
266 |
protected final String TEXT_245 = " msg) {" + NL + "\t\t\tsuper.notifyChanged(msg);" + NL + "\t\t\tif (msg.isTouch()) {" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tRefresher refresher = getRefresher(("; |
266 |
protected final String TEXT_245 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void notifyChanged("; |
267 |
protected final String TEXT_246 = ") msg.getFeature(), msg);" + NL + "\t\t\tif (refresher != null) {" + NL + "\t\t\t\trefresher.refresh();" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL; |
267 |
protected final String TEXT_246 = " msg) {" + NL + "\t\t\tsuper.notifyChanged(msg);" + NL + "\t\t\tif (msg.isTouch()) {" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tRefresher refresher = getRefresher(("; |
268 |
protected final String TEXT_247 = NL; |
268 |
protected final String TEXT_247 = ") msg.getFeature(), msg);" + NL + "\t\t\tif (refresher != null) {" + NL + "\t\t\t\trefresher.refresh();" + NL + "\t\t\t}" + NL + "\t\t}" + NL + "\t}" + NL; |
269 |
protected final String TEXT_248 = "\tpublic void addRefresher("; |
269 |
protected final String TEXT_248 = NL; |
270 |
protected final String TEXT_249 = " feature, Refresher refresher) {" + NL + "\t\tCompositeRefresher compositeRefresher = getCompositeRefresher(feature);" + NL + "\t\tcompositeRefresher.addRefresher(refresher);" + NL + "\t}" + NL + "" + NL + "\tpublic void removeRefresher("; |
270 |
protected final String TEXT_249 = "\tpublic void addRefresher("; |
271 |
protected final String TEXT_250 = " feature, Refresher refresher) {" + NL + "\t\tCompositeRefresher compositeRefresher = getCompositeRefresher(feature);" + NL + "\t\tcompositeRefresher.removeRefresher(refresher);" + NL + "\t}" + NL + "" + NL + "\tprivate CompositeRefresher getCompositeRefresher("; |
271 |
protected final String TEXT_250 = " feature, Refresher refresher) {" + NL + "\t\tCompositeRefresher compositeRefresher = getCompositeRefresher(feature);" + NL + "\t\tcompositeRefresher.addRefresher(refresher);" + NL + "\t}" + NL + "" + NL + "\tpublic void removeRefresher("; |
272 |
protected final String TEXT_251 = " feature) {" + NL + "\t\tif (structuralFeatures2Refresher == null) {" + NL + "\t\t\tcreateRefreshers();" + NL + "\t\t}" + NL + "\t\tRefresher refresher = (Refresher) structuralFeatures2Refresher.get(feature);" + NL + "\t\tif (refresher instanceof CompositeRefresher) {" + NL + "\t\t\treturn (CompositeRefresher) refresher;" + NL + "\t\t}" + NL + "\t\tCompositeRefresher result = new CompositeRefresher();" + NL + "\t\tif (refresher != null) {" + NL + "\t\t\tresult.addRefresher(refresher);" + NL + "\t\t}" + NL + "\t\tstructuralFeatures2Refresher.put(feature, result);" + NL + "\t\treturn result;" + NL + "\t}" + NL; |
272 |
protected final String TEXT_251 = " feature, Refresher refresher) {" + NL + "\t\tCompositeRefresher compositeRefresher = getCompositeRefresher(feature);" + NL + "\t\tcompositeRefresher.removeRefresher(refresher);" + NL + "\t}" + NL + "" + NL + "\tprivate CompositeRefresher getCompositeRefresher("; |
273 |
protected final String TEXT_252 = NL; |
273 |
protected final String TEXT_252 = " feature) {" + NL + "\t\tif (structuralFeatures2Refresher == null) {" + NL + "\t\t\tcreateRefreshers();" + NL + "\t\t}" + NL + "\t\tRefresher refresher = (Refresher) structuralFeatures2Refresher.get(feature);" + NL + "\t\tif (refresher instanceof CompositeRefresher) {" + NL + "\t\t\treturn (CompositeRefresher) refresher;" + NL + "\t\t}" + NL + "\t\tCompositeRefresher result = new CompositeRefresher();" + NL + "\t\tif (refresher != null) {" + NL + "\t\t\tresult.addRefresher(refresher);" + NL + "\t\t}" + NL + "\t\tstructuralFeatures2Refresher.put(feature, result);" + NL + "\t\treturn result;" + NL + "\t}" + NL; |
274 |
protected final String TEXT_253 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshFont() {" + NL + "\t\t"; |
274 |
protected final String TEXT_253 = NL; |
275 |
protected final String TEXT_254 = " style =" + NL + "\t\t\t("; |
275 |
protected final String TEXT_254 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshFont() {" + NL + "\t\t"; |
276 |
protected final String TEXT_255 = ") "; |
276 |
protected final String TEXT_255 = " style =" + NL + "\t\t\t("; |
277 |
protected final String TEXT_256 = ".getStyle(" + NL + "\t\t\t\t"; |
277 |
protected final String TEXT_256 = ") "; |
278 |
protected final String TEXT_257 = ".eINSTANCE.getFontStyle());" + NL + "\t\t"; |
278 |
protected final String TEXT_257 = ".getStyle(" + NL + "\t\t\t\t"; |
279 |
protected final String TEXT_258 = " toDispose = createdFont;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tString fontName = style.getFontName();" + NL + "\t\t\tint fontHeight = style.getFontHeight();" + NL + "\t\t\tint fontStyle = "; |
279 |
protected final String TEXT_258 = ".eINSTANCE.getFontStyle());" + NL + "\t\t"; |
280 |
protected final String TEXT_259 = ".NORMAL;" + NL + "\t\t\tif (style.isBold()) {" + NL + "\t\t\t\tfontStyle |= "; |
280 |
protected final String TEXT_259 = " toDispose = createdFont;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tString fontName = style.getFontName();" + NL + "\t\t\tint fontHeight = style.getFontHeight();" + NL + "\t\t\tint fontStyle = "; |
281 |
protected final String TEXT_260 = ".BOLD;" + NL + "\t\t\t}" + NL + "\t\t\tif (style.isItalic()) {" + NL + "\t\t\t\tfontStyle |= "; |
281 |
protected final String TEXT_260 = ".NORMAL;" + NL + "\t\t\tif (style.isBold()) {" + NL + "\t\t\t\tfontStyle |= "; |
282 |
protected final String TEXT_261 = ".ITALIC;" + NL + "\t\t\t}" + NL + "\t\t\t"; |
282 |
protected final String TEXT_261 = ".BOLD;" + NL + "\t\t\t}" + NL + "\t\t\tif (style.isItalic()) {" + NL + "\t\t\t\tfontStyle |= "; |
283 |
protected final String TEXT_262 = " currentFont = getFigure().getFont();" + NL + "\t\t\tif (currentFont != null) {" + NL + "\t\t\t\t"; |
283 |
protected final String TEXT_262 = ".ITALIC;" + NL + "\t\t\t}" + NL + "\t\t\t"; |
284 |
protected final String TEXT_263 = " currentFontData = currentFont.getFontData()[0];" + NL + "\t\t\t\tif (currentFontData.getName().equals(fontName) && currentFontData.getHeight() == fontHeight && currentFontData.getStyle() == fontStyle) {" + NL + "\t\t\t\t\treturn;" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\tcreatedFont = new "; |
284 |
protected final String TEXT_263 = " currentFont = getFigure().getFont();" + NL + "\t\t\tif (currentFont != null) {" + NL + "\t\t\t\t"; |
285 |
protected final String TEXT_264 = "(null, fontName, fontHeight, fontStyle);" + NL + "\t\t\tgetFigure().setFont(createdFont);" + NL + "\t\t} else {" + NL + "\t\t\t//revert to the default font" + NL + "\t\t\tgetFigure().setFont(getViewer().getControl().getFont());" + NL + "\t\t\tcreatedFont = null;" + NL + "\t\t}" + NL + "\t\tif (toDispose != null) {" + NL + "\t\t\ttoDispose.dispose();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * The font (created by {@link #refreshFont()}) currently assigned to the label (unless the default font is assigned)." + NL + "\t * Whenever another non-default font is assigned to it, it is safe to dispose the previous one." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; |
285 |
protected final String TEXT_264 = " currentFontData = currentFont.getFontData()[0];" + NL + "\t\t\t\tif (currentFontData.getName().equals(fontName) && currentFontData.getHeight() == fontHeight && currentFontData.getStyle() == fontStyle) {" + NL + "\t\t\t\t\treturn;" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\tcreatedFont = new "; |
286 |
protected final String TEXT_265 = " createdFont;" + NL; |
286 |
protected final String TEXT_265 = "(null, fontName, fontHeight, fontStyle);" + NL + "\t\t\tgetFigure().setFont(createdFont);" + NL + "\t\t} else {" + NL + "\t\t\t//revert to the default font" + NL + "\t\t\tgetFigure().setFont(getViewer().getControl().getFont());" + NL + "\t\t\tcreatedFont = null;" + NL + "\t\t}" + NL + "\t\tif (toDispose != null) {" + NL + "\t\t\ttoDispose.dispose();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * The font (created by {@link #refreshFont()}) currently assigned to the label (unless the default font is assigned)." + NL + "\t * Whenever another non-default font is assigned to it, it is safe to dispose the previous one." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; |
287 |
protected final String TEXT_266 = NL; |
287 |
protected final String TEXT_266 = " createdFont;" + NL; |
288 |
protected final String TEXT_267 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshForegroundColor() {" + NL + "\t\t"; |
288 |
protected final String TEXT_267 = NL; |
289 |
protected final String TEXT_268 = " style = ("; |
289 |
protected final String TEXT_268 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshForegroundColor() {" + NL + "\t\t"; |
290 |
protected final String TEXT_269 = ") "; |
290 |
protected final String TEXT_269 = " style = ("; |
291 |
protected final String TEXT_270 = ".getStyle("; |
291 |
protected final String TEXT_270 = ") "; |
292 |
protected final String TEXT_271 = ".eINSTANCE.getLineStyle());" + NL + "\t\t"; |
292 |
protected final String TEXT_271 = ".getStyle("; |
293 |
protected final String TEXT_272 = " toDispose = createdForegroundColor;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tint foregroundColor = style.getLineColor();" + NL + "\t\t\tint red = foregroundColor & 0x000000FF;" + NL + "\t\t\tint green = (foregroundColor & 0x0000FF00) >> 8;" + NL + "\t\t\tint blue = (foregroundColor & 0x00FF0000) >> 16;" + NL + "\t\t\t"; |
293 |
protected final String TEXT_272 = ".eINSTANCE.getLineStyle());" + NL + "\t\t"; |
294 |
protected final String TEXT_273 = " currentColor = getFigure().getForegroundColor();" + NL + "\t\t\tif (currentColor != null && currentColor.getRed() == red && currentColor.getGreen() == green && currentColor.getBlue() == blue) {" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tcreatedForegroundColor = new "; |
294 |
protected final String TEXT_273 = " toDispose = createdForegroundColor;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tint foregroundColor = style.getLineColor();" + NL + "\t\t\tint red = foregroundColor & 0x000000FF;" + NL + "\t\t\tint green = (foregroundColor & 0x0000FF00) >> 8;" + NL + "\t\t\tint blue = (foregroundColor & 0x00FF0000) >> 16;" + NL + "\t\t\t"; |
295 |
protected final String TEXT_274 = "(null, red, green, blue);" + NL + "\t\t\tgetFigure().setForegroundColor(createdForegroundColor);" + NL + "\t\t} else {" + NL + "\t\t\tgetFigure().setForegroundColor(getViewer().getControl().getForeground());" + NL + "\t\t\tcreatedForegroundColor = null;" + NL + "\t\t}" + NL + "\t\tif (toDispose != null) {" + NL + "\t\t\ttoDispose.dispose();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * The color (created by {@link #refreshForegroundColor()}) currently assigned to the figure." + NL + "\t * Whenever another color is assigned to it, it is safe to dispose the previous one." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; |
295 |
protected final String TEXT_274 = " currentColor = getFigure().getForegroundColor();" + NL + "\t\t\tif (currentColor != null && currentColor.getRed() == red && currentColor.getGreen() == green && currentColor.getBlue() == blue) {" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tcreatedForegroundColor = new "; |
296 |
protected final String TEXT_275 = " createdForegroundColor;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshBackgroundColor() {" + NL + "\t\t"; |
296 |
protected final String TEXT_275 = "(null, red, green, blue);" + NL + "\t\t\tgetFigure().setForegroundColor(createdForegroundColor);" + NL + "\t\t} else {" + NL + "\t\t\tgetFigure().setForegroundColor(getViewer().getControl().getForeground());" + NL + "\t\t\tcreatedForegroundColor = null;" + NL + "\t\t}" + NL + "\t\tif (toDispose != null) {" + NL + "\t\t\ttoDispose.dispose();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * The color (created by {@link #refreshForegroundColor()}) currently assigned to the figure." + NL + "\t * Whenever another color is assigned to it, it is safe to dispose the previous one." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; |
297 |
protected final String TEXT_276 = " style = ("; |
297 |
protected final String TEXT_276 = " createdForegroundColor;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprotected void refreshBackgroundColor() {" + NL + "\t\t"; |
298 |
protected final String TEXT_277 = ") "; |
298 |
protected final String TEXT_277 = " style = ("; |
299 |
protected final String TEXT_278 = ".getStyle("; |
299 |
protected final String TEXT_278 = ") "; |
300 |
protected final String TEXT_279 = ".eINSTANCE.getFillStyle());" + NL + "\t\t"; |
300 |
protected final String TEXT_279 = ".getStyle("; |
301 |
protected final String TEXT_280 = " toDispose = createdBackgroundColor;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tint backgroundColor = style.getFillColor();" + NL + "\t\t\tint red = backgroundColor & 0x000000FF;" + NL + "\t\t\tint green = (backgroundColor & 0x0000FF00) >> 8;" + NL + "\t\t\tint blue = (backgroundColor & 0x00FF0000) >> 16;" + NL + "\t\t\t"; |
301 |
protected final String TEXT_280 = ".eINSTANCE.getFillStyle());" + NL + "\t\t"; |
302 |
protected final String TEXT_281 = " currentColor = getFigure().getBackgroundColor();" + NL + "\t\t\tif (currentColor != null && currentColor.getRed() == red && currentColor.getGreen() == green && currentColor.getBlue() == blue) {" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tcreatedBackgroundColor = new "; |
302 |
protected final String TEXT_281 = " toDispose = createdBackgroundColor;" + NL + "\t\tif (style != null) {" + NL + "\t\t\tint backgroundColor = style.getFillColor();" + NL + "\t\t\tint red = backgroundColor & 0x000000FF;" + NL + "\t\t\tint green = (backgroundColor & 0x0000FF00) >> 8;" + NL + "\t\t\tint blue = (backgroundColor & 0x00FF0000) >> 16;" + NL + "\t\t\t"; |
303 |
protected final String TEXT_282 = "(null, red, green, blue);" + NL + "\t\t\tgetFigure().setBackgroundColor(createdBackgroundColor);" + NL + "\t\t} else {" + NL + "\t\t\tgetFigure().setBackgroundColor(getViewer().getControl().getBackground());" + NL + "\t\t}" + NL + "\t\tif (toDispose != null) {" + NL + "\t\t\ttoDispose.dispose();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * The color (created by {@link #refreshBackgroundColor()}) currently assigned to the figure." + NL + "\t * Whenever another color is assigned to it, it is safe to dispose the previous one." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; |
303 |
protected final String TEXT_282 = " currentColor = getFigure().getBackgroundColor();" + NL + "\t\t\tif (currentColor != null && currentColor.getRed() == red && currentColor.getGreen() == green && currentColor.getBlue() == blue) {" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tcreatedBackgroundColor = new "; |
304 |
protected final String TEXT_283 = " createdBackgroundColor;" + NL; |
304 |
protected final String TEXT_283 = "(null, red, green, blue);" + NL + "\t\t\tgetFigure().setBackgroundColor(createdBackgroundColor);" + NL + "\t\t} else {" + NL + "\t\t\tgetFigure().setBackgroundColor(getViewer().getControl().getBackground());" + NL + "\t\t}" + NL + "\t\tif (toDispose != null) {" + NL + "\t\t\ttoDispose.dispose();" + NL + "\t\t}" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * The color (created by {@link #refreshBackgroundColor()}) currently assigned to the figure." + NL + "\t * Whenever another color is assigned to it, it is safe to dispose the previous one." + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; |
305 |
protected final String TEXT_284 = NL; |
305 |
protected final String TEXT_284 = " createdBackgroundColor;" + NL; |
306 |
protected final String TEXT_285 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; |
306 |
protected final String TEXT_285 = NL; |
307 |
protected final String TEXT_286 = " structuralFeatures2Refresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Refresher getRefresher("; |
307 |
protected final String TEXT_286 = "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate "; |
308 |
protected final String TEXT_287 = " feature, "; |
308 |
protected final String TEXT_287 = " structuralFeatures2Refresher;" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tpublic Refresher getRefresher("; |
309 |
protected final String TEXT_288 = " msg) {" + NL + "\t\tif (structuralFeatures2Refresher == null) {" + NL + "\t\t\tcreateRefreshers();" + NL + "\t\t}" + NL + "\t\treturn (Refresher) structuralFeatures2Refresher.get(feature);" + NL + "\t}" + NL + "" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void createRefreshers() {" + NL + "\t\tstructuralFeatures2Refresher = new "; |
309 |
protected final String TEXT_288 = " feature, "; |
310 |
protected final String TEXT_289 = "();"; |
310 |
protected final String TEXT_289 = " msg) {" + NL + "\t\tif (structuralFeatures2Refresher == null) {" + NL + "\t\t\tcreateRefreshers();" + NL + "\t\t}" + NL + "\t\treturn (Refresher) structuralFeatures2Refresher.get(feature);" + NL + "\t}" + NL + "" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate void createRefreshers() {" + NL + "\t\tstructuralFeatures2Refresher = new "; |
311 |
protected final String TEXT_290 = NL; |
311 |
protected final String TEXT_290 = "();"; |
312 |
protected final String TEXT_291 = "\t\tRefresher childrenRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshChildren();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; |
312 |
protected final String TEXT_291 = NL; |
313 |
protected final String TEXT_292 = ".eINSTANCE.getView_PersistedChildren(), childrenRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; |
313 |
protected final String TEXT_292 = "\t\tRefresher childrenRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshChildren();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; |
314 |
protected final String TEXT_293 = ".eINSTANCE.getView_TransientChildren(), childrenRefresher);"; |
314 |
protected final String TEXT_293 = ".eINSTANCE.getView_PersistedChildren(), childrenRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; |
315 |
protected final String TEXT_294 = NL; |
315 |
protected final String TEXT_294 = ".eINSTANCE.getView_TransientChildren(), childrenRefresher);"; |
316 |
protected final String TEXT_295 = "\t\tRefresher boundsRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshBounds();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; |
316 |
protected final String TEXT_295 = NL; |
317 |
protected final String TEXT_296 = ".eINSTANCE.getNode_LayoutConstraint(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; |
317 |
protected final String TEXT_296 = "\t\tRefresher boundsRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshBounds();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; |
318 |
protected final String TEXT_297 = ".eINSTANCE.getSize_Width(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; |
318 |
protected final String TEXT_297 = ".eINSTANCE.getNode_LayoutConstraint(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; |
319 |
protected final String TEXT_298 = ".eINSTANCE.getSize_Height(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; |
319 |
protected final String TEXT_298 = ".eINSTANCE.getSize_Width(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; |
320 |
protected final String TEXT_299 = ".eINSTANCE.getLocation_X(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; |
320 |
protected final String TEXT_299 = ".eINSTANCE.getSize_Height(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; |
321 |
protected final String TEXT_300 = ".eINSTANCE.getLocation_Y(), boundsRefresher);"; |
321 |
protected final String TEXT_300 = ".eINSTANCE.getLocation_X(), boundsRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; |
322 |
protected final String TEXT_301 = NL; |
322 |
protected final String TEXT_301 = ".eINSTANCE.getLocation_Y(), boundsRefresher);"; |
323 |
protected final String TEXT_302 = "\t\tRefresher visibilityRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshVisibility();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; |
323 |
protected final String TEXT_302 = NL; |
324 |
protected final String TEXT_303 = ".eINSTANCE.getView_Visible(), visibilityRefresher);"; |
324 |
protected final String TEXT_303 = "\t\tRefresher visibilityRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshVisibility();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; |
325 |
protected final String TEXT_304 = NL; |
325 |
protected final String TEXT_304 = ".eINSTANCE.getView_Visible(), visibilityRefresher);"; |
326 |
protected final String TEXT_305 = "\t\tRefresher sourceEdgesRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshSourceConnections();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; |
326 |
protected final String TEXT_305 = NL; |
327 |
protected final String TEXT_306 = ".eINSTANCE.getView_SourceEdges(), sourceEdgesRefresher);"; |
327 |
protected final String TEXT_306 = "\t\tRefresher sourceEdgesRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshSourceConnections();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; |
328 |
protected final String TEXT_307 = NL; |
328 |
protected final String TEXT_307 = ".eINSTANCE.getView_SourceEdges(), sourceEdgesRefresher);"; |
329 |
protected final String TEXT_308 = "\t\tRefresher targetEdgesRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshTargetConnections();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; |
329 |
protected final String TEXT_308 = NL; |
330 |
protected final String TEXT_309 = ".eINSTANCE.getView_TargetEdges(), targetEdgesRefresher);"; |
330 |
protected final String TEXT_309 = "\t\tRefresher targetEdgesRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshTargetConnections();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; |
331 |
protected final String TEXT_310 = NL; |
331 |
protected final String TEXT_310 = ".eINSTANCE.getView_TargetEdges(), targetEdgesRefresher);"; |
332 |
protected final String TEXT_311 = "\t\tRefresher fontRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshFont();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; |
332 |
protected final String TEXT_311 = NL; |
333 |
protected final String TEXT_312 = ".eINSTANCE.getFontStyle_FontHeight(), fontRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; |
333 |
protected final String TEXT_312 = "\t\tRefresher fontRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshFont();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; |
334 |
protected final String TEXT_313 = ".eINSTANCE.getFontStyle_FontName(), fontRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; |
334 |
protected final String TEXT_313 = ".eINSTANCE.getFontStyle_FontHeight(), fontRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; |
335 |
protected final String TEXT_314 = ".eINSTANCE.getFontStyle_Bold(), fontRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; |
335 |
protected final String TEXT_314 = ".eINSTANCE.getFontStyle_FontName(), fontRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; |
336 |
protected final String TEXT_315 = ".eINSTANCE.getFontStyle_Italic(), fontRefresher);" + NL + "\t\t"; |
336 |
protected final String TEXT_315 = ".eINSTANCE.getFontStyle_Bold(), fontRefresher);" + NL + "\t\tstructuralFeatures2Refresher.put("; |
337 |
protected final String TEXT_316 = NL; |
337 |
protected final String TEXT_316 = ".eINSTANCE.getFontStyle_Italic(), fontRefresher);" + NL + "\t\t"; |
338 |
protected final String TEXT_317 = "\t\tRefresher backgroundColorRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshBackgroundColor();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; |
338 |
protected final String TEXT_317 = NL; |
339 |
protected final String TEXT_318 = ".eINSTANCE.getFillStyle_FillColor(), backgroundColorRefresher);" + NL + "\t\tRefresher foregroundColorRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshForegroundColor();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; |
339 |
protected final String TEXT_318 = "\t\tRefresher backgroundColorRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshBackgroundColor();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; |
340 |
protected final String TEXT_319 = ".eINSTANCE.getLineStyle_LineColor(), foregroundColorRefresher);" + NL + "\t}" + NL; |
340 |
protected final String TEXT_319 = ".eINSTANCE.getFillStyle_FillColor(), backgroundColorRefresher);" + NL + "\t\tRefresher foregroundColorRefresher = new Refresher() {" + NL + "\t\t\tpublic void refresh() {" + NL + "\t\t\t\trefreshForegroundColor();" + NL + "\t\t\t}" + NL + "\t\t};" + NL + "\t\tstructuralFeatures2Refresher.put("; |
341 |
protected final String TEXT_320 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class Create"; |
341 |
protected final String TEXT_320 = ".eINSTANCE.getLineStyle_LineColor(), foregroundColorRefresher);" + NL + "\t}" + NL; |
342 |
protected final String TEXT_321 = "StartCommand extends "; |
342 |
protected final String TEXT_321 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class Create"; |
343 |
protected final String TEXT_322 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; |
343 |
protected final String TEXT_322 = "StartCommand extends "; |
344 |
protected final String TEXT_323 = " source;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Create"; |
344 |
protected final String TEXT_323 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate "; |
345 |
protected final String TEXT_324 = "StartCommand("; |
345 |
protected final String TEXT_324 = " source;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Create"; |
346 |
protected final String TEXT_325 = ".CreateConnectionRequestEx requestEx) {" + NL + "\t\t\t//Until the mouse button is pressed, the source of the connection is in request.getTargetEditPart(), not in request.getSourceEditPart()." + NL + "\t\t\tsource = ("; |
346 |
protected final String TEXT_325 = "StartCommand("; |
347 |
protected final String TEXT_326 = ")requestEx.getTargetEditPart().getModel();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void execute() {" + NL + "\t\t\t//This command never gets executed" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void undo() {" + NL + "\t\t\t//This command never gets executed" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void redo() {" + NL + "\t\t\t//This command never gets executed" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canUndo() {" + NL + "\t\t\treturn true;" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected boolean prepare() {" + NL + "\t\t\tif (source == null) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}"; |
347 |
protected final String TEXT_326 = ".CreateConnectionRequestEx requestEx) {" + NL + "\t\t\t//Until the mouse button is pressed, the source of the connection is in request.getTargetEditPart(), not in request.getSourceEditPart()." + NL + "\t\t\tsource = ("; |
348 |
protected final String TEXT_327 = NL + "\t\t\treturn false;"; |
348 |
protected final String TEXT_327 = ")requestEx.getTargetEditPart().getModel();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void execute() {" + NL + "\t\t\t//This command never gets executed" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void undo() {" + NL + "\t\t\t//This command never gets executed" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void redo() {" + NL + "\t\t\t//This command never gets executed" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canUndo() {" + NL + "\t\t\treturn true;" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected boolean prepare() {" + NL + "\t\t\tif (source == null) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}"; |
349 |
protected final String TEXT_328 = NL + "\t\t\t"; |
349 |
protected final String TEXT_328 = NL + "\t\t\treturn false;"; |
350 |
protected final String TEXT_329 = " container = ("; |
350 |
protected final String TEXT_329 = NL + "\t\t\t"; |
351 |
protected final String TEXT_330 = ")getRelationshipContainer(source.getElement(), "; |
351 |
protected final String TEXT_330 = " container = ("; |
352 |
protected final String TEXT_331 = ".eINSTANCE.get"; |
352 |
protected final String TEXT_331 = ")getRelationshipContainer(source.getElement(), "; |
353 |
protected final String TEXT_332 = "());" + NL + "\t\t\tif (container == null) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}"; |
353 |
protected final String TEXT_332 = ".eINSTANCE.get"; |
354 |
protected final String TEXT_333 = NL; |
354 |
protected final String TEXT_333 = "());" + NL + "\t\t\tif (container == null) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}"; |
355 |
protected final String TEXT_334 = NL + "\t\tif ("; |
355 |
protected final String TEXT_334 = NL; |
356 |
protected final String TEXT_335 = "."; |
356 |
protected final String TEXT_335 = NL + "\t\tif ("; |
357 |
protected final String TEXT_336 = "() != null) {" + NL + "\t\t\t"; |
357 |
protected final String TEXT_336 = "."; |
358 |
protected final String TEXT_337 = NL + "\t\t}"; |
358 |
protected final String TEXT_337 = "() != null) {" + NL + "\t\t\t"; |
359 |
protected final String TEXT_338 = NL + "\t\tif ("; |
359 |
protected final String TEXT_338 = NL + "\t\t}"; |
360 |
protected final String TEXT_339 = "."; |
360 |
protected final String TEXT_339 = NL + "\t\tif ("; |
361 |
protected final String TEXT_340 = "().size() >= "; |
361 |
protected final String TEXT_340 = "."; |
362 |
protected final String TEXT_341 = ".eINSTANCE.get"; |
362 |
protected final String TEXT_341 = "().size() >= "; |
363 |
protected final String TEXT_342 = ".getUpperBound()) {" + NL + "\t\t\t"; |
363 |
protected final String TEXT_342 = ".eINSTANCE.get"; |
364 |
protected final String TEXT_343 = NL + "\t\t}"; |
364 |
protected final String TEXT_343 = ".getUpperBound()) {" + NL + "\t\t\t"; |
365 |
protected final String TEXT_344 = NL; |
365 |
protected final String TEXT_344 = NL + "\t\t}"; |
366 |
protected final String TEXT_345 = NL + "\t\tif ("; |
366 |
protected final String TEXT_345 = NL; |
367 |
protected final String TEXT_346 = "."; |
367 |
protected final String TEXT_346 = NL + "\t\tif ("; |
368 |
protected final String TEXT_347 = "() != null) {" + NL + "\t\t\t"; |
368 |
protected final String TEXT_347 = "."; |
369 |
protected final String TEXT_348 = NL + "\t\t}"; |
369 |
protected final String TEXT_348 = "() != null) {" + NL + "\t\t\t"; |
370 |
protected final String TEXT_349 = NL + "\t\tif ("; |
370 |
protected final String TEXT_349 = NL + "\t\t}"; |
371 |
protected final String TEXT_350 = "."; |
371 |
protected final String TEXT_350 = NL + "\t\tif ("; |
372 |
protected final String TEXT_351 = "().size() >= "; |
372 |
protected final String TEXT_351 = "."; |
373 |
protected final String TEXT_352 = ".eINSTANCE.get"; |
373 |
protected final String TEXT_352 = "().size() >= "; |
374 |
protected final String TEXT_353 = ".getUpperBound()) {" + NL + "\t\t\t"; |
374 |
protected final String TEXT_353 = ".eINSTANCE.get"; |
375 |
protected final String TEXT_354 = NL + "\t\t}"; |
375 |
protected final String TEXT_354 = ".getUpperBound()) {" + NL + "\t\t\t"; |
376 |
protected final String TEXT_355 = NL + "\t\t\treturn true;"; |
376 |
protected final String TEXT_355 = NL + "\t\t}"; |
377 |
protected final String TEXT_356 = NL + "\t\t\t"; |
377 |
protected final String TEXT_356 = NL; |
378 |
protected final String TEXT_357 = " domainElement = ("; |
378 |
protected final String TEXT_357 = NL + "\t\t\tif(!"; |
379 |
protected final String TEXT_358 = ")source.getElement();"; |
379 |
protected final String TEXT_358 = ".canCreateLink("; |
380 |
protected final String TEXT_359 = NL; |
380 |
protected final String TEXT_359 = ", "; |
381 |
protected final String TEXT_360 = NL + "\t\tif ("; |
381 |
protected final String TEXT_360 = ", false)) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}"; |
382 |
protected final String TEXT_361 = "."; |
382 |
protected final String TEXT_361 = NL + "\t\t\treturn true;"; |
383 |
protected final String TEXT_362 = "() != null) {" + NL + "\t\t\t"; |
383 |
protected final String TEXT_362 = NL + "\t\t\t"; |
384 |
protected final String TEXT_363 = NL + "\t\t}"; |
384 |
protected final String TEXT_363 = " domainElement = ("; |
385 |
protected final String TEXT_364 = NL + "\t\tif ("; |
385 |
protected final String TEXT_364 = ")source.getElement();"; |
386 |
protected final String TEXT_365 = "."; |
386 |
protected final String TEXT_365 = NL; |
387 |
protected final String TEXT_366 = "().size() >= "; |
387 |
protected final String TEXT_366 = NL + "\t\tif ("; |
388 |
protected final String TEXT_367 = ".eINSTANCE.get"; |
388 |
protected final String TEXT_367 = "."; |
389 |
protected final String TEXT_368 = ".getUpperBound()) {" + NL + "\t\t\t"; |
389 |
protected final String TEXT_368 = "() != null) {" + NL + "\t\t\t"; |
390 |
protected final String TEXT_369 = NL + "\t\t}"; |
390 |
protected final String TEXT_369 = NL + "\t\t}"; |
391 |
protected final String TEXT_370 = NL + "\t\t\treturn true;"; |
391 |
protected final String TEXT_370 = NL + "\t\tif ("; |
392 |
protected final String TEXT_371 = NL + "\t\t\treturn false;"; |
392 |
protected final String TEXT_371 = "."; |
393 |
protected final String TEXT_372 = NL + "\t\t}"; |
393 |
protected final String TEXT_372 = "().size() >= "; |
394 |
protected final String TEXT_373 = NL + "\t\t/**" + NL + "\t\t * Finds container element for the new relationship of the specified type." + NL + "\t\t * Default implementation goes up by containment hierarchy starting from" + NL + "\t\t * the specified element and returns the first element that is instance of" + NL + "\t\t * the specified container class." + NL + "\t\t * " + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected "; |
394 |
protected final String TEXT_373 = ".eINSTANCE.get"; |
395 |
protected final String TEXT_374 = " getRelationshipContainer("; |
395 |
protected final String TEXT_374 = ".getUpperBound()) {" + NL + "\t\t\t"; |
396 |
protected final String TEXT_375 = " element, "; |
396 |
protected final String TEXT_375 = NL + "\t\t}"; |
397 |
protected final String TEXT_376 = " containerClass) {" + NL + "\t\t\tfor (; element != null; element = element.eContainer()) {" + NL + "\t\t\t\tif (containerClass.isSuperTypeOf(element.eClass())) {" + NL + "\t\t\t\t\treturn element;" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\treturn null;" + NL + "\t\t}"; |
397 |
protected final String TEXT_376 = NL; |
398 |
protected final String TEXT_377 = NL + NL + "\t}"; |
398 |
protected final String TEXT_377 = NL + "\t\t\tif(!"; |
399 |
protected final String TEXT_378 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class Create"; |
399 |
protected final String TEXT_378 = ".canCreateLink("; |
400 |
protected final String TEXT_379 = "Command extends "; |
400 |
protected final String TEXT_379 = ", "; |
401 |
protected final String TEXT_380 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final "; |
401 |
protected final String TEXT_380 = ", false)) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}"; |
402 |
protected final String TEXT_381 = " source;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final "; |
402 |
protected final String TEXT_381 = NL + "\t\t\treturn true;"; |
403 |
protected final String TEXT_382 = " target;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final "; |
403 |
protected final String TEXT_382 = NL + "\t\t\treturn false;"; |
404 |
protected final String TEXT_383 = " createdEdge;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final org.eclipse.emf.common.command.Command domainModelAddCommand;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Create"; |
404 |
protected final String TEXT_383 = NL + "\t\t}"; |
405 |
protected final String TEXT_384 = "Command("; |
405 |
protected final String TEXT_384 = NL + "\t\t/**" + NL + "\t\t * Finds container element for the new relationship of the specified type." + NL + "\t\t * Default implementation goes up by containment hierarchy starting from" + NL + "\t\t * the specified element and returns the first element that is instance of" + NL + "\t\t * the specified container class." + NL + "\t\t * " + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected "; |
406 |
protected final String TEXT_385 = ".CreateConnectionRequestEx requestEx) {" + NL + "\t\t\tif (requestEx.getSourceEditPart().getModel() instanceof "; |
406 |
protected final String TEXT_385 = " getRelationshipContainer("; |
407 |
protected final String TEXT_386 = ") {" + NL + "\t\t\t\tsource = ("; |
407 |
protected final String TEXT_386 = " element, "; |
408 |
protected final String TEXT_387 = ")requestEx.getSourceEditPart().getModel();" + NL + "\t\t\t} else {" + NL + "\t\t\t\tsource = null;" + NL + "\t\t\t}" + NL + "\t\t\tif (requestEx.getTargetEditPart().getModel() instanceof "; |
408 |
protected final String TEXT_387 = " containerClass) {" + NL + "\t\t\tfor (; element != null; element = element.eContainer()) {" + NL + "\t\t\t\tif (containerClass.isSuperTypeOf(element.eClass())) {" + NL + "\t\t\t\t\treturn element;" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\treturn null;" + NL + "\t\t}"; |
409 |
protected final String TEXT_388 = ") {" + NL + "\t\t\t\ttarget = ("; |
409 |
protected final String TEXT_388 = NL + NL + "\t}"; |
410 |
protected final String TEXT_389 = ")requestEx.getTargetEditPart().getModel();" + NL + "\t\t\t} else {" + NL + "\t\t\t\ttarget = null;" + NL + "\t\t\t}" + NL + "\t\t\tif (source == null || target == null) {" + NL + "\t\t\t\tcreatedEdge = null;" + NL + "\t\t\t\tdomainModelAddCommand = "; |
410 |
protected final String TEXT_389 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class Create"; |
411 |
protected final String TEXT_390 = ".INSTANCE;" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tcreatedEdge = "; |
411 |
protected final String TEXT_390 = "Command extends "; |
412 |
protected final String TEXT_391 = ".eINSTANCE.createEdge();"; |
412 |
protected final String TEXT_391 = " {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final "; |
413 |
protected final String TEXT_392 = NL + "\t\t\t"; |
413 |
protected final String TEXT_392 = " source;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final "; |
414 |
protected final String TEXT_393 = " createdDomainElement = "; |
414 |
protected final String TEXT_393 = " target;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final "; |
415 |
protected final String TEXT_394 = ".eINSTANCE.create"; |
415 |
protected final String TEXT_394 = " createdEdge;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprivate final org.eclipse.emf.common.command.Command domainModelAddCommand;" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic Create"; |
416 |
protected final String TEXT_395 = "();" + NL + "\t\t\tcreatedEdge.setElement(createdDomainElement);" + NL + "\t\t\t"; |
416 |
protected final String TEXT_395 = "Command("; |
417 |
protected final String TEXT_396 = NL + "\t\t\t"; |
417 |
protected final String TEXT_396 = ".CreateConnectionRequestEx requestEx) {" + NL + "\t\t\tif (requestEx.getSourceEditPart().getModel() instanceof "; |
418 |
protected final String TEXT_397 = "."; |
418 |
protected final String TEXT_397 = ") {" + NL + "\t\t\t\tsource = ("; |
419 |
protected final String TEXT_398 = ".initializeElement(createdDomainElement);"; |
419 |
protected final String TEXT_398 = ")requestEx.getSourceEditPart().getModel();" + NL + "\t\t\t} else {" + NL + "\t\t\t\tsource = null;" + NL + "\t\t\t}" + NL + "\t\t\tif (requestEx.getTargetEditPart().getModel() instanceof "; |
420 |
protected final String TEXT_399 = NL + "\t\t\tcreatedEdge.setElement(target.getElement());\t\t//XXX: is this correct?"; |
420 |
protected final String TEXT_399 = ") {" + NL + "\t\t\t\ttarget = ("; |
421 |
protected final String TEXT_400 = NL + "\t\t\t"; |
421 |
protected final String TEXT_400 = ")requestEx.getTargetEditPart().getModel();" + NL + "\t\t\t} else {" + NL + "\t\t\t\ttarget = null;" + NL + "\t\t\t}" + NL + "\t\t\tif (source == null || target == null) {" + NL + "\t\t\t\tcreatedEdge = null;" + NL + "\t\t\t\tdomainModelAddCommand = "; |
422 |
protected final String TEXT_401 = ".decorateView(createdEdge);" + NL + "\t\t\t"; |
422 |
protected final String TEXT_401 = ".INSTANCE;" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\tcreatedEdge = "; |
423 |
protected final String TEXT_402 = " domainModelEditDomain = "; |
423 |
protected final String TEXT_402 = ".eINSTANCE.createEdge();"; |
424 |
protected final String TEXT_403 = ".getEditingDomain(source.getDiagram().getElement());"; |
424 |
protected final String TEXT_403 = NL + "\t\t\t"; |
425 |
protected final String TEXT_404 = NL + "\t\t\torg.eclipse.emf.common.command.CompoundCommand addLinkEndsCommand = new org.eclipse.emf.common.command.CompoundCommand();"; |
425 |
protected final String TEXT_404 = " createdDomainElement = "; |
426 |
protected final String TEXT_405 = NL + "\t\t\t"; |
426 |
protected final String TEXT_405 = ".eINSTANCE.create"; |
427 |
protected final String TEXT_406 = " container = getRelationshipContainer(source.getElement(), "; |
427 |
protected final String TEXT_406 = "();" + NL + "\t\t\tcreatedEdge.setElement(createdDomainElement);" + NL + "\t\t\t"; |
428 |
protected final String TEXT_407 = ".eINSTANCE.get"; |
428 |
protected final String TEXT_407 = NL + "\t\t\t"; |
429 |
protected final String TEXT_408 = "());" + NL + "\t\t\tif (container == null) {" + NL + "\t\t\t\tdomainModelAddCommand = null;" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\taddLinkEndsCommand.append("; |
429 |
protected final String TEXT_408 = "."; |
430 |
protected final String TEXT_409 = ".create(domainModelEditDomain, " + NL + "\t\t\t\tcontainer, "; |
430 |
protected final String TEXT_409 = ".initializeElement(createdDomainElement);"; |
431 |
protected final String TEXT_410 = ".eINSTANCE.get"; |
431 |
protected final String TEXT_410 = NL + "\t\t\tcreatedEdge.setElement(target.getElement());\t\t//XXX: is this correct?"; |
432 |
protected final String TEXT_411 = "(), createdDomainElement));"; |
432 |
protected final String TEXT_411 = NL + "\t\t\t"; |
433 |
protected final String TEXT_412 = NL + "\t\t\taddLinkEndsCommand.append("; |
433 |
protected final String TEXT_412 = ".decorateView(createdEdge);" + NL + "\t\t\t"; |
434 |
protected final String TEXT_413 = ".create(domainModelEditDomain," + NL + "\t\t\t\tcontainer, "; |
434 |
protected final String TEXT_413 = " domainModelEditDomain = "; |
435 |
protected final String TEXT_414 = ".eINSTANCE.get"; |
435 |
protected final String TEXT_414 = ".getEditingDomain(source.getDiagram().getElement());"; |
436 |
protected final String TEXT_415 = "(), createdDomainElement));"; |
436 |
protected final String TEXT_415 = NL + "\t\t\torg.eclipse.emf.common.command.CompoundCommand addLinkEndsCommand = new org.eclipse.emf.common.command.CompoundCommand();"; |
437 |
protected final String TEXT_416 = NL; |
437 |
protected final String TEXT_416 = NL + "\t\t\t"; |
438 |
protected final String TEXT_417 = NL + "\t\tif ("; |
438 |
protected final String TEXT_417 = " container = getRelationshipContainer(source.getElement(), "; |
439 |
protected final String TEXT_418 = "."; |
439 |
protected final String TEXT_418 = ".eINSTANCE.get"; |
440 |
protected final String TEXT_419 = "() != null) {" + NL + "\t\t\t"; |
440 |
protected final String TEXT_419 = "());" + NL + "\t\t\tif (container == null) {" + NL + "\t\t\t\tdomainModelAddCommand = null;" + NL + "\t\t\t\treturn;" + NL + "\t\t\t}" + NL + "\t\t\taddLinkEndsCommand.append("; |
441 |
protected final String TEXT_420 = NL + "\t\t}"; |
441 |
protected final String TEXT_420 = ".create(domainModelEditDomain, " + NL + "\t\t\t\tcontainer, "; |
442 |
protected final String TEXT_421 = NL + "\t\tif ("; |
442 |
protected final String TEXT_421 = ".eINSTANCE.get"; |
443 |
protected final String TEXT_422 = "."; |
443 |
protected final String TEXT_422 = "(), createdDomainElement));"; |
444 |
protected final String TEXT_423 = "().size() >= "; |
444 |
protected final String TEXT_423 = NL + "\t\t\taddLinkEndsCommand.append("; |
445 |
protected final String TEXT_424 = ".eINSTANCE.get"; |
445 |
protected final String TEXT_424 = ".create(domainModelEditDomain," + NL + "\t\t\t\tcontainer, "; |
446 |
protected final String TEXT_425 = ".getUpperBound()) {" + NL + "\t\t\t"; |
446 |
protected final String TEXT_425 = ".eINSTANCE.get"; |
447 |
protected final String TEXT_426 = NL + "\t\t}"; |
447 |
protected final String TEXT_426 = "(), createdDomainElement));"; |
448 |
protected final String TEXT_427 = NL + "\t\t\taddLinkEndsCommand.append("; |
448 |
protected final String TEXT_427 = NL; |
449 |
protected final String TEXT_428 = ".create(domainModelEditDomain, " + NL + "\t\t\t\tcreatedDomainElement, "; |
449 |
protected final String TEXT_428 = NL + "\t\tif ("; |
450 |
protected final String TEXT_429 = ".eINSTANCE.get"; |
450 |
protected final String TEXT_429 = "."; |
451 |
protected final String TEXT_430 = "(), source.getElement()));"; |
451 |
protected final String TEXT_430 = "() != null) {" + NL + "\t\t\t"; |
452 |
protected final String TEXT_431 = NL; |
452 |
protected final String TEXT_431 = NL + "\t\t}"; |
453 |
protected final String TEXT_432 = NL + "\t\tif ("; |
453 |
protected final String TEXT_432 = NL + "\t\tif ("; |
454 |
protected final String TEXT_433 = "."; |
454 |
protected final String TEXT_433 = "."; |
455 |
protected final String TEXT_434 = "() != null) {" + NL + "\t\t\t"; |
455 |
protected final String TEXT_434 = "().size() >= "; |
456 |
protected final String TEXT_435 = NL + "\t\t}"; |
456 |
protected final String TEXT_435 = ".eINSTANCE.get"; |
457 |
protected final String TEXT_436 = NL + "\t\tif ("; |
457 |
protected final String TEXT_436 = ".getUpperBound()) {" + NL + "\t\t\t"; |
458 |
protected final String TEXT_437 = "."; |
458 |
protected final String TEXT_437 = NL + "\t\t}"; |
459 |
protected final String TEXT_438 = "().size() >= "; |
459 |
protected final String TEXT_438 = NL + "\t\t\taddLinkEndsCommand.append("; |
460 |
protected final String TEXT_439 = ".eINSTANCE.get"; |
460 |
protected final String TEXT_439 = ".create(domainModelEditDomain, " + NL + "\t\t\t\tcreatedDomainElement, "; |
461 |
protected final String TEXT_440 = ".getUpperBound()) {" + NL + "\t\t\t"; |
461 |
protected final String TEXT_440 = ".eINSTANCE.get"; |
462 |
protected final String TEXT_441 = NL + "\t\t}"; |
462 |
protected final String TEXT_441 = "(), source.getElement()));"; |
463 |
protected final String TEXT_442 = NL + "\t\t\taddLinkEndsCommand.append("; |
463 |
protected final String TEXT_442 = NL; |
464 |
protected final String TEXT_443 = ".create(domainModelEditDomain, " + NL + "\t\t\t\tcreatedDomainElement, "; |
464 |
protected final String TEXT_443 = NL + "\t\tif ("; |
465 |
protected final String TEXT_444 = ".eINSTANCE.get"; |
465 |
protected final String TEXT_444 = "."; |
466 |
protected final String TEXT_445 = "(), target.getElement()));"; |
466 |
protected final String TEXT_445 = "() != null) {" + NL + "\t\t\t"; |
467 |
protected final String TEXT_446 = NL + "\t\tdomainModelAddCommand = addLinkEndsCommand;"; |
467 |
protected final String TEXT_446 = NL + "\t\t}"; |
468 |
protected final String TEXT_447 = NL + "\t\t\tdomainModelAddCommand = "; |
468 |
protected final String TEXT_447 = NL + "\t\tif ("; |
469 |
protected final String TEXT_448 = ".create(domainModelEditDomain, source.getElement(), " + NL + "\t\t\t\t"; |
469 |
protected final String TEXT_448 = "."; |
470 |
protected final String TEXT_449 = ".eINSTANCE.get"; |
470 |
protected final String TEXT_449 = "().size() >= "; |
471 |
protected final String TEXT_450 = "(), target.getElement());"; |
471 |
protected final String TEXT_450 = ".eINSTANCE.get"; |
472 |
protected final String TEXT_451 = NL + "\t\t}" + NL; |
472 |
protected final String TEXT_451 = ".getUpperBound()) {" + NL + "\t\t\t"; |
473 |
protected final String TEXT_452 = NL + "\t\t/**" + NL + "\t\t * Finds container element for the new relationship of the specified type." + NL + "\t\t * Default implementation goes up by containment hierarchy starting from" + NL + "\t\t * the specified element and returns the first element that is instance of" + NL + "\t\t * the specified container class." + NL + "\t\t * " + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected "; |
473 |
protected final String TEXT_452 = NL + "\t\t}"; |
474 |
protected final String TEXT_453 = " getRelationshipContainer("; |
474 |
protected final String TEXT_453 = NL + "\t\t\taddLinkEndsCommand.append("; |
475 |
protected final String TEXT_454 = " element, "; |
475 |
protected final String TEXT_454 = ".create(domainModelEditDomain, " + NL + "\t\t\t\tcreatedDomainElement, "; |
476 |
protected final String TEXT_455 = " containerClass) {" + NL + "\t\t\tfor (; element != null; element = element.eContainer()) {" + NL + "\t\t\t\tif (containerClass.isSuperTypeOf(element.eClass())) {" + NL + "\t\t\t\t\treturn element;" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\treturn null;" + NL + "\t\t}"; |
476 |
protected final String TEXT_455 = ".eINSTANCE.get"; |
477 |
protected final String TEXT_456 = NL + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canExecute() {" + NL + "\t\t\treturn source != null && target != null && createdEdge != null && domainModelAddCommand != null && domainModelAddCommand.canExecute();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canUndo() {" + NL + "\t\t\treturn source != null && target != null && createdEdge != null && domainModelAddCommand != null && domainModelAddCommand.canUndo();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void execute() {" + NL + "\t\t\tdomainModelAddCommand.execute();" + NL + "\t\t\tsource.getDiagram().insertEdge(createdEdge);" + NL + "\t\t\tcreatedEdge.setSource(source);" + NL + "\t\t\tcreatedEdge.setTarget(target);" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void undo() {" + NL + "\t\t\tdomainModelAddCommand.undo();" + NL + "\t\t\tsource.getDiagram().removeEdge(createdEdge);" + NL + "\t\t\tcreatedEdge.setSource(null);" + NL + "\t\t\tcreatedEdge.setTarget(null);" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void redo() {" + NL + "\t\t\texecute();" + NL + "\t\t}" + NL + "\t}"; |
477 |
protected final String TEXT_456 = "(), target.getElement()));"; |
478 |
protected final String TEXT_457 = NL; |
478 |
protected final String TEXT_457 = NL + "\t\tdomainModelAddCommand = addLinkEndsCommand;"; |
479 |
protected final String TEXT_458 = NL; |
479 |
protected final String TEXT_458 = NL + "\t\t\tdomainModelAddCommand = "; |
480 |
protected final String TEXT_459 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class MapModeWorkaround {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic int DPtoLP(int dp) {" + NL + "\t\t\treturn dp;" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic static MapModeWorkaround INSTANCE = new MapModeWorkaround();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate MapModeWorkaround getMapMode() {" + NL + "\t\treturn MapModeWorkaround.INSTANCE;" + NL + "\t}"; |
480 |
protected final String TEXT_459 = ".create(domainModelEditDomain, source.getElement(), " + NL + "\t\t\t\t"; |
481 |
protected final String TEXT_460 = NL + "}"; |
481 |
protected final String TEXT_460 = ".eINSTANCE.get"; |
482 |
protected final String TEXT_461 = NL; |
482 |
protected final String TEXT_461 = "(), target.getElement());"; |
|
|
483 |
protected final String TEXT_462 = NL + "\t\t}" + NL; |
484 |
protected final String TEXT_463 = NL + "\t\t/**" + NL + "\t\t * Finds container element for the new relationship of the specified type." + NL + "\t\t * Default implementation goes up by containment hierarchy starting from" + NL + "\t\t * the specified element and returns the first element that is instance of" + NL + "\t\t * the specified container class." + NL + "\t\t * " + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tprotected "; |
485 |
protected final String TEXT_464 = " getRelationshipContainer("; |
486 |
protected final String TEXT_465 = " element, "; |
487 |
protected final String TEXT_466 = " containerClass) {" + NL + "\t\t\tfor (; element != null; element = element.eContainer()) {" + NL + "\t\t\t\tif (containerClass.isSuperTypeOf(element.eClass())) {" + NL + "\t\t\t\t\treturn element;" + NL + "\t\t\t\t}" + NL + "\t\t\t}" + NL + "\t\t\treturn null;" + NL + "\t\t}"; |
488 |
protected final String TEXT_467 = NL + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canExecute() {" + NL + "\t\t\tif (source == null || target == null || createdEdge == null || domainModelAddCommand == null || !domainModelAddCommand.canExecute()) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}"; |
489 |
protected final String TEXT_468 = NL; |
490 |
protected final String TEXT_469 = NL + "\t\t\tif(!"; |
491 |
protected final String TEXT_470 = ".canCreateLink("; |
492 |
protected final String TEXT_471 = ", "; |
493 |
protected final String TEXT_472 = ", false)) {" + NL + "\t\t\t\treturn false;" + NL + "\t\t\t}"; |
494 |
protected final String TEXT_473 = NL + "\t\t\treturn true;" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic boolean canUndo() {" + NL + "\t\t\treturn source != null && target != null && createdEdge != null && domainModelAddCommand != null && domainModelAddCommand.canUndo();" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void execute() {" + NL + "\t\t\tdomainModelAddCommand.execute();" + NL + "\t\t\tsource.getDiagram().insertEdge(createdEdge);" + NL + "\t\t\tcreatedEdge.setSource(source);" + NL + "\t\t\tcreatedEdge.setTarget(target);" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void undo() {" + NL + "\t\t\tdomainModelAddCommand.undo();" + NL + "\t\t\tsource.getDiagram().removeEdge(createdEdge);" + NL + "\t\t\tcreatedEdge.setSource(null);" + NL + "\t\t\tcreatedEdge.setTarget(null);" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic void redo() {" + NL + "\t\t\texecute();" + NL + "\t\t}" + NL + "\t}"; |
495 |
protected final String TEXT_474 = NL; |
496 |
protected final String TEXT_475 = NL; |
497 |
protected final String TEXT_476 = NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate static class MapModeWorkaround {" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic int DPtoLP(int dp) {" + NL + "\t\t\treturn dp;" + NL + "\t\t}" + NL + "\t\t/**" + NL + "\t\t * @generated" + NL + "\t\t */" + NL + "\t\tpublic static MapModeWorkaround INSTANCE = new MapModeWorkaround();" + NL + "\t}" + NL + "" + NL + "\t/**" + NL + "\t * @generated" + NL + "\t */" + NL + "\tprivate MapModeWorkaround getMapMode() {" + NL + "\t\treturn MapModeWorkaround.INSTANCE;" + NL + "\t}"; |
498 |
protected final String TEXT_477 = NL + "}"; |
499 |
protected final String TEXT_478 = NL; |
483 |
|
500 |
|
484 |
public String generate(Object argument) |
501 |
public String generate(Object argument) |
485 |
{ |
502 |
{ |
Lines 488-494
Link Here
|
488 |
GenNode genNode = (GenNode) ((Object[]) argument)[0]; |
505 |
GenNode genNode = (GenNode) ((Object[]) argument)[0]; |
489 |
GenDiagram genDiagram = genNode.getDiagram(); |
506 |
GenDiagram genDiagram = genNode.getDiagram(); |
490 |
Palette palette = genDiagram.getPalette(); |
507 |
Palette palette = genDiagram.getPalette(); |
491 |
boolean useFlowLayout = ViewmapLayoutTypeHelper.getSharedInstance().isStoringChildPositions(genNode); |
508 |
boolean isXYLayout = ViewmapLayoutTypeHelper.getSharedInstance().isStoringChildPositions(genNode); |
492 |
final ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1]; |
509 |
final ImportAssistant importManager = (ImportAssistant) ((Object[]) argument)[1]; |
493 |
|
510 |
|
494 |
stringBuffer.append(TEXT_1); |
511 |
stringBuffer.append(TEXT_1); |
Lines 839-845
Link Here
|
839 |
stringBuffer.append(TEXT_127); |
856 |
stringBuffer.append(TEXT_127); |
840 |
stringBuffer.append(importManager.getImportedName(figureQualifiedClassName)); |
857 |
stringBuffer.append(importManager.getImportedName(figureQualifiedClassName)); |
841 |
stringBuffer.append(TEXT_128); |
858 |
stringBuffer.append(TEXT_128); |
842 |
if (useFlowLayout) { |
859 |
if (isXYLayout) { |
843 |
stringBuffer.append(TEXT_129); |
860 |
stringBuffer.append(TEXT_129); |
844 |
} /* use flow layout*/ |
861 |
} /* use flow layout*/ |
845 |
stringBuffer.append(TEXT_130); |
862 |
stringBuffer.append(TEXT_130); |
Lines 855-917
Link Here
|
855 |
stringBuffer.append(TEXT_134); |
872 |
stringBuffer.append(TEXT_134); |
856 |
stringBuffer.append(figureQualifiedClassName); |
873 |
stringBuffer.append(figureQualifiedClassName); |
857 |
stringBuffer.append(TEXT_135); |
874 |
stringBuffer.append(TEXT_135); |
858 |
stringBuffer.append(useFlowLayout ? "true" : "false"); |
875 |
if (!genNode.getChildNodes().isEmpty() && isXYLayout) { /*otherwise, leave to figure's default value*/ |
859 |
stringBuffer.append(TEXT_136); |
876 |
stringBuffer.append(TEXT_136); |
860 |
} |
877 |
} |
861 |
stringBuffer.append(TEXT_137); |
878 |
stringBuffer.append(TEXT_137); |
862 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); |
879 |
} |
863 |
stringBuffer.append(TEXT_138); |
880 |
stringBuffer.append(TEXT_138); |
864 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); |
881 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); |
865 |
stringBuffer.append(TEXT_139); |
882 |
stringBuffer.append(TEXT_139); |
866 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); |
883 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); |
867 |
stringBuffer.append(TEXT_140); |
884 |
stringBuffer.append(TEXT_140); |
868 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAnnotation")); |
885 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); |
869 |
stringBuffer.append(TEXT_141); |
886 |
stringBuffer.append(TEXT_141); |
870 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Figure")); |
887 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EAnnotation")); |
871 |
stringBuffer.append(TEXT_142); |
888 |
stringBuffer.append(TEXT_142); |
872 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Figure")); |
889 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Figure")); |
873 |
stringBuffer.append(TEXT_143); |
890 |
stringBuffer.append(TEXT_143); |
874 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.BorderLayout")); |
891 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.Figure")); |
875 |
stringBuffer.append(TEXT_144); |
892 |
stringBuffer.append(TEXT_144); |
876 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ImageFigure")); |
893 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.BorderLayout")); |
877 |
stringBuffer.append(TEXT_145); |
894 |
stringBuffer.append(TEXT_145); |
878 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ImageFigure")); |
895 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ImageFigure")); |
879 |
stringBuffer.append(TEXT_146); |
896 |
stringBuffer.append(TEXT_146); |
880 |
stringBuffer.append(importManager.getImportedName(genDiagram.getEditorGen().getPlugin().getActivatorQualifiedClassName())); |
897 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ImageFigure")); |
881 |
stringBuffer.append(TEXT_147); |
898 |
stringBuffer.append(TEXT_147); |
882 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.PositionConstants")); |
899 |
stringBuffer.append(importManager.getImportedName(genDiagram.getEditorGen().getPlugin().getActivatorQualifiedClassName())); |
883 |
stringBuffer.append(TEXT_148); |
900 |
stringBuffer.append(TEXT_148); |
884 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.BorderLayout")); |
901 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.PositionConstants")); |
885 |
stringBuffer.append(TEXT_149); |
902 |
stringBuffer.append(TEXT_149); |
886 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); |
903 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.BorderLayout")); |
887 |
stringBuffer.append(TEXT_150); |
904 |
stringBuffer.append(TEXT_150); |
888 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); |
905 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); |
889 |
stringBuffer.append(TEXT_151); |
906 |
stringBuffer.append(TEXT_151); |
|
|
907 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); |
908 |
stringBuffer.append(TEXT_152); |
890 |
|
909 |
|
891 |
if (!useFlowLayout) { |
910 |
if (!isXYLayout) { |
892 |
String layoutClassName = importManager.getImportedName("org.eclipse.draw2d.ToolbarLayout"); |
911 |
String layoutClassName = importManager.getImportedName("org.eclipse.draw2d.ToolbarLayout"); |
893 |
|
912 |
|
894 |
stringBuffer.append(TEXT_152); |
|
|
895 |
stringBuffer.append(layoutClassName); |
896 |
stringBuffer.append(TEXT_153); |
913 |
stringBuffer.append(TEXT_153); |
897 |
stringBuffer.append(layoutClassName); |
914 |
stringBuffer.append(layoutClassName); |
898 |
stringBuffer.append(TEXT_154); |
915 |
stringBuffer.append(TEXT_154); |
899 |
} else { |
916 |
stringBuffer.append(layoutClassName); |
900 |
stringBuffer.append(TEXT_155); |
917 |
stringBuffer.append(TEXT_155); |
901 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.FreeformLayout")); |
918 |
} else { |
902 |
stringBuffer.append(TEXT_156); |
919 |
stringBuffer.append(TEXT_156); |
903 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); |
920 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.FreeformLayout")); |
904 |
stringBuffer.append(TEXT_157); |
921 |
stringBuffer.append(TEXT_157); |
905 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); |
922 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); |
906 |
stringBuffer.append(TEXT_158); |
923 |
stringBuffer.append(TEXT_158); |
907 |
} |
924 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); |
908 |
stringBuffer.append(TEXT_159); |
925 |
stringBuffer.append(TEXT_159); |
909 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); |
926 |
} |
910 |
stringBuffer.append(TEXT_160); |
927 |
stringBuffer.append(TEXT_160); |
911 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")); |
928 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); |
912 |
stringBuffer.append(TEXT_161); |
929 |
stringBuffer.append(TEXT_161); |
913 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")); |
930 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")); |
914 |
stringBuffer.append(TEXT_162); |
931 |
stringBuffer.append(TEXT_162); |
|
|
932 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")); |
933 |
stringBuffer.append(TEXT_163); |
915 |
|
934 |
|
916 |
boolean hasFixedChildren = false; |
935 |
boolean hasFixedChildren = false; |
917 |
List innerLabels = new ArrayList(genNode.getLabels().size()); |
936 |
List innerLabels = new ArrayList(genNode.getLabels().size()); |
Lines 924-932
Link Here
|
924 |
if (!innerLabels.isEmpty()) { |
943 |
if (!innerLabels.isEmpty()) { |
925 |
hasFixedChildren = true; |
944 |
hasFixedChildren = true; |
926 |
|
945 |
|
927 |
stringBuffer.append(TEXT_163); |
|
|
928 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); |
929 |
stringBuffer.append(TEXT_164); |
946 |
stringBuffer.append(TEXT_164); |
|
|
947 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); |
948 |
stringBuffer.append(TEXT_165); |
930 |
|
949 |
|
931 |
for (Iterator it = innerLabels.iterator(); it.hasNext(); ) { |
950 |
for (Iterator it = innerLabels.iterator(); it.hasNext(); ) { |
932 |
GenNodeLabel genLabel = (GenNodeLabel) it.next(); |
951 |
GenNodeLabel genLabel = (GenNodeLabel) it.next(); |
Lines 945-973
Link Here
|
945 |
isAccessor = false; |
964 |
isAccessor = false; |
946 |
} |
965 |
} |
947 |
|
966 |
|
948 |
stringBuffer.append(TEXT_165); |
|
|
949 |
stringBuffer.append(labelEditPart); |
950 |
stringBuffer.append(TEXT_166); |
967 |
stringBuffer.append(TEXT_166); |
951 |
if (isAccessor) { |
|
|
952 |
stringBuffer.append(TEXT_167); |
953 |
stringBuffer.append(labelEditPart); |
968 |
stringBuffer.append(labelEditPart); |
|
|
969 |
stringBuffer.append(TEXT_167); |
970 |
if (isAccessor) { |
954 |
stringBuffer.append(TEXT_168); |
971 |
stringBuffer.append(TEXT_168); |
955 |
stringBuffer.append(figureQualifiedClassName); |
972 |
stringBuffer.append(labelEditPart); |
956 |
stringBuffer.append(TEXT_169); |
973 |
stringBuffer.append(TEXT_169); |
957 |
stringBuffer.append(labelFigureClassName); |
974 |
stringBuffer.append(figureQualifiedClassName); |
958 |
stringBuffer.append(TEXT_170); |
975 |
stringBuffer.append(TEXT_170); |
959 |
} else { |
976 |
stringBuffer.append(labelFigureClassName); |
960 |
stringBuffer.append(TEXT_171); |
977 |
stringBuffer.append(TEXT_171); |
961 |
stringBuffer.append(labelEditPart); |
978 |
} else { |
962 |
stringBuffer.append(TEXT_172); |
979 |
stringBuffer.append(TEXT_172); |
963 |
stringBuffer.append(labelFigureClassName); |
980 |
stringBuffer.append(labelEditPart); |
964 |
stringBuffer.append(TEXT_173); |
981 |
stringBuffer.append(TEXT_173); |
965 |
} |
982 |
stringBuffer.append(labelFigureClassName); |
966 |
stringBuffer.append(TEXT_174); |
983 |
stringBuffer.append(TEXT_174); |
967 |
} |
984 |
} |
968 |
stringBuffer.append(TEXT_175); |
985 |
stringBuffer.append(TEXT_175); |
969 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); |
986 |
} |
970 |
stringBuffer.append(TEXT_176); |
987 |
stringBuffer.append(TEXT_176); |
|
|
988 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); |
989 |
stringBuffer.append(TEXT_177); |
971 |
|
990 |
|
972 |
GenNodeLabel firstEditableLabel = null; |
991 |
GenNodeLabel firstEditableLabel = null; |
973 |
for (Iterator it = innerLabels.iterator(); it.hasNext(); ) { |
992 |
for (Iterator it = innerLabels.iterator(); it.hasNext(); ) { |
Lines 979-1023
Link Here
|
979 |
} |
998 |
} |
980 |
if (firstEditableLabel != null) { |
999 |
if (firstEditableLabel != null) { |
981 |
|
1000 |
|
982 |
stringBuffer.append(TEXT_177); |
|
|
983 |
stringBuffer.append(importManager.getImportedName("java.util.Iterator")); |
984 |
stringBuffer.append(TEXT_178); |
1001 |
stringBuffer.append(TEXT_178); |
985 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); |
1002 |
stringBuffer.append(importManager.getImportedName("java.util.Iterator")); |
986 |
stringBuffer.append(TEXT_179); |
1003 |
stringBuffer.append(TEXT_179); |
987 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); |
1004 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); |
988 |
stringBuffer.append(TEXT_180); |
1005 |
stringBuffer.append(TEXT_180); |
989 |
stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); |
1006 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); |
990 |
stringBuffer.append(TEXT_181); |
1007 |
stringBuffer.append(TEXT_181); |
991 |
stringBuffer.append(importManager.getImportedName(firstEditableLabel.getEditPartQualifiedClassName())); |
1008 |
stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); |
992 |
stringBuffer.append(TEXT_182); |
1009 |
stringBuffer.append(TEXT_182); |
993 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); |
1010 |
stringBuffer.append(importManager.getImportedName(firstEditableLabel.getEditPartQualifiedClassName())); |
994 |
stringBuffer.append(TEXT_183); |
1011 |
stringBuffer.append(TEXT_183); |
|
|
1012 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); |
1013 |
stringBuffer.append(TEXT_184); |
995 |
|
1014 |
|
996 |
} |
1015 |
} |
997 |
|
1016 |
|
998 |
stringBuffer.append(TEXT_184); |
|
|
999 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request")); |
1000 |
stringBuffer.append(TEXT_185); |
1017 |
stringBuffer.append(TEXT_185); |
1001 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.RequestConstants")); |
1018 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request")); |
1002 |
stringBuffer.append(TEXT_186); |
1019 |
stringBuffer.append(TEXT_186); |
1003 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); |
1020 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.RequestConstants")); |
1004 |
stringBuffer.append(TEXT_187); |
1021 |
stringBuffer.append(TEXT_187); |
1005 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")); |
1022 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); |
1006 |
stringBuffer.append(TEXT_188); |
1023 |
stringBuffer.append(TEXT_188); |
1007 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")); |
1024 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")); |
1008 |
stringBuffer.append(TEXT_189); |
1025 |
stringBuffer.append(TEXT_189); |
1009 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); |
|
|
1010 |
stringBuffer.append(TEXT_190); |
1011 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")); |
1026 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")); |
1012 |
stringBuffer.append(TEXT_191); |
1027 |
stringBuffer.append(TEXT_190); |
1013 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); |
1028 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); |
|
|
1029 |
stringBuffer.append(TEXT_191); |
1030 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.requests.DirectEditRequest")); |
1014 |
stringBuffer.append(TEXT_192); |
1031 |
stringBuffer.append(TEXT_192); |
1015 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); |
1032 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); |
1016 |
stringBuffer.append(TEXT_193); |
1033 |
stringBuffer.append(TEXT_193); |
1017 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); |
1034 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); |
1018 |
stringBuffer.append(TEXT_194); |
1035 |
stringBuffer.append(TEXT_194); |
1019 |
stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); |
1036 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); |
1020 |
stringBuffer.append(TEXT_195); |
1037 |
stringBuffer.append(TEXT_195); |
|
|
1038 |
stringBuffer.append(importManager.getImportedName(genDiagram.getVisualIDRegistryQualifiedClassName())); |
1039 |
stringBuffer.append(TEXT_196); |
1021 |
|
1040 |
|
1022 |
for (Iterator it = innerLabels.iterator(); it.hasNext(); ) { |
1041 |
for (Iterator it = innerLabels.iterator(); it.hasNext(); ) { |
1023 |
GenNodeLabel genLabel = (GenNodeLabel) it.next(); |
1042 |
GenNodeLabel genLabel = (GenNodeLabel) it.next(); |
Lines 1025-1037
Link Here
|
1025 |
continue; |
1044 |
continue; |
1026 |
} |
1045 |
} |
1027 |
|
1046 |
|
1028 |
stringBuffer.append(TEXT_196); |
|
|
1029 |
stringBuffer.append(importManager.getImportedName(genLabel.getEditPartQualifiedClassName())); |
1030 |
stringBuffer.append(TEXT_197); |
1047 |
stringBuffer.append(TEXT_197); |
|
|
1048 |
stringBuffer.append(importManager.getImportedName(genLabel.getEditPartQualifiedClassName())); |
1049 |
stringBuffer.append(TEXT_198); |
1031 |
|
1050 |
|
1032 |
} |
1051 |
} |
1033 |
|
1052 |
|
1034 |
stringBuffer.append(TEXT_198); |
1053 |
stringBuffer.append(TEXT_199); |
1035 |
|
1054 |
|
1036 |
} |
1055 |
} |
1037 |
|
1056 |
|
Lines 1046-1204
Link Here
|
1046 |
} |
1065 |
} |
1047 |
if (hasExternalLabels) { |
1066 |
if (hasExternalLabels) { |
1048 |
|
1067 |
|
1049 |
stringBuffer.append(TEXT_199); |
|
|
1050 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); |
1051 |
stringBuffer.append(TEXT_200); |
1068 |
stringBuffer.append(TEXT_200); |
1052 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); |
1069 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); |
1053 |
stringBuffer.append(TEXT_201); |
1070 |
stringBuffer.append(TEXT_201); |
1054 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart")); |
1071 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); |
1055 |
stringBuffer.append(TEXT_202); |
1072 |
stringBuffer.append(TEXT_202); |
1056 |
if (hasFixedChildren) { |
1073 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart")); |
1057 |
stringBuffer.append(TEXT_203); |
1074 |
stringBuffer.append(TEXT_203); |
1058 |
} else { |
1075 |
if (hasFixedChildren) { |
1059 |
stringBuffer.append(TEXT_204); |
1076 |
stringBuffer.append(TEXT_204); |
1060 |
} |
1077 |
} else { |
1061 |
stringBuffer.append(TEXT_205); |
1078 |
stringBuffer.append(TEXT_205); |
1062 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); |
1079 |
} |
1063 |
stringBuffer.append(TEXT_206); |
1080 |
stringBuffer.append(TEXT_206); |
1064 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); |
1081 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); |
1065 |
stringBuffer.append(TEXT_207); |
1082 |
stringBuffer.append(TEXT_207); |
1066 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart")); |
1083 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); |
1067 |
stringBuffer.append(TEXT_208); |
1084 |
stringBuffer.append(TEXT_208); |
1068 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); |
1085 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart")); |
1069 |
stringBuffer.append(TEXT_209); |
1086 |
stringBuffer.append(TEXT_209); |
|
|
1087 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); |
1088 |
stringBuffer.append(TEXT_210); |
1070 |
|
1089 |
|
1071 |
for (Iterator labels = genNode.getLabels().iterator(); labels.hasNext();) { |
1090 |
for (Iterator labels = genNode.getLabels().iterator(); labels.hasNext();) { |
1072 |
GenNodeLabel label = (GenNodeLabel) labels.next(); |
1091 |
GenNodeLabel label = (GenNodeLabel) labels.next(); |
1073 |
if (label instanceof GenExternalNodeLabel) { |
1092 |
if (label instanceof GenExternalNodeLabel) { |
1074 |
|
1093 |
|
1075 |
stringBuffer.append(TEXT_210); |
|
|
1076 |
stringBuffer.append(importManager.getImportedName(label.getEditPartQualifiedClassName())); |
1077 |
stringBuffer.append(TEXT_211); |
1094 |
stringBuffer.append(TEXT_211); |
|
|
1095 |
stringBuffer.append(importManager.getImportedName(label.getEditPartQualifiedClassName())); |
1096 |
stringBuffer.append(TEXT_212); |
1078 |
|
1097 |
|
1079 |
} |
1098 |
} |
1080 |
} |
1099 |
} |
1081 |
|
1100 |
|
1082 |
stringBuffer.append(TEXT_212); |
|
|
1083 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); |
1084 |
stringBuffer.append(TEXT_213); |
1101 |
stringBuffer.append(TEXT_213); |
1085 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editparts.ScalableFreeformRootEditPart")); |
1102 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.IFigure")); |
1086 |
stringBuffer.append(TEXT_214); |
1103 |
stringBuffer.append(TEXT_214); |
1087 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editparts.ScalableFreeformRootEditPart")); |
1104 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editparts.ScalableFreeformRootEditPart")); |
1088 |
stringBuffer.append(TEXT_215); |
1105 |
stringBuffer.append(TEXT_215); |
1089 |
stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartFactoryQualifiedClassName())); |
1106 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.editparts.ScalableFreeformRootEditPart")); |
1090 |
stringBuffer.append(TEXT_216); |
1107 |
stringBuffer.append(TEXT_216); |
|
|
1108 |
stringBuffer.append(importManager.getImportedName(genDiagram.getEditPartFactoryQualifiedClassName())); |
1109 |
stringBuffer.append(TEXT_217); |
1091 |
|
1110 |
|
1092 |
} else { |
1111 |
} else { |
1093 |
if (hasFixedChildren) { |
1112 |
if (hasFixedChildren) { |
1094 |
stringBuffer.append(TEXT_217); |
|
|
1095 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); |
1096 |
stringBuffer.append(TEXT_218); |
1113 |
stringBuffer.append(TEXT_218); |
|
|
1114 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.EditPart")); |
1115 |
stringBuffer.append(TEXT_219); |
1097 |
|
1116 |
|
1098 |
} |
1117 |
} |
1099 |
} |
1118 |
} |
1100 |
|
1119 |
|
1101 |
stringBuffer.append(TEXT_219); |
|
|
1102 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")); |
1103 |
stringBuffer.append(TEXT_220); |
1120 |
stringBuffer.append(TEXT_220); |
1104 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds")); |
1121 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Node")); |
1105 |
stringBuffer.append(TEXT_221); |
1122 |
stringBuffer.append(TEXT_221); |
1106 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds")); |
1123 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds")); |
1107 |
stringBuffer.append(TEXT_222); |
1124 |
stringBuffer.append(TEXT_222); |
1108 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds")); |
1125 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds")); |
1109 |
stringBuffer.append(TEXT_223); |
1126 |
stringBuffer.append(TEXT_223); |
1110 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart")); |
1127 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Bounds")); |
1111 |
stringBuffer.append(TEXT_224); |
1128 |
stringBuffer.append(TEXT_224); |
1112 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); |
1129 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.GraphicalEditPart")); |
1113 |
stringBuffer.append(TEXT_225); |
1130 |
stringBuffer.append(TEXT_225); |
1114 |
stringBuffer.append(importManager.getImportedName("java.util.List")); |
1131 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.geometry.Rectangle")); |
1115 |
stringBuffer.append(TEXT_226); |
1132 |
stringBuffer.append(TEXT_226); |
1116 |
stringBuffer.append(importManager.getImportedName("java.util.List")); |
1133 |
stringBuffer.append(importManager.getImportedName("java.util.List")); |
1117 |
stringBuffer.append(TEXT_227); |
1134 |
stringBuffer.append(TEXT_227); |
1118 |
stringBuffer.append(importManager.getImportedName("java.util.List")); |
1135 |
stringBuffer.append(importManager.getImportedName("java.util.List")); |
1119 |
stringBuffer.append(TEXT_228); |
1136 |
stringBuffer.append(TEXT_228); |
1120 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionAnchor")); |
1137 |
stringBuffer.append(importManager.getImportedName("java.util.List")); |
1121 |
stringBuffer.append(TEXT_229); |
1138 |
stringBuffer.append(TEXT_229); |
1122 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ConnectionEditPart")); |
1139 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionAnchor")); |
1123 |
stringBuffer.append(TEXT_230); |
1140 |
stringBuffer.append(TEXT_230); |
1124 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ChopboxAnchor")); |
1141 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ConnectionEditPart")); |
1125 |
stringBuffer.append(TEXT_231); |
1142 |
stringBuffer.append(TEXT_231); |
1126 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionAnchor")); |
1143 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ChopboxAnchor")); |
1127 |
stringBuffer.append(TEXT_232); |
1144 |
stringBuffer.append(TEXT_232); |
1128 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request")); |
1145 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionAnchor")); |
1129 |
stringBuffer.append(TEXT_233); |
1146 |
stringBuffer.append(TEXT_233); |
1130 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ChopboxAnchor")); |
1147 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request")); |
1131 |
stringBuffer.append(TEXT_234); |
1148 |
stringBuffer.append(TEXT_234); |
1132 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionAnchor")); |
1149 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ChopboxAnchor")); |
1133 |
stringBuffer.append(TEXT_235); |
1150 |
stringBuffer.append(TEXT_235); |
1134 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ConnectionEditPart")); |
1151 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionAnchor")); |
1135 |
stringBuffer.append(TEXT_236); |
1152 |
stringBuffer.append(TEXT_236); |
1136 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ChopboxAnchor")); |
1153 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.ConnectionEditPart")); |
1137 |
stringBuffer.append(TEXT_237); |
1154 |
stringBuffer.append(TEXT_237); |
1138 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionAnchor")); |
1155 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ChopboxAnchor")); |
1139 |
stringBuffer.append(TEXT_238); |
1156 |
stringBuffer.append(TEXT_238); |
1140 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request")); |
1157 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ConnectionAnchor")); |
1141 |
stringBuffer.append(TEXT_239); |
1158 |
stringBuffer.append(TEXT_239); |
1142 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ChopboxAnchor")); |
1159 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gef.Request")); |
1143 |
stringBuffer.append(TEXT_240); |
1160 |
stringBuffer.append(TEXT_240); |
1144 |
/*@ include file="adapters/propertySource.javajetinc"*/ |
1161 |
stringBuffer.append(importManager.getImportedName("org.eclipse.draw2d.ChopboxAnchor")); |
1145 |
stringBuffer.append(TEXT_241); |
1162 |
stringBuffer.append(TEXT_241); |
|
|
1163 |
/*@ include file="adapters/propertySource.javajetinc"*/ |
1146 |
stringBuffer.append(TEXT_242); |
1164 |
stringBuffer.append(TEXT_242); |
1147 |
stringBuffer.append(TEXT_243); |
1165 |
stringBuffer.append(TEXT_243); |
1148 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.impl.AdapterImpl")); |
|
|
1149 |
stringBuffer.append(TEXT_244); |
1166 |
stringBuffer.append(TEXT_244); |
1150 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); |
1167 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.impl.AdapterImpl")); |
1151 |
stringBuffer.append(TEXT_245); |
1168 |
stringBuffer.append(TEXT_245); |
1152 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); |
1169 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); |
1153 |
stringBuffer.append(TEXT_246); |
1170 |
stringBuffer.append(TEXT_246); |
|
|
1171 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); |
1154 |
stringBuffer.append(TEXT_247); |
1172 |
stringBuffer.append(TEXT_247); |
1155 |
stringBuffer.append(TEXT_248); |
1173 |
stringBuffer.append(TEXT_248); |
1156 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); |
|
|
1157 |
stringBuffer.append(TEXT_249); |
1174 |
stringBuffer.append(TEXT_249); |
1158 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); |
1175 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); |
1159 |
stringBuffer.append(TEXT_250); |
1176 |
stringBuffer.append(TEXT_250); |
1160 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); |
1177 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); |
1161 |
stringBuffer.append(TEXT_251); |
1178 |
stringBuffer.append(TEXT_251); |
|
|
1179 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); |
1180 |
stringBuffer.append(TEXT_252); |
1162 |
|
1181 |
|
1163 |
final String primaryView = "getDiagramNode()"; |
1182 |
final String primaryView = "getDiagramNode()"; |
1164 |
|
1183 |
|
1165 |
stringBuffer.append(TEXT_252); |
|
|
1166 |
stringBuffer.append(TEXT_253); |
1184 |
stringBuffer.append(TEXT_253); |
1167 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); |
|
|
1168 |
stringBuffer.append(TEXT_254); |
1185 |
stringBuffer.append(TEXT_254); |
1169 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); |
1186 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); |
1170 |
stringBuffer.append(TEXT_255); |
1187 |
stringBuffer.append(TEXT_255); |
1171 |
stringBuffer.append(primaryView); |
1188 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FontStyle")); |
1172 |
stringBuffer.append(TEXT_256); |
1189 |
stringBuffer.append(TEXT_256); |
1173 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
1190 |
stringBuffer.append(primaryView); |
1174 |
stringBuffer.append(TEXT_257); |
1191 |
stringBuffer.append(TEXT_257); |
1175 |
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); |
1192 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
1176 |
stringBuffer.append(TEXT_258); |
1193 |
stringBuffer.append(TEXT_258); |
1177 |
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); |
1194 |
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); |
1178 |
stringBuffer.append(TEXT_259); |
1195 |
stringBuffer.append(TEXT_259); |
1179 |
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); |
1196 |
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); |
1180 |
stringBuffer.append(TEXT_260); |
1197 |
stringBuffer.append(TEXT_260); |
1181 |
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); |
1198 |
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); |
1182 |
stringBuffer.append(TEXT_261); |
1199 |
stringBuffer.append(TEXT_261); |
1183 |
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); |
1200 |
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.SWT")); |
1184 |
stringBuffer.append(TEXT_262); |
1201 |
stringBuffer.append(TEXT_262); |
1185 |
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.FontData")); |
|
|
1186 |
stringBuffer.append(TEXT_263); |
1187 |
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); |
1202 |
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); |
|
|
1203 |
stringBuffer.append(TEXT_263); |
1204 |
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.FontData")); |
1188 |
stringBuffer.append(TEXT_264); |
1205 |
stringBuffer.append(TEXT_264); |
1189 |
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); |
1206 |
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); |
1190 |
stringBuffer.append(TEXT_265); |
1207 |
stringBuffer.append(TEXT_265); |
|
|
1208 |
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Font")); |
1191 |
stringBuffer.append(TEXT_266); |
1209 |
stringBuffer.append(TEXT_266); |
1192 |
stringBuffer.append(TEXT_267); |
1210 |
stringBuffer.append(TEXT_267); |
1193 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.LineStyle")); |
|
|
1194 |
stringBuffer.append(TEXT_268); |
1211 |
stringBuffer.append(TEXT_268); |
1195 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.LineStyle")); |
1212 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.LineStyle")); |
1196 |
stringBuffer.append(TEXT_269); |
1213 |
stringBuffer.append(TEXT_269); |
1197 |
stringBuffer.append(primaryView); |
1214 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.LineStyle")); |
1198 |
stringBuffer.append(TEXT_270); |
1215 |
stringBuffer.append(TEXT_270); |
1199 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
1216 |
stringBuffer.append(primaryView); |
1200 |
stringBuffer.append(TEXT_271); |
1217 |
stringBuffer.append(TEXT_271); |
1201 |
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); |
1218 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
1202 |
stringBuffer.append(TEXT_272); |
1219 |
stringBuffer.append(TEXT_272); |
1203 |
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); |
1220 |
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); |
1204 |
stringBuffer.append(TEXT_273); |
1221 |
stringBuffer.append(TEXT_273); |
Lines 1206-1220
Link Here
|
1206 |
stringBuffer.append(TEXT_274); |
1223 |
stringBuffer.append(TEXT_274); |
1207 |
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); |
1224 |
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); |
1208 |
stringBuffer.append(TEXT_275); |
1225 |
stringBuffer.append(TEXT_275); |
1209 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FillStyle")); |
1226 |
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); |
1210 |
stringBuffer.append(TEXT_276); |
1227 |
stringBuffer.append(TEXT_276); |
1211 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FillStyle")); |
1228 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FillStyle")); |
1212 |
stringBuffer.append(TEXT_277); |
1229 |
stringBuffer.append(TEXT_277); |
1213 |
stringBuffer.append(primaryView); |
1230 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.FillStyle")); |
1214 |
stringBuffer.append(TEXT_278); |
1231 |
stringBuffer.append(TEXT_278); |
1215 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
1232 |
stringBuffer.append(primaryView); |
1216 |
stringBuffer.append(TEXT_279); |
1233 |
stringBuffer.append(TEXT_279); |
1217 |
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); |
1234 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
1218 |
stringBuffer.append(TEXT_280); |
1235 |
stringBuffer.append(TEXT_280); |
1219 |
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); |
1236 |
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); |
1220 |
stringBuffer.append(TEXT_281); |
1237 |
stringBuffer.append(TEXT_281); |
Lines 1222-1246
Link Here
|
1222 |
stringBuffer.append(TEXT_282); |
1239 |
stringBuffer.append(TEXT_282); |
1223 |
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); |
1240 |
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); |
1224 |
stringBuffer.append(TEXT_283); |
1241 |
stringBuffer.append(TEXT_283); |
|
|
1242 |
stringBuffer.append(importManager.getImportedName("org.eclipse.swt.graphics.Color")); |
1225 |
stringBuffer.append(TEXT_284); |
1243 |
stringBuffer.append(TEXT_284); |
1226 |
stringBuffer.append(TEXT_285); |
1244 |
stringBuffer.append(TEXT_285); |
1227 |
stringBuffer.append(importManager.getImportedName("java.util.HashMap")); |
|
|
1228 |
stringBuffer.append(TEXT_286); |
1245 |
stringBuffer.append(TEXT_286); |
1229 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); |
1246 |
stringBuffer.append(importManager.getImportedName("java.util.HashMap")); |
1230 |
stringBuffer.append(TEXT_287); |
1247 |
stringBuffer.append(TEXT_287); |
1231 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); |
1248 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EStructuralFeature")); |
1232 |
stringBuffer.append(TEXT_288); |
1249 |
stringBuffer.append(TEXT_288); |
1233 |
stringBuffer.append(importManager.getImportedName("java.util.HashMap")); |
1250 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.notify.Notification")); |
1234 |
stringBuffer.append(TEXT_289); |
1251 |
stringBuffer.append(TEXT_289); |
|
|
1252 |
stringBuffer.append(importManager.getImportedName("java.util.HashMap")); |
1235 |
stringBuffer.append(TEXT_290); |
1253 |
stringBuffer.append(TEXT_290); |
1236 |
stringBuffer.append(TEXT_291); |
1254 |
stringBuffer.append(TEXT_291); |
1237 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
|
|
1238 |
stringBuffer.append(TEXT_292); |
1255 |
stringBuffer.append(TEXT_292); |
1239 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
1256 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
1240 |
stringBuffer.append(TEXT_293); |
1257 |
stringBuffer.append(TEXT_293); |
|
|
1258 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
1241 |
stringBuffer.append(TEXT_294); |
1259 |
stringBuffer.append(TEXT_294); |
1242 |
stringBuffer.append(TEXT_295); |
1260 |
stringBuffer.append(TEXT_295); |
1243 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
|
|
1244 |
stringBuffer.append(TEXT_296); |
1261 |
stringBuffer.append(TEXT_296); |
1245 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
1262 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
1246 |
stringBuffer.append(TEXT_297); |
1263 |
stringBuffer.append(TEXT_297); |
Lines 1250-1270
Link Here
|
1250 |
stringBuffer.append(TEXT_299); |
1267 |
stringBuffer.append(TEXT_299); |
1251 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
1268 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
1252 |
stringBuffer.append(TEXT_300); |
1269 |
stringBuffer.append(TEXT_300); |
|
|
1270 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
1253 |
stringBuffer.append(TEXT_301); |
1271 |
stringBuffer.append(TEXT_301); |
1254 |
stringBuffer.append(TEXT_302); |
1272 |
stringBuffer.append(TEXT_302); |
1255 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
|
|
1256 |
stringBuffer.append(TEXT_303); |
1273 |
stringBuffer.append(TEXT_303); |
|
|
1274 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
1257 |
stringBuffer.append(TEXT_304); |
1275 |
stringBuffer.append(TEXT_304); |
1258 |
stringBuffer.append(TEXT_305); |
1276 |
stringBuffer.append(TEXT_305); |
1259 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
|
|
1260 |
stringBuffer.append(TEXT_306); |
1277 |
stringBuffer.append(TEXT_306); |
|
|
1278 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
1261 |
stringBuffer.append(TEXT_307); |
1279 |
stringBuffer.append(TEXT_307); |
1262 |
stringBuffer.append(TEXT_308); |
1280 |
stringBuffer.append(TEXT_308); |
1263 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
|
|
1264 |
stringBuffer.append(TEXT_309); |
1281 |
stringBuffer.append(TEXT_309); |
|
|
1282 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
1265 |
stringBuffer.append(TEXT_310); |
1283 |
stringBuffer.append(TEXT_310); |
1266 |
stringBuffer.append(TEXT_311); |
1284 |
stringBuffer.append(TEXT_311); |
1267 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
|
|
1268 |
stringBuffer.append(TEXT_312); |
1285 |
stringBuffer.append(TEXT_312); |
1269 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
1286 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
1270 |
stringBuffer.append(TEXT_313); |
1287 |
stringBuffer.append(TEXT_313); |
Lines 1272-1283
Link Here
|
1272 |
stringBuffer.append(TEXT_314); |
1289 |
stringBuffer.append(TEXT_314); |
1273 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
1290 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
1274 |
stringBuffer.append(TEXT_315); |
1291 |
stringBuffer.append(TEXT_315); |
|
|
1292 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
1275 |
stringBuffer.append(TEXT_316); |
1293 |
stringBuffer.append(TEXT_316); |
1276 |
stringBuffer.append(TEXT_317); |
1294 |
stringBuffer.append(TEXT_317); |
1277 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
|
|
1278 |
stringBuffer.append(TEXT_318); |
1295 |
stringBuffer.append(TEXT_318); |
1279 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
1296 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
1280 |
stringBuffer.append(TEXT_319); |
1297 |
stringBuffer.append(TEXT_319); |
|
|
1298 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationPackage")); |
1299 |
stringBuffer.append(TEXT_320); |
1281 |
/*XXX: probably, this should go to a separate jet-template along with GraphicalNodeEditPolicy*/ |
1300 |
/*XXX: probably, this should go to a separate jet-template along with GraphicalNodeEditPolicy*/ |
1282 |
if (palette != null) { |
1301 |
if (palette != null) { |
1283 |
|
1302 |
|
Lines 1304-1377
Link Here
|
1304 |
if (!outgoingClass.getEcoreClass().isSuperTypeOf(genNode.getModelFacet().getMetaClass().getEcoreClass())) { |
1323 |
if (!outgoingClass.getEcoreClass().isSuperTypeOf(genNode.getModelFacet().getMetaClass().getEcoreClass())) { |
1305 |
continue; |
1324 |
continue; |
1306 |
} |
1325 |
} |
|
|
1326 |
GenLinkConstraints linkConstraints = genLink.getCreationConstraints(); |
1307 |
|
1327 |
|
1308 |
stringBuffer.append(TEXT_320); |
1328 |
stringBuffer.append(TEXT_321); |
1309 |
stringBuffer.append(createCommandNameInfix); |
1329 |
stringBuffer.append(createCommandNameInfix); |
1310 |
stringBuffer.append(genLink.getVisualID()); |
1330 |
stringBuffer.append(genLink.getVisualID()); |
1311 |
stringBuffer.append(TEXT_321); |
|
|
1312 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")); |
1313 |
stringBuffer.append(TEXT_322); |
1331 |
stringBuffer.append(TEXT_322); |
1314 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); |
1332 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")); |
1315 |
stringBuffer.append(TEXT_323); |
1333 |
stringBuffer.append(TEXT_323); |
|
|
1334 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); |
1335 |
stringBuffer.append(TEXT_324); |
1316 |
stringBuffer.append(createCommandNameInfix); |
1336 |
stringBuffer.append(createCommandNameInfix); |
1317 |
stringBuffer.append(genLink.getVisualID()); |
1337 |
stringBuffer.append(genLink.getVisualID()); |
1318 |
stringBuffer.append(TEXT_324); |
|
|
1319 |
stringBuffer.append(importManager.getImportedName(palette.getFactoryQualifiedClassName())); |
1320 |
stringBuffer.append(TEXT_325); |
1338 |
stringBuffer.append(TEXT_325); |
1321 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); |
1339 |
stringBuffer.append(importManager.getImportedName(palette.getFactoryQualifiedClassName())); |
1322 |
stringBuffer.append(TEXT_326); |
1340 |
stringBuffer.append(TEXT_326); |
|
|
1341 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); |
1342 |
stringBuffer.append(TEXT_327); |
1323 |
|
1343 |
|
1324 |
if (genLink.getModelFacet() instanceof TypeLinkModelFacet) { |
1344 |
if (genLink.getModelFacet() instanceof TypeLinkModelFacet) { |
1325 |
TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet(); |
1345 |
TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet(); |
1326 |
GenFeature containmentFeature = modelFacet.getContainmentMetaFeature(); |
1346 |
GenFeature containmentFeature = modelFacet.getContainmentMetaFeature(); |
1327 |
if (containmentFeature == null) { |
1347 |
if (containmentFeature == null) { |
1328 |
|
1348 |
|
1329 |
stringBuffer.append(TEXT_327); |
1349 |
stringBuffer.append(TEXT_328); |
1330 |
|
1350 |
|
1331 |
} else { |
1351 |
} else { |
1332 |
|
1352 |
|
1333 |
stringBuffer.append(TEXT_328); |
|
|
1334 |
stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getQualifiedInterfaceName())); |
1335 |
stringBuffer.append(TEXT_329); |
1353 |
stringBuffer.append(TEXT_329); |
1336 |
stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getQualifiedInterfaceName())); |
1354 |
stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getQualifiedInterfaceName())); |
1337 |
stringBuffer.append(TEXT_330); |
1355 |
stringBuffer.append(TEXT_330); |
1338 |
stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getGenPackage().getQualifiedPackageInterfaceName())); |
1356 |
stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getQualifiedInterfaceName())); |
1339 |
stringBuffer.append(TEXT_331); |
1357 |
stringBuffer.append(TEXT_331); |
1340 |
stringBuffer.append(containmentFeature.getGenClass().getClassifierAccessorName()); |
1358 |
stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getGenPackage().getQualifiedPackageInterfaceName())); |
1341 |
stringBuffer.append(TEXT_332); |
1359 |
stringBuffer.append(TEXT_332); |
|
|
1360 |
stringBuffer.append(containmentFeature.getGenClass().getClassifierAccessorName()); |
1361 |
stringBuffer.append(TEXT_333); |
1342 |
|
1362 |
|
1343 |
{ |
1363 |
{ |
1344 |
GenFeature _feature = containmentFeature; |
1364 |
GenFeature _feature = containmentFeature; |
1345 |
String _ownerInstance = "container"; |
1365 |
String _ownerInstance = "container"; |
1346 |
String _exceedsUpperBound = "return false;"; |
1366 |
String _exceedsUpperBound = "return false;"; |
1347 |
|
1367 |
|
1348 |
stringBuffer.append(TEXT_333); |
1368 |
stringBuffer.append(TEXT_334); |
1349 |
|
1369 |
|
1350 |
int upperBound = _feature.getEcoreFeature().getUpperBound(); |
1370 |
int upperBound = _feature.getEcoreFeature().getUpperBound(); |
1351 |
if (upperBound > 0) { |
1371 |
if (upperBound > 0) { |
1352 |
if (upperBound == 1) { |
1372 |
if (upperBound == 1) { |
1353 |
|
1373 |
|
1354 |
stringBuffer.append(TEXT_334); |
|
|
1355 |
stringBuffer.append(_ownerInstance); |
1356 |
stringBuffer.append(TEXT_335); |
1374 |
stringBuffer.append(TEXT_335); |
1357 |
stringBuffer.append(_feature.getGetAccessor()); |
1375 |
stringBuffer.append(_ownerInstance); |
1358 |
stringBuffer.append(TEXT_336); |
1376 |
stringBuffer.append(TEXT_336); |
1359 |
stringBuffer.append(_exceedsUpperBound); |
1377 |
stringBuffer.append(_feature.getGetAccessor()); |
1360 |
stringBuffer.append(TEXT_337); |
1378 |
stringBuffer.append(TEXT_337); |
|
|
1379 |
stringBuffer.append(_exceedsUpperBound); |
1380 |
stringBuffer.append(TEXT_338); |
1361 |
|
1381 |
|
1362 |
} else { |
1382 |
} else { |
1363 |
|
1383 |
|
1364 |
stringBuffer.append(TEXT_338); |
|
|
1365 |
stringBuffer.append(_ownerInstance); |
1366 |
stringBuffer.append(TEXT_339); |
1384 |
stringBuffer.append(TEXT_339); |
1367 |
stringBuffer.append(_feature.getGetAccessor()); |
1385 |
stringBuffer.append(_ownerInstance); |
1368 |
stringBuffer.append(TEXT_340); |
1386 |
stringBuffer.append(TEXT_340); |
1369 |
stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); |
1387 |
stringBuffer.append(_feature.getGetAccessor()); |
1370 |
stringBuffer.append(TEXT_341); |
1388 |
stringBuffer.append(TEXT_341); |
1371 |
stringBuffer.append(_feature.getFeatureAccessorName()); |
1389 |
stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); |
1372 |
stringBuffer.append(TEXT_342); |
1390 |
stringBuffer.append(TEXT_342); |
1373 |
stringBuffer.append(_exceedsUpperBound); |
1391 |
stringBuffer.append(_feature.getFeatureAccessorName()); |
1374 |
stringBuffer.append(TEXT_343); |
1392 |
stringBuffer.append(TEXT_343); |
|
|
1393 |
stringBuffer.append(_exceedsUpperBound); |
1394 |
stringBuffer.append(TEXT_344); |
1375 |
|
1395 |
|
1376 |
} |
1396 |
} |
1377 |
} |
1397 |
} |
Lines 1385-1417
Link Here
|
1385 |
String _ownerInstance = "container"; |
1405 |
String _ownerInstance = "container"; |
1386 |
String _exceedsUpperBound = "return false;"; |
1406 |
String _exceedsUpperBound = "return false;"; |
1387 |
|
1407 |
|
1388 |
stringBuffer.append(TEXT_344); |
1408 |
stringBuffer.append(TEXT_345); |
1389 |
|
1409 |
|
1390 |
int upperBound = _feature.getEcoreFeature().getUpperBound(); |
1410 |
int upperBound = _feature.getEcoreFeature().getUpperBound(); |
1391 |
if (upperBound > 0) { |
1411 |
if (upperBound > 0) { |
1392 |
if (upperBound == 1) { |
1412 |
if (upperBound == 1) { |
1393 |
|
1413 |
|
1394 |
stringBuffer.append(TEXT_345); |
|
|
1395 |
stringBuffer.append(_ownerInstance); |
1396 |
stringBuffer.append(TEXT_346); |
1414 |
stringBuffer.append(TEXT_346); |
1397 |
stringBuffer.append(_feature.getGetAccessor()); |
1415 |
stringBuffer.append(_ownerInstance); |
1398 |
stringBuffer.append(TEXT_347); |
1416 |
stringBuffer.append(TEXT_347); |
1399 |
stringBuffer.append(_exceedsUpperBound); |
1417 |
stringBuffer.append(_feature.getGetAccessor()); |
1400 |
stringBuffer.append(TEXT_348); |
1418 |
stringBuffer.append(TEXT_348); |
|
|
1419 |
stringBuffer.append(_exceedsUpperBound); |
1420 |
stringBuffer.append(TEXT_349); |
1401 |
|
1421 |
|
1402 |
} else { |
1422 |
} else { |
1403 |
|
1423 |
|
1404 |
stringBuffer.append(TEXT_349); |
|
|
1405 |
stringBuffer.append(_ownerInstance); |
1406 |
stringBuffer.append(TEXT_350); |
1424 |
stringBuffer.append(TEXT_350); |
1407 |
stringBuffer.append(_feature.getGetAccessor()); |
1425 |
stringBuffer.append(_ownerInstance); |
1408 |
stringBuffer.append(TEXT_351); |
1426 |
stringBuffer.append(TEXT_351); |
1409 |
stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); |
1427 |
stringBuffer.append(_feature.getGetAccessor()); |
1410 |
stringBuffer.append(TEXT_352); |
1428 |
stringBuffer.append(TEXT_352); |
1411 |
stringBuffer.append(_feature.getFeatureAccessorName()); |
1429 |
stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); |
1412 |
stringBuffer.append(TEXT_353); |
1430 |
stringBuffer.append(TEXT_353); |
1413 |
stringBuffer.append(_exceedsUpperBound); |
1431 |
stringBuffer.append(_feature.getFeatureAccessorName()); |
1414 |
stringBuffer.append(TEXT_354); |
1432 |
stringBuffer.append(TEXT_354); |
|
|
1433 |
stringBuffer.append(_exceedsUpperBound); |
1434 |
stringBuffer.append(TEXT_355); |
1415 |
|
1435 |
|
1416 |
} |
1436 |
} |
1417 |
} |
1437 |
} |
Lines 1419-1499
Link Here
|
1419 |
|
1439 |
|
1420 |
} |
1440 |
} |
1421 |
} |
1441 |
} |
|
|
1442 |
{ |
1443 |
String _source = "source.getElement()"; |
1444 |
String _target = "null"; |
1422 |
|
1445 |
|
1423 |
stringBuffer.append(TEXT_355); |
1446 |
stringBuffer.append(TEXT_356); |
|
|
1447 |
|
1448 |
if (linkConstraints != null) { |
1449 |
|
1450 |
stringBuffer.append(TEXT_357); |
1451 |
stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer")+"."+genDiagram.getLinkCreationConstraintsClassName()+"."+linkConstraints.getConstraintsInstanceFieldName()); |
1452 |
stringBuffer.append(TEXT_358); |
1453 |
stringBuffer.append(_source); |
1454 |
stringBuffer.append(TEXT_359); |
1455 |
stringBuffer.append(_target); |
1456 |
stringBuffer.append(TEXT_360); |
1457 |
|
1458 |
} |
1459 |
|
1460 |
|
1461 |
} //local declarations for linkConstraints.jetinc |
1462 |
|
1463 |
stringBuffer.append(TEXT_361); |
1424 |
|
1464 |
|
1425 |
} |
1465 |
} |
1426 |
} else if (genLink.getModelFacet() instanceof FeatureModelFacet) { |
1466 |
} else if (genLink.getModelFacet() instanceof FeatureModelFacet) { |
1427 |
GenFeature metaFeature = ((FeatureModelFacet) genLink.getModelFacet()).getMetaFeature(); |
1467 |
GenFeature metaFeature = ((FeatureModelFacet) genLink.getModelFacet()).getMetaFeature(); |
1428 |
|
1468 |
|
1429 |
stringBuffer.append(TEXT_356); |
1469 |
stringBuffer.append(TEXT_362); |
1430 |
stringBuffer.append(importManager.getImportedName(outgoingClass.getQualifiedInterfaceName())); |
1470 |
stringBuffer.append(importManager.getImportedName(outgoingClass.getQualifiedInterfaceName())); |
1431 |
stringBuffer.append(TEXT_357); |
1471 |
stringBuffer.append(TEXT_363); |
1432 |
stringBuffer.append(importManager.getImportedName(outgoingClass.getQualifiedInterfaceName())); |
1472 |
stringBuffer.append(importManager.getImportedName(outgoingClass.getQualifiedInterfaceName())); |
1433 |
stringBuffer.append(TEXT_358); |
1473 |
stringBuffer.append(TEXT_364); |
1434 |
|
1474 |
|
1435 |
{ |
1475 |
{ |
1436 |
GenFeature _feature = metaFeature; |
1476 |
GenFeature _feature = metaFeature; |
1437 |
String _ownerInstance = "domainElement"; |
1477 |
String _ownerInstance = "domainElement"; |
1438 |
String _exceedsUpperBound = "return false;"; |
1478 |
String _exceedsUpperBound = "return false;"; |
1439 |
|
1479 |
|
1440 |
stringBuffer.append(TEXT_359); |
1480 |
stringBuffer.append(TEXT_365); |
1441 |
|
1481 |
|
1442 |
int upperBound = _feature.getEcoreFeature().getUpperBound(); |
1482 |
int upperBound = _feature.getEcoreFeature().getUpperBound(); |
1443 |
if (upperBound > 0) { |
1483 |
if (upperBound > 0) { |
1444 |
if (upperBound == 1) { |
1484 |
if (upperBound == 1) { |
1445 |
|
1485 |
|
1446 |
stringBuffer.append(TEXT_360); |
1486 |
stringBuffer.append(TEXT_366); |
1447 |
stringBuffer.append(_ownerInstance); |
1487 |
stringBuffer.append(_ownerInstance); |
1448 |
stringBuffer.append(TEXT_361); |
1488 |
stringBuffer.append(TEXT_367); |
1449 |
stringBuffer.append(_feature.getGetAccessor()); |
1489 |
stringBuffer.append(_feature.getGetAccessor()); |
1450 |
stringBuffer.append(TEXT_362); |
1490 |
stringBuffer.append(TEXT_368); |
1451 |
stringBuffer.append(_exceedsUpperBound); |
1491 |
stringBuffer.append(_exceedsUpperBound); |
1452 |
stringBuffer.append(TEXT_363); |
1492 |
stringBuffer.append(TEXT_369); |
1453 |
|
1493 |
|
1454 |
} else { |
1494 |
} else { |
1455 |
|
1495 |
|
1456 |
stringBuffer.append(TEXT_364); |
1496 |
stringBuffer.append(TEXT_370); |
1457 |
stringBuffer.append(_ownerInstance); |
1497 |
stringBuffer.append(_ownerInstance); |
1458 |
stringBuffer.append(TEXT_365); |
1498 |
stringBuffer.append(TEXT_371); |
1459 |
stringBuffer.append(_feature.getGetAccessor()); |
1499 |
stringBuffer.append(_feature.getGetAccessor()); |
1460 |
stringBuffer.append(TEXT_366); |
1500 |
stringBuffer.append(TEXT_372); |
1461 |
stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); |
1501 |
stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); |
1462 |
stringBuffer.append(TEXT_367); |
1502 |
stringBuffer.append(TEXT_373); |
1463 |
stringBuffer.append(_feature.getFeatureAccessorName()); |
1503 |
stringBuffer.append(_feature.getFeatureAccessorName()); |
1464 |
stringBuffer.append(TEXT_368); |
1504 |
stringBuffer.append(TEXT_374); |
1465 |
stringBuffer.append(_exceedsUpperBound); |
1505 |
stringBuffer.append(_exceedsUpperBound); |
1466 |
stringBuffer.append(TEXT_369); |
1506 |
stringBuffer.append(TEXT_375); |
1467 |
|
1507 |
|
1468 |
} |
1508 |
} |
1469 |
} |
1509 |
} |
1470 |
|
1510 |
|
1471 |
|
1511 |
|
1472 |
} |
1512 |
} |
|
|
1513 |
{ |
1514 |
String _source = "source.getElement()"; |
1515 |
String _target = "null"; |
1516 |
|
1517 |
stringBuffer.append(TEXT_376); |
1518 |
|
1519 |
if (linkConstraints != null) { |
1520 |
|
1521 |
stringBuffer.append(TEXT_377); |
1522 |
stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer")+"."+genDiagram.getLinkCreationConstraintsClassName()+"."+linkConstraints.getConstraintsInstanceFieldName()); |
1523 |
stringBuffer.append(TEXT_378); |
1524 |
stringBuffer.append(_source); |
1525 |
stringBuffer.append(TEXT_379); |
1526 |
stringBuffer.append(_target); |
1527 |
stringBuffer.append(TEXT_380); |
1528 |
|
1529 |
} |
1473 |
|
1530 |
|
1474 |
stringBuffer.append(TEXT_370); |
1531 |
|
|
|
1532 |
} //local declarations for linkConstraints.jetinc |
1533 |
|
1534 |
stringBuffer.append(TEXT_381); |
1475 |
|
1535 |
|
1476 |
} else { |
1536 |
} else { |
1477 |
|
1537 |
|
1478 |
stringBuffer.append(TEXT_371); |
1538 |
stringBuffer.append(TEXT_382); |
1479 |
|
1539 |
|
1480 |
} |
1540 |
} |
1481 |
|
1541 |
|
1482 |
stringBuffer.append(TEXT_372); |
1542 |
stringBuffer.append(TEXT_383); |
1483 |
|
1543 |
|
1484 |
if (genLink.getModelFacet() instanceof TypeLinkModelFacet) { |
1544 |
if (genLink.getModelFacet() instanceof TypeLinkModelFacet) { |
1485 |
|
1545 |
|
1486 |
stringBuffer.append(TEXT_373); |
1546 |
stringBuffer.append(TEXT_384); |
1487 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); |
1547 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); |
1488 |
stringBuffer.append(TEXT_374); |
1548 |
stringBuffer.append(TEXT_385); |
1489 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); |
1549 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); |
1490 |
stringBuffer.append(TEXT_375); |
1550 |
stringBuffer.append(TEXT_386); |
1491 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EClass")); |
1551 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EClass")); |
1492 |
stringBuffer.append(TEXT_376); |
1552 |
stringBuffer.append(TEXT_387); |
1493 |
|
1553 |
|
1494 |
} |
1554 |
} |
1495 |
|
1555 |
|
1496 |
stringBuffer.append(TEXT_377); |
1556 |
stringBuffer.append(TEXT_388); |
1497 |
|
1557 |
|
1498 |
} //outgoing links |
1558 |
} //outgoing links |
1499 |
|
1559 |
|
Lines 1519-1590
Link Here
|
1519 |
if (!incomingClass.getEcoreClass().isSuperTypeOf(genNode.getModelFacet().getMetaClass().getEcoreClass())) { |
1579 |
if (!incomingClass.getEcoreClass().isSuperTypeOf(genNode.getModelFacet().getMetaClass().getEcoreClass())) { |
1520 |
continue; |
1580 |
continue; |
1521 |
} |
1581 |
} |
|
|
1582 |
GenLinkConstraints linkConstraints = genLink.getCreationConstraints(); |
1522 |
|
1583 |
|
1523 |
stringBuffer.append(TEXT_378); |
1584 |
stringBuffer.append(TEXT_389); |
1524 |
stringBuffer.append(createCommandNameInfix); |
1585 |
stringBuffer.append(createCommandNameInfix); |
1525 |
stringBuffer.append(genLink.getVisualID()); |
1586 |
stringBuffer.append(genLink.getVisualID()); |
1526 |
stringBuffer.append(TEXT_379); |
1587 |
stringBuffer.append(TEXT_390); |
1527 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")); |
1588 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.AbstractCommand")); |
1528 |
stringBuffer.append(TEXT_380); |
1589 |
stringBuffer.append(TEXT_391); |
1529 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); |
1590 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); |
1530 |
stringBuffer.append(TEXT_381); |
1591 |
stringBuffer.append(TEXT_392); |
1531 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); |
1592 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); |
1532 |
stringBuffer.append(TEXT_382); |
1593 |
stringBuffer.append(TEXT_393); |
1533 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); |
1594 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.Edge")); |
1534 |
stringBuffer.append(TEXT_383); |
1595 |
stringBuffer.append(TEXT_394); |
1535 |
stringBuffer.append(createCommandNameInfix); |
1596 |
stringBuffer.append(createCommandNameInfix); |
1536 |
stringBuffer.append(genLink.getVisualID()); |
1597 |
stringBuffer.append(genLink.getVisualID()); |
1537 |
stringBuffer.append(TEXT_384); |
1598 |
stringBuffer.append(TEXT_395); |
1538 |
stringBuffer.append(importManager.getImportedName(palette.getFactoryQualifiedClassName())); |
1599 |
stringBuffer.append(importManager.getImportedName(palette.getFactoryQualifiedClassName())); |
1539 |
stringBuffer.append(TEXT_385); |
1600 |
stringBuffer.append(TEXT_396); |
1540 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); |
1601 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); |
1541 |
stringBuffer.append(TEXT_386); |
1602 |
stringBuffer.append(TEXT_397); |
1542 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); |
1603 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); |
1543 |
stringBuffer.append(TEXT_387); |
1604 |
stringBuffer.append(TEXT_398); |
1544 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); |
1605 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); |
1545 |
stringBuffer.append(TEXT_388); |
1606 |
stringBuffer.append(TEXT_399); |
1546 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); |
1607 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.View")); |
1547 |
stringBuffer.append(TEXT_389); |
1608 |
stringBuffer.append(TEXT_400); |
1548 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")); |
1609 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.common.command.UnexecutableCommand")); |
1549 |
stringBuffer.append(TEXT_390); |
1610 |
stringBuffer.append(TEXT_401); |
1550 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory")); |
1611 |
stringBuffer.append(importManager.getImportedName("org.eclipse.gmf.runtime.notation.NotationFactory")); |
1551 |
stringBuffer.append(TEXT_391); |
1612 |
stringBuffer.append(TEXT_402); |
1552 |
|
1613 |
|
1553 |
if (genLink.getModelFacet() instanceof TypeLinkModelFacet) { |
1614 |
if (genLink.getModelFacet() instanceof TypeLinkModelFacet) { |
1554 |
TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet(); |
1615 |
TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet(); |
1555 |
GenClass linkClass = modelFacet.getMetaClass(); |
1616 |
GenClass linkClass = modelFacet.getMetaClass(); |
1556 |
|
1617 |
|
1557 |
stringBuffer.append(TEXT_392); |
1618 |
stringBuffer.append(TEXT_403); |
1558 |
stringBuffer.append(importManager.getImportedName(importManager.getImportedName(linkClass.getQualifiedInterfaceName()))); |
1619 |
stringBuffer.append(importManager.getImportedName(importManager.getImportedName(linkClass.getQualifiedInterfaceName()))); |
1559 |
stringBuffer.append(TEXT_393); |
1620 |
stringBuffer.append(TEXT_404); |
1560 |
stringBuffer.append(importManager.getImportedName(linkClass.getGenPackage().getQualifiedFactoryInterfaceName())); |
1621 |
stringBuffer.append(importManager.getImportedName(linkClass.getGenPackage().getQualifiedFactoryInterfaceName())); |
1561 |
stringBuffer.append(TEXT_394); |
1622 |
stringBuffer.append(TEXT_405); |
1562 |
stringBuffer.append(linkClass.getClassifierAccessorName()); |
1623 |
stringBuffer.append(linkClass.getClassifierAccessorName()); |
1563 |
stringBuffer.append(TEXT_395); |
1624 |
stringBuffer.append(TEXT_406); |
1564 |
/*XXX: Class name DomainElementInitializer should be user-customizable*/ |
1625 |
/*XXX: Class name DomainElementInitializer should be user-customizable*/ |
1565 |
stringBuffer.append(TEXT_396); |
1626 |
stringBuffer.append(TEXT_407); |
1566 |
stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer")); |
1627 |
stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer")); |
1567 |
stringBuffer.append(TEXT_397); |
1628 |
stringBuffer.append(TEXT_408); |
1568 |
stringBuffer.append(genLink.getUniqueIdentifier()); |
1629 |
stringBuffer.append(genLink.getUniqueIdentifier()); |
1569 |
stringBuffer.append(TEXT_398); |
1630 |
stringBuffer.append(TEXT_409); |
1570 |
|
1631 |
|
1571 |
} else if (genLink.getModelFacet() instanceof FeatureModelFacet) { |
1632 |
} else if (genLink.getModelFacet() instanceof FeatureModelFacet) { |
1572 |
|
1633 |
|
1573 |
stringBuffer.append(TEXT_399); |
1634 |
stringBuffer.append(TEXT_410); |
1574 |
|
1635 |
|
1575 |
} |
1636 |
} |
1576 |
|
1637 |
|
1577 |
stringBuffer.append(TEXT_400); |
1638 |
stringBuffer.append(TEXT_411); |
1578 |
stringBuffer.append(importManager.getImportedName(genLink.getNotationViewFactoryQualifiedClassName())); |
1639 |
stringBuffer.append(importManager.getImportedName(genLink.getNotationViewFactoryQualifiedClassName())); |
1579 |
stringBuffer.append(TEXT_401); |
1640 |
stringBuffer.append(TEXT_412); |
1580 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); |
1641 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.TransactionalEditingDomain")); |
1581 |
stringBuffer.append(TEXT_402); |
1642 |
stringBuffer.append(TEXT_413); |
1582 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); |
1643 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.transaction.util.TransactionUtil")); |
1583 |
stringBuffer.append(TEXT_403); |
1644 |
stringBuffer.append(TEXT_414); |
1584 |
|
1645 |
|
1585 |
if (genLink.getModelFacet() instanceof TypeLinkModelFacet) { |
1646 |
if (genLink.getModelFacet() instanceof TypeLinkModelFacet) { |
1586 |
|
1647 |
|
1587 |
stringBuffer.append(TEXT_404); |
1648 |
stringBuffer.append(TEXT_415); |
1588 |
|
1649 |
|
1589 |
TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet(); |
1650 |
TypeLinkModelFacet modelFacet = (TypeLinkModelFacet) genLink.getModelFacet(); |
1590 |
GenFeature sourceFeature = modelFacet.getSourceMetaFeature(); |
1651 |
GenFeature sourceFeature = modelFacet.getSourceMetaFeature(); |
Lines 1611-1640
Link Here
|
1611 |
} |
1672 |
} |
1612 |
} |
1673 |
} |
1613 |
|
1674 |
|
1614 |
stringBuffer.append(TEXT_405); |
1675 |
stringBuffer.append(TEXT_416); |
1615 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); |
1676 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); |
1616 |
stringBuffer.append(TEXT_406); |
1677 |
stringBuffer.append(TEXT_417); |
1617 |
stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getGenPackage().getQualifiedPackageInterfaceName())); |
1678 |
stringBuffer.append(importManager.getImportedName(containmentFeature.getGenClass().getGenPackage().getQualifiedPackageInterfaceName())); |
1618 |
stringBuffer.append(TEXT_407); |
1679 |
stringBuffer.append(TEXT_418); |
1619 |
stringBuffer.append(containmentFeature.getGenClass().getClassifierAccessorName()); |
1680 |
stringBuffer.append(containmentFeature.getGenClass().getClassifierAccessorName()); |
1620 |
stringBuffer.append(TEXT_408); |
1681 |
stringBuffer.append(TEXT_419); |
1621 |
stringBuffer.append(importManager.getImportedName(containmentFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); |
1682 |
stringBuffer.append(importManager.getImportedName(containmentFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); |
1622 |
stringBuffer.append(TEXT_409); |
1683 |
stringBuffer.append(TEXT_420); |
1623 |
stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); |
1684 |
stringBuffer.append(importManager.getImportedName(containmentFeature.getGenPackage().getQualifiedPackageInterfaceName())); |
1624 |
stringBuffer.append(TEXT_410); |
1685 |
stringBuffer.append(TEXT_421); |
1625 |
stringBuffer.append(containmentFeature.getFeatureAccessorName()); |
1686 |
stringBuffer.append(containmentFeature.getFeatureAccessorName()); |
1626 |
stringBuffer.append(TEXT_411); |
1687 |
stringBuffer.append(TEXT_422); |
1627 |
|
1688 |
|
1628 |
} |
1689 |
} |
1629 |
if (addChild) { |
1690 |
if (addChild) { |
1630 |
|
1691 |
|
1631 |
stringBuffer.append(TEXT_412); |
1692 |
stringBuffer.append(TEXT_423); |
1632 |
stringBuffer.append(importManager.getImportedName(childFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); |
1693 |
stringBuffer.append(importManager.getImportedName(childFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); |
1633 |
stringBuffer.append(TEXT_413); |
1694 |
stringBuffer.append(TEXT_424); |
1634 |
stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName())); |
1695 |
stringBuffer.append(importManager.getImportedName(childFeature.getGenPackage().getQualifiedPackageInterfaceName())); |
1635 |
stringBuffer.append(TEXT_414); |
1696 |
stringBuffer.append(TEXT_425); |
1636 |
stringBuffer.append(childFeature.getFeatureAccessorName()); |
1697 |
stringBuffer.append(childFeature.getFeatureAccessorName()); |
1637 |
stringBuffer.append(TEXT_415); |
1698 |
stringBuffer.append(TEXT_426); |
1638 |
|
1699 |
|
1639 |
} |
1700 |
} |
1640 |
if (addSource) { |
1701 |
if (addSource) { |
Lines 1643-1675
Link Here
|
1643 |
String _ownerInstance = "createdDomainElement"; |
1704 |
String _ownerInstance = "createdDomainElement"; |
1644 |
String _exceedsUpperBound = "domainModelAddCommand = null;\nreturn;"; |
1705 |
String _exceedsUpperBound = "domainModelAddCommand = null;\nreturn;"; |
1645 |
|
1706 |
|
1646 |
stringBuffer.append(TEXT_416); |
1707 |
stringBuffer.append(TEXT_427); |
1647 |
|
1708 |
|
1648 |
int upperBound = _feature.getEcoreFeature().getUpperBound(); |
1709 |
int upperBound = _feature.getEcoreFeature().getUpperBound(); |
1649 |
if (upperBound > 0) { |
1710 |
if (upperBound > 0) { |
1650 |
if (upperBound == 1) { |
1711 |
if (upperBound == 1) { |
1651 |
|
1712 |
|
1652 |
stringBuffer.append(TEXT_417); |
1713 |
stringBuffer.append(TEXT_428); |
1653 |
stringBuffer.append(_ownerInstance); |
1714 |
stringBuffer.append(_ownerInstance); |
1654 |
stringBuffer.append(TEXT_418); |
1715 |
stringBuffer.append(TEXT_429); |
1655 |
stringBuffer.append(_feature.getGetAccessor()); |
1716 |
stringBuffer.append(_feature.getGetAccessor()); |
1656 |
stringBuffer.append(TEXT_419); |
1717 |
stringBuffer.append(TEXT_430); |
1657 |
stringBuffer.append(_exceedsUpperBound); |
1718 |
stringBuffer.append(_exceedsUpperBound); |
1658 |
stringBuffer.append(TEXT_420); |
1719 |
stringBuffer.append(TEXT_431); |
1659 |
|
1720 |
|
1660 |
} else { |
1721 |
} else { |
1661 |
|
1722 |
|
1662 |
stringBuffer.append(TEXT_421); |
1723 |
stringBuffer.append(TEXT_432); |
1663 |
stringBuffer.append(_ownerInstance); |
1724 |
stringBuffer.append(_ownerInstance); |
1664 |
stringBuffer.append(TEXT_422); |
1725 |
stringBuffer.append(TEXT_433); |
1665 |
stringBuffer.append(_feature.getGetAccessor()); |
1726 |
stringBuffer.append(_feature.getGetAccessor()); |
1666 |
stringBuffer.append(TEXT_423); |
1727 |
stringBuffer.append(TEXT_434); |
1667 |
stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); |
1728 |
stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); |
1668 |
stringBuffer.append(TEXT_424); |
1729 |
stringBuffer.append(TEXT_435); |
1669 |
stringBuffer.append(_feature.getFeatureAccessorName()); |
1730 |
stringBuffer.append(_feature.getFeatureAccessorName()); |
1670 |
stringBuffer.append(TEXT_425); |
1731 |
stringBuffer.append(TEXT_436); |
1671 |
stringBuffer.append(_exceedsUpperBound); |
1732 |
stringBuffer.append(_exceedsUpperBound); |
1672 |
stringBuffer.append(TEXT_426); |
1733 |
stringBuffer.append(TEXT_437); |
1673 |
|
1734 |
|
1674 |
} |
1735 |
} |
1675 |
} |
1736 |
} |
Lines 1677-1689
Link Here
|
1677 |
|
1738 |
|
1678 |
} |
1739 |
} |
1679 |
|
1740 |
|
1680 |
stringBuffer.append(TEXT_427); |
1741 |
stringBuffer.append(TEXT_438); |
1681 |
stringBuffer.append(importManager.getImportedName(sourceFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); |
1742 |
stringBuffer.append(importManager.getImportedName(sourceFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); |
1682 |
stringBuffer.append(TEXT_428); |
1743 |
stringBuffer.append(TEXT_439); |
1683 |
stringBuffer.append(importManager.getImportedName(sourceFeature.getGenPackage().getQualifiedPackageInterfaceName())); |
1744 |
stringBuffer.append(importManager.getImportedName(sourceFeature.getGenPackage().getQualifiedPackageInterfaceName())); |
1684 |
stringBuffer.append(TEXT_429); |
1745 |
stringBuffer.append(TEXT_440); |
1685 |
stringBuffer.append(sourceFeature.getFeatureAccessorName()); |
1746 |
stringBuffer.append(sourceFeature.getFeatureAccessorName()); |
1686 |
stringBuffer.append(TEXT_430); |
1747 |
stringBuffer.append(TEXT_441); |
1687 |
|
1748 |
|
1688 |
} |
1749 |
} |
1689 |
if (addTarget) { |
1750 |
if (addTarget) { |
Lines 1692-1724
Link Here
|
1692 |
String _ownerInstance = "createdDomainElement"; |
1753 |
String _ownerInstance = "createdDomainElement"; |
1693 |
String _exceedsUpperBound = "domainModelAddCommand = null;\nreturn;"; |
1754 |
String _exceedsUpperBound = "domainModelAddCommand = null;\nreturn;"; |
1694 |
|
1755 |
|
1695 |
stringBuffer.append(TEXT_431); |
1756 |
stringBuffer.append(TEXT_442); |
1696 |
|
1757 |
|
1697 |
int upperBound = _feature.getEcoreFeature().getUpperBound(); |
1758 |
int upperBound = _feature.getEcoreFeature().getUpperBound(); |
1698 |
if (upperBound > 0) { |
1759 |
if (upperBound > 0) { |
1699 |
if (upperBound == 1) { |
1760 |
if (upperBound == 1) { |
1700 |
|
1761 |
|
1701 |
stringBuffer.append(TEXT_432); |
1762 |
stringBuffer.append(TEXT_443); |
1702 |
stringBuffer.append(_ownerInstance); |
1763 |
stringBuffer.append(_ownerInstance); |
1703 |
stringBuffer.append(TEXT_433); |
1764 |
stringBuffer.append(TEXT_444); |
1704 |
stringBuffer.append(_feature.getGetAccessor()); |
1765 |
stringBuffer.append(_feature.getGetAccessor()); |
1705 |
stringBuffer.append(TEXT_434); |
1766 |
stringBuffer.append(TEXT_445); |
1706 |
stringBuffer.append(_exceedsUpperBound); |
1767 |
stringBuffer.append(_exceedsUpperBound); |
1707 |
stringBuffer.append(TEXT_435); |
1768 |
stringBuffer.append(TEXT_446); |
1708 |
|
1769 |
|
1709 |
} else { |
1770 |
} else { |
1710 |
|
1771 |
|
1711 |
stringBuffer.append(TEXT_436); |
1772 |
stringBuffer.append(TEXT_447); |
1712 |
stringBuffer.append(_ownerInstance); |
1773 |
stringBuffer.append(_ownerInstance); |
1713 |
stringBuffer.append(TEXT_437); |
1774 |
stringBuffer.append(TEXT_448); |
1714 |
stringBuffer.append(_feature.getGetAccessor()); |
1775 |
stringBuffer.append(_feature.getGetAccessor()); |
1715 |
stringBuffer.append(TEXT_438); |
1776 |
stringBuffer.append(TEXT_449); |
1716 |
stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); |
1777 |
stringBuffer.append(importManager.getImportedName(_feature.getGenPackage().getQualifiedPackageInterfaceName())); |
1717 |
stringBuffer.append(TEXT_439); |
1778 |
stringBuffer.append(TEXT_450); |
1718 |
stringBuffer.append(_feature.getFeatureAccessorName()); |
1779 |
stringBuffer.append(_feature.getFeatureAccessorName()); |
1719 |
stringBuffer.append(TEXT_440); |
1780 |
stringBuffer.append(TEXT_451); |
1720 |
stringBuffer.append(_exceedsUpperBound); |
1781 |
stringBuffer.append(_exceedsUpperBound); |
1721 |
stringBuffer.append(TEXT_441); |
1782 |
stringBuffer.append(TEXT_452); |
1722 |
|
1783 |
|
1723 |
} |
1784 |
} |
1724 |
} |
1785 |
} |
Lines 1726-1771
Link Here
|
1726 |
|
1787 |
|
1727 |
} |
1788 |
} |
1728 |
|
1789 |
|
1729 |
stringBuffer.append(TEXT_442); |
1790 |
stringBuffer.append(TEXT_453); |
1730 |
stringBuffer.append(importManager.getImportedName(targetFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); |
1791 |
stringBuffer.append(importManager.getImportedName(targetFeature.getEcoreFeature().isMany() ? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); |
1731 |
stringBuffer.append(TEXT_443); |
1792 |
stringBuffer.append(TEXT_454); |
1732 |
stringBuffer.append(importManager.getImportedName(targetFeature.getGenPackage().getQualifiedPackageInterfaceName())); |
1793 |
stringBuffer.append(importManager.getImportedName(targetFeature.getGenPackage().getQualifiedPackageInterfaceName())); |
1733 |
stringBuffer.append(TEXT_444); |
1794 |
stringBuffer.append(TEXT_455); |
1734 |
stringBuffer.append(targetFeature.getFeatureAccessorName()); |
1795 |
stringBuffer.append(targetFeature.getFeatureAccessorName()); |
1735 |
stringBuffer.append(TEXT_445); |
1796 |
stringBuffer.append(TEXT_456); |
1736 |
|
1797 |
|
1737 |
} |
1798 |
} |
1738 |
|
1799 |
|
1739 |
stringBuffer.append(TEXT_446); |
1800 |
stringBuffer.append(TEXT_457); |
1740 |
|
1801 |
|
1741 |
} else if (genLink.getModelFacet() instanceof FeatureModelFacet) { |
1802 |
} else if (genLink.getModelFacet() instanceof FeatureModelFacet) { |
1742 |
GenFeature metaFeature = ((FeatureModelFacet) genLink.getModelFacet()).getMetaFeature(); |
1803 |
GenFeature metaFeature = ((FeatureModelFacet) genLink.getModelFacet()).getMetaFeature(); |
1743 |
|
1804 |
|
1744 |
stringBuffer.append(TEXT_447); |
1805 |
stringBuffer.append(TEXT_458); |
1745 |
stringBuffer.append(importManager.getImportedName(metaFeature.getEcoreFeature().isMany()? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); |
1806 |
stringBuffer.append(importManager.getImportedName(metaFeature.getEcoreFeature().isMany()? "org.eclipse.emf.edit.command.AddCommand" : "org.eclipse.emf.edit.command.SetCommand")); |
1746 |
stringBuffer.append(TEXT_448); |
1807 |
stringBuffer.append(TEXT_459); |
1747 |
stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName())); |
1808 |
stringBuffer.append(importManager.getImportedName(metaFeature.getGenPackage().getQualifiedPackageInterfaceName())); |
1748 |
stringBuffer.append(TEXT_449); |
1809 |
stringBuffer.append(TEXT_460); |
1749 |
stringBuffer.append(metaFeature.getFeatureAccessorName()); |
1810 |
stringBuffer.append(metaFeature.getFeatureAccessorName()); |
1750 |
stringBuffer.append(TEXT_450); |
1811 |
stringBuffer.append(TEXT_461); |
1751 |
|
1812 |
|
1752 |
} |
1813 |
} |
1753 |
|
1814 |
|
1754 |
stringBuffer.append(TEXT_451); |
1815 |
stringBuffer.append(TEXT_462); |
1755 |
|
1816 |
|
1756 |
if (genLink.getModelFacet() instanceof TypeLinkModelFacet) { |
1817 |
if (genLink.getModelFacet() instanceof TypeLinkModelFacet) { |
1757 |
|
1818 |
|
1758 |
stringBuffer.append(TEXT_452); |
1819 |
stringBuffer.append(TEXT_463); |
1759 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); |
1820 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); |
1760 |
stringBuffer.append(TEXT_453); |
1821 |
stringBuffer.append(TEXT_464); |
1761 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); |
1822 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EObject")); |
1762 |
stringBuffer.append(TEXT_454); |
1823 |
stringBuffer.append(TEXT_465); |
1763 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EClass")); |
1824 |
stringBuffer.append(importManager.getImportedName("org.eclipse.emf.ecore.EClass")); |
1764 |
stringBuffer.append(TEXT_455); |
1825 |
stringBuffer.append(TEXT_466); |
1765 |
|
1826 |
|
1766 |
} |
1827 |
} |
1767 |
|
1828 |
|
1768 |
stringBuffer.append(TEXT_456); |
1829 |
stringBuffer.append(TEXT_467); |
|
|
1830 |
|
1831 |
{ |
1832 |
String _source = "source.getElement()"; |
1833 |
String _target = "target.getElement()"; |
1834 |
|
1835 |
stringBuffer.append(TEXT_468); |
1836 |
|
1837 |
if (linkConstraints != null) { |
1838 |
|
1839 |
stringBuffer.append(TEXT_469); |
1840 |
stringBuffer.append(importManager.getImportedName(genDiagram.getNotationViewFactoriesPackageName() + ".DomainElementInitializer")+"."+genDiagram.getLinkCreationConstraintsClassName()+"."+linkConstraints.getConstraintsInstanceFieldName()); |
1841 |
stringBuffer.append(TEXT_470); |
1842 |
stringBuffer.append(_source); |
1843 |
stringBuffer.append(TEXT_471); |
1844 |
stringBuffer.append(_target); |
1845 |
stringBuffer.append(TEXT_472); |
1846 |
|
1847 |
} |
1848 |
|
1849 |
|
1850 |
} //local declarations for linkConstraints.jetinc |
1851 |
|
1852 |
stringBuffer.append(TEXT_473); |
1769 |
|
1853 |
|
1770 |
} |
1854 |
} |
1771 |
|
1855 |
|
Lines 1774-1795
Link Here
|
1774 |
if (genNode.getViewmap() instanceof InnerClassViewmap) { |
1858 |
if (genNode.getViewmap() instanceof InnerClassViewmap) { |
1775 |
String classBody = ((InnerClassViewmap) genNode.getViewmap()).getClassBody(); |
1859 |
String classBody = ((InnerClassViewmap) genNode.getViewmap()).getClassBody(); |
1776 |
|
1860 |
|
1777 |
stringBuffer.append(TEXT_457); |
1861 |
stringBuffer.append(TEXT_474); |
1778 |
stringBuffer.append(classBody); |
1862 |
stringBuffer.append(classBody); |
1779 |
stringBuffer.append(TEXT_458); |
1863 |
stringBuffer.append(TEXT_475); |
1780 |
|
1864 |
|
1781 |
if (classBody.indexOf("DPtoLP") != -1) { |
1865 |
if (classBody.indexOf("DPtoLP") != -1) { |
1782 |
|
1866 |
|
1783 |
stringBuffer.append(TEXT_459); |
1867 |
stringBuffer.append(TEXT_476); |
1784 |
|
1868 |
|
1785 |
} |
1869 |
} |
1786 |
|
1870 |
|
1787 |
|
1871 |
|
1788 |
} |
1872 |
} |
1789 |
|
1873 |
|
1790 |
stringBuffer.append(TEXT_460); |
1874 |
stringBuffer.append(TEXT_477); |
1791 |
importManager.emitSortedImports(); |
1875 |
importManager.emitSortedImports(); |
1792 |
stringBuffer.append(TEXT_461); |
1876 |
stringBuffer.append(TEXT_478); |
1793 |
return stringBuffer.toString(); |
1877 |
return stringBuffer.toString(); |
1794 |
} |
1878 |
} |
1795 |
} |
1879 |
} |