congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
ChannelDispatcher$Builder.build
Code IndexAdd Tabnine to your IDE (free)

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

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

origin: org.codehaus.sonar-plugins/sonar-web-plugin

/**
 * Parse the input into a list of tokens, with parent/child relations between the tokens.
 */
public List<Node> parse(Reader reader) {
 // CodeReader reads the file stream
 CodeReader codeReader = new CodeReader(reader);
 // ArrayList collects the nodes
 List<Node> nodeList = new ArrayList<Node>();
 // ChannelDispatcher manages the tokenizers
 ChannelDispatcher<List<Node>> channelDispatcher = ChannelDispatcher.builder().addChannels((Channel[]) tokenizers.toArray(new Channel[tokenizers.size()])).build();
 channelDispatcher.consume(codeReader, nodeList);
 createNodeHierarchy(nodeList);
 return nodeList;
}
origin: SonarSource/sonar-html

/**
 * Parse the input into a list of tokens, with parent/child relations between the tokens.
 */
public List<Node> parse(Reader reader) {
 // CodeReader reads the file stream
 CodeReader codeReader = new CodeReader(reader);
 // ArrayList collects the nodes
 List<Node> nodeList = new ArrayList<>();
 // ChannelDispatcher manages the tokenizers
 ChannelDispatcher<List<Node>> channelDispatcher = ChannelDispatcher.builder().addChannels((Channel[]) tokenizers.toArray(new Channel[tokenizers.size()])).build();
 channelDispatcher.consume(codeReader, nodeList);
 createNodeHierarchy(nodeList);
 return nodeList;
}
origin: Cognifide/AEM-Rules-for-SonarQube

/**
 * Parse the input into a list of tokens, with parent/child relations between the tokens.
 */
public List<Node> parse(Reader reader) {
  // CodeReader reads the file stream
  CodeReader codeReader = new CodeReader(reader);
  // ArrayList collects the nodes
  List<Node> nodeList = new ArrayList<>();
  // ChannelDispatcher manages the tokenizers
  ChannelDispatcher<List<Node>> channelDispatcher = ChannelDispatcher.builder()
    .addChannels((Channel[]) tokenizers.toArray(new Channel[0]))
    .build();
  channelDispatcher.consume(codeReader, nodeList);
  createNodeHierarchy(nodeList);
  return nodeList;
}
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: org.codehaus.sonar/sonar-duplications

private ChannelDispatcher<TokenQueue> getChannelDispatcher() {
 return channelDispatcherBuilder.build();
}
origin: SonarSource/sonarqube

private ChannelDispatcher<TokenQueue> getChannelDispatcher() {
 return channelDispatcherBuilder.build();
}
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();
}
org.sonar.channelChannelDispatcher$Builderbuild

Popular methods of ChannelDispatcher$Builder

  • addChannel
  • addChannels
  • <init>

Popular in Java

  • Reactive rest calls using spring rest template
  • getApplicationContext (Context)
  • notifyDataSetChanged (ArrayAdapter)
  • addToBackStack (FragmentTransaction)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Color (java.awt)
    The Color class is used to encapsulate colors in the default sRGB color space or colors in arbitrary
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • CountDownLatch (java.util.concurrent)
    A synchronization aid that allows one or more threads to wait until a set of operations being perfor
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • Top Vim plugins
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