本文整理汇总了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;
}
示例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;
}
}
}
}
}
示例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;
}
示例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);
}
}
示例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);
}
示例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;
}
示例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;
}
示例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);
}
}
}
示例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);
}
示例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;
}
示例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();
}
示例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();
}
示例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());
}
}
示例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);
}
}
示例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);
}
}
});
}