本文整理汇总了Java中com.intellij.debugger.engine.DebugProcessImpl类的典型用法代码示例。如果您正苦于以下问题:Java DebugProcessImpl类的具体用法?Java DebugProcessImpl怎么用?Java DebugProcessImpl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DebugProcessImpl类属于com.intellij.debugger.engine包,在下文中一共展示了DebugProcessImpl类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: convertToWrapper
import com.intellij.debugger.engine.DebugProcessImpl; //导入依赖的package包/类
private static Value convertToWrapper(EvaluationContextImpl context, PrimitiveValue value, String wrapperTypeName) throws
EvaluateException {
final DebugProcessImpl process = context.getDebugProcess();
final ClassType wrapperClass = (ClassType)process.findClass(context, wrapperTypeName, null);
final String methodSignature = "(" + JVMNameUtil.getPrimitiveSignature(value.type().name()) + ")L" + wrapperTypeName.replace('.', '/') + ";";
List<Method> methods = wrapperClass.methodsByName("valueOf", methodSignature);
if (methods.size() == 0) { // older JDK version
methods = wrapperClass.methodsByName(JVMNameUtil.CONSTRUCTOR_NAME, methodSignature);
}
if (methods.size() == 0) {
throw new EvaluateException("Cannot construct wrapper object for value of type " + value.type() + ": Unable to find either valueOf() or constructor method");
}
return process.invokeMethod(context, wrapperClass, methods.get(0), Collections.singletonList(value));
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:BoxingEvaluator.java
示例2: actionPerformed
import com.intellij.debugger.engine.DebugProcessImpl; //导入依赖的package包/类
public void actionPerformed(AnActionEvent e) {
final Project project = CommonDataKeys.PROJECT.getData(e.getDataContext());
if (project == null) {
return;
}
DebuggerContextImpl context = (DebuggerManagerEx.getInstanceEx(project)).getContext();
final DebuggerSession session = context.getDebuggerSession();
if(session != null && session.isAttached()) {
final DebugProcessImpl process = context.getDebugProcess();
if (process != null) {
process.getManagerThread().invoke(new DebuggerCommandImpl() {
protected void action() throws Exception {
final List<ThreadState> threads = ThreadDumpAction.buildThreadStates(process.getVirtualMachineProxy());
ApplicationManager.getApplication().invokeLater(new Runnable() {
public void run() {
ExportToTextFileAction.export(project, ThreadDumpPanel.createToFileExporter(project, threads));
}
}, ModalityState.NON_MODAL);
}
});
}
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:25,代码来源:ExportThreadsAction.java
示例3: actionPerformed
import com.intellij.debugger.engine.DebugProcessImpl; //导入依赖的package包/类
public void actionPerformed(final AnActionEvent e) {
DebuggerTreeNodeImpl[] selectedNode = getSelectedNodes(e.getDataContext());
final DebuggerContextImpl debuggerContext = getDebuggerContext(e.getDataContext());
final DebugProcessImpl debugProcess = debuggerContext.getDebugProcess();
if (debugProcess == null) return;
//noinspection ConstantConditions
for (final DebuggerTreeNodeImpl debuggerTreeNode : selectedNode) {
final ThreadDescriptorImpl threadDescriptor = ((ThreadDescriptorImpl)debuggerTreeNode.getDescriptor());
if (threadDescriptor.isSuspended()) {
final ThreadReferenceProxyImpl thread = threadDescriptor.getThreadReference();
debugProcess.getManagerThread().schedule(new DebuggerCommandImpl() {
@Override
protected void action() throws Exception {
SuspendContextImpl suspendingContext = SuspendManagerUtil.getSuspendingContext(debugProcess.getSuspendManager(), thread);
if (suspendingContext != null) {
debugProcess.createResumeThreadCommand(suspendingContext, thread).run();
}
debuggerTreeNode.calcValue();
}
});
}
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:ResumeThreadAction.java
示例4: actionPerformed
import com.intellij.debugger.engine.DebugProcessImpl; //导入依赖的package包/类
public void actionPerformed(final AnActionEvent e) {
DebuggerTreeNodeImpl[] selectedNode = getSelectedNodes(e.getDataContext());
if (selectedNode == null) {
return;
}
final DebuggerContextImpl debuggerContext = getDebuggerContext(e.getDataContext());
final DebugProcessImpl debugProcess = debuggerContext.getDebugProcess();
for (final DebuggerTreeNodeImpl debuggerTreeNode : selectedNode) {
ThreadDescriptorImpl threadDescriptor = ((ThreadDescriptorImpl)debuggerTreeNode.getDescriptor());
final ThreadReferenceProxyImpl thread = threadDescriptor.getThreadReference();
if (!threadDescriptor.isFrozen()) {
debugProcess.getManagerThread().schedule(new DebuggerCommandImpl(){
@Override
protected void action() throws Exception {
debugProcess.createFreezeThreadCommand(thread).run();
debuggerTreeNode.calcValue();
}
});
}
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:FreezeThreadAction.java
示例5: update
import com.intellij.debugger.engine.DebugProcessImpl; //导入依赖的package包/类
public void update(AnActionEvent e) {
DebuggerTreeNodeImpl[] selectedNode = getSelectedNodes(e.getDataContext());
if (selectedNode == null) {
return;
}
DebugProcessImpl debugProcess = getDebuggerContext(e.getDataContext()).getDebugProcess();
boolean visible = false;
if (debugProcess != null) {
visible = true;
for (DebuggerTreeNodeImpl aSelectedNode : selectedNode) {
NodeDescriptorImpl threadDescriptor = aSelectedNode.getDescriptor();
if (!(threadDescriptor instanceof ThreadDescriptorImpl) || ((ThreadDescriptorImpl)threadDescriptor).isSuspended()) {
visible = false;
break;
}
}
}
e.getPresentation().setVisible(visible);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:FreezeThreadAction.java
示例6: actionPerformed
import com.intellij.debugger.engine.DebugProcessImpl; //导入依赖的package包/类
@Override
public void actionPerformed(AnActionEvent e) {
DebuggerTreeNodeImpl selectedNode = getSelectedNode(e.getDataContext());
if(selectedNode == null) {
return;
}
final NodeDescriptorImpl descriptor = selectedNode.getDescriptor();
if(!(descriptor instanceof ValueDescriptor)) {
return;
}
DebuggerContextImpl debuggerContext = getDebuggerContext(e.getDataContext());
final DebugProcessImpl debugProcess = debuggerContext.getDebugProcess();
if(debugProcess == null) {
return;
}
debugProcess.getManagerThread().schedule(new NavigateCommand(debuggerContext, (ValueDescriptor)descriptor, debugProcess, e));
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:JumpToObjectAction.java
示例7: setSelected
import com.intellij.debugger.engine.DebugProcessImpl; //导入依赖的package包/类
public void setSelected(final AnActionEvent e, final boolean state) {
if (!state) return;
final DebuggerContextImpl debuggerContext = DebuggerAction.getDebuggerContext(e.getDataContext());
final List<JavaValue> values = getSelectedValues(e);
final List<XValueNodeImpl> selectedNodes = XDebuggerTreeActionBase.getSelectedNodes(e.getDataContext());
LOG.assertTrue(debuggerContext != null && !values.isEmpty());
DebugProcessImpl process = debuggerContext.getDebugProcess();
if (process == null) {
return;
}
process.getManagerThread().schedule(new DebuggerContextCommandImpl(debuggerContext) {
public void threadAction() {
for (final XValueNodeImpl node : selectedNodes) {
final XValue container = node.getValueContainer();
if (container instanceof JavaValue) {
((JavaValue)container).setRenderer(myNodeRenderer, node);
}
}
}
}
);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:ViewAsGroup.java
示例8: update
import com.intellij.debugger.engine.DebugProcessImpl; //导入依赖的package包/类
public void update(final AnActionEvent event) {
if(!DebuggerAction.isFirstStart(event)) {
return;
}
myChildren = AnAction.EMPTY_ARRAY;
final DebuggerContextImpl debuggerContext = DebuggerAction.getDebuggerContext(event.getDataContext());
final List<JavaValue> values = getSelectedValues(event);
if (values.isEmpty()) {
event.getPresentation().setEnabledAndVisible(false);
return;
}
final DebugProcessImpl process = debuggerContext.getDebugProcess();
if (process == null) {
event.getPresentation().setEnabled(false);
return;
}
process.getManagerThread().schedule(new DebuggerContextCommandImpl(debuggerContext) {
public void threadAction() {
myChildren = calcChildren(values);
DebuggerAction.enableAction(event, myChildren.length > 0);
}
});
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:ViewAsGroup.java
示例9: actionPerformed
import com.intellij.debugger.engine.DebugProcessImpl; //导入依赖的package包/类
public void actionPerformed(@NotNull final AnActionEvent e) {
final DebuggerContextImpl debuggerContext = DebuggerAction.getDebuggerContext(e.getDataContext());
if(debuggerContext != null) {
final DebugProcessImpl debugProcess = debuggerContext.getDebugProcess();
if(debugProcess != null) {
final List<JavaValue> selectedValues = ViewAsGroup.getSelectedValues(e);
if (!selectedValues.isEmpty()) {
debugProcess.getManagerThread().schedule(new DebuggerContextCommandImpl(debuggerContext) {
public void threadAction() {
for (JavaValue selectedValue : selectedValues) {
selectedValue.getDescriptor().setRenderer(null);
}
DebuggerAction.refreshViews(e);
}
});
}
}
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:AutoRendererAction.java
示例10: createRequest
import com.intellij.debugger.engine.DebugProcessImpl; //导入依赖的package包/类
@Override
public void createRequest(@NotNull DebugProcessImpl debugProcess) {
DebuggerManagerThreadImpl.assertIsManagerThread();
// check is this breakpoint is enabled, vm reference is valid and there're no requests created yet
if (!shouldCreateRequest(debugProcess)) {
return;
}
if (!isValid()) {
return;
}
SourcePosition position = getSourcePosition();
if (position != null) {
createOrWaitPrepare(debugProcess, position);
}
else {
LOG.error("Unable to create request for breakpoint with null position: " + toString() + " at " + myXBreakpoint.getSourcePosition());
}
updateUI();
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:BreakpointWithHighlighter.java
示例11: disableBreakpoints
import com.intellij.debugger.engine.DebugProcessImpl; //导入依赖的package包/类
public void disableBreakpoints(@NotNull final DebugProcessImpl debugProcess) {
final List<Breakpoint> breakpoints = getBreakpoints();
if (!breakpoints.isEmpty()) {
final RequestManagerImpl requestManager = debugProcess.getRequestsManager();
for (Breakpoint breakpoint : breakpoints) {
breakpoint.markVerified(requestManager.isVerified(breakpoint));
requestManager.deleteRequest(breakpoint);
}
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
updateBreakpointsUI();
}
});
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:BreakpointManager.java
示例12: acceptLocation
import com.intellij.debugger.engine.DebugProcessImpl; //导入依赖的package包/类
protected boolean acceptLocation(final DebugProcessImpl debugProcess, ReferenceType classType, final Location loc) {
Method method = loc.method();
// Some frameworks may create synthetic methods with lines mapped to user code, see IDEA-143852
// if (DebuggerUtils.isSynthetic(method)) { return false; }
if (isAnonymousClass(classType)) {
if ((method.isConstructor() && loc.codeIndex() == 0) || method.isBridge()) return false;
}
return ApplicationManager.getApplication().runReadAction(new Computable<Boolean>() {
@Override
public Boolean compute() {
SourcePosition position = debugProcess.getPositionManager().getSourcePosition(loc);
if (position == null) return false;
JavaLineBreakpointType type = getXBreakpointType();
if (type == null) return true;
return type.matchesPosition(LineBreakpoint.this, position);
}
});
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:LineBreakpoint.java
示例13: rebuild
import com.intellij.debugger.engine.DebugProcessImpl; //导入依赖的package包/类
public void rebuild(final DebuggerContextImpl context) {
ApplicationManager.getApplication().assertIsDispatchThread();
final DebugProcessImpl process = context.getDebugProcess();
if (process == null) {
return; // empty context, no process available yet
}
myDebuggerContext = context;
saveState();
process.getManagerThread().schedule(new DebuggerCommandImpl() {
@Override
protected void action() throws Exception {
getNodeFactory().setHistoryByContext(context);
}
@Override
public Priority getPriority() {
return Priority.NORMAL;
}
});
build(context);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:DebuggerTree.java
示例14: DebuggerContextImpl
import com.intellij.debugger.engine.DebugProcessImpl; //导入依赖的package包/类
private DebuggerContextImpl(@Nullable DebuggerSession session,
@Nullable DebugProcessImpl debugProcess,
@Nullable SuspendContextImpl context,
ThreadReferenceProxyImpl threadProxy,
StackFrameProxyImpl frameProxy,
SourcePosition position,
PsiElement contextElement,
boolean initialized) {
LOG.assertTrue(frameProxy == null || threadProxy == null || threadProxy == frameProxy.threadProxy());
LOG.assertTrue(debugProcess != null || frameProxy == null && threadProxy == null);
myDebuggerSession = session;
myThreadProxy = threadProxy;
myFrameProxy = frameProxy;
myDebugProcess = debugProcess;
mySourcePosition = position;
mySuspendContext = context;
myContextElement = contextElement;
myInitialized = initialized;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:DebuggerContextImpl.java
示例15: createScaledBitmap
import com.intellij.debugger.engine.DebugProcessImpl; //导入依赖的package包/类
@Nullable
private static Value createScaledBitmap(@NotNull EvaluationContextImpl context,
@NotNull ObjectReference bitmap,
@NotNull Dimension currentDimensions) throws EvaluateException {
DebugProcessImpl debugProcess = context.getDebugProcess();
Method createScaledBitmapMethod = DebuggerUtils
.findMethod(bitmap.referenceType(), "createScaledBitmap", "(Landroid/graphics/Bitmap;IIZ)Landroid/graphics/Bitmap;");
if (createScaledBitmapMethod == null) {
return null;
}
double s = Math.max(currentDimensions.getHeight(), currentDimensions.getWidth()) / MAX_DIMENSION;
VirtualMachineProxyImpl vm = context.getDebugProcess().getVirtualMachineProxy();
Value dstWidth = DebuggerUtilsEx.createValue(vm, "int", (int)(currentDimensions.getWidth() / s));
Value dstHeight = DebuggerUtilsEx.createValue(vm, "int", (int)(currentDimensions.getHeight() / s));
Value filter = DebuggerUtilsEx.createValue(vm, "boolean", Boolean.FALSE);
return debugProcess.invokeMethod(context, bitmap, createScaledBitmapMethod,
Arrays.asList(bitmap, dstWidth, dstHeight, filter));
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:21,代码来源:BitmapEvaluator.java
示例16: wrapContext
import com.intellij.debugger.engine.DebugProcessImpl; //导入依赖的package包/类
private PsiElement wrapContext(Project project, final PsiElement originalContext) {
if (project.isDefault()) return originalContext;
PsiElement context = originalContext;
final DebugProcessImpl process = DebuggerManagerEx.getInstanceEx(project).getContext().getDebugProcess();
if (process != null) {
final Map<ObjectReference, ValueMarkup> markupMap = ValueDescriptorImpl.getMarkupMap(process);
if (markupMap != null && markupMap.size() > 0) {
final Pair<String, Map<String, ObjectReference>> markupVariables = createMarkupVariablesText(markupMap);
int offset = markupVariables.getFirst().length() - 1;
final TextWithImportsImpl textWithImports = new TextWithImportsImpl(CodeFragmentKind.CODE_BLOCK, markupVariables.getFirst(), "", myDelegate.getFileType());
final JavaCodeFragment codeFragment = myDelegate.createCodeFragment(textWithImports, context, project);
codeFragment.accept(new JavaRecursiveElementVisitor() {
public void visitLocalVariable(PsiLocalVariable variable) {
final String name = variable.getName();
variable.putUserData(LABEL_VARIABLE_VALUE_KEY, markupVariables.getSecond().get(name));
}
});
final PsiElement newContext = codeFragment.findElementAt(offset);
if (newContext != null) {
context = newContext;
}
}
}
return context;
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:26,代码来源:CodeFragmentFactoryContextWrapper.java
示例17: convertToWrapper
import com.intellij.debugger.engine.DebugProcessImpl; //导入依赖的package包/类
private static Value convertToWrapper(EvaluationContextImpl context, PrimitiveValue value, String wrapperTypeName) throws
EvaluateException {
final DebugProcessImpl process = context.getDebugProcess();
final ClassType wrapperClass = (ClassType)process.findClass(context, wrapperTypeName, null);
final String methodSignature = "(" + JVMNameUtil.getPrimitiveSignature(value.type().name()) + ")L" + wrapperTypeName.replace('.', '/') + ";";
List<Method> methods = wrapperClass.methodsByName("valueOf", methodSignature);
if (methods.size() == 0) { // older JDK version
methods = wrapperClass.methodsByName("<init>", methodSignature);
}
if (methods.size() == 0) {
throw new EvaluateException("Cannot construct wrapper object for value of type " + value.type() + ": Unable to find either valueOf() or constructor method");
}
final Method factoryMethod = methods.get(0);
final ArrayList args = new ArrayList();
args.add(value);
return process.invokeMethod(context, wrapperClass, factoryMethod, args);
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:22,代码来源:BoxingEvaluator.java
示例18: actionPerformed
import com.intellij.debugger.engine.DebugProcessImpl; //导入依赖的package包/类
public void actionPerformed(final AnActionEvent e) {
DebuggerTreeNodeImpl[] selectedNode = getSelectedNodes(e.getDataContext());
final DebuggerContextImpl debuggerContext = getDebuggerContext(e.getDataContext());
final DebugProcessImpl debugProcess = debuggerContext.getDebugProcess();
//noinspection ConstantConditions
for (final DebuggerTreeNodeImpl debuggerTreeNode : selectedNode) {
final ThreadDescriptorImpl threadDescriptor = ((ThreadDescriptorImpl)debuggerTreeNode.getDescriptor());
if (threadDescriptor.isSuspended()) {
final ThreadReferenceProxyImpl thread = threadDescriptor.getThreadReference();
debugProcess.getManagerThread().schedule(new SuspendContextCommandImpl(debuggerContext.getSuspendContext()) {
public void contextAction() throws Exception {
debugProcess.createResumeThreadCommand(getSuspendContext(), thread).run();
debuggerTreeNode.calcValue();
}
});
}
}
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:21,代码来源:ResumeThreadAction.java
示例19: actionPerformed
import com.intellij.debugger.engine.DebugProcessImpl; //导入依赖的package包/类
public void actionPerformed(final AnActionEvent e) {
DebuggerTreeNodeImpl[] selectedNode = getSelectedNodes(e.getDataContext());
if (selectedNode == null) {
return;
}
final DebuggerContextImpl debuggerContext = getDebuggerContext(e.getDataContext());
final DebugProcessImpl debugProcess = debuggerContext.getDebugProcess();
for (final DebuggerTreeNodeImpl debuggerTreeNode : selectedNode) {
ThreadDescriptorImpl threadDescriptor = ((ThreadDescriptorImpl)debuggerTreeNode.getDescriptor());
final ThreadReferenceProxyImpl thread = threadDescriptor.getThreadReference();
if (!threadDescriptor.isFrozen()) {
debugProcess.getManagerThread().schedule(new SuspendContextCommandImpl(debuggerContext.getSuspendContext()) {
public void contextAction() throws Exception {
debugProcess.createFreezeThreadCommand(thread).run();
debuggerTreeNode.calcValue();
}
});
}
}
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:23,代码来源:FreezeThreadAction.java
示例20: update
import com.intellij.debugger.engine.DebugProcessImpl; //导入依赖的package包/类
public void update(AnActionEvent e) {
DebuggerTreeNodeImpl[] selectedNode = getSelectedNodes(e.getDataContext());
if (selectedNode == null) {
return;
}
DebugProcessImpl debugProcess = getDebuggerContext(e.getDataContext()).getDebugProcess();
boolean visible = false;
if (debugProcess != null) {
visible = true;
for (DebuggerTreeNodeImpl aSelectedNode : selectedNode) {
NodeDescriptorImpl threadDescriptor = aSelectedNode.getDescriptor();
if (!(threadDescriptor instanceof ThreadDescriptorImpl) || ((ThreadDescriptorImpl)threadDescriptor).isFrozen()) {
visible = false;
break;
}
}
}
e.getPresentation().setVisible(visible);
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:23,代码来源:FreezeThreadAction.java
注:本文中的com.intellij.debugger.engine.DebugProcessImpl类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论