Tabnine Logo
ResourceUtils.isSet
Code IndexAdd Tabnine to your IDE (free)

How to use
isSet
method
in
org.sonar.api.resources.ResourceUtils

Best Java code snippets using org.sonar.api.resources.ResourceUtils.isSet (Showing top 7 results out of 315)

origin: org.codehaus.sonar/sonar-plugin-api

/**
 * This method equal isRootProject(resource) or isModuleProject(resource)
 */
public static boolean isProject(Resource resource) {
 return isSet(resource);
}
origin: org.codehaus.sonar/sonar-plugin-api

/**
 * @return whether the resource is a view
 */
public static boolean isView(Resource resource) {
 return isSet(resource) && Qualifiers.VIEW.equals(resource.getQualifier());
}
origin: org.codehaus.sonar/sonar-batch

Set<Dependency> getDependenciesBetweenProjects() {
 Set<Dependency> result = Sets.newLinkedHashSet();
 for (Dependency dependency : dependencies) {
  if (ResourceUtils.isSet(dependency.getFrom()) || ResourceUtils.isSet(dependency.getTo())) {
   result.add(dependency);
  }
 }
 return result;
}
origin: org.codehaus.sonar/sonar-plugin-api

/**
 * @return whether the resource is a subview (in the view tree)
 */
public static boolean isSubview(Resource resource) {
 return isSet(resource) && Qualifiers.SUBVIEW.equals(resource.getQualifier());
}
origin: org.sonarsource.sonarqube/sonar-batch

/**
 * Keep only project stuff
 */
public void clear() {
 Iterator<Map.Entry<Resource, Bucket>> it = buckets.entrySet().iterator();
 while (it.hasNext()) {
  Map.Entry<Resource, Bucket> entry = it.next();
  Resource resource = entry.getKey();
  if (!ResourceUtils.isSet(resource)) {
   entry.getValue().clear();
   it.remove();
  }
 }
}
origin: org.codehaus.sonar/sonar-batch

/**
 * Keep only project stuff
 */
public void clear() {
 Iterator<Map.Entry<Resource, Bucket>> it = buckets.entrySet().iterator();
 while (it.hasNext()) {
  Map.Entry<Resource, Bucket> entry = it.next();
  Resource resource = entry.getKey();
  if (!ResourceUtils.isSet(resource)) {
   entry.getValue().clear();
   it.remove();
  }
 }
 // Keep only inter module dependencies
 Set<Dependency> projectDependencies = getDependenciesBetweenProjects();
 dependencies.clear();
 incomingDependenciesByResource.clear();
 outgoingDependenciesByResource.clear();
 for (Dependency projectDependency : projectDependencies) {
  projectDependency.setId(null);
  registerDependency(projectDependency);
 }
}
origin: org.codehaus.sonar.plugins/sonar-core-plugin

 /**
  * {@inheritDoc}
  */
 @Override
 public void decorate(Resource resource, DecoratorContext context) {
  if (MeasureUtils.hasValue(context.getMeasure(CoreMetrics.DIRECTORIES))) {
   return;
  }

  if (Resource.QUALIFIER_DIRECTORY.equals(resource.getQualifier())) {
   context.saveMeasure(CoreMetrics.DIRECTORIES, 1.0);

  } else if (ResourceUtils.isSet(resource) || ResourceUtils.isView(resource) || ResourceUtils.isSubview(resource)) {
   Collection<Measure> childrenMeasures = context.getChildrenMeasures(CoreMetrics.DIRECTORIES);
   Double sum = MeasureUtils.sum(false, childrenMeasures);
   if (sum != null) {
    context.saveMeasure(CoreMetrics.DIRECTORIES, sum);
   }
  }
 }
}
org.sonar.api.resourcesResourceUtilsisSet

Popular methods of ResourceUtils

  • isUnitTestClass
  • isFile
    Alias for #isEntity(Resource)
  • isEntity
  • isProject
    This method equal isRootProject(resource) or isModuleProject(resource)
  • isUnitTestFile
  • isDirectory
    Alias for #isSpace(Resource)
  • isModuleProject
  • isRootProject
  • isPackage
  • isPersistable
  • isSubview
  • isView
  • isSubview,
  • isView,
  • isLibrary,
  • isSpace

Popular in Java

  • Start an intent from android
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • notifyDataSetChanged (ArrayAdapter)
  • getExternalFilesDir (Context)
  • FlowLayout (java.awt)
    A flow layout arranges components in a left-to-right flow, much like lines of text in a paragraph. F
  • Rectangle (java.awt)
    A Rectangle specifies an area in a coordinate space that is enclosed by the Rectangle object's top-
  • ByteBuffer (java.nio)
    A buffer for bytes. A byte buffer can be created in either one of the following ways: * #allocate
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • ExecutorService (java.util.concurrent)
    An Executor that provides methods to manage termination and methods that can produce a Future for tr
  • Runner (org.openjdk.jmh.runner)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now