Author: bobtarling
Date: 2010-09-01 03:11:44-0700
New Revision: 18720
Modified:
trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SimpleListModel.java
Log:
Fix indentation
Modified: trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SimpleListModel.java
Url: http://argouml.tigris.org/source/browse/argouml/trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SimpleListModel.java?view=diff&pathrev=18720&r1=18719&r2=18720
==============================================================================
--- trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SimpleListModel.java (original)
+++ trunk/src/argouml-core-umlpropertypanels/src/org/argouml/core/propertypanels/ui/SimpleListModel.java 2010-09-01 03:11:44-0700
@@ -108,50 +108,52 @@
*/
public void propertyChange(final PropertyChangeEvent e) {
if (e instanceof RemoveAssociationEvent
- || e instanceof AddAssociationEvent) {
- Runnable doWorkRunnable = new Runnable() {
- public void run() {
- try {
- if (getterSetterManager.isFullBuildOnly(propertyName)) {
- removeAllElements();
- build();
- } else {
- if (e instanceof RemoveAssociationEvent) {
- final Object objectToRemove =
- ((RemoveAssociationEvent) e).getChangedValue();
- removeElement(objectToRemove);
- } else if (e instanceof AddAssociationEvent) {
- Object newElement = ((AddAssociationEvent) e).getChangedValue();
- if (metaTypes.contains(newElement.getClass())
- && !SimpleListModel.this.contains(newElement)) {
- if (Model.getUmlHelper().isMovable(getMetaType())) {
- final Collection c =
- (Collection) getterSetterManager.getOptions(
- umlElement,
- propertyName,
- metaTypes);
- final int index =
- CollectionUtil.indexOf(c, newElement);
- if (index < 0 || index > getSize() - 1) {
- LOG.warn(
- "Unable to add element at correct position "
- + index + " added to end instead");
- addElement(newElement);
- } else {
- add(index, newElement);
- }
- } else {
- addElement(newElement);
- }
- }
- }
- }
- } catch (InvalidElementException e) {
- LOG.debug("propertyChange accessed a deleted element ", e);
- }
- }
- };
- SwingUtilities.invokeLater(doWorkRunnable);
+ || e instanceof AddAssociationEvent) {
+
+ Runnable doWorkRunnable = new Runnable() {
+ public void run() {
+ try {
+ if (getterSetterManager.isFullBuildOnly(
+ propertyName)) {
+ removeAllElements();
+ build();
+ } else {
+ if (e instanceof RemoveAssociationEvent) {
+ final Object objectToRemove =
+ ((RemoveAssociationEvent) e).getChangedValue();
+ removeElement(objectToRemove);
+ } else if (e instanceof AddAssociationEvent) {
+ Object newElement = ((AddAssociationEvent) e).getChangedValue();
+ if (metaTypes.contains(newElement.getClass())
+ && !SimpleListModel.this.contains(newElement)) {
+ if (Model.getUmlHelper().isMovable(getMetaType())) {
+ final Collection c =
+ (Collection) getterSetterManager.getOptions(
+ umlElement,
+ propertyName,
+ metaTypes);
+ final int index =
+ CollectionUtil.indexOf(c, newElement);
+ if (index < 0 || index > getSize() - 1) {
+ LOG.warn(
+ "Unable to add element at correct position "
+ + index + " added to end instead");
+ addElement(newElement);
+ } else {
+ add(index, newElement);
+ }
+ } else {
+ addElement(newElement);
+ }
+ }
+ }
+ }
+ } catch (InvalidElementException e) {
+ LOG.debug("propertyChange accessed a deleted element ", e);
+ }
+ }
+ };
+ SwingUtilities.invokeLater(doWorkRunnable);
} else if (e.getPropertyName().equals("baseClass")
&& e.getPropertyName().equals(propertyName)
&& e instanceof AttributeChangeEvent) {
------------------------------------------------------
http://argouml.tigris.org/ds/viewMessage.do?dsForumId=5905&dsMessageId=2654057
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.