| Summary: | Messages should refer to operations (currently just strings) | ||
|---|---|---|---|
| Product: | [Applications] umbrello | Reporter: | Jonathan Riddell <jr> |
| Component: | general | Assignee: | Oliver Kellogg <okellogg> |
| Status: | RESOLVED FIXED | ||
| Severity: | wishlist | CC: | hsk, kde, sean.clarke |
| Priority: | NOR | ||
| Version First Reported In: | unspecified | ||
| Target Milestone: | --- | ||
| Platform: | unspecified | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
|
Description
Jonathan Riddell
2003-01-24 19:29:09 UTC
As pointed out in beastie 72627 method parameters and attributes could also be references to classes in the model so their names are kept up to date too. *** Bug 72627 has been marked as a duplicate of this bug. *** *** Bug 84515 has been marked as a duplicate of this bug. *** My pleasure to squash this one... CVS commit by okellogg: Add infrastructure required for a sequence or collaboration message which is an operation of a classifier to reference the respective UMLOperation rather than being dumb text. CCBUG:53376 M +6 -2 associationwidget.cpp 1.142 M +9 -2 associationwidget.h 1.60 M +3 -9 floatingtext.cpp 1.69 M +27 -21 linkwidget.cpp 1.11 M +38 -8 linkwidget.h 1.12 M +45 -11 messagewidget.cpp 1.63 M +10 -3 messagewidget.h 1.31 CVS commit by okellogg:
showOpDlg(): Hook up with the infrastructure around LinkWidget::m_pOperation.
BUG:53376
M +20 -5 floatingtext.cpp 1.70
--- kdesdk/umbrello/umbrello/floatingtext.cpp #1.69:1.70
@@ -28,4 +28,5 @@
#include "listpopupmenu.h"
#include "operation.h"
+#include "model_utils.h"
#include "inputdialog.h"
#include "dialogs/assocpropdlg.h"
@@ -249,6 +250,6 @@ void FloatingText::showOpDlg() {
return;
}
- QString seqNum, op;
- UMLClassifier* c = m_pLink->getSeqNumAndOp(this, seqNum, op);
+ QString seqNum, opText;
+ UMLClassifier* c = m_pLink->getSeqNumAndOp(this, seqNum, opText);
if (c == NULL) {
kdError() << "FloatingText::showOpDlg: "
@@ -260,5 +261,6 @@ void FloatingText::showOpDlg() {
SelectOpDlg selectDlg(m_pView, c);
selectDlg.setSeqNumber( seqNum );
- selectDlg.setCustomOp( op );
+ if (m_pLink->getOperation() == NULL)
+ selectDlg.setCustomOp( opText );
int result = selectDlg.exec();
if(!result) {
@@ -266,6 +268,19 @@ void FloatingText::showOpDlg() {
}
seqNum = selectDlg.getSeqNumber();
- op = selectDlg.getOpText();
- m_pLink->setSeqNumAndOp(seqNum, op);
+ opText = selectDlg.getOpText();
+ Umbrello::OpDescriptor od;
+ Umbrello::Parse_Status st = Umbrello::parseOperation(opText, od, c);
+ if (st == Umbrello::PS_OK) {
+ UMLDoc *umldoc = UMLApp::app()->getDocument();
+ bool isExistingOp = false;
+ UMLObject *o = umldoc->createOperation(c, od.m_name, &isExistingOp, &od.m_args);
+ UMLOperation *op = static_cast<UMLOperation*>(o);
+ if (od.m_pReturnType) {
+ op->setType(od.m_pReturnType);
+ }
+ m_pLink->setOperation(op);
+ opText = QString::null;
+ }
+ m_pLink->setSeqNumAndOp(seqNum, opText);
setMessageText();
}
|