Integrated resource model related changes with eclipse plug-ins.
[platform/upstream/iotivity.git] / service / simulator / java / eclipse-plugin / ServiceProviderPlugin / src / oic / simulator / serviceprovider / view / AttributeView.java
index 1d80604..a4bb01e 100644 (file)
@@ -162,7 +162,7 @@ public class AttributeView extends ViewPart {
 
                     @Override
                     public void run() {
-                        if (null == resource) {
+                        if (null == resource || null == attViewer) {
                             return;
                         }
                         Resource resourceInSelection = resourceManager
@@ -177,8 +177,6 @@ public class AttributeView extends ViewPart {
                             Tree tree;
                             tree = attViewer.getTree();
                             if (!tree.isDisposed()) {
-                                attViewer.refresh();
-
                                 // Disabling the table to prevent interactions
                                 // during the automation
                                 tree.setEnabled(false);
@@ -216,7 +214,6 @@ public class AttributeView extends ViewPart {
                         tree = attViewer.getTree();
                         if (!tree.isDisposed()) {
                             tree.setEnabled(true);
-                            attViewer.refresh();
                         }
                     }
                 });
@@ -454,7 +451,7 @@ public class AttributeView extends ViewPart {
                                         && !(parent instanceof ResourceRepresentation)) {
                                     return "NA";
                                 } else if (attrElement.isReadOnly()) {
-                                    return "Read-only";
+                                    return "NA";
                                 } else if (attrElement.isAutoUpdateSupport()) {
                                     if (attrElement.isAutoUpdateInProgress())
                                         return Constants.ENABLED;