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

  • Finding current android device location
  • setScale (BigDecimal)
  • getSupportFragmentManager (FragmentActivity)
  • onRequestPermissionsResult (Fragment)
  • InputStreamReader (java.io)
    A class for turning a byte stream into a character stream. Data read from the source input stream is
  • PrintStream (java.io)
    Fake signature of an existing Java class.
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • TreeSet (java.util)
    TreeSet is an implementation of SortedSet. All optional operations (adding and removing) are support
  • BlockingQueue (java.util.concurrent)
    A java.util.Queue that additionally supports operations that wait for the queue to become non-empty
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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