本文整理汇总了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);
}
});
}
示例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);
}
});
}
示例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);
}
});
}
示例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);
}
示例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;
}
示例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);
}
示例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;
}