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

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

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

origin: org.codehaus.sonar/sonar-batch

/**
 * Views plugin creates copy of technical projects and should be allowed to copy all measures even internal ones
 */
private boolean isViewResource(Resource resource) {
 boolean isTechnicalProject = Scopes.FILE.equals(resource.getScope()) && Qualifiers.PROJECT.equals(resource.getQualifier());
 return isTechnicalProject || ResourceUtils.isView(resource) || ResourceUtils.isSubview(resource);
}
origin: org.codehaus.sonar/sonar-batch

private Constants.ComponentType getType(Resource r) {
 if (ResourceUtils.isFile(r)) {
  return Constants.ComponentType.FILE;
 } else if (ResourceUtils.isDirectory(r)) {
  return Constants.ComponentType.DIRECTORY;
 } else if (ResourceUtils.isModuleProject(r)) {
  return Constants.ComponentType.MODULE;
 } else if (ResourceUtils.isRootProject(r)) {
  return Constants.ComponentType.PROJECT;
 } else if (ResourceUtils.isView(r)) {
  return Constants.ComponentType.VIEW;
 } else if (ResourceUtils.isSubview(r)) {
  return Constants.ComponentType.SUBVIEW;
 }
 throw new IllegalArgumentException("Unknown resource type: " + r);
}
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.resourcesResourceUtilsisSubview

Popular methods of ResourceUtils

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

Popular in Java

  • Reading from database using SQL prepared statement
  • requestLocationUpdates (LocationManager)
  • startActivity (Activity)
  • onRequestPermissionsResult (Fragment)
  • BufferedInputStream (java.io)
    A BufferedInputStream adds functionality to another input stream-namely, the ability to buffer the i
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • Reference (javax.naming)
  • JButton (javax.swing)
  • From CI to AI: The AI layer in your organization
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