1 package com.generalrobotix.ui.grxui;
3 import org.eclipse.ui.IFolderLayout;
4 import org.eclipse.ui.IPageLayout;
5 import org.eclipse.ui.IPerspectiveFactory;
6 import org.eclipse.ui.IWorkbench;
7 import org.eclipse.ui.IWorkbenchPage;
8 import org.eclipse.ui.IWorkbenchWindow;
9 import org.eclipse.ui.PlatformUI;
10 import org.eclipse.jface.dialogs.MessageDialog;
11 import org.eclipse.swt.widgets.Display;
12 import org.eclipse.swt.widgets.Shell;
19 public static final String
ID =
"com.generalrobotix.ui.grxui.GrxUIPerspectiveFactory";
21 public static final String[]
views = {
22 "com.generalrobotix.ui.view.GrxItemViewPart",
23 "com.generalrobotix.ui.view.GrxJythonPromptViewPart",
24 "com.generalrobotix.ui.view.GrxORBMonitorViewPart",
25 "com.generalrobotix.ui.view.GrxProcessManagerViewPart",
26 "com.generalrobotix.ui.view.GrxServerManagerViewPart",
27 "com.generalrobotix.ui.view.GrxLoggerViewPart",
28 "com.generalrobotix.ui.view.GrxGraphViewPart",
29 "com.generalrobotix.ui.view.GrxPropertyViewPart",
30 "com.generalrobotix.ui.view.GrxRobotStatViewPart",
31 "com.generalrobotix.ui.view.Grx3DViewPart",
32 "com.generalrobotix.ui.view.GrxOpenHRPViewPart",
33 "com.generalrobotix.ui.view.GrxCollisionPairViewPart",
34 "com.generalrobotix.ui.view.GrxControllerViewPart",
35 "com.generalrobotix.ui.view.GrxTextEditorViewPart"};
40 IWorkbench workbench = PlatformUI.getWorkbench();
41 if( workbench !=
null){
42 IWorkbenchWindow activeWindow = workbench.getActiveWorkbenchWindow();
43 if(activeWindow !=
null){
44 IWorkbenchPage activePage = activeWindow.getActivePage();
45 if(activePage !=
null){
47 ret = activeWindow.getShell();
52 for( IWorkbenchWindow window : workbench.getWorkbenchWindows() ){
53 for(IWorkbenchPage page:window.getPages()){
55 ret = window.getShell();
65 System.out.println(
"INIT GrxUIPerspectiveFactory");
69 System.out.println(
"START GrxUIPerspectiveFactory");
72 String editorArea = layout.getEditorArea();
75 IFolderLayout top_folder = layout.createFolder(
"TopViews",
76 IPageLayout.TOP, (
float) 0.11f, editorArea);
77 IFolderLayout right_middle = layout.createFolder(
"RightMIDDLEViews",
78 IPageLayout.RIGHT, (
float) 0.6f, editorArea);
79 IFolderLayout middle = layout.createFolder(
"MiddleViews",
80 IPageLayout.BOTTOM, (
float) 0.4f, editorArea);
81 IFolderLayout top_left = layout.createFolder(
"TopLeftViews",
82 IPageLayout.LEFT, (
float) 0.6f, editorArea);
83 IFolderLayout top_right = layout.createFolder(
"TopRightViews",
84 IPageLayout.RIGHT, (
float) 0.35f,
"TopLeftViews");
86 top_folder.addView(
"com.generalrobotix.ui.view.GrxLoggerViewPart");
87 top_left.addView(
"com.generalrobotix.ui.view.GrxItemViewPart");
89 top_right.addView(
"com.generalrobotix.ui.view.GrxORBMonitorViewPart");
91 .addView(
"com.generalrobotix.ui.view.GrxProcessManagerViewPart");
93 .addView(
"com.generalrobotix.ui.view.GrxServerManagerViewPart");
96 right_middle.addView(
"com.generalrobotix.ui.view.GrxGraphViewPart");
97 right_middle.addView(
"com.generalrobotix.ui.view.GrxPropertyViewPart");
98 right_middle.addView(
"com.generalrobotix.ui.view.GrxRobotStatViewPart");
100 middle.addView(
"com.generalrobotix.ui.view.Grx3DViewPart");
101 middle.addView(
"com.generalrobotix.ui.view.GrxOpenHRPViewPart");
102 middle.addView(
"com.generalrobotix.ui.view.GrxControllerViewPart");
103 middle.addView(
"com.generalrobotix.ui.view.GrxCollisionPairViewPart");
104 middle.addView(
"com.generalrobotix.ui.view.GrxTextEditorViewPart");
107 layout.setEditorAreaVisible(
false);
void createInitialLayout(IPageLayout layout)
#define null
our own NULL pointer
RTC::ReturnCode_t ret(RTC::Local::ReturnCode_t r)
static final String [] views
static Shell getCurrentShell()
GrxUIPerspectiveFactory()