ace-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ma...@apache.org
Subject svn commit: r1498709 - in /ace/trunk: org.apache.ace.client.rest/src/org/apache/ace/client/rest/Workspace.java org.apache.ace.tageditor/src/org/apache/ace/tageditor/TagTableEntry.java
Date Mon, 01 Jul 2013 21:36:43 GMT
Author: marrs
Date: Mon Jul  1 21:36:43 2013
New Revision: 1498709

URL: http://svn.apache.org/r1498709
Log:
Updated the tag editor and REST client API to use the new methods to remove attributes and
tags.

Modified:
    ace/trunk/org.apache.ace.client.rest/src/org/apache/ace/client/rest/Workspace.java
    ace/trunk/org.apache.ace.tageditor/src/org/apache/ace/tageditor/TagTableEntry.java

Modified: ace/trunk/org.apache.ace.client.rest/src/org/apache/ace/client/rest/Workspace.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.client.rest/src/org/apache/ace/client/rest/Workspace.java?rev=1498709&r1=1498708&r2=1498709&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.client.rest/src/org/apache/ace/client/rest/Workspace.java (original)
+++ ace/trunk/org.apache.ace.client.rest/src/org/apache/ace/client/rest/Workspace.java Mon
Jul  1 21:36:43 2013
@@ -295,8 +295,7 @@ public class Workspace {
         while (keys.hasMoreElements()) {
             String key = keys.nextElement();
             if (!valueObject.attributes.containsKey(key)) {
-                // TODO since we cannot remove keys right now, we null them
-                repositoryObject.addAttribute(key, null);
+                repositoryObject.removeAttribute(key);
             }
         }
         if (ARTIFACT2FEATURE.equals(entityType) || FEATURE2DISTRIBUTION.equals(entityType)
|| DISTRIBUTION2TARGET.equals(entityType)) {
@@ -347,8 +346,7 @@ public class Workspace {
         while (keys.hasMoreElements()) {
             String key = keys.nextElement();
             if (!valueObject.tags.containsKey(key)) {
-                // TODO since we cannot remove keys right now, we null them
-                repositoryObject.addTag(key, null);
+                repositoryObject.removeTag(key);
             }
         }
     }

Modified: ace/trunk/org.apache.ace.tageditor/src/org/apache/ace/tageditor/TagTableEntry.java
URL: http://svn.apache.org/viewvc/ace/trunk/org.apache.ace.tageditor/src/org/apache/ace/tageditor/TagTableEntry.java?rev=1498709&r1=1498708&r2=1498709&view=diff
==============================================================================
--- ace/trunk/org.apache.ace.tageditor/src/org/apache/ace/tageditor/TagTableEntry.java (original)
+++ ace/trunk/org.apache.ace.tageditor/src/org/apache/ace/tageditor/TagTableEntry.java Mon
Jul  1 21:36:43 2013
@@ -91,7 +91,7 @@ public class TagTableEntry {
         if (id != null) {
             table.removeItem(id);
             if ((m_lastKey != null) && (m_lastKey.trim().length() > 0)) {
-                m_repoObject.addTag(m_lastKey, null);
+                m_repoObject.removeTag(m_lastKey);
             }
             ChangeListener listener = m_listener;
             if (listener != null) {
@@ -122,7 +122,7 @@ public class TagTableEntry {
     private void set(String key, String value) {
         if ((key != null) && (key.trim().length() > 0)) {
             if ((value != null) && (value.trim().length() > 0)) {
-                m_repoObject.addTag(key, value);
+                m_repoObject.addTag(key, value); // TODO changing the tag that often is probably
not a good idea (especially if nothing changed)
                 ChangeListener listener = m_listener;
                 if (listener != null) {
                     listener.changed(this);



Mime
View raw message