本文整理汇总了Java中com.intellij.xdebugger.XDebuggerBundle类的典型用法代码示例。如果您正苦于以下问题:Java XDebuggerBundle类的具体用法?Java XDebuggerBundle怎么用?Java XDebuggerBundle使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XDebuggerBundle类属于com.intellij.xdebugger包,在下文中一共展示了XDebuggerBundle类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: evaluateAndAct
import com.intellij.xdebugger.XDebuggerBundle; //导入依赖的package包/类
private static void evaluateAndAct(Project project,
JavaStackFrame stackFrame,
StringBuilder sb,
XDebuggerEvaluator.XEvaluationCallback callback) {
XDebuggerEvaluator evaluator = stackFrame.getEvaluator();
if (evaluator != null) {
evaluator.evaluate(XExpressionImpl.fromText(sb.toString(), EvaluationMode.CODE_FRAGMENT),
callback,
stackFrame.getSourcePosition());
}
else {
Messages.showMessageDialog(project, XDebuggerBundle.message("xdebugger.evaluate.stack.frame.has.not.evaluator"),
UIUtil.removeMnemonic(ActionsBundle.actionText(DebuggerActions.POP_FRAME)),
Messages.getErrorIcon());
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:17,代码来源:PopFrameAction.java
示例2: CodeFragmentInputComponent
import com.intellij.xdebugger.XDebuggerBundle; //导入依赖的package包/类
public CodeFragmentInputComponent(final @NotNull Project project,
@NotNull XDebuggerEditorsProvider editorsProvider,
final @Nullable XSourcePosition sourcePosition,
@Nullable XExpression statements,
String splitterProportionKey,
Disposable parentDisposable) {
super(XDebuggerBundle.message("dialog.title.evaluate.code.fragment"));
myMultilineEditor = new XDebuggerExpressionEditor(project, editorsProvider, "evaluateCodeFragment", sourcePosition,
statements != null ? statements : XExpressionImpl.EMPTY_CODE_FRAGMENT, true);
myMainPanel = new JPanel(new BorderLayout());
JPanel editorPanel = new JPanel(new BorderLayout());
editorPanel.add(myMultilineEditor.getComponent(), BorderLayout.CENTER);
DefaultActionGroup group = new DefaultActionGroup();
group.add(new HistoryNavigationAction(false, IdeActions.ACTION_PREVIOUS_OCCURENCE, parentDisposable));
group.add(new HistoryNavigationAction(true, IdeActions.ACTION_NEXT_OCCURENCE, parentDisposable));
editorPanel.add(ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, group, false).getComponent(), BorderLayout.EAST);
//myMainPanel.add(new JLabel(XDebuggerBundle.message("xdebugger.label.text.code.fragment")), BorderLayout.NORTH);
myMainPanel.add(editorPanel, BorderLayout.CENTER);
if (statements != null) {
myMultilineEditor.setExpression(statements);
}
mySplitterProportionKey = splitterProportionKey;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:24,代码来源:CodeFragmentInputComponent.java
示例3: perform
import com.intellij.xdebugger.XDebuggerBundle; //导入依赖的package包/类
@Override
protected void perform(XValueNodeImpl node, @NotNull String nodeName, AnActionEvent e) {
XReferrersProvider referrersProvider = node.getValueContainer().getReferrersProvider();
if (referrersProvider != null) {
XDebuggerTree tree = node.getTree();
XDebugSession session = XDebuggerManager.getInstance(tree.getProject()).getCurrentSession();
if (session != null) {
XInspectDialog dialog = new XInspectDialog(tree.getProject(),
tree.getEditorsProvider(),
tree.getSourcePosition(),
nodeName,
referrersProvider.getReferringObjectsValue(),
tree.getValueMarkers(), session, false);
dialog.setTitle(XDebuggerBundle.message("showReferring.dialog.title", nodeName));
dialog.show();
}
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:19,代码来源:ShowReferringObjectsAction.java
示例4: computeChildren
import com.intellij.xdebugger.XDebuggerBundle; //导入依赖的package包/类
@Override
public void computeChildren(@NotNull final XCompositeNode node) {
myDialog.startEvaluation(new XEvaluationCallbackBase() {
@Override
public void evaluated(@NotNull final XValue result) {
String name = UIUtil.removeMnemonic(XDebuggerBundle.message("xdebugger.evaluate.result"));
node.addChildren(XValueChildrenList.singleton(name, result), true);
myDialog.evaluationDone();
}
@Override
public void errorOccurred(@NotNull final String errorMessage) {
node.setErrorMessage(errorMessage);
myDialog.evaluationDone();
}
});
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:EvaluatingExpressionRootNode.java
示例5: initSession
import com.intellij.xdebugger.XDebuggerBundle; //导入依赖的package包/类
@Override
protected void initSession(XDebugSession session, RunProfileState state, Executor executor) {
XDebugSessionTab tab = ((XDebugSessionImpl)session).getSessionTab();
if (tab != null) {
RunnerLayoutUi ui = tab.getUi();
ContentManager contentManager = ui.getContentManager();
Content content = findContent(contentManager, XDebuggerBundle.message("debugger.session.tab.watches.title"));
if (content != null) {
contentManager.removeContent(content, true);
}
content = findContent(contentManager, XDebuggerBundle.message("debugger.session.tab.console.content.name"));
if (content != null) {
contentManager.removeContent(content, true);
}
initEduConsole(session, ui);
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:PyEduDebugRunner.java
示例6: initEduConsole
import com.intellij.xdebugger.XDebuggerBundle; //导入依赖的package包/类
private static void initEduConsole(@NotNull final XDebugSession session,
@NotNull final RunnerLayoutUi ui) {
Project project = session.getProject();
final Sdk sdk = PythonSdkType.findPythonSdk(ModuleManager.getInstance(project).getModules()[0]);
final PythonDebugLanguageConsoleView view = new PythonDebugLanguageConsoleView(project, sdk);
final ProcessHandler processHandler = session.getDebugProcess().getProcessHandler();
view.attachToProcess(processHandler);
view.addMessageFilter(new PythonTracebackFilter(project));
view.addMessageFilter(new UrlFilter());
view.enableConsole(false);
Content eduConsole =
ui.createContent("EduConsole", view.getComponent(),
XDebuggerBundle.message("debugger.session.tab.console.content.name"),
AllIcons.Debugger.ToolConsole, view.getPreferredFocusableComponent());
eduConsole.setCloseable(false);
ui.addContent(eduConsole, 0, PlaceInGrid.right, false);
PyDebugProcess process = (PyDebugProcess)session.getDebugProcess();
PyDebugRunner.initDebugConsoleView(project, process, view, processHandler, session);
patchLeftToolbar(session, ui);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:26,代码来源:PyEduDebugRunner.java
示例7: showProgress
import com.intellij.xdebugger.XDebuggerBundle; //导入依赖的package包/类
public void showProgress() {
if (evaluated || session.isStopped()) return;
new Task.Backgroundable(session.getProject(), XDebuggerBundle.message("load.value.task.text")) {
@Override
public void run(@NotNull ProgressIndicator indicator) {
indicator.setIndeterminate(true);
int i = 0;
while (!canceled && !evaluated) {
indicator.checkCanceled();
indicator.setFraction(((i++) % 100) * 0.01);
semaphore.waitFor(300);
}
}
@Override
public boolean shouldStartInBackground() {
return false;
}
@Override
public void onCancel() {
canceled = true;
}
}.queue();
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:27,代码来源:XFetchValueActionBase.java
示例8: DebuggerSessionTabBase
import com.intellij.xdebugger.XDebuggerBundle; //导入依赖的package包/类
public DebuggerSessionTabBase(@NotNull Project project, @NotNull String runnerId, @NotNull final String sessionName,
@NotNull GlobalSearchScope searchScope) {
super(project, searchScope);
Disposer.register(project, this);
myManager = new LogFilesManager(project, this, this);
mySessionName = sessionName;
myUi = RunnerLayoutUi.Factory.getInstance(project).create(
runnerId, XDebuggerBundle.message("xdebugger.default.content.title"), sessionName, this);
myUi.getDefaults()
.initTabDefaults(0, XDebuggerBundle.message("xdebugger.debugger.tab.title"), null)
.initFocusContent(DebuggerContentInfo.FRAME_CONTENT, XDebuggerUIConstants.LAYOUT_VIEW_BREAKPOINT_CONDITION)
.initFocusContent(DebuggerContentInfo.CONSOLE_CONTENT, LayoutViewOptions.STARTUP, new LayoutAttractionPolicy.FocusOnce(false));
}
开发者ID:lshain-android-source,项目名称:tools-idea,代码行数:17,代码来源:DebuggerSessionTabBase.java
示例9: createLayout
import com.intellij.xdebugger.XDebuggerBundle; //导入依赖的package包/类
@RequiredUIAccess
@Nonnull
@Override
protected Component createLayout(PropertyBuilder propertyBuilder) {
XDebuggerGeneralSettings settings = XDebuggerSettingManagerImpl.getInstanceImpl().getGeneralSettings();
VerticalLayout layout = VerticalLayout.create();
CheckBox focusAppOnBreakpointCheckbox = CheckBox.create(XDebuggerBundle.message("setting.focus.app.on.breakpoint.label"));
layout.add(focusAppOnBreakpointCheckbox);
propertyBuilder.add(focusAppOnBreakpointCheckbox, settings::isMayBringFrameToFrontOnBreakpoint, settings::setMayBringFrameToFrontOnBreakpoint);
CheckBox showDebugWindowOnBreakpointCheckbox = CheckBox.create(XDebuggerBundle.message("settings.show.window.label"));
layout.add(showDebugWindowOnBreakpointCheckbox);
propertyBuilder.add(showDebugWindowOnBreakpointCheckbox, settings::isShowDebuggerOnBreakpoint, settings::setShowDebuggerOnBreakpoint);
CheckBox hideWindowCheckBox = CheckBox.create(XDebuggerBundle.message("setting.hide.window.label"));
layout.add(hideWindowCheckBox);
propertyBuilder.add(hideWindowCheckBox, settings::isHideDebuggerOnProcessTermination, settings::setHideDebuggerOnProcessTermination);
CheckBox scrollToCenterCheckbox = CheckBox.create(XDebuggerBundle.message("settings.scroll.to.center"));
layout.add(scrollToCenterCheckbox);
propertyBuilder.add(scrollToCenterCheckbox, settings::isScrollToCenter, settings::setScrollToCenter);
return layout;
}
开发者ID:consulo,项目名称:consulo,代码行数:25,代码来源:XDebuggerGeneralConfigurable.java
示例10: CodeFragmentInputComponent
import com.intellij.xdebugger.XDebuggerBundle; //导入依赖的package包/类
public CodeFragmentInputComponent(final @Nonnull Project project,
@Nonnull XDebuggerEditorsProvider editorsProvider,
final @Nullable XSourcePosition sourcePosition,
@Nullable XExpression statements,
String splitterProportionKey,
Disposable parentDisposable) {
super(XDebuggerBundle.message("dialog.title.evaluate.code.fragment"));
myMultilineEditor = new XDebuggerExpressionEditor(project, editorsProvider, "evaluateCodeFragment", sourcePosition,
statements != null ? statements : XExpressionImpl.EMPTY_CODE_FRAGMENT, true, true, false);
myMainPanel = new JPanel(new BorderLayout());
JPanel editorPanel = new JPanel(new BorderLayout());
editorPanel.add(myMultilineEditor.getComponent(), BorderLayout.CENTER);
DefaultActionGroup group = new DefaultActionGroup();
group.add(new HistoryNavigationAction(false, IdeActions.ACTION_PREVIOUS_OCCURENCE, parentDisposable));
group.add(new HistoryNavigationAction(true, IdeActions.ACTION_NEXT_OCCURENCE, parentDisposable));
editorPanel.add(ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, group, false).getComponent(), BorderLayout.EAST);
//myMainPanel.add(new JLabel(XDebuggerBundle.message("xdebugger.label.text.code.fragment")), BorderLayout.NORTH);
myMainPanel.add(editorPanel, BorderLayout.CENTER);
if (statements != null) {
myMultilineEditor.setExpression(statements);
}
mySplitterProportionKey = splitterProportionKey;
}
开发者ID:consulo,项目名称:consulo,代码行数:24,代码来源:CodeFragmentInputComponent.java
示例11: computeChildren
import com.intellij.xdebugger.XDebuggerBundle; //导入依赖的package包/类
@Override
public void computeChildren(@Nonnull final XCompositeNode node) {
myDialog.startEvaluation(new XEvaluationCallbackBase() {
@Override
public void evaluated(@Nonnull final XValue result) {
String name = UIUtil.removeMnemonic(XDebuggerBundle.message("xdebugger.evaluate.result"));
node.addChildren(XValueChildrenList.singleton(name, result), true);
myDialog.evaluationDone();
}
@Override
public void errorOccurred(@Nonnull final String errorMessage) {
node.setErrorMessage(errorMessage);
myDialog.evaluationDone();
}
});
}
开发者ID:consulo,项目名称:consulo,代码行数:18,代码来源:EvaluatingExpressionRootNode.java
示例12: XInspectDialog
import com.intellij.xdebugger.XDebuggerBundle; //导入依赖的package包/类
public XInspectDialog(@Nonnull Project project,
XDebuggerEditorsProvider editorsProvider,
XSourcePosition sourcePosition,
@Nonnull String name,
@Nonnull XValue value,
XValueMarkers<?, ?> markers) {
super(project, false);
setTitle(XDebuggerBundle.message("inspect.value.dialog.title", name));
setModal(false);
Pair<XValue, String> initialItem = Pair.create(value, name);
XDebuggerTreeCreator creator = new XDebuggerTreeCreator(project, editorsProvider, sourcePosition, markers);
myDebuggerTreePanel = new DebuggerTreeWithHistoryPanel<Pair<XValue, String>>(initialItem, creator, project);
init();
}
开发者ID:consulo,项目名称:consulo,代码行数:17,代码来源:XInspectDialog.java
示例13: createVariablesContent
import com.intellij.xdebugger.XDebuggerBundle; //导入依赖的package包/类
private Content createVariablesContent(@Nonnull XDebugSessionImpl session) {
XVariablesView variablesView;
if (myWatchesInVariables) {
variablesView = myWatchesView = new XWatchesViewImpl(session, myWatchesInVariables);
}
else {
variablesView = new XVariablesView(session);
}
registerView(DebuggerContentInfo.VARIABLES_CONTENT, variablesView);
Content result =
myUi.createContent(DebuggerContentInfo.VARIABLES_CONTENT, variablesView.getPanel(), XDebuggerBundle.message("debugger.session.tab.variables.title"),
AllIcons.Debugger.Value, null);
result.setCloseable(false);
ActionGroup group = getCustomizedActionGroup(XDebuggerActions.VARIABLES_TREE_TOOLBAR_GROUP);
result.setActions(group, ActionPlaces.DEBUGGER_TOOLBAR, variablesView.getTree());
return result;
}
开发者ID:consulo,项目名称:consulo,代码行数:19,代码来源:XDebugSessionTab.java
示例14: update
import com.intellij.xdebugger.XDebuggerBundle; //导入依赖的package包/类
@Override
public boolean update(final DnDEvent aEvent) {
Object object = aEvent.getAttachedObject();
boolean possible = false;
if (object instanceof XValueNodeImpl[]) {
possible = true;
// do not add new watch if node is dragged to itself
if (((XValueNodeImpl[])object).length == 1) {
Point point = aEvent.getPoint();
XDebuggerTree tree = getTree();
TreePath path = tree.getClosestPathForLocation(point.x, point.y);
if (path != null && path.getLastPathComponent() == ((XValueNodeImpl[])object)[0]) {
// the same item is under pointer, filter out place below the tree
Rectangle pathBounds = tree.getPathBounds(path);
possible = pathBounds != null && pathBounds.y + pathBounds.height < point.y;
}
}
}
else if (object instanceof EventInfo) {
possible = ((EventInfo)object).getTextForFlavor(DataFlavor.stringFlavor) != null;
}
aEvent.setDropPossible(possible, XDebuggerBundle.message("xdebugger.drop.text.add.to.watches"));
return true;
}
开发者ID:consulo,项目名称:consulo,代码行数:27,代码来源:XWatchesViewImpl.java
示例15: getCurrentStateMessage
import com.intellij.xdebugger.XDebuggerBundle; //导入依赖的package包/类
@Override
public String getCurrentStateMessage()
{
if(myVm == null)
{
return XDebuggerBundle.message("debugger.state.message.disconnected");
}
else
{
if(myVm.isAttached())
{
return "Attached";
}
else
{
String disconnectReason = myVm.getDisconnectReason();
if(disconnectReason == null)
{
return XDebuggerBundle.message("debugger.state.message.disconnected");
}
return "Disconnected: " + disconnectReason;
}
}
}
开发者ID:consulo,项目名称:consulo-javascript,代码行数:25,代码来源:V8DebugProcess.java
示例16: evaluateAndReturn
import com.intellij.xdebugger.XDebuggerBundle; //导入依赖的package包/类
private static void evaluateAndReturn(final Project project,
final JavaStackFrame stackFrame,
final DebugProcessImpl debugProcess,
XExpression expression,
final DialogWrapper dialog) {
XDebuggerEvaluator evaluator = stackFrame.getEvaluator();
if (evaluator != null) {
evaluator.evaluate(expression,
new XDebuggerEvaluator.XEvaluationCallback() {
@Override
public void evaluated(@NotNull XValue result) {
if (result instanceof JavaValue) {
forceEarlyReturnWithFinally(((JavaValue)result).getDescriptor().getValue(),
stackFrame,
debugProcess,
dialog);
}
}
@Override
public void errorOccurred(@NotNull final String errorMessage) {
showError(project, DebuggerBundle.message("error.unable.to.evaluate.expression") + ": " + errorMessage);
}
}, stackFrame.getSourcePosition());
}
else {
showError(project, XDebuggerBundle.message("xdebugger.evaluate.stack.frame.has.not.evaluator"));
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:30,代码来源:ForceEarlyReturnAction.java
示例17: registerConsoleContent
import com.intellij.xdebugger.XDebuggerBundle; //导入依赖的package包/类
/**
* Registers tab for the given {@code console}.
*
* @param console {@code ExecutionConsole} instance
* @param ui {@code RunnerLayoutUi} instance
* @return registered {@code Content} instance
*/
@NotNull
public Content registerConsoleContent(@NotNull RunnerLayoutUi ui, @NotNull ExecutionConsole console) {
Content content = ui.createContent(DebuggerContentInfo.CONSOLE_CONTENT, console.getComponent(),
XDebuggerBundle.message("debugger.session.tab.console.content.name"),
AllIcons.Debugger.Console,
console.getPreferredFocusableComponent());
content.setCloseable(false);
ui.addContent(content, 1, PlaceInGrid.bottom, false);
return content;
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:18,代码来源:XDebugTabLayouter.java
示例18: customizePresentation
import com.intellij.xdebugger.XDebuggerBundle; //导入依赖的package包/类
/**
* Customize presentation of the stack frame in frames list
* @param component component
*/
public void customizePresentation(@NotNull ColoredTextContainer component) {
XSourcePosition position = getSourcePosition();
if (position != null) {
component.append(position.getFile().getName(), SimpleTextAttributes.REGULAR_ATTRIBUTES);
component.append(":" + (position.getLine() + 1), SimpleTextAttributes.REGULAR_ATTRIBUTES);
component.setIcon(AllIcons.Debugger.StackFrame);
}
else {
component.append(XDebuggerBundle.message("invalid.frame"), SimpleTextAttributes.ERROR_ATTRIBUTES);
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:16,代码来源:XStackFrame.java
示例19: createDraggedImage
import com.intellij.xdebugger.XDebuggerBundle; //导入依赖的package包/类
@Override
public Pair<Image, Point> createDraggedImage(final DnDAction action, final Point dragOrigin) {
XValueNodeImpl[] nodes = getNodesToDrag();
if (nodes.length == 1) {
return DnDAwareTree.getDragImage(myTree, nodes[0].getPath(), dragOrigin);
}
return DnDAwareTree.getDragImage(myTree, XDebuggerBundle.message("xdebugger.drag.text.0.elements", nodes.length), dragOrigin);
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:9,代码来源:XDebuggerTreePanel.java
示例20: errorOccurred
import com.intellij.xdebugger.XDebuggerBundle; //导入依赖的package包/类
@Override
public void errorOccurred(@NotNull String errorMessage) {
try {
String message = XDebuggerBundle.message("load.value.task.error", errorMessage);
XDebugSessionImpl.NOTIFICATION_GROUP.createNotification(message, NotificationType.ERROR).notify(myNode.getTree().getProject());
}
finally {
evaluationComplete(errorMessage);
}
}
开发者ID:jskierbi,项目名称:intellij-ce-playground,代码行数:11,代码来源:HeadlessValueEvaluationCallback.java
注:本文中的com.intellij.xdebugger.XDebuggerBundle类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论