Package de.halirutan.mathematica.parsing.psi

Examples of de.halirutan.mathematica.parsing.psi.MathematicaRecursiveVisitor


  @Override
  public void visitFunction(final Function function) {
    setHighlighting(function, myHolder, MathematicaSyntaxHighlighterColors.ANONYMOUS_FUNCTION);

    final MathematicaRecursiveVisitor slotVisitor = new MathematicaRecursiveVisitor() {

      @Override
      public void visitSlot(final Slot slot) {
        setHighlighting(slot, myHolder, MathematicaSyntaxHighlighterColors.PATTERN);
      }
View Full Code Here


      }

      if (functionName.equals("Message")) {
        final Set<LookupElement> usages = new com.intellij.util.containers.hash.HashSet<LookupElement>();

        MathematicaRecursiveVisitor visitor = new MathematicaRecursiveVisitor() {

          @Override
          public void visitMessageName(final MessageName messageName) {
              usages.add(
                  LookupElementBuilder.create(messageName.getText()).
                      withIcon(MathematicaIcons.MESSAGES_ICON).
                      withCaseSensitivity(false)); // make it case insensitive so you can type argx in Sym::argx to
                                                    // find the correct completion
          }
        };
        visitor.visitFile(parameters.getOriginalFile());
        result.addAllElements(usages);
      }

    }
  }
View Full Code Here

TOP

Related Classes of de.halirutan.mathematica.parsing.psi.MathematicaRecursiveVisitor

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.