• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java DebugProcess类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: doEval

import com.intellij.debugger.engine.DebugProcess; //导入依赖的package包/类
private Value doEval(EvaluationContext evaluationContext, Value originalValue, MyCachedEvaluator cachedEvaluator)
  throws EvaluateException {
  final DebugProcess debugProcess = evaluationContext.getDebugProcess();
  if (originalValue == null) {
    return null;
  }
  try {
    final ExpressionEvaluator evaluator = cachedEvaluator.getEvaluator(debugProcess.getProject());
    if(!debugProcess.isAttached()) {
      throw EvaluateExceptionUtil.PROCESS_EXITED;
    }
    final EvaluationContext thisEvaluationContext = evaluationContext.createEvaluationContext(originalValue);
    return evaluator.evaluate(thisEvaluationContext);
  }
  catch (final EvaluateException ex) {
    throw new EvaluateException(DebuggerBundle.message("error.unable.to.evaluate.expression") + " " + ex.getMessage(), ex);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:NodeRendererSettings.java


示例2: defineClass

import com.intellij.debugger.engine.DebugProcess; //导入依赖的package包/类
public static void defineClass(String name,
                               byte[] bytes,
                               EvaluationContext context,
                               DebugProcess process,
                               ClassLoaderReference classLoader) throws EvaluateException {
  try {
    VirtualMachineProxyImpl proxy = (VirtualMachineProxyImpl)process.getVirtualMachineProxy();
    Method defineMethod =
      ((ClassType)classLoader.referenceType()).concreteMethodByName("defineClass", "(Ljava/lang/String;[BII)Ljava/lang/Class;");
    StringReference nameObj = proxy.mirrorOf(name);
    DebuggerUtilsEx.keep(nameObj, context);
    process.invokeMethod(context, classLoader, defineMethod,
                         Arrays.asList(nameObj,
                                       mirrorOf(bytes, context, process),
                                       proxy.mirrorOf(0),
                                       proxy.mirrorOf(bytes.length)));
  }
  catch (Exception e) {
    throw new EvaluateException("Error during class " + name + " definition: " + e, e);
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:22,代码来源:ClassLoadingUtils.java


示例3: createURLArray

import com.intellij.debugger.engine.DebugProcess; //导入依赖的package包/类
private static ArrayReference createURLArray(EvaluationContext context)
  throws EvaluateException, InvocationException, InvalidTypeException, ClassNotLoadedException, IncompatibleThreadStateException {
  DebugProcess process = context.getDebugProcess();
  ArrayType arrayType = (ArrayType)process.findClass(context, "java.net.URL[]", context.getClassLoader());
  ArrayReference arrayRef = arrayType.newInstance(1);
  DebuggerUtilsEx.keep(arrayRef, context);
  ClassType classType = (ClassType)process.findClass(context, "java.net.URL", context.getClassLoader());
  VirtualMachineProxyImpl proxy = (VirtualMachineProxyImpl)process.getVirtualMachineProxy();
  StringReference url = proxy.mirrorOf("file:a");
  DebuggerUtilsEx.keep(url, context);
  ObjectReference reference = process.newInstance(context,
                                                  classType,
                                                  classType.concreteMethodByName(JVMNameUtil.CONSTRUCTOR_NAME, "(Ljava/lang/String;)V"),
                                                  Collections.singletonList(url));
  DebuggerUtilsEx.keep(reference, context);
  arrayRef.setValues(Collections.singletonList(reference));
  return arrayRef;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:ClassLoadingUtils.java


示例4: locationsOfLine

import com.intellij.debugger.engine.DebugProcess; //导入依赖的package包/类
@Override
@NotNull
public List<Location> locationsOfLine(@NotNull ReferenceType type, @NotNull SourcePosition position) throws NoDataException {
  checkGroovyFile(position);
  try {
    if (LOG.isDebugEnabled()) {
      LOG.debug("locationsOfLine: " + type + "; " + position);
    }
    int line = position.getLine() + 1;
    List<Location> locations = getDebugProcess().getVirtualMachineProxy().versionHigher("1.4")
                               ? type.locationsOfLine(DebugProcess.JAVA_STRATUM, null, line)
                               : type.locationsOfLine(line);
    if (locations == null || locations.isEmpty()) throw NoDataException.INSTANCE;
    return locations;
  }
  catch (AbsentInformationException e) {
    throw NoDataException.INSTANCE;
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:GroovyPositionManager.java


示例5: createPositionManager

import com.intellij.debugger.engine.DebugProcess; //导入依赖的package包/类
@Override
public PositionManager createPositionManager(@NotNull final DebugProcess process) {
  AccessToken accessToken = ApplicationManager.getApplication().acquireReadActionLock();
  try {
    JavaPsiFacade facade = JavaPsiFacade.getInstance(process.getProject());
    if (facade.findPackage("com.springsource.loaded") != null || facade.findPackage("org.springsource.loaded") != null) {
      return new SpringLoadedPositionManager(process);
    }
  }
  finally {
    accessToken.finish();
  }

  try {
    // Check spring loaded for remote process
    if (!process.getVirtualMachineProxy().classesByName("com.springsource.loaded.agent.SpringLoadedAgent").isEmpty()
        || !process.getVirtualMachineProxy().classesByName("org.springsource.loaded.agent.SpringLoadedAgent").isEmpty()) {
      return new SpringLoadedPositionManager(process);
    }
  }
  catch (Exception ignored) {
    // Some problem with virtual machine.
  }

  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:27,代码来源:SpringLoadedPositionManagerFactory.java


示例6: locationsOfLine

import com.intellij.debugger.engine.DebugProcess; //导入依赖的package包/类
@NotNull public List<Location> locationsOfLine (ReferenceType type, SourcePosition position) throws NoDataException {
    try {
        // TODO - resolve type in case of inner classes or instances
        int line = position.getLine() + 1;
        List<Location> locations;
        if (debugProcess.getVirtualMachineProxy ().versionHigher ("1.4"))
            locations = type.locationsOfLine (DebugProcess.JAVA_STRATUM, null, line);
        else
            locations = type.locationsOfLine (line);
        if (locations == null  ||  locations.isEmpty())
            throw new NoDataException();
        return locations;
    } catch (AbsentInformationException e) {
        e.printStackTrace (); // TODO
        throw new NoDataException ();
    }
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:18,代码来源:F3PositionManager.java


示例7: initComponent

import com.intellij.debugger.engine.DebugProcess; //导入依赖的package包/类
public void initComponent() {
    ApplicationManager.getApplication().runWriteAction(new Runnable() {
        public void run() {
            FileTypeManager.getInstance().registerFileType(F3_FILE_TYPE, F3_FILE_EXTENSION);

            ProjectManager.getInstance().addProjectManagerListener(new ProjectManagerAdapter() {
                public void projectOpened(Project project) {
                    CompilerManager compilerManager = CompilerManager.getInstance(project);
                    compilerManager.addCompiler(new F3Compiler());
                    compilerManager.addCompilableFileType(F3_FILE_TYPE);

                    DebuggerManager.getInstance (project).registerPositionManagerFactory (new Function<DebugProcess, PositionManager>() {
                        public PositionManager fun (DebugProcess debugProcess) {
                            return new F3PositionManager (debugProcess);
                        }
                    });
                }
            });
        }
    });
}
 
开发者ID:unktomi,项目名称:form-follows-function,代码行数:22,代码来源:F3Plugin.java


示例8: start

import com.intellij.debugger.engine.DebugProcess; //导入依赖的package包/类
@Override
public void start(ProcessHandler processHandler) {
  super.start(processHandler);
  final Project project = getCommonModel().getProject();
  DebuggerManager.getInstance(project)
      .addDebugProcessListener(
          processHandler,
          new DebugProcessAdapter() {
            @Override
            public void processAttached(DebugProcess process) {
              process.appendPositionManager(
                  new DefaultJSPPositionManager(
                      process, JavaeeFacetUtil.getInstance().getAllJavaeeFacets(project)) {
                    @Override
                    protected String getGeneratedClassesPackage() {
                      return "org.apache.jsp";
                    }
                  });
            }
          });
}
 
开发者ID:GoogleCloudPlatform,项目名称:google-cloud-intellij,代码行数:22,代码来源:AppEngineServerInstance.java


示例9: processClassPrepare

import com.intellij.debugger.engine.DebugProcess; //导入依赖的package包/类
public void processClassPrepare(DebugProcess process, ReferenceType refType) {
  DebugProcessImpl debugProcess = (DebugProcessImpl)process;
  if (!ENABLED) {
    return;
  }
  // trying to create a request
  ExceptionRequest request = debugProcess.getRequestsManager().createExceptionRequest(this, refType, NOTIFY_CAUGHT, NOTIFY_UNCAUGHT);
  debugProcess.getRequestsManager().enableRequest(request);
  if (LOG.isDebugEnabled()) {
    if (refType != null) {
      LOG.debug("Created exception request for reference type " + refType.name());
    }
    else {
      LOG.debug("Created exception request for reference type null");
    }
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:18,代码来源:ExceptionBreakpoint.java


示例10: createPrepareRequest

import com.intellij.debugger.engine.DebugProcess; //导入依赖的package包/类
public ClassPrepareRequest createPrepareRequest(final ClassPrepareRequestor requestor, final SourcePosition position)
  throws NoDataException {
  String qName = getOuterClassName(position);
  if (qName != null) {
    return myDebugProcess.getRequestsManager().createClassPrepareRequest(requestor, qName);
  }

  qName = findEnclosingName(position);

  if (qName == null) throw new NoDataException();
  ClassPrepareRequestor waitRequestor = new ClassPrepareRequestor() {
    public void processClassPrepare(DebugProcess debuggerProcess, ReferenceType referenceType) {
      final CompoundPositionManager positionManager = ((DebugProcessImpl)debuggerProcess).getPositionManager();
      if (positionManager.locationsOfLine(referenceType, position).size() > 0) {
        requestor.processClassPrepare(debuggerProcess, referenceType);
      }
    }
  };
  return myDebugProcess.getRequestsManager().createClassPrepareRequest(waitRequestor, qName + "$*");
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:21,代码来源:GroovyPositionManager.java


示例11: createPositionManager

import com.intellij.debugger.engine.DebugProcess; //导入依赖的package包/类
@Override
public PositionManager createPositionManager(final DebugProcess process) {
  AccessToken accessToken = ApplicationManager.getApplication().acquireReadActionLock();
  try {
    JavaPsiFacade facade = JavaPsiFacade.getInstance(process.getProject());
    if (facade.findPackage("com.springsource.loaded") != null || facade.findPackage("org.springsource.loaded") != null) {
      return new SpringLoadedPositionManager(process);
    }
  }
  finally {
    accessToken.finish();
  }

  try {
    // Check spring loaded for remote process
    if (process.getVirtualMachineProxy().classesByName("com.springsource.loaded.agent.SpringLoadedAgent").size() > 0
        || process.getVirtualMachineProxy().classesByName("org.springsource.loaded.agent.SpringLoadedAgent").size() > 0) {
      return new SpringLoadedPositionManager(process);
    }
  }
  catch (Exception ignored) {
    // Some problem with virtual machine.
  }

  return null;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:27,代码来源:SpringLoadedPositionManagerFactory.java


示例12: createPrepareRequest

import com.intellij.debugger.engine.DebugProcess; //导入依赖的package包/类
public ClassPrepareRequest createPrepareRequest(@NotNull final ClassPrepareRequestor requestor, @NotNull final SourcePosition position)
  throws NoDataException {
  final FileType fileType = position.getFile().getFileType();
  if(fileType != JspFileType.INSTANCE && fileType != JspxFileType.INSTANCE) {
    throw NoDataException.INSTANCE;
  }

  return myDebugProcess.getRequestsManager().createClassPrepareRequest(new ClassPrepareRequestor() {
    public void processClassPrepare(DebugProcess debuggerProcess, ReferenceType referenceType) {
      refreshGeneratedFilesDirectory();
      try {
        if(locationsOfLine(referenceType, position).size() > 0) {
          requestor.processClassPrepare(debuggerProcess, referenceType);
        }
      }
      catch (NoDataException e) {
      }
    }
  }, APACHE_PACKAGE + ".*");
}
 
开发者ID:consulo,项目名称:consulo-javaee,代码行数:21,代码来源:Tomcat40PositionManager.java


示例13: obsolete

import com.intellij.debugger.engine.DebugProcess; //导入依赖的package包/类
public void obsolete()
{
	if(myNewObjects != null)
	{
		myNewObjects.forEach(ObjectReference::enableCollection);
	}

	myNewObjects = null;
	if(!myIsBackgroundMode || myIsBackgroundTrackingEnabled)
	{
		myBreakpoint.enable();
	}

	final XDebugSession session = XDebuggerManager.getInstance(myProject).getCurrentSession();
	if(session != null)
	{
		final DebugProcess process = DebuggerManager.getInstance(myProject).getDebugProcess(session.getDebugProcess().getProcessHandler());
		final MemoryViewDebugProcessData data = process.getUserData(MemoryViewDebugProcessData.KEY);
		if(data != null)
		{
			data.getTrackedStacks().release();
		}
	}
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:25,代码来源:ConstructorInstancesTracker.java


示例14: updateClassesAndCounts

import com.intellij.debugger.engine.DebugProcess; //导入依赖的package包/类
private void updateClassesAndCounts()
{
	ApplicationManager.getApplication().invokeLater(() ->
	{
		final XDebugSession debugSession = XDebuggerManager.getInstance(myProject).getCurrentSession();
		if(debugSession != null)
		{
			final DebugProcess debugProcess = DebuggerManager.getInstance(myProject).getDebugProcess(debugSession.getDebugProcess().getProcessHandler());
			if(debugProcess != null && debugProcess.isAttached() && debugProcess instanceof DebugProcessImpl)
			{
				final DebugProcessImpl process = (DebugProcessImpl) debugProcess;
				final SuspendContextImpl context = process.getDebuggerContext().getSuspendContext();
				if(context != null)
				{
					mySingleAlarm.cancelAndRequest(context);
				}
			}
		}
	}, x -> myProject.isDisposed());
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:21,代码来源:ClassesFilteredView.java


示例15: getImageBytes

import com.intellij.debugger.engine.DebugProcess; //导入依赖的package包/类
private static Value getImageBytes(EvaluationContext evaluationContext, Value obj, String methodName) throws EvaluateException
{
	DebugProcess process = evaluationContext.getDebugProcess();
	EvaluationContext copyContext = evaluationContext.createEvaluationContext(obj);
	ClassType helperClass = ClassLoadingUtils.getHelperClass(ImageSerializer.class.getName(), copyContext, process);

	if(helperClass != null)
	{
		List<Method> methods = helperClass.methodsByName(methodName);
		if(!methods.isEmpty())
		{
			return process.invokeMethod(copyContext, helperClass, methods.get(0), Collections.singletonList(obj));
		}
	}
	return null;
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:17,代码来源:ImageObjectRenderer.java


示例16: handleTemporaryBreakpointHit

import com.intellij.debugger.engine.DebugProcess; //导入依赖的package包/类
private void handleTemporaryBreakpointHit(final DebugProcessImpl debugProcess)
{
	// need to delete the request immediately, see IDEA-133978
	debugProcess.getRequestsManager().deleteRequest(this);

	debugProcess.addDebugProcessListener(new DebugProcessListener()
	{
		@Override
		public void resumed(SuspendContext suspendContext)
		{
			removeBreakpoint();
		}

		@Override
		public void processDetached(DebugProcess process, boolean closedByUser)
		{
			removeBreakpoint();
		}

		private void removeBreakpoint()
		{
			AppUIUtil.invokeOnEdt(() -> DebuggerManagerEx.getInstanceEx(myProject).getBreakpointManager().removeBreakpoint(Breakpoint.this));
			debugProcess.removeDebugProcessListener(this);
		}
	});
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:27,代码来源:Breakpoint.java


示例17: processClassPrepare

import com.intellij.debugger.engine.DebugProcess; //导入依赖的package包/类
@Override
public void processClassPrepare(DebugProcess process, ReferenceType refType)
{
	DebugProcessImpl debugProcess = (DebugProcessImpl) process;
	if(!isEnabled())
	{
		return;
	}
	// trying to create a request
	ExceptionRequest request = debugProcess.getRequestsManager().createExceptionRequest(this, refType, isNotifyCaught(), isNotifyUncaught());
	debugProcess.getRequestsManager().enableRequest(request);
	if(LOG.isDebugEnabled())
	{
		if(refType != null)
		{
			LOG.debug("Created exception request for reference type " + refType.name());
		}
		else
		{
			LOG.debug("Created exception request for reference type null");
		}
	}
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:24,代码来源:ExceptionBreakpoint.java


示例18: getMarkup

import com.intellij.debugger.engine.DebugProcess; //导入依赖的package包/类
@Override
@Nullable
public ValueMarkup getMarkup(final DebugProcess debugProcess)
{
	final Value value = getValue();
	if(value instanceof ObjectReference)
	{
		final ObjectReference objRef = (ObjectReference) value;
		final Map<ObjectReference, ValueMarkup> map = getMarkupMap(debugProcess);
		if(map != null)
		{
			return map.get(objRef);
		}
	}
	return null;
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:17,代码来源:ValueDescriptorImpl.java


示例19: setMarkup

import com.intellij.debugger.engine.DebugProcess; //导入依赖的package包/类
@Override
public void setMarkup(final DebugProcess debugProcess, @Nullable final ValueMarkup markup)
{
	final Value value = getValue();
	if(value instanceof ObjectReference)
	{
		final Map<ObjectReference, ValueMarkup> map = getMarkupMap(debugProcess);
		if(map != null)
		{
			final ObjectReference objRef = (ObjectReference) value;
			if(markup != null)
			{
				map.put(objRef, markup);
			}
			else
			{
				map.remove(objRef);
			}
		}
	}
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:22,代码来源:ValueDescriptorImpl.java


示例20: getValueMarkup

import com.intellij.debugger.engine.DebugProcess; //导入依赖的package包/类
@Nullable
public ValueMarkup getValueMarkup()
{
	if(myThisObject != null)
	{
		DebugProcess process = myFrame.getVirtualMachine().getDebugProcess();
		if(process instanceof DebugProcessImpl)
		{
			XDebugSession session = ((DebugProcessImpl) process).getSession().getXDebugSession();
			if(session instanceof XDebugSessionImpl)
			{
				XValueMarkers<?, ?> markers = ((XDebugSessionImpl) session).getValueMarkers();
				if(markers != null)
				{
					return markers.getAllMarkers().get(myThisObject);
				}
			}
		}
	}
	return null;
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:22,代码来源:StackFrameDescriptorImpl.java



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java EditTextPreference类代码示例发布时间:2022-05-23
下一篇:
Java DataSender类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap