1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
|
8 | |
|
9 | |
|
10 | |
|
11 | |
|
12 | |
|
13 | |
|
14 | |
|
15 | |
|
16 | |
|
17 | |
|
18 | |
|
19 | |
|
20 | |
|
21 | |
|
22 | |
|
23 | |
|
24 | |
|
25 | |
|
26 | |
|
27 | |
|
28 | |
|
29 | |
|
30 | |
|
31 | |
|
32 | |
|
33 | |
|
34 | |
|
35 | |
|
36 | |
|
37 | |
|
38 | |
|
39 | |
package org.argouml.notation.providers.uml; |
40 | |
|
41 | |
import java.text.ParseException; |
42 | |
import java.util.ArrayList; |
43 | |
import java.util.Collection; |
44 | |
import java.util.Iterator; |
45 | |
import java.util.List; |
46 | |
import java.util.NoSuchElementException; |
47 | |
|
48 | |
import org.argouml.application.events.ArgoEventPump; |
49 | |
import org.argouml.application.events.ArgoEventTypes; |
50 | |
import org.argouml.application.events.ArgoHelpEvent; |
51 | |
import org.argouml.i18n.Translator; |
52 | |
import org.argouml.kernel.Project; |
53 | |
import org.argouml.kernel.ProjectManager; |
54 | |
import org.argouml.model.InvalidElementException; |
55 | |
import org.argouml.model.Model; |
56 | |
import org.argouml.notation.NotationSettings; |
57 | |
import org.argouml.notation.providers.OperationNotation; |
58 | |
import org.argouml.uml.StereotypeUtility; |
59 | |
import org.argouml.util.MyTokenizer; |
60 | |
|
61 | |
|
62 | |
|
63 | |
|
64 | |
|
65 | |
|
66 | |
public class OperationNotationUml extends OperationNotation { |
67 | |
|
68 | |
private static final String RECEPTION_KEYWORD = "signal"; |
69 | |
|
70 | |
|
71 | |
|
72 | |
|
73 | |
|
74 | |
|
75 | |
public OperationNotationUml(Object operation) { |
76 | 0 | super(operation); |
77 | 0 | } |
78 | |
|
79 | |
|
80 | |
|
81 | |
|
82 | |
public void parse(Object modelElement, String text) { |
83 | |
try { |
84 | 0 | parseOperationFig(Model.getFacade().getOwner(modelElement), |
85 | |
modelElement, text); |
86 | 0 | } catch (ParseException pe) { |
87 | 0 | String msg = "statusmsg.bar.error.parsing.operation"; |
88 | 0 | Object[] args = { |
89 | |
pe.getLocalizedMessage(), |
90 | |
Integer.valueOf(pe.getErrorOffset()), |
91 | |
}; |
92 | 0 | ArgoEventPump.fireEvent(new ArgoHelpEvent( |
93 | |
ArgoEventTypes.HELP_CHANGED, this, |
94 | |
Translator.messageFormat(msg, args))); |
95 | 0 | } |
96 | 0 | } |
97 | |
|
98 | |
|
99 | |
|
100 | |
|
101 | |
|
102 | |
|
103 | |
|
104 | |
|
105 | |
|
106 | |
|
107 | |
|
108 | |
public void parseOperationFig( |
109 | |
Object classifier, |
110 | |
Object operation, |
111 | |
String text) throws ParseException { |
112 | |
|
113 | 0 | if (classifier == null || operation == null) { |
114 | 0 | return; |
115 | |
} |
116 | 0 | ParseException pex = null; |
117 | 0 | int start = 0; |
118 | 0 | int end = NotationUtilityUml.indexOfNextCheckedSemicolon(text, start); |
119 | 0 | Project currentProject = |
120 | |
ProjectManager.getManager().getCurrentProject(); |
121 | 0 | if (end == -1) { |
122 | |
|
123 | 0 | currentProject.moveToTrash(operation); |
124 | 0 | return; |
125 | |
} |
126 | 0 | String s = text.substring(start, end).trim(); |
127 | 0 | if (s.length() == 0) { |
128 | |
|
129 | 0 | currentProject.moveToTrash(operation); |
130 | 0 | return; |
131 | |
} |
132 | 0 | parseOperation(s, operation); |
133 | 0 | int i = Model.getFacade().getFeatures(classifier).indexOf(operation); |
134 | |
|
135 | 0 | start = end + 1; |
136 | 0 | end = NotationUtilityUml.indexOfNextCheckedSemicolon(text, start); |
137 | 0 | while (end > start && end <= text.length()) { |
138 | 0 | s = text.substring(start, end).trim(); |
139 | 0 | if (s.length() > 0) { |
140 | |
|
141 | 0 | Object returnType = currentProject.getDefaultReturnType(); |
142 | 0 | Object newOp = |
143 | |
Model.getCoreFactory() |
144 | |
.buildOperation(classifier, returnType); |
145 | 0 | if (newOp != null) { |
146 | |
try { |
147 | 0 | parseOperation(s, newOp); |
148 | |
|
149 | |
|
150 | 0 | if (i != -1) { |
151 | 0 | Model.getCoreHelper().addFeature( |
152 | |
classifier, ++i, newOp); |
153 | |
} else { |
154 | 0 | Model.getCoreHelper().addFeature( |
155 | |
classifier, newOp); |
156 | |
} |
157 | 0 | } catch (ParseException ex) { |
158 | 0 | if (pex == null) { |
159 | 0 | pex = ex; |
160 | |
} |
161 | 0 | } |
162 | |
} |
163 | |
} |
164 | 0 | start = end + 1; |
165 | 0 | end = NotationUtilityUml.indexOfNextCheckedSemicolon(text, start); |
166 | |
} |
167 | 0 | if (pex != null) { |
168 | 0 | throw pex; |
169 | |
} |
170 | 0 | } |
171 | |
|
172 | |
|
173 | |
|
174 | |
|
175 | |
|
176 | |
|
177 | |
|
178 | |
|
179 | |
|
180 | |
|
181 | |
|
182 | |
|
183 | |
|
184 | |
|
185 | |
|
186 | |
|
187 | |
|
188 | |
|
189 | |
|
190 | |
|
191 | |
|
192 | |
|
193 | |
|
194 | |
|
195 | |
|
196 | |
|
197 | |
|
198 | |
|
199 | |
|
200 | |
|
201 | |
|
202 | |
public void parseOperation(String s, Object op) throws ParseException { |
203 | |
MyTokenizer st; |
204 | 0 | boolean hasColon = false; |
205 | 0 | String name = null; |
206 | 0 | String parameterlist = null; |
207 | 0 | StringBuilder stereotype = null; |
208 | |
String token; |
209 | 0 | String type = null; |
210 | 0 | String visibility = null; |
211 | 0 | List<String> properties = null; |
212 | 0 | int paramOffset = 0; |
213 | |
|
214 | 0 | s = s.trim(); |
215 | |
|
216 | 0 | if (s.length() > 0 |
217 | |
&& NotationUtilityUml.VISIBILITYCHARS.indexOf(s.charAt(0)) |
218 | |
>= 0) { |
219 | 0 | visibility = s.substring(0, 1); |
220 | 0 | s = s.substring(1); |
221 | |
} |
222 | |
|
223 | |
try { |
224 | 0 | st = new MyTokenizer(s, " ,\t,<<,\u00AB,\u00BB,>>,:,=,{,},\\,", |
225 | |
NotationUtilityUml.operationCustomSep); |
226 | 0 | while (st.hasMoreTokens()) { |
227 | 0 | token = st.nextToken(); |
228 | 0 | if (" ".equals(token) || "\t".equals(token) |
229 | |
|| ",".equals(token)) { |
230 | 0 | continue; |
231 | 0 | } else if ("<<".equals(token) || "\u00AB".equals(token)) { |
232 | 0 | if (stereotype != null) { |
233 | 0 | parseError("operation.stereotypes", |
234 | |
st.getTokenIndex()); |
235 | |
} |
236 | 0 | stereotype = new StringBuilder(); |
237 | |
while (true) { |
238 | 0 | token = st.nextToken(); |
239 | 0 | if (">>".equals(token) || "\u00BB".equals(token)) { |
240 | 0 | break; |
241 | |
} |
242 | 0 | stereotype.append(token); |
243 | |
} |
244 | 0 | } else if ("{".equals(token)) { |
245 | 0 | properties = tokenOpenBrace(st, properties); |
246 | 0 | } else if (":".equals(token)) { |
247 | 0 | hasColon = true; |
248 | 0 | } else if ("=".equals(token)) { |
249 | 0 | parseError("operation.default-values", st.getTokenIndex()); |
250 | 0 | } else if (token.charAt(0) == '(' && !hasColon) { |
251 | 0 | if (parameterlist != null) { |
252 | 0 | parseError("operation.two-parameter-lists", |
253 | |
st.getTokenIndex()); |
254 | |
} |
255 | |
|
256 | 0 | parameterlist = token; |
257 | |
} else { |
258 | 0 | if (hasColon) { |
259 | 0 | if (type != null) { |
260 | 0 | parseError("operation.two-types", |
261 | |
st.getTokenIndex()); |
262 | |
} |
263 | |
|
264 | 0 | if (token.length() > 0 |
265 | |
&& (token.charAt(0) == '\"' |
266 | |
|| token.charAt(0) == '\'')) { |
267 | 0 | parseError("operation.type-quoted", |
268 | |
st.getTokenIndex()); |
269 | |
} |
270 | |
|
271 | 0 | if (token.length() > 0 && token.charAt(0) == '(') { |
272 | 0 | parseError("operation.type-expr", |
273 | |
st.getTokenIndex()); |
274 | |
} |
275 | |
|
276 | 0 | type = token; |
277 | |
} else { |
278 | 0 | if (name != null && visibility != null) { |
279 | 0 | parseError("operation.extra-text", |
280 | |
st.getTokenIndex()); |
281 | |
} |
282 | |
|
283 | 0 | if (token.length() > 0 |
284 | |
&& (token.charAt(0) == '\"' |
285 | |
|| token.charAt(0) == '\'')) { |
286 | 0 | parseError("operation.name-quoted", |
287 | |
st.getTokenIndex()); |
288 | |
} |
289 | |
|
290 | 0 | if (token.length() > 0 && token.charAt(0) == '(') { |
291 | 0 | parseError("operation.name-expr", |
292 | |
st.getTokenIndex()); |
293 | |
} |
294 | |
|
295 | 0 | if (name == null |
296 | |
&& visibility == null |
297 | |
&& token.length() > 1 |
298 | |
&& NotationUtilityUml.VISIBILITYCHARS.indexOf( |
299 | |
token.charAt(0)) |
300 | |
>= 0) { |
301 | 0 | visibility = token.substring(0, 1); |
302 | 0 | token = token.substring(1); |
303 | |
} |
304 | |
|
305 | 0 | if (name != null) { |
306 | 0 | visibility = name; |
307 | 0 | name = token; |
308 | |
} else { |
309 | 0 | name = token; |
310 | |
} |
311 | |
} |
312 | |
} |
313 | |
} |
314 | 0 | } catch (NoSuchElementException nsee) { |
315 | 0 | parseError("operation.unexpected-end-operation", |
316 | |
s.length()); |
317 | 0 | } catch (ParseException pre) { |
318 | 0 | throw pre; |
319 | 0 | } |
320 | |
|
321 | 0 | if (parameterlist != null) { |
322 | |
|
323 | 0 | if (parameterlist.charAt(parameterlist.length() - 1) != ')') { |
324 | 0 | parseError("operation.parameter-list-incomplete", |
325 | |
paramOffset + parameterlist.length() - 1); |
326 | |
} |
327 | |
|
328 | 0 | paramOffset++; |
329 | 0 | parameterlist = parameterlist.substring(1, |
330 | |
parameterlist.length() - 1); |
331 | 0 | NotationUtilityUml.parseParamList(op, parameterlist, paramOffset); |
332 | |
} |
333 | |
|
334 | 0 | if (visibility != null) { |
335 | 0 | Model.getCoreHelper().setVisibility(op, |
336 | |
NotationUtilityUml.getVisibility(visibility.trim())); |
337 | |
} |
338 | |
|
339 | 0 | if (name != null) { |
340 | 0 | Model.getCoreHelper().setName(op, name.trim()); |
341 | 0 | } else if (Model.getFacade().getName(op) == null |
342 | |
|| "".equals(Model.getFacade().getName(op))) { |
343 | 0 | Model.getCoreHelper().setName(op, "anonymous"); |
344 | |
} |
345 | |
|
346 | 0 | if (type != null) { |
347 | 0 | Object ow = Model.getFacade().getOwner(op); |
348 | 0 | Object ns = null; |
349 | 0 | if (ow != null && Model.getFacade().getNamespace(ow) != null) { |
350 | 0 | ns = Model.getFacade().getNamespace(ow); |
351 | |
} else { |
352 | 0 | ns = Model.getFacade().getRoot(op); |
353 | |
} |
354 | 0 | Object mtype = NotationUtilityUml.getType(type.trim(), ns); |
355 | 0 | setReturnParameter(op, mtype); |
356 | |
} |
357 | |
|
358 | 0 | if (properties != null) { |
359 | 0 | NotationUtilityUml.setProperties(op, properties, |
360 | |
NotationUtilityUml.operationSpecialStrings); |
361 | |
} |
362 | |
|
363 | |
|
364 | |
|
365 | 0 | if (!Model.getFacade().isAReception(op) |
366 | |
|| !RECEPTION_KEYWORD.equals(stereotype.toString())) { |
367 | 0 | StereotypeUtility.dealWithStereotypes(op, stereotype, true); |
368 | |
} |
369 | 0 | } |
370 | |
|
371 | |
|
372 | |
|
373 | |
|
374 | |
|
375 | |
|
376 | |
|
377 | |
|
378 | |
|
379 | |
|
380 | |
|
381 | |
private void parseError(String message, int offset) |
382 | |
throws ParseException { |
383 | |
|
384 | 0 | throw new ParseException( |
385 | |
Translator.localize("parsing.error." + message), |
386 | |
offset); |
387 | |
} |
388 | |
|
389 | |
|
390 | |
|
391 | |
|
392 | |
|
393 | |
|
394 | |
|
395 | |
|
396 | |
|
397 | |
private List<String> tokenOpenBrace(MyTokenizer st, List<String> properties) |
398 | |
throws ParseException { |
399 | |
String token; |
400 | 0 | StringBuilder propname = new StringBuilder(); |
401 | 0 | String propvalue = null; |
402 | |
|
403 | 0 | if (properties == null) { |
404 | 0 | properties = new ArrayList<String>(); |
405 | |
} |
406 | |
while (true) { |
407 | 0 | token = st.nextToken(); |
408 | 0 | if (",".equals(token) || "}".equals(token)) { |
409 | 0 | if (propname.length() > 0) { |
410 | 0 | properties.add(propname.toString()); |
411 | 0 | properties.add(propvalue); |
412 | |
} |
413 | 0 | propname = new StringBuilder(); |
414 | 0 | propvalue = null; |
415 | |
|
416 | 0 | if ("}".equals(token)) { |
417 | 0 | break; |
418 | |
} |
419 | 0 | } else if ("=".equals(token)) { |
420 | 0 | if (propvalue != null) { |
421 | 0 | String msg = |
422 | |
"parsing.error.operation.prop-stereotypes"; |
423 | 0 | Object[] args = {propname}; |
424 | 0 | throw new ParseException( |
425 | |
Translator.localize(msg, |
426 | |
args), |
427 | |
st.getTokenIndex()); |
428 | |
} |
429 | 0 | propvalue = ""; |
430 | 0 | } else if (propvalue == null) { |
431 | 0 | propname.append(token); |
432 | |
} else { |
433 | 0 | propvalue += token; |
434 | |
} |
435 | |
} |
436 | 0 | if (propname.length() > 0) { |
437 | 0 | properties.add(propname.toString()); |
438 | 0 | properties.add(propvalue); |
439 | |
} |
440 | 0 | return properties; |
441 | |
} |
442 | |
|
443 | |
|
444 | |
|
445 | |
|
446 | |
|
447 | |
|
448 | |
|
449 | |
|
450 | |
|
451 | |
private void setReturnParameter(Object op, Object type) { |
452 | 0 | Object param = null; |
453 | 0 | Iterator it = Model.getFacade().getParameters(op).iterator(); |
454 | 0 | while (it.hasNext()) { |
455 | 0 | Object p = it.next(); |
456 | 0 | if (Model.getFacade().isReturn(p)) { |
457 | 0 | param = p; |
458 | 0 | break; |
459 | |
} |
460 | 0 | } |
461 | 0 | while (it.hasNext()) { |
462 | 0 | Object p = it.next(); |
463 | 0 | if (Model.getFacade().isReturn(p)) { |
464 | 0 | ProjectManager.getManager().getCurrentProject().moveToTrash(p); |
465 | |
} |
466 | 0 | } |
467 | 0 | if (param == null) { |
468 | 0 | Object returnType = |
469 | |
ProjectManager.getManager() |
470 | |
.getCurrentProject().getDefaultReturnType(); |
471 | 0 | param = Model.getCoreFactory().buildParameter(op, returnType); |
472 | |
} |
473 | 0 | Model.getCoreHelper().setType(param, type); |
474 | 0 | } |
475 | |
|
476 | |
|
477 | |
|
478 | |
|
479 | |
public String getParsingHelp() { |
480 | 0 | return "parsing.help.operation"; |
481 | |
} |
482 | |
|
483 | |
|
484 | |
|
485 | |
|
486 | |
|
487 | |
|
488 | |
|
489 | |
|
490 | |
|
491 | |
|
492 | |
|
493 | |
|
494 | |
|
495 | |
|
496 | |
|
497 | |
|
498 | |
public String toString(Object modelElement, NotationSettings settings) { |
499 | 0 | return toString(modelElement, settings.isUseGuillemets(), |
500 | |
settings.isShowVisibilities(), settings.isShowTypes(), |
501 | |
settings.isShowProperties()); |
502 | |
} |
503 | |
|
504 | |
|
505 | |
|
506 | |
|
507 | |
|
508 | |
|
509 | |
|
510 | |
|
511 | |
|
512 | |
|
513 | |
|
514 | |
|
515 | |
|
516 | |
private String toString(Object modelElement, boolean useGuillemets, |
517 | |
boolean showVisibility, |
518 | |
boolean showTypes, boolean showProperties) { |
519 | |
try { |
520 | 0 | String stereoStr = NotationUtilityUml.generateStereotype( |
521 | |
Model.getFacade().getStereotypes(modelElement), |
522 | |
useGuillemets); |
523 | 0 | boolean isReception = Model.getFacade().isAReception(modelElement); |
524 | |
|
525 | 0 | if (isReception) { |
526 | 0 | stereoStr = |
527 | |
NotationUtilityUml |
528 | |
.generateStereotype(RECEPTION_KEYWORD, |
529 | |
useGuillemets) |
530 | |
+ " " + stereoStr; |
531 | |
} |
532 | |
|
533 | |
|
534 | |
|
535 | |
|
536 | |
|
537 | 0 | StringBuffer genStr = new StringBuffer(30); |
538 | 0 | if ((stereoStr != null) && (stereoStr.length() > 0)) { |
539 | 0 | genStr.append(stereoStr).append(" "); |
540 | |
} |
541 | 0 | if (showVisibility) { |
542 | 0 | String visStr = NotationUtilityUml |
543 | |
.generateVisibility2(modelElement); |
544 | 0 | if (visStr != null) { |
545 | 0 | genStr.append(visStr); |
546 | |
} |
547 | |
} |
548 | |
|
549 | 0 | String nameStr = Model.getFacade().getName(modelElement); |
550 | 0 | if ((nameStr != null) && (nameStr.length() > 0)) { |
551 | 0 | genStr.append(nameStr); |
552 | |
} |
553 | |
|
554 | |
|
555 | |
|
556 | 0 | if (showTypes) { |
557 | |
|
558 | 0 | StringBuffer parameterStr = new StringBuffer(); |
559 | 0 | parameterStr.append("(").append(getParameterList(modelElement)) |
560 | |
.append(")"); |
561 | |
|
562 | |
|
563 | 0 | StringBuffer returnParasSb = getReturnParameters(modelElement, |
564 | |
isReception); |
565 | 0 | genStr.append(parameterStr).append(" "); |
566 | 0 | if ((returnParasSb != null) && (returnParasSb.length() > 0)) { |
567 | 0 | genStr.append(returnParasSb).append(" "); |
568 | |
} |
569 | 0 | } else { |
570 | 0 | genStr.append("()"); |
571 | |
} |
572 | 0 | if (showProperties) { |
573 | 0 | StringBuffer propertySb = getProperties(modelElement, |
574 | |
isReception); |
575 | 0 | if (propertySb.length() > 0) { |
576 | 0 | genStr.append(propertySb); |
577 | |
} |
578 | |
} |
579 | 0 | return genStr.toString().trim(); |
580 | 0 | } catch (InvalidElementException e) { |
581 | |
|
582 | 0 | return ""; |
583 | |
} |
584 | |
|
585 | |
} |
586 | |
|
587 | |
|
588 | |
private StringBuffer getParameterList(Object modelElement) { |
589 | 0 | StringBuffer parameterListBuffer = new StringBuffer(); |
590 | 0 | Collection coll = Model.getFacade().getParameters(modelElement); |
591 | 0 | Iterator it = coll.iterator(); |
592 | 0 | int counter = 0; |
593 | 0 | while (it.hasNext()) { |
594 | 0 | Object parameter = it.next(); |
595 | 0 | if (!Model.getFacade().hasReturnParameterDirectionKind( |
596 | |
parameter)) { |
597 | 0 | counter++; |
598 | 0 | parameterListBuffer.append( |
599 | |
NotationUtilityUml.generateParameter(parameter)); |
600 | 0 | parameterListBuffer.append(","); |
601 | |
} |
602 | 0 | } |
603 | 0 | if (counter > 0) { |
604 | 0 | parameterListBuffer.delete( |
605 | |
parameterListBuffer.length() - 1, |
606 | |
parameterListBuffer.length()); |
607 | |
} |
608 | 0 | return parameterListBuffer; |
609 | |
} |
610 | |
|
611 | |
private StringBuffer getReturnParameters(Object modelElement, |
612 | |
boolean isReception) { |
613 | 0 | StringBuffer returnParasSb = new StringBuffer(); |
614 | 0 | if (!isReception) { |
615 | 0 | Collection coll = |
616 | |
Model.getCoreHelper().getReturnParameters(modelElement); |
617 | 0 | if (coll != null && coll.size() > 0) { |
618 | 0 | returnParasSb.append(": "); |
619 | 0 | Iterator it2 = coll.iterator(); |
620 | 0 | while (it2.hasNext()) { |
621 | 0 | Object type = Model.getFacade().getType(it2.next()); |
622 | 0 | if (type != null) { |
623 | 0 | returnParasSb.append(Model.getFacade() |
624 | |
.getName(type)); |
625 | |
} |
626 | 0 | returnParasSb.append(","); |
627 | 0 | } |
628 | |
|
629 | |
|
630 | 0 | if (returnParasSb.length() == 3) { |
631 | 0 | returnParasSb.delete(0, returnParasSb.length()); |
632 | |
} |
633 | |
|
634 | |
else { |
635 | 0 | returnParasSb.delete( |
636 | |
returnParasSb.length() - 1, |
637 | |
returnParasSb.length()); |
638 | |
} |
639 | |
} |
640 | |
} |
641 | 0 | return returnParasSb; |
642 | |
} |
643 | |
|
644 | |
|
645 | |
private StringBuffer getProperties(Object modelElement, |
646 | |
boolean isReception) { |
647 | 0 | StringBuffer propertySb = new StringBuffer().append("{"); |
648 | |
|
649 | 0 | if (Model.getFacade().isQuery(modelElement)) { |
650 | 0 | propertySb.append("query,"); |
651 | |
} |
652 | |
|
653 | |
|
654 | |
|
655 | |
|
656 | |
|
657 | |
|
658 | 0 | if (Model.getFacade().isRoot(modelElement)) { |
659 | 0 | propertySb.append("root,"); |
660 | |
} |
661 | 0 | if (Model.getFacade().isLeaf(modelElement)) { |
662 | 0 | propertySb.append("leaf,"); |
663 | |
} |
664 | 0 | if (!isReception) { |
665 | 0 | if (Model.getFacade().getConcurrency(modelElement) != null) { |
666 | 0 | propertySb.append(Model.getFacade().getName( |
667 | |
Model.getFacade().getConcurrency(modelElement))); |
668 | 0 | propertySb.append(','); |
669 | |
} |
670 | |
} |
671 | 0 | if (propertySb.length() > 1) { |
672 | 0 | propertySb.delete(propertySb.length() - 1, propertySb.length()); |
673 | |
|
674 | 0 | propertySb.append("}"); |
675 | |
} else { |
676 | 0 | propertySb = new StringBuffer(); |
677 | |
} |
678 | 0 | return propertySb; |
679 | |
} |
680 | |
|
681 | |
|
682 | |
private StringBuffer getTaggedValues(Object modelElement) { |
683 | 0 | StringBuffer taggedValuesSb = new StringBuffer(); |
684 | 0 | Iterator it3 = Model.getFacade().getTaggedValues(modelElement); |
685 | 0 | if (it3 != null && it3.hasNext()) { |
686 | 0 | while (it3.hasNext()) { |
687 | 0 | taggedValuesSb.append( |
688 | |
NotationUtilityUml.generateTaggedValue(it3.next())); |
689 | 0 | taggedValuesSb.append(","); |
690 | |
} |
691 | 0 | taggedValuesSb.delete( |
692 | |
taggedValuesSb.length() - 1, |
693 | |
taggedValuesSb.length()); |
694 | |
} |
695 | 0 | return taggedValuesSb; |
696 | |
} |
697 | |
} |