Package com.intellij.debugger

Examples of com.intellij.debugger.NoDataException


    myProcess = process;
  }

  @Override
  public SourcePosition getSourcePosition(@Nullable Location location) throws NoDataException {
    if (true) throw new NoDataException();
    if (location == null) throw new NoDataException();

    final ReferenceType refType = location.declaringType();
    if (refType == null) throw new NoDataException();

    int dollar = refType.name().indexOf("$");
    String qname = dollar == -1? refType.name() : refType.name().substring(0, dollar);

    final String name = location.method().name();
    int lineNumber = location.lineNumber() - 1;

    for (PsiFile file : myGrammars.get(qname)) {
      BnfExpression expression = findExpression(file, name);
      BnfRule rule = PsiTreeUtil.getParentOfType(expression, BnfRule.class);
      if (expression != null && qname.equals(ParserGeneratorUtil.getAttribute(rule, KnownAttribute.PARSER_CLASS))) {
        for (BnfExpression expr : ParserGeneratorUtil.getChildExpressions(expression)) {
          int line = getLineNumber(expr, qname, lineNumber);
          if (line == lineNumber) {
            return SourcePosition.createFromElement(expr);
          }
        }
        if (lineNumber == getLineNumber(expression, qname, lineNumber)) {
          return SourcePosition.createFromElement(expression);
        }
        return SourcePosition.createFromElement(rule);
      }
    }
    throw new NoDataException();
  }
View Full Code Here


  public List<ReferenceType> getAllClasses(SourcePosition classPosition) throws NoDataException {
    String parserClass = getParserClass(classPosition);

    List<ReferenceType> referenceTypes = myProcess.getVirtualMachineProxy().classesByName(parserClass);
    if (referenceTypes.isEmpty()) {
      throw new NoDataException();
    }
    return referenceTypes;
  }
View Full Code Here

      return type.locationsOfLine(line + 1);
    }
    catch (AbsentInformationException e) {
      // ignore
    }
    throw new NoDataException();
  }
View Full Code Here

  private String getParserClass(SourcePosition classPosition) throws NoDataException {
    AccessToken token = ReadAction.start();
    try {
      BnfRule rule = getRuleAt(classPosition);
      String parserClass = ParserGeneratorUtil.getAttribute(rule, KnownAttribute.PARSER_CLASS);
      if (StringUtil.isEmpty(parserClass)) throw new NoDataException();
      return parserClass;
    }
    finally {
      token.finish();
    }
View Full Code Here

  }

  @NotNull
  private BnfRule getRuleAt(SourcePosition position) throws NoDataException {
    PsiFile file = position.getFile();
    if (!(file instanceof BnfFileImpl)) throw new NoDataException();
    BnfRule rule = PsiTreeUtil.getParentOfType(position.getElementAt(), BnfRule.class);
    if (rule == null) throw new NoDataException();
    return rule;
  }
View Full Code Here

    }
    catch (Throwable e) {
      LOG.info(e);
    }
    if(sourcePosition == null) {
      throw new NoDataException();
    }
    return sourcePosition;
  }
View Full Code Here

  }

  private void checkSourcePositionFileType(final SourcePosition classPosition) throws NoDataException {
    final FileType fileType = classPosition.getFile().getFileType();
    if(!myFileTypes.contains(fileType)) {
      throw new NoDataException();
    }
  }
View Full Code Here

    try {
        int line = position.getLine() + 1;
      List<Location> locations = getDebugProcess().getVirtualMachineProxy().versionHigher("1.4")
          ? type.locationsOfLine(DebugProcessImpl.JAVA_STRATUM, null, line)
          : type.locationsOfLine(line);
      if (locations == null || locations.isEmpty()) throw new NoDataException();
      return locations;
    }
    catch (AbsentInformationException e) {
      throw new NoDataException();
    }
  }
View Full Code Here

  }

  public ClassPrepareRequest createPrepareRequest(final ClassPrepareRequestor requestor, final SourcePosition position)
      throws NoDataException {
    final PsiFile file = position.getFile();
    if (!(file instanceof ClojureFile)) throw new NoDataException();

    final String query = ApplicationManager.getApplication().runReadAction(new Computable<String>() {
      public String compute() {
        final ClojureFile clojureFile = (ClojureFile) file;
        PsiElement element = clojureFile.findElementAt(position.getOffset());
View Full Code Here

  }

  @NotNull
  public List<ReferenceType> getAllClasses(final SourcePosition position) throws NoDataException {
    PsiFile file = position.getFile();
    if (!(file instanceof ClojureFile)) throw new NoDataException();
    final List<ReferenceType> list = myDebugProcess.getVirtualMachineProxy().allClasses();
    final ArrayList<ReferenceType> result = new ArrayList<ReferenceType>();
    final String fileName = position.getFile().getName();
    for (ReferenceType type : list) {
      try {
View Full Code Here

TOP

Related Classes of com.intellij.debugger.NoDataException

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.