Package org.chromium.sdk

Examples of org.chromium.sdk.TextStreamPosition


      @Override
      public TextStreamPosition getOpenParenPosition()
          throws MethodIsBlockingException {
        final LocationValue functionPosition = getLoadedPosition();
        return new TextStreamPosition() {
          @Override public int getOffset() {
            return WipBrowserImpl.throwUnsupported();
          }

          @Override public int getLine() {
View Full Code Here


            @Override public Optional<Void> visitSuccess(ChangeDescription changeDescription) {
              return createOptional(null);
            }
            @Override
            public Optional<Void> visitCompileError(CompileErrorFailure compileError) {
              TextStreamPosition start = compileError.getStartPosition();
              String messageString = NLS.bind(Messages.WizardLogicBuilder_COMPILE_ERROR_AT,
                  new Object[] { compileError.getCompilerMessage(),
                  start.getLine(), start.getColumn() });
              return createErrorOptional(
                  new Message(messageString, MessagePriority.BLOCKING_PROBLEM));
            }
          });
        } else {
View Full Code Here

        if (columnObject == null) {
          column = 0;
        } else {
          column = columnObject.intValue();
        }
        streamPosition = new TextStreamPosition() {
          @Override public int getOffset() {
            return WipBrowserImpl.throwUnsupported();
          }
          @Override public int getLine() {
            return line;
View Full Code Here

        if (columnObject == null) {
          column = 0;
        } else {
          column = columnObject.intValue();
        }
        streamPosition = new TextStreamPosition() {
          @Override public int getOffset() {
            return WipBrowserImpl.throwUnsupported();
          }
          @Override public int getLine() {
            return line;
View Full Code Here

      @Override
      public TextStreamPosition getOpenParenPosition()
          throws MethodIsBlockingException {
        final LocationValue functionPosition = getFunctionDetails().location();
        return new TextStreamPosition() {
          @Override public int getOffset() {
            return WipBrowserImpl.throwUnsupported();
          }

          @Override public int getLine() {
View Full Code Here

      if (script == null) {
        id = null;
      } else {
        id = VmResourceId.forScript(script);
      }
      TextStreamPosition vmPosition = stackFrame.getStatementStartPosition();
      SourcePositionMap sourceTransformationMap = getConnectedData().getSourcePositionMap();
      SourcePositionMap.Token token = sourceTransformationMap.getCurrentToken();
      SourcePosition originalPosition;
      if (id == null) {
        originalPosition = new SourcePosition(id, vmPosition.getLine(), vmPosition.getColumn());
      } else {
        originalPosition = sourceTransformationMap.translatePosition(id,
            vmPosition.getLine(), vmPosition.getColumn(),
            TranslateDirection.VM_TO_USER);
      }
      currentCachedPosition = new CachedUserPosition(originalPosition, token);
      userCachedSourcePosition = currentCachedPosition;
    }
View Full Code Here

              return compileErrorDetails.syntaxErrorMessage();
            }

            private TextStreamPosition wrapJson(
                final ChangeLiveBody.CompileErrorDetails.Position pointPosition) {
              return new TextStreamPosition() {
                @Override public int getOffset() {
                  return (int) pointPosition.position();
                }
                @Override public int getLine() {
                  return (int) pointPosition.line();
View Full Code Here

  }

  // Accessed from Dispatch thread.
  public Collection<? extends Breakpoint> findRelatedBreakpoints(
      WipContextBuilder.WipDebugContextImpl.CallFrameImpl topFrame) {
    TextStreamPosition position = topFrame.getStatementStartPosition();
    int line = position.getLine();
    int column = position.getColumn();

    String scriptId = topFrame.getSourceId();
    final WipBreakpointImpl.ActualLocation location =
        new WipBreakpointImpl.ActualLocation(scriptId, line, Long.valueOf(column));
View Full Code Here

  @Override
  public TextStreamPosition getOpenParenPosition() throws MethodIsBlockingException {
    if (openParenPosition == null) {
      final FunctionValueHandle functionValueHandle = getAdditionalPropertyData();
      openParenPosition = new TextStreamPosition() {
        @Override public int getOffset() {
          return castLongToInt(functionValueHandle.position(), NO_POSITION);
        }
        @Override public int getLine() {
          return castLongToInt(functionValueHandle.line(), NO_POSITION);
View Full Code Here

  @Override
  public TextStreamPosition getOpenParenPosition() throws MethodIsBlockingException {
    if (openParenPosition == null) {
      final FunctionValueHandle functionValueHandle = getAdditionalPropertyData();
      openParenPosition = new TextStreamPosition() {
        @Override public int getOffset() {
          return castLongToInt(functionValueHandle.position(), NO_POSITION);
        }
        @Override public int getLine() {
          return castLongToInt(functionValueHandle.line(), NO_POSITION);
View Full Code Here

TOP

Related Classes of org.chromium.sdk.TextStreamPosition

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.