Codota Logo
ChannelDispatcher$Builder.addChannel
Code IndexAdd Codota to your IDE (free)

How to use
addChannel
method
in
org.sonar.channel.ChannelDispatcher$Builder

Best Java code snippets using org.sonar.channel.ChannelDispatcher$Builder.addChannel (Showing top 9 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
FileOutputStream f =
  • Codota IconFile file;new FileOutputStream(file)
  • Codota IconString name;new FileOutputStream(name)
  • Codota IconFile file;new FileOutputStream(file, true)
  • Smart code suggestions by Codota
}
origin: org.codehaus.sonar-plugins/sonar-web-plugin

@Override
public final void tokenize(SourceCode source, Tokens cpdTokens) {
 String fileName = source.getFileName();
 ChannelDispatcher.Builder lexerBuilder = ChannelDispatcher.builder();
 lexerBuilder.addChannel(CommentChannel.JSP_COMMENT);
 lexerBuilder.addChannel(CommentChannel.HTML_COMMENT);
 lexerBuilder.addChannel(CommentChannel.C_COMMENT);
 lexerBuilder.addChannel(CommentChannel.CPP_COMMENT);
 lexerBuilder.addChannel(new WordChannel(fileName));
 lexerBuilder.addChannel(new LiteralChannel(fileName));
 lexerBuilder.addChannel(new BlackHoleChannel());
 ChannelDispatcher<Tokens> lexer = lexerBuilder.build();
 try {
  lexer.consume(new CodeReader(new FileReader(new File(fileName))), cpdTokens);
  cpdTokens.add(TokenEntry.getEOF());
 } catch (FileNotFoundException e) {
  LOG.error("Unable to open file : " + fileName, e);
 }
}
origin: SonarSource/sonarqube

/**
 * Defines that sequence of characters must be ignored, if it matches specified regular expression.
 */
public Builder ignore(String regularExpression) {
 channelDispatcherBuilder.addChannel(new BlackHoleTokenChannel(regularExpression));
 return this;
}
origin: SonarSource/sonarqube

/**
 * Defines that sequence of characters, which is matched specified regular expression, is a token with specified value.
 */
public Builder token(String regularExpression, String normalizationValue) {
 channelDispatcherBuilder.addChannel(new TokenChannel(regularExpression, normalizationValue));
 return this;
}
origin: SonarSource/sonarqube

/**
 * Defines that sequence of characters, which is matched specified regular expression, is a token.
 */
public Builder token(String regularExpression) {
 channelDispatcherBuilder.addChannel(new TokenChannel(regularExpression));
 return this;
}
origin: SonarSource/sonarqube

private Markdown() {
 dispatcher = ChannelDispatcher.builder()
  .addChannel(new HtmlLinkChannel())
  .addChannel(new HtmlUrlChannel())
  .addChannel(new HtmlEndOfLineChannel())
  .addChannel(new HtmlEmphasisChannel())
  .addChannel(new HtmlListChannel())
  .addChannel(new HtmlBlockquoteChannel())
  .addChannel(new HtmlHeadingChannel())
  .addChannel(new HtmlCodeChannel())
  .addChannel(new HtmlMultilineCodeChannel())
  .addChannel(new IdentifierAndNumberChannel())
  .addChannel(new BlackholeChannel())
  .build();
}
origin: org.codehaus.sonar/sonar-duplications

/**
 * Defines that sequence of characters must be ignored, if it matches specified regular expression.
 */
public Builder ignore(String regularExpression) {
 channelDispatcherBuilder.addChannel(new BlackHoleTokenChannel(regularExpression));
 return this;
}
origin: org.codehaus.sonar/sonar-duplications

/**
 * Defines that sequence of characters, which is matched specified regular expression, is a token.
 */
public Builder token(String regularExpression) {
 channelDispatcherBuilder.addChannel(new TokenChannel(regularExpression));
 return this;
}
origin: org.codehaus.sonar/sonar-channel

public Builder addChannels(Channel... c) {
 for (Channel channel : c) {
  addChannel(channel);
 }
 return this;
}
origin: org.codehaus.sonar/sonar-duplications

/**
 * Defines that sequence of characters, which is matched specified regular expression, is a token with specified value.
 */
public Builder token(String regularExpression, String normalizationValue) {
 channelDispatcherBuilder.addChannel(new TokenChannel(regularExpression, normalizationValue));
 return this;
}
org.sonar.channelChannelDispatcher$BuilderaddChannel

Popular methods of ChannelDispatcher$Builder

  • build
  • addChannels
  • <init>

Popular in Java

  • Creating JSON documents from java classes using gson
  • compareTo (BigDecimal)
  • requestLocationUpdates (LocationManager)
  • getApplicationContext (Context)
  • FileOutputStream (java.io)
    A file output stream is an output stream for writing data to aFile or to a FileDescriptor. Whether
  • SecureRandom (java.security)
    This class generates cryptographically secure pseudo-random numbers. It is best to invoke SecureRand
  • UUID (java.util)
    UUID is an immutable representation of a 128-bit universally unique identifier (UUID). There are mul
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • JFileChooser (javax.swing)
  • JPanel (javax.swing)
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now