本文整理汇总了Java中com.intellij.debugger.DebuggerManager类的典型用法代码示例。如果您正苦于以下问题:Java DebuggerManager类的具体用法?Java DebuggerManager怎么用?Java DebuggerManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
DebuggerManager类属于com.intellij.debugger包,在下文中一共展示了DebuggerManager类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: startNotify
import com.intellij.debugger.DebuggerManager; //导入依赖的package包/类
public void startNotify() {
final DebugProcess debugProcess = DebuggerManager.getInstance(myProject).getDebugProcess(this);
final DebugProcessAdapter listener = new DebugProcessAdapter() {
//executed in manager thread
public void processDetached(DebugProcess process, boolean closedByUser) {
debugProcess.removeDebugProcessListener(this);
notifyProcessDetached();
}
};
debugProcess.addDebugProcessListener(listener);
try {
super.startNotify();
}
finally {
// in case we added our listener too late, we may have lost processDetached notification,
// so check here if process is detached
if (debugProcess.isDetached()) {
debugProcess.removeDebugProcessListener(listener);
notifyProcessDetached();
}
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:23,代码来源:RemoteDebugProcessHandler.java
示例2: getNonAnonymousClassName
import com.intellij.debugger.DebuggerManager; //导入依赖的package包/类
@Nullable
public static String getNonAnonymousClassName(PsiClass aClass) {
if (PsiUtil.isLocalOrAnonymousClass(aClass)) {
return null;
}
String name = aClass.getName();
if (name == null) {
return null;
}
PsiClass parentClass = PsiTreeUtil.getParentOfType(aClass, PsiClass.class, true);
if (parentClass != null) {
final String parentName = getNonAnonymousClassName(parentClass);
if (parentName == null) {
return null;
}
return parentName + "$" + name;
}
return DebuggerManager.getInstance(aClass.getProject()).getVMClassQualifiedName(aClass);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:20,代码来源:JVMNameUtil.java
示例3: initComponent
import com.intellij.debugger.DebuggerManager; //导入依赖的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
示例4: start
import com.intellij.debugger.DebuggerManager; //导入依赖的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
示例5: obsolete
import com.intellij.debugger.DebuggerManager; //导入依赖的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
示例6: trackClass
import com.intellij.debugger.DebuggerManager; //导入依赖的package包/类
private void trackClass(@NotNull XDebugSession session, @NotNull ReferenceType ref, @NotNull TrackingType type, boolean isTrackerEnabled)
{
LOG.assertTrue(DebuggerManager.getInstance(myProject).isDebuggerManagerThread());
if(type == TrackingType.CREATION)
{
final ConstructorInstancesTracker old = myConstructorTrackedClasses.getOrDefault(ref, null);
if(old != null)
{
Disposer.dispose(old);
}
final ConstructorInstancesTracker tracker = new ConstructorInstancesTracker(ref, session, myInstancesTracker);
tracker.setBackgroundMode(!myIsActive);
if(isTrackerEnabled)
{
tracker.enable();
}
else
{
tracker.disable();
}
myConstructorTrackedClasses.put(ref, tracker);
}
}
开发者ID:consulo,项目名称:consulo-java,代码行数:26,代码来源:ClassesFilteredView.java
示例7: updateClassesAndCounts
import com.intellij.debugger.DebuggerManager; //导入依赖的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
示例8: getStack
import com.intellij.debugger.DebuggerManager; //导入依赖的package包/类
@Nullable
private List<StackFrameItem> getStack(AnActionEvent e)
{
final Project project = e.getProject();
final XValueNodeImpl selectedNode = getSelectedNode(e.getDataContext());
final ObjectReference ref = selectedNode != null ? getObjectReference(selectedNode) : null;
if(project == null || ref == null)
{
return null;
}
final XDebugSession session = XDebuggerManager.getInstance(project).getCurrentSession();
if(session != null)
{
final MemoryViewDebugProcessData data = DebuggerManager.getInstance(project).getDebugProcess(session.getDebugProcess().getProcessHandler()).getUserData(MemoryViewDebugProcessData.KEY);
return data != null ? data.getTrackedStacks().getStack(ref) : null;
}
return null;
}
开发者ID:consulo,项目名称:consulo-java,代码行数:21,代码来源:JumpToAllocationSourceAction.java
示例9: getNonAnonymousClassName
import com.intellij.debugger.DebuggerManager; //导入依赖的package包/类
@Nullable
public static String getNonAnonymousClassName(PsiClass aClass)
{
if(PsiUtil.isLocalOrAnonymousClass(aClass))
{
return null;
}
String name = aClass.getName();
if(name == null)
{
return null;
}
PsiClass parentClass = PsiTreeUtil.getParentOfType(aClass, PsiClass.class, true);
if(parentClass != null)
{
final String parentName = getNonAnonymousClassName(parentClass);
if(parentName == null)
{
return null;
}
return parentName + "$" + name;
}
return DebuggerManager.getInstance(aClass.getProject()).getVMClassQualifiedName(aClass);
}
开发者ID:consulo,项目名称:consulo-java,代码行数:25,代码来源:JVMNameUtil.java
示例10: startDebugSession
import com.intellij.debugger.DebuggerManager; //导入依赖的package包/类
@Override
public void startDebugSession(@NotNull JavaDebugConnectionData info, @NotNull ExecutionEnvironment executionEnvironment, @NotNull RemoteServer<?> server)
throws ExecutionException {
final Project project = executionEnvironment.getProject();
final DebuggerPanelsManager manager = DebuggerPanelsManager.getInstance(project);
final JavaDebugServerModeHandler serverModeHandler = info.getServerModeHandler();
boolean serverMode = serverModeHandler != null;
final RemoteConnection remoteConnection = new RemoteConnection(true, info.getHost(), String.valueOf(info.getPort()), serverMode);
DebugEnvironment debugEnvironment = new RemoteServerDebugEnvironment(project, remoteConnection, executionEnvironment.getRunProfile());
DebugUIEnvironment debugUIEnvironment = new RemoteServerDebugUIEnvironment(debugEnvironment, executionEnvironment);
RunContentDescriptor debugContentDescriptor = manager.attachVirtualMachine(debugUIEnvironment);
LOG.assertTrue(debugContentDescriptor != null);
ProcessHandler processHandler = debugContentDescriptor.getProcessHandler();
LOG.assertTrue(processHandler != null);
if (serverMode) {
serverModeHandler.attachRemote();
DebuggerManager.getInstance(executionEnvironment.getProject())
.addDebugProcessListener(processHandler, new DebugProcessAdapter() {
public void processDetached(DebugProcess process, boolean closedByUser) {
try {
serverModeHandler.detachRemote();
}
catch (ExecutionException e) {
LOG.info(e);
}
}
});
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:30,代码来源:JavaDebuggerLauncherImpl.java
示例11: getState
import com.intellij.debugger.DebuggerManager; //导入依赖的package包/类
@Override
public RunProfileState getState(@NotNull Executor executor, @NotNull ExecutionEnvironment env) throws ExecutionException {
final JavaCommandLineState state = new JavaApplicationCommandLineState<JavaScratchConfiguration>(this, env) {
@Override
protected void setupJavaParameters(JavaParameters params) throws ExecutionException {
super.setupJavaParameters(params);
final File scrachesOutput = JavaScratchCompilationSupport.getScratchOutputDirectory(getProject());
if (scrachesOutput != null) {
params.getClassPath().add(scrachesOutput);
}
}
@NotNull
@Override
protected OSProcessHandler startProcess() throws ExecutionException {
final OSProcessHandler handler = super.startProcess();
if (getRunnerSettings() instanceof DebuggingRunnerData) {
final VirtualFile vFile = getConfiguration().getScratchVirtualFile();
if (vFile != null) {
DebuggerManager.getInstance(getProject()).addDebugProcessListener(handler, new DebugProcessAdapter() {
@Override
public void processAttached(DebugProcess process) {
if (vFile.isValid()) {
process.appendPositionManager(new JavaScratchPositionManager((DebugProcessImpl)process, vFile));
}
process.removeDebugProcessListener(this);
}
});
}
}
return handler;
}
};
state.setConsoleBuilder(TextConsoleBuilderFactory.getInstance().createBuilder(getProject(), getConfigurationModule().getSearchScope()));
return state;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:37,代码来源:JavaScratchConfiguration.java
示例12: getNonAnonymousClassName
import com.intellij.debugger.DebuggerManager; //导入依赖的package包/类
@Nullable
public static String getNonAnonymousClassName(PsiClass aClass) {
PsiClass parentClass = PsiTreeUtil.getParentOfType(aClass, PsiClass.class, true);
if(parentClass != null) {
final String parentName = getNonAnonymousClassName(parentClass);
if (parentName == null) {
return null;
}
return parentName + "$" + aClass.getName();
}
return DebuggerManager.getInstance(aClass.getProject()).getVMClassQualifiedName(aClass);
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:13,代码来源:JVMNameUtil.java
示例13: start
import com.intellij.debugger.DebuggerManager; //导入依赖的package包/类
@Override
public void start(ProcessHandler handler)
{
super.start(handler);
JavaeeServerModel model = (JavaeeServerModel) getCommonModel().getServerModel();
if(model.isTruncateLogFile())
{
for(PredefinedLogFile file : model.getPredefinedLogFiles())
{
try
{
new FileOutputStream(model.getOptionsForPredefinedLogFile(file).getPathPattern()).close();
}
catch(Throwable ignore)
{
}
}
}
DebuggerManager.getInstance(getCommonModel().getProject()).addDebugProcessListener(handler, new DebugProcessAdapter()
{
@Override
public void processAttached(DebugProcess process)
{
process.appendPositionManager(createPositionManager(process));
}
});
}
开发者ID:consulo,项目名称:consulo-javaee,代码行数:28,代码来源:JavaeeServerInstance.java
示例14: InstancesWindow
import com.intellij.debugger.DebuggerManager; //导入依赖的package包/类
public InstancesWindow(@NotNull XDebugSession session, @NotNull InstancesProvider provider, @NotNull String className)
{
super(session.getProject(), false);
myProject = session.getProject();
myDebugProcess = (DebugProcessImpl) DebuggerManager.getInstance(myProject).getDebugProcess(session.getDebugProcess().getProcessHandler());
myInstancesProvider = provider;
myClassName = className;
addWarningMessage(null);
session.addSessionListener(new XDebugSessionListener()
{
@Override
public void sessionStopped()
{
ApplicationManager.getApplication().invokeLater(() -> close(OK_EXIT_CODE));
}
}, myDisposable);
setModal(false);
myInstancesView = new MyInstancesView(session);
myInstancesView.setPreferredSize(new JBDimension(DEFAULT_WINDOW_WIDTH, DEFAULT_WINDOW_HEIGHT));
init();
JRootPane root = myInstancesView.getRootPane();
root.setDefaultButton(myInstancesView.myFilterButton);
}
开发者ID:consulo,项目名称:consulo-java,代码行数:28,代码来源:InstancesWindow.java
示例15: mouseClicked
import com.intellij.debugger.DebuggerManager; //导入依赖的package包/类
@Override
public void mouseClicked(MouseEvent e)
{
if(e.getClickCount() != 1 || e.getButton() != MouseEvent.BUTTON1 || !isShowNewInstancesEvent(e))
{
return;
}
final ReferenceType ref = myTable.getSelectedClass();
final TrackerForNewInstances strategy = ref == null ? null : getStrategy(ref);
XDebugSession debugSession = XDebuggerManager.getInstance(myProject).getCurrentSession();
if(strategy != null && debugSession != null)
{
final DebugProcess debugProcess = DebuggerManager.getInstance(myProject).getDebugProcess(debugSession.getDebugProcess().getProcessHandler());
final MemoryViewDebugProcessData data = debugProcess.getUserData(MemoryViewDebugProcessData.KEY);
if(data != null)
{
final List<ObjectReference> newInstances = strategy.getNewInstances();
data.getTrackedStacks().pinStacks(ref);
final InstancesWindow instancesWindow = new InstancesWindow(debugSession, limit -> newInstances, ref.name());
Disposer.register(instancesWindow.getDisposable(), () -> data.getTrackedStacks().unpinStacks(ref));
instancesWindow.show();
}
else
{
LOG.warn("MemoryViewDebugProcessData not found in debug session user data");
}
}
}
开发者ID:consulo,项目名称:consulo-java,代码行数:30,代码来源:ClassesFilteredView.java
示例16: perform
import com.intellij.debugger.DebuggerManager; //导入依赖的package包/类
@Override
protected void perform(XValueNodeImpl node, @NotNull String nodeName, AnActionEvent e)
{
final Project project = e.getProject();
final List<StackFrameItem> stack = getStack(e);
if(project != null && stack != null)
{
final XDebugSession session = XDebuggerManager.getInstance(project).getCurrentSession();
if(session != null)
{
DebugProcessImpl process = (DebugProcessImpl) DebuggerManager.getInstance(project).getDebugProcess(session.getDebugProcess().getProcessHandler());
StackFramePopup.show(stack, process);
}
}
}
开发者ID:consulo,项目名称:consulo-java,代码行数:16,代码来源:JumpToAllocationSourceAction.java
示例17: startNotify
import com.intellij.debugger.DebuggerManager; //导入依赖的package包/类
@Override
public void startNotify()
{
final DebugProcess debugProcess = DebuggerManager.getInstance(myProject).getDebugProcess(this);
final DebugProcessAdapter listener = new DebugProcessAdapter()
{
//executed in manager thread
@Override
public void processDetached(DebugProcess process, boolean closedByUser)
{
debugProcess.removeDebugProcessListener(this);
notifyProcessDetached();
}
};
debugProcess.addDebugProcessListener(listener);
try
{
super.startNotify();
}
finally
{
// in case we added our listener too late, we may have lost processDetached notification,
// so check here if process is detached
if(debugProcess.isDetached())
{
debugProcess.removeDebugProcessListener(listener);
notifyProcessDetached();
}
}
}
开发者ID:consulo,项目名称:consulo-java,代码行数:31,代码来源:RemoteDebugProcessHandler.java
示例18: destroyProcessImpl
import com.intellij.debugger.DebuggerManager; //导入依赖的package包/类
@Override
protected void destroyProcessImpl()
{
DebugProcess debugProcess = DebuggerManager.getInstance(myProject).getDebugProcess(this);
if(debugProcess != null)
{
debugProcess.stop(true);
}
}
开发者ID:consulo,项目名称:consulo-java,代码行数:10,代码来源:RemoteDebugProcessHandler.java
示例19: detachProcessImpl
import com.intellij.debugger.DebuggerManager; //导入依赖的package包/类
@Override
protected void detachProcessImpl()
{
DebugProcess debugProcess = DebuggerManager.getInstance(myProject).getDebugProcess(this);
if(debugProcess != null)
{
debugProcess.stop(false);
}
}
开发者ID:consulo,项目名称:consulo-java,代码行数:10,代码来源:RemoteDebugProcessHandler.java
示例20: attach
import com.intellij.debugger.DebuggerManager; //导入依赖的package包/类
public static void attach( ManProject manProject )
{
DebuggerManager debugManager = DebuggerManager.getInstance( manProject.getNativeProject() );
((DebuggerManagerEx)debugManager).addDebuggerManagerListener( new HotSwapComponent( manProject ) );
}
开发者ID:manifold-systems,项目名称:manifold-ij,代码行数:6,代码来源:HotSwapComponent.java
注:本文中的com.intellij.debugger.DebuggerManager类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论