since myIcon now always is not null (DeferrredIcon), paint read-write icon always
authorAlexey Kudravtsev <cdr@intellij.com>
Thu, 6 May 2010 10:15:47 +0000 (14:15 +0400)
committerAlexey Kudravtsev <cdr@intellij.com>
Fri, 7 May 2010 09:46:43 +0000 (13:46 +0400)
platform/usageView/src/com/intellij/usages/ReadWriteAccessUsageInfo2UsageAdapter.java

index d06cf453615d74eaa5500223ba7c784215e7ff6c..43770e1d0922980a2259168392f1fca33d547a38 100644 (file)
@@ -30,16 +30,14 @@ public class ReadWriteAccessUsageInfo2UsageAdapter extends UsageInfo2UsageAdapte
     super(usageInfo);
     myAccessedForReading = accessedForReading;
     myAccessedForWriting = accessedForWriting;
-    if (myIcon == null) {
-      if (myAccessedForReading && myAccessedForWriting) {
-        myIcon = Icons.VARIABLE_RW_ACCESS;
-      }
-      else if (myAccessedForWriting) {
-        myIcon = Icons.VARIABLE_WRITE_ACCESS;           // If icon is changed, don't forget to change UTCompositeUsageNode.getIcon();
-      }
-      else if (myAccessedForReading){
-        myIcon = Icons.VARIABLE_READ_ACCESS;            // If icon is changed, don't forget to change UTCompositeUsageNode.getIcon();
-      }
+    if (myAccessedForReading && myAccessedForWriting) {
+      myIcon = Icons.VARIABLE_RW_ACCESS;
+    }
+    else if (myAccessedForWriting) {
+      myIcon = Icons.VARIABLE_WRITE_ACCESS;           // If icon is changed, don't forget to change UTCompositeUsageNode.getIcon();
+    }
+    else if (myAccessedForReading){
+      myIcon = Icons.VARIABLE_READ_ACCESS;            // If icon is changed, don't forget to change UTCompositeUsageNode.getIcon();
     }
   }