Package com.intellij.usages

Examples of com.intellij.usages.ReadWriteAccessUsage


*         Date: Jan 17, 2005
*/
public class ReadAccessFilteringRule implements UsageFilteringRule{
  public boolean isVisible(Usage usage) {
    if (usage instanceof ReadWriteAccessUsage) {
      final ReadWriteAccessUsage readWriteAccessUsage = (ReadWriteAccessUsage)usage;
      final boolean isForReadingOnly = readWriteAccessUsage.isAccessedForReading() && !readWriteAccessUsage.isAccessedForWriting();
      return !isForReadingOnly;
    }
    return true;
  }
View Full Code Here


      UsageType usageType = getUsageType(elementUsage.getElement());
      if (usageType != null) return new UsageTypeGroup(usageType);

      if (usage instanceof ReadWriteAccessUsage) {
        ReadWriteAccessUsage u = (ReadWriteAccessUsage)usage;
        if (u.isAccessedForWriting()) return new UsageTypeGroup(UsageType.WRITE);
        if (u.isAccessedForReading()) return new UsageTypeGroup(UsageType.READ);
      }

      return new UsageTypeGroup(UsageType.UNCLASSIFIED);
    }
View Full Code Here

*         Date: Jan 17, 2005
*/
public class WriteAccessFilteringRule implements UsageFilteringRule{
  public boolean isVisible(Usage usage) {
    if (usage instanceof ReadWriteAccessUsage) {
      final ReadWriteAccessUsage readWriteAccessUsage = (ReadWriteAccessUsage)usage;
      final boolean isForWrightingOnly = readWriteAccessUsage.isAccessedForWriting() && !readWriteAccessUsage.isAccessedForReading();
      return !isForWrightingOnly;
    }
    return true;
  }
View Full Code Here

TOP

Related Classes of com.intellij.usages.ReadWriteAccessUsage

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.