package org.eclipse.blockchain.ui.perspective; | |
import org.eclipse.ui.IFolderLayout; | |
import org.eclipse.ui.IPageLayout; | |
import org.eclipse.ui.IPerspectiveFactory; | |
/** | |
* @author PKI8COB | |
*/ | |
public class BlockChainPerspectiveFactory implements IPerspectiveFactory { | |
/** | |
* The id of the Blockchain perspective | |
*/ | |
public static final String BLOCKCHAIN_PERSPECTIVE = "org.eclipse.blockchain.ui.perspective"; | |
public static final String RUN_TIME_VIEWID = "org.eclipse.blockchain.ui.runtimeView"; | |
public static final String TRANSACTION_VIEWID = "org.eclipse.blockchain.ui.transactionView"; | |
public static final String COMPILE_TIME_VIEWID = "org.eclipse.blockchain.ui.compileView"; | |
public static final String CONSOLE_VIEW = "org.eclipse.ui.console.ConsoleView"; | |
public static final String SERVER_VIEW = "org.eclipse.wst.server.ui.ServersView"; | |
public static final String ERROR_LOG_VIEW = "org.eclipse.pde.runtime.LogView"; | |
private final String TRANSACTION_VIEW_ID = "org.eclipse.blockchain.ui.TransactionHistoryView"; | |
/** | |
* {@inheritDoc} | |
*/ | |
@Override | |
public void createInitialLayout(final IPageLayout layout) { | |
String editorArea = layout.getEditorArea(); | |
IFolderLayout left = layout.createFolder("left", IPageLayout.LEFT, 0.25f, editorArea); | |
left.addView(IPageLayout.ID_PROJECT_EXPLORER); | |
IFolderLayout rightLayout = layout.createFolder("rightLayout", IPageLayout.RIGHT, 0.75f, editorArea); | |
rightLayout.addView(COMPILE_TIME_VIEWID); | |
rightLayout.addPlaceholder(IPageLayout.ID_TASK_LIST); | |
// Add View in the bottom area in separate way | |
layout.addView(TRANSACTION_VIEWID, IPageLayout.RIGHT, 0.65f, editorArea); | |
IFolderLayout bottom = layout.createFolder("bottom", IPageLayout.BOTTOM, 0.75f, editorArea); | |
bottom.addView(CONSOLE_VIEW); | |
bottom.addView(SERVER_VIEW); | |
bottom.addView(ERROR_LOG_VIEW); | |
bottom.addView(this.TRANSACTION_VIEW_ID); | |
} | |
} |