Eclipse plug-in for service provider.
[platform/upstream/iotivity.git] / service / simulator / java / eclipse-plugin / ServiceProviderPlugin / src / oic / simulator / serviceprovider / perspective / PerspectiveFactory.java
1 package oic.simulator.serviceprovider.perspective;
2
3 import oic.simulator.serviceprovider.view.AttributeView;
4 import oic.simulator.serviceprovider.view.LogView;
5 import oic.simulator.serviceprovider.view.MetaPropertiesView;
6 import oic.simulator.serviceprovider.view.MultiResourceOrchestrationView;
7 import oic.simulator.serviceprovider.view.ResourceManagerView;
8
9 import org.eclipse.ui.IPageLayout;
10 import org.eclipse.ui.IPerspectiveFactory;
11
12 public class PerspectiveFactory implements IPerspectiveFactory {
13
14     public static final String PERSPECTIVE_ID = "oic.simulator.serviceprovider.perspective";
15     private IPageLayout        factory;
16
17     @Override
18     public void createInitialLayout(IPageLayout factory) {
19         this.factory = factory;
20         factory.setEditorAreaVisible(false);
21         addViews();
22         factory.setFixed(false);
23     }
24
25     private void addViews() {
26         factory.addView(ResourceManagerView.VIEW_ID, IPageLayout.LEFT, 0.3f,
27                 factory.getEditorArea());
28         factory.addView(MetaPropertiesView.VIEW_ID, IPageLayout.BOTTOM, 0.65f,
29                 ResourceManagerView.VIEW_ID);
30         factory.addView(AttributeView.VIEW_ID, IPageLayout.LEFT, 0.7f,
31                 factory.getEditorArea());
32         factory.addView(LogView.VIEW_ID, IPageLayout.BOTTOM, 0.65f,
33                 AttributeView.VIEW_ID);
34         factory.addView(MultiResourceOrchestrationView.VIEW_ID,
35                 IPageLayout.RIGHT, 0.6f, AttributeView.VIEW_ID);
36     }
37 }