当前位置: 首页>>代码示例>>Java>>正文


Java StackFrameDescriptorImpl类代码示例

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


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

示例1: getStackFrameProxy

import com.intellij.debugger.ui.impl.watch.StackFrameDescriptorImpl; //导入依赖的package包/类
static StackFrameProxyImpl getStackFrameProxy(AnActionEvent e) {
  DebuggerTreeNodeImpl node = getSelectedNode(e.getDataContext());
  if (node != null) {
    NodeDescriptorImpl descriptor = node.getDescriptor();
    if (descriptor instanceof StackFrameDescriptorImpl) {
      return ((StackFrameDescriptorImpl)descriptor).getFrameProxy();
    }
  }
  else {
    JavaStackFrame stackFrame = getSelectedStackFrame(e);
    if (stackFrame != null) {
      return stackFrame.getStackFrameProxy();
    }
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:PopFrameAction.java

示例2: selectFrame

import com.intellij.debugger.ui.impl.watch.StackFrameDescriptorImpl; //导入依赖的package包/类
private void selectFrame(StackFrameProxy frame) {
  synchronized (myFramesList) {
    final int count = myFramesList.getElementCount();
    final Object selectedValue = myFramesList.getSelectedValue();
    final DefaultListModel model = myFramesList.getModel();
    for (int idx = 0; idx < count; idx++) {
      final Object elem = model.getElementAt(idx);
      if (elem instanceof StackFrameDescriptorImpl) {
        final StackFrameDescriptorImpl item = (StackFrameDescriptorImpl)elem;
        if (frame.equals(item.getFrameProxy())) {
          if (!item.equals(selectedValue)) {
            myFramesList.setSelectedIndex(idx);
          }
          return;
        }
      }
    }
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:20,代码来源:FramesPanel.java

示例3: isOccurrenceOfSelectedFrame

import com.intellij.debugger.ui.impl.watch.StackFrameDescriptorImpl; //导入依赖的package包/类
private static boolean isOccurrenceOfSelectedFrame(final StackFrameDescriptorImpl selectedDescriptor, StackFrameDescriptorImpl descriptor)
{
	final Method currentMethod = descriptor.getMethod();
	if(currentMethod != null)
	{
		if(selectedDescriptor != null)
		{
			final Method selectedMethod = selectedDescriptor.getMethod();
			if(selectedMethod != null)
			{
				if(Comparing.equal(selectedMethod, currentMethod))
				{
					return true;
				}
			}
		}
	}
	return false;
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:20,代码来源:JavaFramesListRenderer.java

示例4: customizePresentation

import com.intellij.debugger.ui.impl.watch.StackFrameDescriptorImpl; //导入依赖的package包/类
@Override
public void customizePresentation(@NotNull ColoredTextContainer component)
{
	StackFrameDescriptorImpl selectedDescriptor = null;
	DebuggerSession session = myDebugProcess.getSession();
	if(session != null)
	{
		XDebugSession xSession = session.getXDebugSession();
		if(xSession != null)
		{
			XStackFrame frame = xSession.getCurrentStackFrame();
			if(frame instanceof JavaStackFrame)
			{
				selectedDescriptor = ((JavaStackFrame) frame).getDescriptor();
			}
		}
	}
	FRAME_RENDERER.customizePresentation(myDescriptor, component, selectedDescriptor);
	if(myInsertCapturePoint != null)
	{
		component.setIcon(XDebuggerUIConstants.INFORMATION_MESSAGE_ICON);
	}
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:24,代码来源:JavaStackFrame.java

示例5: createStackFrame

import com.intellij.debugger.ui.impl.watch.StackFrameDescriptorImpl; //导入依赖的package包/类
private static XStackFrame createStackFrame(@NotNull StackFrameProxyImpl stackFrameProxy, @NotNull MethodsTracker tracker) {
  StackFrameDescriptorImpl descriptor = new StackFrameDescriptorImpl(stackFrameProxy, tracker);
  DebugProcessImpl debugProcess = (DebugProcessImpl)descriptor.getDebugProcess();
  Location location = descriptor.getLocation();
  if (location != null) {
    XStackFrame customFrame = debugProcess.getPositionManager().createStackFrame(stackFrameProxy, debugProcess, location);
    if (customFrame != null) {
      return customFrame;
    }
  }
  return new JavaStackFrame(descriptor, true);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:JavaExecutionStack.java

示例6: showFrame

import com.intellij.debugger.ui.impl.watch.StackFrameDescriptorImpl; //导入依赖的package包/类
private static boolean showFrame(@NotNull XStackFrame frame) {
  if (DebuggerSettings.getInstance().SHOW_LIBRARY_STACKFRAMES) return true;
  if (frame instanceof JavaStackFrame) {
    StackFrameDescriptorImpl descriptor = ((JavaStackFrame)frame).getDescriptor();
    return !descriptor.isSynthetic() && !descriptor.isInLibraryContent();
  }
  return true;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:JavaExecutionStack.java

示例7: isOccurrenceOfSelectedFrame

import com.intellij.debugger.ui.impl.watch.StackFrameDescriptorImpl; //导入依赖的package包/类
private static boolean isOccurrenceOfSelectedFrame(final StackFrameDescriptorImpl selectedDescriptor, StackFrameDescriptorImpl descriptor) {
  final Method currentMethod = descriptor.getMethod();
  if (currentMethod != null) {
    if (selectedDescriptor != null) {
      final Method selectedMethod = selectedDescriptor.getMethod();
      if (selectedMethod != null) {
        if (Comparing.equal(selectedMethod, currentMethod)) {
          return true;
        }
      }
    }
  }
  return false;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:JavaFramesListRenderer.java

示例8: doAction

import com.intellij.debugger.ui.impl.watch.StackFrameDescriptorImpl; //导入依赖的package包/类
protected static void doAction(DataContext dataContext) {
  final Project project = CommonDataKeys.PROJECT.getData(dataContext);
  if(project == null) return;
  StackFrameDescriptorImpl stackFrameDescriptor = getStackFrameDescriptor(dataContext);
  if(stackFrameDescriptor != null) {
    //DebuggerContextUtil.setStackFrame(getContextManager(dataContext), stackFrameDescriptor.getFrameProxy());
    SourcePosition sourcePosition = stackFrameDescriptor.getSourcePosition();
    if (sourcePosition != null) {
      sourcePosition.navigate(true);
    }
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:GotoFrameSourceAction.java

示例9: getStackFrame

import com.intellij.debugger.ui.impl.watch.StackFrameDescriptorImpl; //导入依赖的package包/类
static JavaStackFrame getStackFrame(AnActionEvent e) {
  StackFrameDescriptorImpl descriptor = getSelectedStackFrameDescriptor(e);
  if (descriptor != null) {
    return new JavaStackFrame(descriptor, false);
  }
  return getSelectedStackFrame(e);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:8,代码来源:PopFrameAction.java

示例10: getSelectedStackFrameDescriptor

import com.intellij.debugger.ui.impl.watch.StackFrameDescriptorImpl; //导入依赖的package包/类
@Nullable
private static StackFrameDescriptorImpl getSelectedStackFrameDescriptor(AnActionEvent e) {
  DebuggerTreeNodeImpl selectedNode = getSelectedNode(e.getDataContext());
  if(selectedNode != null) {
    NodeDescriptorImpl descriptor = selectedNode.getDescriptor();
    if(descriptor instanceof StackFrameDescriptorImpl) {
      return (StackFrameDescriptorImpl)descriptor;
      //if(selectedNode.getNextSibling() != null) {
      //  return (StackFrameDescriptorImpl)descriptor;
      //}
    }
  }
  return null;
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:15,代码来源:PopFrameAction.java

示例11: isAtBreakpoint

import com.intellij.debugger.ui.impl.watch.StackFrameDescriptorImpl; //导入依赖的package包/类
private static boolean isAtBreakpoint(AnActionEvent e) {
  DebuggerTreeNodeImpl selectedNode = getSelectedNode(e.getDataContext());
  if(selectedNode != null && selectedNode.getDescriptor() instanceof StackFrameDescriptorImpl) {
    DebuggerTreeNodeImpl parent = selectedNode.getParent();
    if(parent != null) {
      return ((ThreadDescriptorImpl)parent.getDescriptor()).isAtBreakpoint();
    }
  }
  DebuggerContextImpl debuggerContext = DebuggerAction.getDebuggerContext(e.getDataContext());
  SuspendContextImpl suspendContext = debuggerContext.getSuspendContext();
  return suspendContext != null && debuggerContext.getThreadProxy() == suspendContext.getThread();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:13,代码来源:PopFrameAction.java

示例12: ThreadsPanel

import com.intellij.debugger.ui.impl.watch.StackFrameDescriptorImpl; //导入依赖的package包/类
public ThreadsPanel(Project project, final DebuggerStateManager stateManager) {
  super(project, stateManager);

  final Disposable disposable = DebuggerAction.installEditAction(getThreadsTree(), DebuggerActions.EDIT_FRAME_SOURCE);
  registerDisposable(disposable);

  getThreadsTree().addKeyListener(new KeyAdapter() {
    @Override
    public void keyPressed(KeyEvent e) {
      if (e.getKeyCode() == KeyEvent.VK_ENTER && getThreadsTree().getSelectionCount() == 1) {
        DebuggerTreeNodeImpl node = (DebuggerTreeNodeImpl)getThreadsTree().getLastSelectedPathComponent();
        if (node != null) {
          NodeDescriptorImpl descriptor = node.getDescriptor();
          if (descriptor instanceof StackFrameDescriptorImpl) {
            selectFrame(node);
          }
        }
      }
    }
  });
  add(ScrollPaneFactory.createScrollPane(getThreadsTree()), BorderLayout.CENTER);
  stateManager.addListener(new DebuggerContextListener() {
    @Override
    public void changeEvent(@NotNull DebuggerContextImpl newContext, DebuggerSession.Event event) {
      if (DebuggerSession.Event.ATTACHED == event || DebuggerSession.Event.RESUME == event) {
        startLabelsUpdate();
      }
      else if (DebuggerSession.Event.PAUSE == event || DebuggerSession.Event.DETACHED == event || DebuggerSession.Event.DISPOSE == event) {
        myUpdateLabelsAlarm.cancelAllRequests();
      }
      if (DebuggerSession.Event.DETACHED == event || DebuggerSession.Event.DISPOSE == event) {
        stateManager.removeListener(this);
      }
    }
  });
  startLabelsUpdate();
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:38,代码来源:ThreadsPanel.java

示例13: doAction

import com.intellij.debugger.ui.impl.watch.StackFrameDescriptorImpl; //导入依赖的package包/类
protected static void doAction(DataContext dataContext) {
  final Project project = PlatformDataKeys.PROJECT.getData(dataContext);
  if(project == null) return;
  StackFrameDescriptorImpl stackFrameDescriptor = getStackFrameDescriptor(dataContext);
  if(stackFrameDescriptor != null) {
    DebuggerContextUtil.setStackFrame(getContextManager(dataContext), stackFrameDescriptor.getFrameProxy());
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:9,代码来源:GotoFrameSourceAction.java

示例14: updateFrameList

import com.intellij.debugger.ui.impl.watch.StackFrameDescriptorImpl; //导入依赖的package包/类
private void updateFrameList(ThreadReferenceProxyImpl thread) {
  try {
    if(!getSuspendContext().getDebugProcess().getSuspendManager().isSuspended(thread)) {
      return;
    }
  }
  catch (ObjectCollectedException e) {
    return;
  }
  
  final EvaluationContextImpl evaluationContext = getDebuggerContext().createEvaluationContext();
  final List<StackFrameDescriptorImpl> descriptors = new ArrayList<StackFrameDescriptorImpl>();

  synchronized (myFramesList) {
    final DefaultListModel model = myFramesList.getModel();
    final int size = model.getSize();
    for (int i = 0; i < size; i++) {
      final Object elem = model.getElementAt(i);
      if (elem instanceof StackFrameDescriptorImpl) {
        descriptors.add((StackFrameDescriptorImpl)elem);
      }
    }
  }

  for (StackFrameDescriptorImpl descriptor : descriptors) {
    descriptor.setContext(evaluationContext);
    descriptor.updateRepresentation(evaluationContext, DescriptorLabelListener.DUMMY_LISTENER);
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:30,代码来源:FramesPanel.java

示例15: contextAction

import com.intellij.debugger.ui.impl.watch.StackFrameDescriptorImpl; //导入依赖的package包/类
public void contextAction() throws Exception {
  final StackFrameDescriptorImpl descriptor = new StackFrameDescriptorImpl(myFrame, myTracker);
  descriptor.setContext(myEvaluationContext);
  descriptor.updateRepresentation(myEvaluationContext, DescriptorLabelListener.DUMMY_LISTENER);
  final Project project = getProject();
  DebuggerInvocationUtil.swingInvokeLater(project, new Runnable() {
    public void run() {
      try {
        myFramesListener.setEnabled(false);
        synchronized (myFramesList) {
          final DefaultListModel model = myFramesList.getModel();
          if (myFramesLastUpdateTime < myTimestamp) {
            myFramesLastUpdateTime = myTimestamp;
            model.clear();
          }
          if (myTimestamp != myFramesLastUpdateTime) {
            return;  // the command has expired
          }
          final boolean shouldHide = !myShowLibraryFrames && !myIsContextFrame && myIndexToInsert != 0 && (descriptor.isSynthetic() || descriptor.isInLibraryContent());
          if (!shouldHide) {
            myCounter.markCalculated(myIndexToInsert);
            final int actualIndex = myCounter.getActualIndex(myIndexToInsert);
            model.insertElementAt(descriptor, actualIndex);
            if (myIsContextFrame) {
              myFramesList.setSelectedIndex(actualIndex);
            }
          }
        }
      }
      finally {
        myFramesListener.setEnabled(true);
      }
    }
  });
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:36,代码来源:FramesPanel.java


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