将一个View放在堆栈中的Eclipse-plugin-dev打破了堆栈

时间:2014-12-12 04:28:53

标签: eclipse eclipse-rcp eclipse-plugin nodeclipse

Nodeclipse UI插件节点视角defines several Views

<extension
     point="org.eclipse.ui.perspectiveExtensions">
  <perspectiveExtension
        targetID="org.nodeclipse.ui.perspectives.NodePerspective">

喜欢的时候

        <view id="org.eclipse.debug.ui.DebugView" 
            relative="org.eclipse.ui.console.ConsoleView" 
            relationship="stack"/>              
        <view id="org.eclipse.tcf.te.ui.terminals.TerminalsView"
            relative="org.eclipse.debug.ui.DebugView"
            relationship="stack"/>
        <view id="winterwell.markdown.views.MarkdownPreview" 
            relative="org.eclipse.tcf.te.ui.terminals.TerminalsView" 
            relationship="stack"/>              
        <view id="org.eclipse.ui.views.ProblemView" 
            relative="winterwell.markdown.views.MarkdownPreview" 
            relationship="stack"/>   

没关系。结果是

3rd

但是当我想把TCF终端放在第一位时

        <view id="org.eclipse.ui.console.ConsoleView" 
            relative="org.eclipse.tcf.te.ui.terminals.TerminalsView" 
            relationship="stack"/>
        <view id="org.eclipse.debug.ui.DebugView" 
            relative="org.eclipse.ui.console.ConsoleView" 
            relationship="stack"/>              
        <view id="winterwell.markdown.views.MarkdownPreview" 
            relative="org.eclipse.debug.ui.DebugView" 
            relationship="stack"/>              
        <view id="org.eclipse.ui.views.ProblemView" 
            relative="winterwell.markdown.views.MarkdownPreview" 
            relationship="stack"/>   

它分解为右边的新epmty View,没有终端视图

enter image description here

更新:我试过

        <view id="org.eclipse.tcf.te.ui.terminals.TerminalsView"
             relative="org.eclipse.ui.editorss"
             relationship="bottom"/>
        <view id="org.eclipse.ui.console.ConsoleView" 
            relative="org.eclipse.tcf.te.ui.terminals.TerminalsView" 
            relationship="stack"/>
        <view id="org.eclipse.debug.ui.DebugView" 
            relative="org.eclipse.ui.console.ConsoleView" 
            relationship="stack"/>
        <view id="winterwell.markdown.views.MarkdownPreview" 
            relative="org.eclipse.debug.ui.DebugView" 
            relationship="stack"/>              
        <view id="org.eclipse.ui.views.ProblemView" 
            relative="winterwell.markdown.views.MarkdownPreview" 
            relationship="stack"/>   
        <view id="org.eclipse.pde.runtime.LogView" 
            relative="org.eclipse.ui.views.ProblemView" 
            relationship="stack"/>

由Uwe Stieber在https://bugs.eclipse.org/bugs/show_bug.cgi?id=454884#c3

中提供建议

但结果是将View堆栈放在编辑器下,而不是在South部分:

c3

1 个答案:

答案 0 :(得分:0)

后来由Uwe Stieber建议,使用NodePerspective.java

解决
    IFolderLayout rightBottom = factory.createFolder("rightBottom", IPageLayout.BOTTOM, 0.75f, factory.getEditorArea());// NON-NLS-1
    if (viewRegistry.find(ID_TERMINALS_VIEW) != null){
        rightBottom.addView(ID_TERMINALS_VIEW);        
    }
    rightBottom.addView(IConsoleConstants.ID_CONSOLE_VIEW);
    rightBottom.addView(ID_DEBUG_VIEW);
    if (viewRegistry.find(ID_MARKDOWN_VIEW) != null){
        rightBottom.addView(ID_MARKDOWN_VIEW); 
    }
    if (viewRegistry.find(ID_GFM_VIEW) != null){
        rightBottom.addView(ID_GFM_VIEW);        
    }
    rightBottom.addView(IPageLayout.ID_PROBLEM_VIEW);
    if (viewRegistry.find(ID_LOG_VIEW) != null){
        rightBottom.addView(ID_LOG_VIEW);        
    }