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

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

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

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

/**
 * Alias for {@link #isEntity(Resource)}
 */
public static boolean isFile(Resource resource) {
 return isEntity(resource);
}
origin: org.codehaus.sonar.plugins/sonar-core-plugin

public boolean shouldDecorateResource(Resource resource) {
 return ResourceUtils.isUnitTestFile(resource) || !ResourceUtils.isEntity(resource);
}
origin: org.codehaus.sonar/sonar-batch

@VisibleForTesting
static boolean shouldPersistMeasure(@Nullable Resource resource, @Nullable Measure measure) {
 if (resource == null || measure == null) {
  return false;
 }
 return measure.getPersistenceMode().useDatabase() &&
  !(ResourceUtils.isEntity(resource) && measure.isBestValue()) && isMeasureNotEmpty(measure);
}
origin: org.codehaus.sonar/sonar-batch

private void saveOnRule(DecoratorContext context, SumMap<RuleKey> ruleDebts) {
 for (Map.Entry<RuleKey, Long> entry : ruleDebts.entrySet()) {
  org.sonar.api.rules.Rule oldRule = ruleFinder.findByKey(entry.getKey());
  if (oldRule != null) {
   saveRuleMeasure(context, oldRule, entry.getValue().doubleValue(), ResourceUtils.isEntity(context.getResource()));
  }
 }
}
origin: org.codehaus.sonar.sslr-squid-bridge/sslr-squid-bridge

@Override
public void decorate(Resource resource, DecoratorContext context) {
 Language resourceLanguage = resource.getLanguage();
 // assume that all checks relate to files, not directories nor modules
 if (ResourceUtils.isEntity(resource) && resourceLanguage != null && resourceLanguage.getKey().equals(language)) {
  for (CommonCheck check : checks.all()) {
   check.checkResource(resource, context, checks.ruleKey(check), perspectives);
  }
 }
}
origin: org.codehaus.sonar.common-rules/sonar-common-rules

@SuppressWarnings({"rawtypes", "unchecked"})
public void decorate(Resource resource, DecoratorContext context) {
 // assume that all checks relate to files, not directories nor modules
 if (ResourceUtils.isEntity(resource) && resource.getLanguage() != null && resource.getLanguage().getKey().equals(language)) {
  for (CommonCheck check : activeChecks) {
   check.checkResource(resource, context, checkFactory.getActiveRule(check).getRule());
  }
 }
}
org.sonar.api.resourcesResourceUtilsisEntity

Popular methods of ResourceUtils

  • isUnitTestClass
  • isFile
    Alias for #isEntity(Resource)
  • isProject
    This method equal isRootProject(resource) or isModuleProject(resource)
  • isSet
  • 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)
  • CodeWhisperer alternatives
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