Package com.intellij.psi.search.scope.packageSet

Examples of com.intellij.psi.search.scope.packageSet.PackageSet


      }
    }
    for (NamedScope scope : allScopes)
    {
      String name = scope.getName();
      PackageSet packageSet = scope.getValue();
      if (packageSet == null)
      {
        continue;
      }
      if (changeView(packageSet, ((PsiElement) element), psiFile, name, requestFocus))
View Full Code Here


    tfVcsAfterRev.setText((data == null) || (data.getVcsAfterRev() == null) ? "" : data.getVcsAfterRev());

    ckVcsBeforeRev.setSelected((tfVcsBeforeRev.getText().length() > 0));
    ckVcsAfterRev.setSelected((tfVcsAfterRev.getText().length() > 0));

    PackageSet packageSet;
    String pathPattern = ((data == null) || (data.getPathPattern() == null) || (data.getPathPattern().length() == 0))
      ? DEFAULT_FILESCOPE_PATTERN : data.getPathPattern();

    try
    {
View Full Code Here

    tfVcsAfterRev.setText((data == null) || (data.getVcsAfterRev() == null) ? "" : data.getVcsAfterRev());

    ckVcsBeforeRev.setSelected((tfVcsBeforeRev.getText().length() > 0));
    ckVcsAfterRev.setSelected((tfVcsAfterRev.getText().length() > 0));

    PackageSet packageSet;
    String pathPattern = ((data == null) || (data.getPathPattern() == null) || (data.getPathPattern().length() == 0))
      ? DEFAULT_FILESCOPE_PATTERN : data.getPathPattern();

    try
    {
View Full Code Here

      }
    }
    for (NamedScope scope : allScopes)
    {
      String name = scope.getName();
      PackageSet packageSet = scope.getValue();
      if (packageSet == null)
      {
        continue;
      }
      if (changeView(packageSet, ((PsiElement) element), psiFile, name, requestFocus))
View Full Code Here

  {
    this.project = project;
    this.review = review;
    fileScopeManager = ApplicationManager.getApplication().getComponent(FileScopeManager.class);

    PackageSet packageSetTmp = null;
    String pathPattern = review.getFileScope().getPathPattern();
    try
    {
      if (pathPattern != null)
      {
View Full Code Here

  public String getProfileName(PsiFile psiFile) {
    if (USE_PROJECT_LEVEL_SETTINGS){
      final NamedScopesHolder scopeManager = DependencyValidationManager.getInstance(myProject);
      for (NamedScope scope : myScopeToProfileMap.keySet()) {
        final PackageSet packageSet = scope.getValue();
        if (packageSet != null && packageSet.contains(psiFile, scopeManager)) {
          return myScopeToProfileMap.get(scope);
        }
      }
      final Profile profile = myProfiles.get(PROJECT_PROFILE);
      if (profile != null) return profile.getName();
View Full Code Here

    myDenyRule = isDenyRule;
  }

  public boolean isForbiddenToUse(PsiFile from, PsiFile to) {
    if (myFromScope == null || myToScope == null) return false;
    final PackageSet fromSet = myFromScope.getValue();
    final PackageSet toSet = myToScope.getValue();
    if (fromSet == null || toSet == null) return false;
    DependencyValidationManager holder = DependencyValidationManager.getInstance(from.getProject());
    return (myDenyRule
            ? fromSet.contains(from, holder)
            : new ComplementPackageSet(fromSet).contains(from, holder))
           && toSet.contains(to, holder);
  }
View Full Code Here

           && toSet.contains(to, holder);
  }

  public boolean isApplicable(PsiFile file){
    if (myFromScope == null || myToScope == null) return false;
    final PackageSet fromSet = myFromScope.getValue();
    if (fromSet == null) return false;

    DependencyValidationManager holder = DependencyValidationManager.getInstance(file.getProject());
    return (myDenyRule
            ? fromSet.contains(file, holder)
            : new ComplementPackageSet(fromSet).contains(file, holder));
  }
View Full Code Here

  }

  @Nullable
  private static String getPackageSetPresentation(NamedScope scope) {
    if (scope != null) {
      final PackageSet packageSet = scope.getValue();
      if (packageSet != null) {
        return packageSet.getText();
      }
    }
    return null;
  }
View Full Code Here

    public boolean contains(VirtualFile file) {
      PsiFile psiFile = myManager.findFile(file);
      if (psiFile == null) return false;
      NamedScopesHolder holder = NamedScopeManager.getInstance(myProject);
      final PackageSet packageSet = mySet.getValue();
      return packageSet != null && packageSet.contains(psiFile, holder);
    }
View Full Code Here

TOP

Related Classes of com.intellij.psi.search.scope.packageSet.PackageSet

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.