本文整理汇总了Java中com.intellij.debugger.engine.DebuggerUtils.findClass方法的典型用法代码示例。如果您正苦于以下问题:Java DebuggerUtils.findClass方法的具体用法?Java DebuggerUtils.findClass怎么用?Java DebuggerUtils.findClass使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.intellij.debugger.engine.DebuggerUtils
的用法示例。
在下文中一共展示了DebuggerUtils.findClass方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: initEvaluatorAndChildrenExpression
import com.intellij.debugger.engine.DebuggerUtils; //导入方法依赖的package包/类
protected Cache initEvaluatorAndChildrenExpression(final Project project) {
final Cache cache = new Cache();
try {
final PsiClass contextClass = DebuggerUtils.findClass(getClassName(), project, GlobalSearchScope.allScope(project));
if(contextClass == null) {
throw EvaluateExceptionUtil.CANNOT_FIND_SOURCE_CLASS;
}
final PsiType contextType = DebuggerUtils.getType(getClassName(), project);
cache.myPsiChildrenExpression = null;
JavaCodeFragment codeFragment = myDefaultFragmentFactory.createCodeFragment(myReferenceExpression, contextClass, project);
codeFragment.forceResolveScope(GlobalSearchScope.allScope(project));
codeFragment.setThisType(contextType);
DebuggerUtils.checkSyntax(codeFragment);
cache.myPsiChildrenExpression = ((PsiExpressionCodeFragment)codeFragment).getExpression();
cache.myEvaluator = myDefaultFragmentFactory.getEvaluatorBuilder().build(cache.myPsiChildrenExpression, null);
}
catch (EvaluateException e) {
cache.myException = e;
}
myCache = new SoftReference<Cache>(cache);
return cache;
}
示例2: getEvaluationCode
import com.intellij.debugger.engine.DebuggerUtils; //导入方法依赖的package包/类
protected PsiCodeFragment getEvaluationCode(final StackFrameContext context) throws EvaluateException {
Value value = myParentDescriptor.getValue();
if(value instanceof ObjectReference) {
final String typeName = value.type().name();
final PsiClass psiClass = DebuggerUtils.findClass(myTypeName, myProject, context.getDebugProcess().getSearchScope());
if (psiClass == null) {
throw EvaluateExceptionUtil.createEvaluateException(DebuggerBundle.message("evaluation.error.invalid.type.name", typeName));
}
return createCodeFragment(psiClass);
}
else {
throw EvaluateExceptionUtil.createEvaluateException(
DebuggerBundle.message("evaluation.error.objref.expected", myParentDescriptor.getName())
);
}
}
示例3: getPsiClass
import com.intellij.debugger.engine.DebuggerUtils; //导入方法依赖的package包/类
@Nullable
private PsiClass getPsiClass(AnActionEvent e)
{
final ReferenceType selectedClass = getSelectedClass(e);
final Project project = e.getProject();
if(selectedClass == null || project == null)
{
return null;
}
final ReferenceType targetClass = getObjectType(selectedClass);
if(targetClass != null)
{
return DebuggerUtils.findClass(targetClass.name(), project, GlobalSearchScope.allScope(project));
}
return null;
}
示例4: ClassChildrenExpressionConfigurable
import com.intellij.debugger.engine.DebuggerUtils; //导入方法依赖的package包/类
public ClassChildrenExpressionConfigurable(@NotNull Project project, @NotNull ExpressionChildrenRenderer renderer) {
myRenderer = renderer;
PsiClass psiClass = DebuggerUtils.findClass(myRenderer.getClassName(), project, GlobalSearchScope.allScope(project));
myChildrenEditor = new DebuggerExpressionComboBox(project, this, psiClass, "ClassChildrenExpression");
myExpandableEditor = new DebuggerExpressionComboBox(project, this, psiClass, "ClassChildrenExpression");
myChildrenPanel.getComponent().setLayout(new BorderLayout());
myChildrenPanel.getComponent().add(myChildrenEditor);
myExpandablePanel.getComponent().setLayout(new BorderLayout());
myExpandablePanel.getComponent().add(myExpandableEditor);
}
示例5: ClassChildrenExpressionConfigurable
import com.intellij.debugger.engine.DebuggerUtils; //导入方法依赖的package包/类
public ClassChildrenExpressionConfigurable(Project project, ExpressionChildrenRenderer renderer) {
myRenderer = renderer;
PsiClass psiClass = DebuggerUtils.findClass(myRenderer.getClassName(), project, GlobalSearchScope.allScope(project));
myChildrenEditor = ((DebuggerUtilsEx)DebuggerUtils.getInstance()).createEditor(project, psiClass, "ClassChildrenExpression");
myExpandableEditor = ((DebuggerUtilsEx)DebuggerUtils.getInstance()).createEditor(project, psiClass, "ClassChildrenExpression");
myChildrenPanel.getComponent().setLayout(new BorderLayout());
myChildrenPanel.getComponent().add(myChildrenEditor);
myExpandablePanel.getComponent().setLayout(new BorderLayout());
myExpandablePanel.getComponent().add(myExpandableEditor);
}
示例6: ClassLabelExpressionConfigurable
import com.intellij.debugger.engine.DebuggerUtils; //导入方法依赖的package包/类
public ClassLabelExpressionConfigurable(@NotNull Project project, LabelRenderer renderer) {
myRenderer = renderer;
myCompletionEditor = new LabeledComponent<CompletionEditor>();
final PsiClass psiClass = DebuggerUtils.findClass(myRenderer.getClassName(), project, GlobalSearchScope.allScope(project));
myCompletionEditor.setComponent(((DebuggerUtilsEx)DebuggerUtils.getInstance()).createEditor(project, psiClass, "ClassLabelExpression"));
myCompletionEditor.setText(DebuggerBundle.message("label.class.label.expression.configurable.node.label"));
myPanel = new JPanel(new BorderLayout());
myPanel.add(myCompletionEditor, BorderLayout.NORTH);
}
示例7: getContext
import com.intellij.debugger.engine.DebuggerUtils; //导入方法依赖的package包/类
protected final PsiElement getContext(Project project, DebuggerContext context) {
DebugProcess process = context.getDebugProcess();
GlobalSearchScope scope = process != null ? process.getSearchScope() : GlobalSearchScope.allScope(project);
return DebuggerUtils.findClass(getClassName(), project, scope);
}
示例8: getContext
import com.intellij.debugger.engine.DebuggerUtils; //导入方法依赖的package包/类
protected final PsiElement getContext(Project project, DebuggerContext context)
{
DebugProcess process = context.getDebugProcess();
GlobalSearchScope scope = process != null ? process.getSearchScope() : GlobalSearchScope.allScope(project);
return DebuggerUtils.findClass(getClassName(), project, scope);
}