コード例 #1
0
 @Override
 public Icon getIcon(int flags) {
   if (isValid()) {
     final Property property = getProperty();
     if (property != null) {
       if (property.getGetter().valueOrNull() == this) {
         return PythonIcons.Python.PropertyGetter;
       }
       if (property.getSetter().valueOrNull() == this) {
         return PythonIcons.Python.PropertySetter;
       }
       if (property.getDeleter().valueOrNull() == this) {
         return PythonIcons.Python.PropertyDeleter;
       }
       return PlatformIcons.PROPERTY_ICON;
     }
   }
   return PlatformIcons.METHOD_ICON;
 }
コード例 #2
0
 @Override
 public Icon getIcon(int flags) {
   PyPsiUtils.assertValid(this);
   final Property property = getProperty();
   if (property != null) {
     if (property.getGetter().valueOrNull() == this) {
       return PythonIcons.Python.PropertyGetter;
     }
     if (property.getSetter().valueOrNull() == this) {
       return PythonIcons.Python.PropertySetter;
     }
     if (property.getDeleter().valueOrNull() == this) {
       return PythonIcons.Python.PropertyDeleter;
     }
     return PlatformIcons.PROPERTY_ICON;
   }
   if (getContainingClass() != null) {
     return PlatformIcons.METHOD_ICON;
   }
   return PythonIcons.Python.Function;
 }