如何以编程方式禁用有关Eclipse中的Debug Perspective模式切换的提示?

时间:2019-06-05 12:08:48

标签: eclipse debugging eclipse-plugin perspective

@Override
public void createInitialLayout(IPageLayout layout) {

    String editor = layout.getEditorArea();
    layout.setEditorAreaVisible(true);
    layout.addView(VIEW_EXLPORER, IPageLayout.LEFT, 0.20f, editor);
    layout.getViewLayout(VIEW_EXLPORER).setCloseable(false);

    IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, 0.80f, editor);
    bottom.addView(VIEW_PROGRESS);

    bottom.addView(IPageLayout.ID_TASK_LIST);
    bottom.addView(IPageLayout.ID_OUTLINE);
    bottom.addView(IPageLayout.ID_PROBLEM_VIEW);   

    //shows debug view area here        
    layout.addView("org.eclipse.debug.ui.DebugView", IPageLayout.LEFT, (float) 0.40, layout.getEditorArea());

}

从我的代码中可以看到,我已经在我的自定义透视图中拥有了调试视图,但是当我自动开始调试时,eclipse一直提示我切换到调试透视图,我希望以编程方式避免这种情况,因为我现在确实想使我的用户困惑

有什么方法可以追踪吗?

1 个答案:

答案 0 :(得分:0)

您可以尝试使用DebugUITools.setLaunchPerspective来使提示打开您的自定义透视图,而不是默认视图,或者完全禁用该提示。

通过其Javadoc:

/**
 * Sets the perspective to switch to when a configuration of the given type
 * is launched in the given mode. <code>PERSPECTIVE_NONE</code> indicates no
 * perspective switch should take place. <code>PERSPECTIVE_DEFAULT</code> indicates
 * a default perspective switch should take place, as defined by the associated
 * launch tab group extension.
 *
 * In 3.3 this method is equivalent to calling <code>setLaunchPerspective(ILaunchConfigurationType type, Set modes, ILaunchDelegate delegate, String perspectiveid)</code>,
 * with the parameter 'mode' used in the set modes, and null passed as the delegate
 *
 * @param type launch configuration type
 * @param mode launch mode identifier
 * @param perspective identifier, <code>PERSPECTIVE_NONE</code>, or
 *   <code>PERSPECTIVE_DEFAULT</code>
 * @since 3.0
 */
相关问题