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


Java DebuggerTreeNodeImpl.getDescriptor方法代码示例

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


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

示例1: actionPerformed

import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl; //导入方法依赖的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

示例2: update

import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl; //导入方法依赖的package包/类
public void update(AnActionEvent e) {
  DebuggerTreeNodeImpl[] selectedNodes = getSelectedNodes(e.getDataContext());

  boolean visible = false;
  boolean enabled = false;
  String text = DebuggerBundle.message("action.resume.thread.text.resume");

  if(selectedNodes != null && selectedNodes.length > 0){
    visible = true;
    enabled = true;
    for (DebuggerTreeNodeImpl selectedNode : selectedNodes) {
      final NodeDescriptorImpl threadDescriptor = selectedNode.getDescriptor();
      if (!(threadDescriptor instanceof ThreadDescriptorImpl) || !((ThreadDescriptorImpl)threadDescriptor).isSuspended()) {
        visible = false;
        break;
      }
    }
  }
  final Presentation presentation = e.getPresentation();
  presentation.setText(text);
  presentation.setVisible(visible);
  presentation.setEnabled(enabled);
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:ResumeThreadAction.java

示例3: actionPerformed

import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl; //导入方法依赖的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

示例4: update

import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl; //导入方法依赖的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

示例5: actionPerformed

import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl; //导入方法依赖的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

示例6: getStackFrameProxy

import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl; //导入方法依赖的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

示例7: addContainerChildren

import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl; //导入方法依赖的package包/类
private void addContainerChildren(@NotNull DebuggerTreeNodeImpl node, int startIndex) {
  ContainerDescriptorImpl containerDescriptor = (ContainerDescriptorImpl)node.getDescriptor();
  List<Instance> instances = containerDescriptor.getInstances();
  List<HprofFieldDescriptorImpl> descriptors = new ArrayList<HprofFieldDescriptorImpl>(NODES_PER_EXPANSION);
  int currentIndex = startIndex;
  int limit = currentIndex + NODES_PER_EXPANSION;
  for (int loopCounter = currentIndex; loopCounter < instances.size() && currentIndex < limit; ++loopCounter) {
    Instance instance = instances.get(loopCounter);
    if (myHeap.getInstance(instance.getId()) != null) {
      descriptors.add(new InstanceFieldDescriptorImpl(
        myDebuggerTree.getProject(),
        new Field(Type.OBJECT, Integer.toString(currentIndex)),
        instance,
        currentIndex));
      ++currentIndex;
    }
  }
  HprofFieldDescriptorImpl.batchUpdateRepresentation(descriptors, myDebugProcess.getManagerThread(), myDummySuspendContext);
  for (HprofFieldDescriptorImpl descriptor : descriptors) {
    node.add(DebuggerTreeNodeImpl.createNodeNoUpdate(myDebuggerTree, descriptor));
  }
  if (currentIndex == limit) {
    node.add(DebuggerTreeNodeImpl.createNodeNoUpdate(myDebuggerTree, new ExpansionDescriptorImpl("instances", limit, instances.size())));
  }
}
 
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:InstancesTree.java

示例8: actionPerformed

import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl; //导入方法依赖的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

示例9: actionPerformed

import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl; //导入方法依赖的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

示例10: update

import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl; //导入方法依赖的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

示例11: actionPerformed

import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl; //导入方法依赖的package包/类
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:lshain-android-source,项目名称:tools-idea,代码行数:20,代码来源:JumpToObjectAction.java

示例12: update

import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl; //导入方法依赖的package包/类
public void update(final AnActionEvent e) {
  if(!isFirstStart(e)) {
    return;
  }

  final DebuggerContextImpl debuggerContext = getDebuggerContext(e.getDataContext());
  final DebugProcessImpl debugProcess = debuggerContext.getDebugProcess();
  if(debugProcess == null) {
    e.getPresentation().setVisible(false);
    return;
  }

  DebuggerTreeNodeImpl selectedNode = getSelectedNode(e.getDataContext());
  if(selectedNode == null) {
    e.getPresentation().setVisible(false);
    return;
  }

  final NodeDescriptorImpl descriptor = selectedNode.getDescriptor();
  if (descriptor instanceof ValueDescriptor) {
    debugProcess.getManagerThread().schedule(new EnableCommand(debuggerContext, (ValueDescriptor)descriptor, debugProcess, e));
  }
  else {
    e.getPresentation().setVisible(false);
  }
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:27,代码来源:JumpToObjectAction.java

示例13: getTipText

import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl; //导入方法依赖的package包/类
@Nullable
private String getTipText(DebuggerTreeNodeImpl node) {
  NodeDescriptorImpl descriptor = node.getDescriptor();
  if (descriptor instanceof ValueDescriptorImpl) {
    String text = ((ValueDescriptorImpl)descriptor).getValueLabel();
    if (text != null) {
      if (StringUtil.startsWithChar(text, '{') && text.indexOf('}') > 0) {
        int idx = text.indexOf('}');
        if (idx != text.length() - 1) {
          text = text.substring(idx + 1);
        }
      }

      if (StringUtil.startsWithChar(text, '\"') && StringUtil.endsWithChar(text, '\"')) {
        text = text.substring(1, text.length() - 1);
      }

      final String tipText = prepareToolTipText(text);
      if (!tipText.isEmpty() &&
          (tipText.indexOf('\n') >= 0 || !getVisibleRect().contains(getRowBounds(getRowForPath(new TreePath(node.getPath())))))) {
        return tipText;
      }
    }
  }
  return node.getMarkupTooltipText() != null? "" : null;
}
 
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:27,代码来源:DebuggerTreeBase.java

示例14: createNodeTitle

import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl; //导入方法依赖的package包/类
private static String createNodeTitle(String prefix, DebuggerTreeNodeImpl node)
{
	if(node != null)
	{
		DebuggerTreeNodeImpl parent = node.getParent();
		NodeDescriptorImpl descriptor = parent.getDescriptor();
		if(descriptor instanceof ValueDescriptorImpl && ((ValueDescriptorImpl) descriptor).isArray())
		{
			int index = parent.getIndex(node);
			return createNodeTitle(prefix, parent) + "[" + index + "]";
		}
		String name = (node.getDescriptor() != null) ? node.getDescriptor().getName() : null;
		return (name != null) ? prefix + " " + name : prefix;
	}
	return prefix;
}
 
开发者ID:consulo,项目名称:consulo-java,代码行数:17,代码来源:ArrayAction.java

示例15: actionPerformed

import com.intellij.debugger.ui.impl.watch.DebuggerTreeNodeImpl; //导入方法依赖的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:consulo,项目名称:consulo-java,代码行数:25,代码来源:JumpToObjectAction.java


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