2016-09-14 127 views
0

我已經創建了一個實現自定義控制檯的eclipse插件,並且在此控制檯視圖中,我製作了一個按鈕,用於在按下按鈕時終止進程。 現在我想讓這個按鈕位於所有控制檯的按鈕之前。 我知道我必須修改我的location URI,但我找不到用於?before=的值。 你能幫我告訴我這是什麼價值嗎? 這就是按鈕現在的位置,我希望它在所有按鈕之前。它是紅色的XEclipse自定義控制檯按鈕位置

This is the termination button

回答

1

ConsoleView視圖工具欄是這樣創建的:

protected void configureToolBar(IToolBarManager mgr) { 
    mgr.add(new Separator(IConsoleConstants.LAUNCH_GROUP)); 
    mgr.add(new Separator(IConsoleConstants.OUTPUT_GROUP)); 
    mgr.add(new Separator("fixedGroup")); 
    ... 

所以,你的前值應該可能是IConsoleConstants.LAUNCH_GROUP的值,它是launchGroup

/** 
* Menu group identifier for the console view context menu and toolbar, for actions pertaining to 
* launching (value <code>"launchGroup"</code>). 
*/ 
public static final String LAUNCH_GROUP = "launchGroup"; 

/** 
* Menu group identifier for the console view context menu and toolbar, for actions pertaining to 
* console output. (value<code>"outputGroup"</code>). 
*/ 
public static final String OUTPUT_GROUP = "outputGroup"; 
+0

是的!謝謝! – Justplayit94