Examples of LineInfo


Examples of com.google.collide.shared.document.LineInfo

    AnchorType topType = AnchorType.create(EditorTests.class, "top");

    Document doc = Document.createFromString("qwerty\nasdfgh\nzxcvbn\n");
    LineFinder lineFinder = doc.getLineFinder();
    AnchorManager anchorManager = doc.getAnchorManager();
    LineInfo lineInfo = lineFinder.findLine(1);

    Editor editor = Editor.create(new MockAppContext());
    editor.setDocument(doc);

    Anchor topAnchor = anchorManager.createAnchor(topType, lineInfo.line(), lineInfo.number(),
        AnchorManager.IGNORE_COLUMN);
    topAnchor.setRemovalStrategy(Anchor.RemovalStrategy.SHIFT);
    topAnchor.setInsertionPlacementStrategy(InsertionPlacementStrategy.EARLIER);

    Anchor bottomAnchor = anchorManager.createAnchor(bottomType, lineInfo.line(), lineInfo.number(),
        AnchorManager.IGNORE_COLUMN);
    bottomAnchor.setRemovalStrategy(Anchor.RemovalStrategy.SHIFT);
    bottomAnchor.setInsertionPlacementStrategy(InsertionPlacementStrategy.LATER);

    SelectionModel selection = editor.getSelection();
View Full Code Here

Examples of com.google.dart.engine.utilities.source.LineInfo

        DartEntry dartEntry = getReadableDartEntry(librarySource);
        if (dartEntry != null) {
          DartEntryImpl dartCopy = dartEntry.getWritableCopy();
          recordElementData(dartCopy, library, library.getSource(), htmlSource);
          dartCopy.setState(SourceEntry.CONTENT, CacheState.FLUSHED);
          dartCopy.setValue(SourceEntry.LINE_INFO, new LineInfo(new int[] {0}));
          dartCopy.setValue(DartEntry.ANGULAR_ERRORS, AnalysisError.NO_ERRORS);
          // DartEntry.ELEMENT - set in recordElementData
          dartCopy.setValue(DartEntry.EXPORTED_LIBRARIES, Source.EMPTY_ARRAY);
          dartCopy.setValue(DartEntry.IMPORTED_LIBRARIES, Source.EMPTY_ARRAY);
          dartCopy.setValue(DartEntry.INCLUDED_PARTS, Source.EMPTY_ARRAY);
View Full Code Here

Examples of metlin.LineInfo

    final String token = parameters.getParameter(
        MetLinParameters.SECURITY_TOKEN).getValue();

    MetaboliteSearchRequest searchParams = new MetaboliteSearchRequest(
        token, searchMass, adduct, searchTolerance, "Da");
    LineInfo resultsData[][];
    try {
      resultsData = serv.metaboliteSearch(searchParams);
    } catch (AxisFault e) {
      // For some reason, the METLIN SOAP gateway throws AxisFault caused
      // by ArrayStoreException if no result is found. I suspect their
      // SOAP response is malformed and Axis does not like it.
      resultsData = new LineInfo[1][0];
    }

    if (resultsData.length == 0) {
      throw (new IOException("Results could not be retrieved from METLIN"));

    }
    final int totalResults = Math.min(resultsData[0].length, numOfResults);
    String metlinIDs[] = new String[totalResults];

    for (int i = 0; i < totalResults; i++) {
      LineInfo metlinEntry = resultsData[0][i];
      String metlinID = metlinEntry.getMolid();
      retrievedMolecules.put(metlinID, metlinEntry);
      metlinIDs[i] = metlinID;
    }

    return metlinIDs;
View Full Code Here

Examples of org.housecream.restmcu.it.resource.LineInfo

            }
        });
    }

    public LineInfo fillPin() {
        LineInfo line = new LineInfo(42);
        line.setDescription(new RestMcuLine());
        line.getDescription().setDescription("pin 42 description");
        line.getDescription().setDirection(RestMcuLineDirection.INPUT);
        line.getDescription().setType(RestMcuLineType.ANALOG);
        line.getDescription().setValueMax(1024f);
        line.getDescription().setValueMin(0f);

        line.setSettings(new RestMcuLineSettings());
        line.getSettings().setName("name of pin");
        List<RestMcuLineNotify> notifies = new ArrayList<RestMcuLineNotify>();
        notifies.add(new RestMcuLineNotify(SUP_OR_EQUAL, 42));
        notifies.add(new RestMcuLineNotify(INF_OR_EQUAL, 42));

        line.getSettings().setNotifies(notifies);

        return line;
    }
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.