当前位置: 首页>>代码示例>>Java>>正文


Java AbstractValueHint类代码示例

本文整理汇总了Java中com.intellij.xdebugger.impl.evaluate.quick.common.AbstractValueHint的典型用法代码示例。如果您正苦于以下问题:Java AbstractValueHint类的具体用法?Java AbstractValueHint怎么用?Java AbstractValueHint使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。


AbstractValueHint类属于com.intellij.xdebugger.impl.evaluate.quick.common包,在下文中一共展示了AbstractValueHint类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createValueHint

import com.intellij.xdebugger.impl.evaluate.quick.common.AbstractValueHint; //导入依赖的package包/类
public AbstractValueHint createValueHint(@NotNull final Project project, @NotNull final Editor editor, @NotNull final Point point, final ValueHintType type) {
  final XDebugSession session = XDebuggerManager.getInstance(project).getCurrentSession();
  if (session == null) return null;

  XStackFrame stackFrame = session.getCurrentStackFrame();
  if (stackFrame == null) return null;
  final XDebuggerEvaluator evaluator = stackFrame.getEvaluator();
  if (evaluator == null) return null;

  return PsiDocumentManager.getInstance(project).commitAndRunReadAction(new Computable<XValueHint>() {
    public XValueHint compute() {
      int offset = AbstractValueHint.calculateOffset(editor, point);
      TextRange range = getExpressionRange(evaluator, project, type, editor, offset);
      if (range == null) return null;
      int textLength = editor.getDocument().getTextLength();
      if (range.getStartOffset() > range.getEndOffset() || range.getStartOffset() < 0 || range.getEndOffset() > textLength) {
        LOG.error("invalid range: " + range + ", text length = " + textLength + ", evaluator: " + evaluator);
        return null;
      }

      return new XValueHint(project, editor, point, type, range, evaluator, session);
    }
  });
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:25,代码来源:XQuickEvaluateHandler.java

示例2: createValueHint

import com.intellij.xdebugger.impl.evaluate.quick.common.AbstractValueHint; //导入依赖的package包/类
@Override
public AbstractValueHint createValueHint(@NotNull final Project project, @NotNull final Editor editor, @NotNull final Point point, final ValueHintType type) {
  final XDebugSession session = XDebuggerManager.getInstance(project).getCurrentSession();
  if (session == null) {
    return null;
  }

  final XDebuggerEvaluator evaluator = session.getDebugProcess().getEvaluator();
  if (evaluator == null) {
    return null;
  }

  return PsiDocumentManager.getInstance(project).commitAndRunReadAction(new Computable<XValueHint>() {
    @Override
    public XValueHint compute() {
      int offset = AbstractValueHint.calculateOffset(editor, point);
      ExpressionInfo expressionInfo = getExpressionInfo(evaluator, project, type, editor, offset);
      if (expressionInfo == null) {
        return null;
      }

      int textLength = editor.getDocument().getTextLength();
      TextRange range = expressionInfo.getTextRange();
      if (range.getStartOffset() > range.getEndOffset() || range.getStartOffset() < 0 || range.getEndOffset() > textLength) {
        LOG.error("invalid range: " + range + ", text length = " + textLength + ", evaluator: " + evaluator);
        return null;
      }

      return new XValueHint(project, editor, point, type, expressionInfo, evaluator, session);
    }
  });
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:33,代码来源:XQuickEvaluateHandler.java

示例3: createValueHint

import com.intellij.xdebugger.impl.evaluate.quick.common.AbstractValueHint; //导入依赖的package包/类
@Override
public AbstractValueHint createValueHint(@Nonnull final Project project, @Nonnull final Editor editor, @Nonnull final Point point, final ValueHintType type) {
  final XDebugSession session = XDebuggerManager.getInstance(project).getCurrentSession();
  if (session == null) {
    return null;
  }

  final XDebuggerEvaluator evaluator = session.getDebugProcess().getEvaluator();
  if (evaluator == null) {
    return null;
  }

  return PsiDocumentManager.getInstance(project).commitAndRunReadAction(new Computable<XValueHint>() {
    @Override
    public XValueHint compute() {
      int offset = AbstractValueHint.calculateOffset(editor, point);
      ExpressionInfo expressionInfo = getExpressionInfo(evaluator, project, type, editor, offset);
      if (expressionInfo == null) {
        return null;
      }

      int textLength = editor.getDocument().getTextLength();
      TextRange range = expressionInfo.getTextRange();
      if (range.getStartOffset() > range.getEndOffset() || range.getStartOffset() < 0 || range.getEndOffset() > textLength) {
        LOG.error("invalid range: " + range + ", text length = " + textLength + ", evaluator: " + evaluator);
        return null;
      }

      return new XValueHint(project, editor, point, type, expressionInfo, evaluator, session);
    }
  });
}
 
开发者ID:consulo,项目名称:consulo,代码行数:33,代码来源:XQuickEvaluateHandler.java

示例4: createValueHint

import com.intellij.xdebugger.impl.evaluate.quick.common.AbstractValueHint; //导入依赖的package包/类
@Override
public AbstractValueHint createValueHint(@NotNull final Project project, @NotNull final Editor editor, @NotNull final Point point, final ValueHintType type) {
  return ValueHint.createValueHint(project, editor, point, type);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:5,代码来源:QuickEvaluateActionHandler.java

示例5: createValueHint

import com.intellij.xdebugger.impl.evaluate.quick.common.AbstractValueHint; //导入依赖的package包/类
@Nullable
@Override
public AbstractValueHint createValueHint(@NotNull Project project, @NotNull Editor editor, @NotNull Point point, ValueHintType type) {
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:6,代码来源:DebuggerSupport.java

示例6: createValueHint

import com.intellij.xdebugger.impl.evaluate.quick.common.AbstractValueHint; //导入依赖的package包/类
public AbstractValueHint createValueHint(@NotNull final Project project, @NotNull final Editor editor, @NotNull final Point point, final ValueHintType type) {
  return ValueHint.createValueHint(project, editor, point, type);
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:4,代码来源:QuickEvaluateActionHandler.java

示例7: createValueHint

import com.intellij.xdebugger.impl.evaluate.quick.common.AbstractValueHint; //导入依赖的package包/类
@Nullable
@Override
public AbstractValueHint createValueHint(@Nonnull Project project, @Nonnull Editor editor, @Nonnull Point point, ValueHintType type) {
  return null;
}
 
开发者ID:consulo,项目名称:consulo,代码行数:6,代码来源:DebuggerSupport.java


注:本文中的com.intellij.xdebugger.impl.evaluate.quick.common.AbstractValueHint类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。