Author: linus
Date: 2011-02-23 11:34:02-0800
New Revision: 19050
Modified:
branches/BRANCH_0_32_x/ (props changed)
branches/BRANCH_0_32_x/src/argouml-app/ (props changed)
branches/BRANCH_0_32_x/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/UMLClassDiagram.java
branches/BRANCH_0_32_x/src/argouml-app/tests/org/argouml/profile/ (props changed)
branches/BRANCH_0_32_x/src/argouml-app/tests/org/argouml/uml/ui/foundation/extension_mechanisms/TestUMLTagDefinitionComboBoxModel.java (props changed)
branches/BRANCH_0_32_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/RowSelector.java
branches/BRANCH_0_32_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java
Log:
Merged:
For issue 6183, r19043
For issue 6197, r19049.
Modified: branches/BRANCH_0_32_x/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/UMLClassDiagram.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_32_x/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/UMLClassDiagram.java?view=diff&pathrev=19050&r1=19049&r2=19050
==============================================================================
--- branches/BRANCH_0_32_x/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/UMLClassDiagram.java (original)
+++ branches/BRANCH_0_32_x/src/argouml-app/src/org/argouml/uml/diagram/static_structure/ui/UMLClassDiagram.java 2011-02-23 11:34:02-0800
@@ -638,7 +638,9 @@
@Override
public boolean doesAccept(Object objectToAccept) {
- if (Model.getFacade().isAClass(objectToAccept)) {
+ if (objectToAccept instanceof CommentEdge) {
+ return true;
+ } else if (Model.getFacade().isAClass(objectToAccept)) {
return true;
} else if (Model.getFacade().isAInterface(objectToAccept)) {
return true;
@@ -815,7 +817,17 @@
figEdge.setDestFigNode(supFN);
figEdge.getFig().setLayer(getLayer());
} else if (modelElement instanceof CommentEdge) {
+ CommentEdge ce = (CommentEdge) modelElement;
+ Object source = ce.getSource();
+ Object dest = ce.getDestination();
+ FigNode sourceFN = (FigNode) getLayer().presentationFor(source);
+ FigNode destFN = (FigNode) getLayer().presentationFor(dest);
figEdge = new FigEdgeNote(modelElement, settings);
+ figEdge.setSourcePortFig(sourceFN);
+ figEdge.setSourceFigNode(sourceFN);
+ figEdge.setDestPortFig(destFN);
+ figEdge.setDestFigNode(destFN);
+ figEdge.getFig().setLayer(getLayer());
}
if (figEdge != null) {
Modified: branches/BRANCH_0_32_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/RowSelector.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_32_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/RowSelector.java?view=diff&pathrev=19050&r1=19049&r2=19050
==============================================================================
--- branches/BRANCH_0_32_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/RowSelector.java (original)
+++ branches/BRANCH_0_32_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/RowSelector.java 2011-02-23 11:34:02-0800
@@ -516,10 +516,23 @@
public JComponent getExpansion() {
+ List<Action> flatActions = new ArrayList<Action>();
+ for (Object o : actions) {
+ if (o instanceof Action) {
+ flatActions.add((Action) o);
+ } else {
+ Object[] oa = (Object[]) o;
+ for (int j = 0; j < oa.length; ++j) {
+ flatActions.add((Action) oa[j]);
+ }
+ }
+ }
+
+
final ToolBox tb =
- new ToolBox(2, actions.size() / 2 + actions.size() % 2, true);
- for (int i = 0; i < actions.size() / 2 + actions.size() % 2; ++i) {
- tb.add((Action) actions.get(i));
+ new ToolBox(2, flatActions.size() / 2 + flatActions.size() % 2, true);
+ for (int i = 0; i < flatActions.size() / 2 + flatActions.size() % 2; ++i) {
+ tb.add((Action) flatActions.get(i));
}
if (moveUpAction != null) {
tb.add(moveUpAction);
@@ -527,11 +540,11 @@
if (moveTopAction != null) {
tb.add(moveTopAction);
}
- if (actions.size() % 2 == 1) {
+ if (flatActions.size() % 2 == 1) {
tb.add(new JPanel());
}
- for (int i = actions.size() / 2 + actions.size() % 2; i < actions.size(); ++i) {
- tb.add((Action) actions.get(i));
+ for (int i = flatActions.size() / 2 + flatActions.size() % 2; i < flatActions.size(); ++i) {
+ tb.add((Action) flatActions.get(i));
}
if (moveDownAction != null) {
tb.add(moveDownAction);
Modified: branches/BRANCH_0_32_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java
Url: http://argouml.tigris.org/source/browse/argouml/branches/BRANCH_0_32_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java?view=diff&pathrev=19050&r1=19049&r2=19050
==============================================================================
--- branches/BRANCH_0_32_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java (original)
+++ branches/BRANCH_0_32_x/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SwingUIFactory.java 2011-02-23 11:34:02-0800
@@ -116,10 +116,15 @@
panel.add(LabelledLayout.getSeparator());
}
} catch (Exception e) {
- throw new IllegalStateException(
- "Exception caught building control " + prop.getControlType()
- + " for property " + prop.getPropertyName() + " on panel for "
- + target, e);
+ String message = "Exception caught building control " + prop.getControlType()
+ + " for property " + prop.getPropertyName() + " on panel for "
+ + target;
+ LOG.error(message, e);
+ try {
+ panel.add(new JLabel(message));
+ } catch (Exception ex) {
+ throw e;
+ }
}
}
}
@@ -274,7 +279,7 @@
} else {
final GetterSetterManager getterSetter =
GetterSetterManager.getGetterSetter(prop.getType());
-
+
if (getterSetter.contains(propertyName)) {
ExpressionModel model =
new ExpressionModel(propertyName, prop.getTypes().get(0), target, getterSetter);
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2706931
To unsubscribe from this discussion, e-mail: [[email protected]].
lmpx.com only provides a reader for public news (NNTP) servers. It is not
affiliated with the servers or forums shown here and is not responsible for
the content of articles, which is written by their respective authors.