Examples of LanguageElement


Examples of com.buschmais.jqassistant.core.report.api.LanguageElement

        String stringValue = null;
        if (value == null) {
            stringValue = null;
        } else if (value instanceof Descriptor) {
            Descriptor descriptor = (Descriptor) value;
            LanguageElement elementValue = ReportHelper.getLanguageElement(descriptor);
            if (elementValue != null) {
                xmlStreamWriter.writeStartElement("element");
                xmlStreamWriter.writeAttribute("language", elementValue.getLanguage());
                xmlStreamWriter.writeCharacters(elementValue.name());
                xmlStreamWriter.writeEndElement(); // element
                SourceProvider sourceProvider = elementValue.getSourceProvider();
                stringValue = sourceProvider.getName(descriptor);
                FileDescriptor sourceFile = sourceProvider.getSourceFile(descriptor);
                Integer lineNumber = sourceProvider.getLineNumber(descriptor);
                if (sourceFile != null) {
                    xmlStreamWriter.writeStartElement("source");
View Full Code Here

Examples of noop.model.LanguageElement

  @Override
  public void visit(MethodInvocation methodInvocation) {
    Library library = workspace.lookupLibrary(methodInvocation.vertex.libraryUid);
    Iterable<Edge> edges = library.edgesFrom(methodInvocation.vertex);
    LanguageElement target = null;
    for (Edge edge : edges) {
      switch (edge.type) {
        case TARGET:
          target = workspace.resolve(edge.dest);
          break;
      }
    }

    modelVisitor.enter(target);
    target.accept(modelVisitor);
    modelVisitor.leave(target);
   
  }
View Full Code Here

Examples of noop.model.LanguageElement

    this.addVertices = addVertices;
  }

  public void editNode(EditNodeOperation operation) {
    Library library = workspace.lookupLibrary(operation.vertex.libraryUid);
    LanguageElement currentValue = library.getElements().get(operation.vertex.index);
    if (currentValue.getClass() != operation.newValue.getClass()) {
      throw new IllegalArgumentException(String.format("Cannot edit node %s with %s because the current type is %s",
          operation.vertex, operation.newValue, currentValue.getClass()));
    }
    library.replace(operation.vertex.index, operation.newValue);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.