-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
90 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 75 additions & 0 deletions
75
...sto.bragg.nbi.ui/src/au/gov/ansto/bragg/nbi/ui/internal/ControlExperimentPerspective.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
/******************************************************************************* | ||
* Copyright (c) 2007 Australian Nuclear Science and Technology Organisation. | ||
* All rights reserved. This program and the accompanying materials | ||
* are made available under the terms of the Eclipse Public License v1.0 | ||
* which accompanies this distribution, and is available at | ||
* http://www.eclipse.org/legal/epl-v10.html | ||
* | ||
* Contributors: | ||
* Norman Xiong (Bragg Institute) - initial API and implementation | ||
*******************************************************************************/ | ||
package au.gov.ansto.bragg.nbi.ui.internal; | ||
|
||
import org.eclipse.ui.IPageLayout; | ||
import org.eclipse.ui.IPerspectiveFactory; | ||
|
||
public class ControlExperimentPerspective implements IPerspectiveFactory { | ||
|
||
public static final String CONTROL_EXPERIMENT_PERSPECTIVE_ID = "au.gov.ansto.bragg.nbi.ui.ControlExperimentPerspective"; | ||
public static final String CONTROL_TABLE_VIEW_ID = "org.gumtree.control.ui.ControlTableView"; | ||
public static final String CONTROL_BATCH_RUNNER_VIEW_ID = "org.gumtree.control.ui.batchScriptManagerView"; | ||
public static final String CONTROL_TERMINAL_VIEW_ID = "org.gumtree.control.ui.ControlTerminalView"; | ||
public static final String PROJECT_EXPLORER_VIEW_ID = "org.eclipse.ui.navigator.ProjectExplorer"; | ||
public static final String ID_VIEW_ACTIVITY_MONITOR = "au.gov.ansto.bragg.nbi.ui.SicsRealtimeDataView"; | ||
|
||
public void createInitialLayout(final IPageLayout factory) { | ||
factory.addShowViewShortcut(CONTROL_BATCH_RUNNER_VIEW_ID); | ||
factory.addShowViewShortcut(CONTROL_TERMINAL_VIEW_ID); | ||
factory.addShowViewShortcut(PROJECT_EXPLORER_VIEW_ID); | ||
|
||
factory.addPerspectiveShortcut(CONTROL_EXPERIMENT_PERSPECTIVE_ID); | ||
|
||
// IFolderLayout bottomRight = | ||
// factory.createFolder( | ||
// "bottomRight", //NON-NLS-1 | ||
// IPageLayout.BOTTOM, | ||
// 0.70f, | ||
// factory.getEditorArea()); | ||
// bottomRight.addView(CONTROL_TERMINAL_VIEW_ID); | ||
factory.addView(CONTROL_TERMINAL_VIEW_ID, IPageLayout.BOTTOM, 0.70f, factory.getEditorArea()); | ||
|
||
// IFolderLayout bottomLeft = | ||
// factory.createFolder( | ||
// "bottomLeft", //NON-NLS-1 | ||
// IPageLayout.LEFT, | ||
// 0.33f, | ||
// "bottomRight"); | ||
// bottomLeft.addView(PROJECT_EXPLORER_VIEW_ID); | ||
factory.addStandaloneView(PROJECT_EXPLORER_VIEW_ID, false, IPageLayout.LEFT, 0.33f, CONTROL_TERMINAL_VIEW_ID); | ||
|
||
// IFolderLayout right = | ||
// factory.createFolder( | ||
// "right", | ||
// IPageLayout.RIGHT, | ||
// 0.50f, | ||
// factory.getEditorArea()); | ||
// right.addView(CONTROL_BATCH_RUNNER_VIEW_ID); | ||
factory.addStandaloneView(CONTROL_BATCH_RUNNER_VIEW_ID, false, IPageLayout.RIGHT, 0.4f, factory.getEditorArea()); | ||
|
||
factory.addStandaloneView(CONTROL_TABLE_VIEW_ID, false, IPageLayout.RIGHT, 0.4f, factory.getEditorArea()); | ||
|
||
factory.addStandaloneView(ID_VIEW_ACTIVITY_MONITOR, false, IPageLayout.RIGHT, 0.50f, CONTROL_TERMINAL_VIEW_ID); | ||
|
||
factory.setEditorAreaVisible(false); | ||
factory.getViewLayout(CONTROL_TERMINAL_VIEW_ID).setCloseable(false); | ||
factory.getViewLayout(CONTROL_TERMINAL_VIEW_ID).setMoveable(false); | ||
// factory.getViewLayout("bottomLeft").setMoveable(false); | ||
// factory.getViewLayout("bottomLeft").setCloseable(false); | ||
// factory.getViewLayout("right").setMoveable(false); | ||
// factory.getViewLayout("right").setCloseable(false); | ||
|
||
factory.setFixed(true); | ||
} | ||
|
||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters