Search in sources :

Example 11 with IWorkbenchWindowConfigurer

use of org.eclipse.ui.application.IWorkbenchWindowConfigurer in project yamcs-studio by yamcs.

the class YamcsStudioWorkbenchWindowAdvisor method preWindowOpen.

@Override
public void preWindowOpen() {
    IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
    configurer.setInitialSize(new Point(1920, 1200));
    configurer.setShowMenuBar(true);
    configurer.setShowCoolBar(true);
    configurer.setShowProgressIndicator(true);
    configurer.setShowPerspectiveBar(false);
    configurer.setShowStatusLine(true);
    updateTitle();
    configurer.getWindow().addPerspectiveListener(new IPerspectiveListener() {

        @Override
        public void perspectiveChanged(IWorkbenchPage page, IPerspectiveDescriptor perspective, String changeId) {
            updateTitle();
        }

        @Override
        public void perspectiveActivated(IWorkbenchPage page, IPerspectiveDescriptor perspective) {
            updateTitle();
        }
    });
    // Workaround for text editor DND bug.
    // See http://www.eclipse.org/forums/index.php/m/333816/
    configurer.configureEditorAreaDropListener(new EditorAreaDropAdapter(configurer.getWindow()));
    // Bootstrap DIIRT
    CompositeDataSource defaultDs = (CompositeDataSource) PVManager.getDefaultDataSource();
    defaultDs.putDataSource(new ParameterDataSourceProvider());
    defaultDs.setConfiguration(new CompositeDataSourceConfiguration().defaultDataSource("para").delimiter("://"));
    PVManager.setDefaultDataSource(defaultDs);
}
Also used : IPerspectiveListener(org.eclipse.ui.IPerspectiveListener) ParameterDataSourceProvider(org.yamcs.studio.css.core.pvmanager.ParameterDataSourceProvider) EditorAreaDropAdapter(org.eclipse.ui.internal.ide.EditorAreaDropAdapter) IWorkbenchPage(org.eclipse.ui.IWorkbenchPage) IWorkbenchWindowConfigurer(org.eclipse.ui.application.IWorkbenchWindowConfigurer) IPerspectiveDescriptor(org.eclipse.ui.IPerspectiveDescriptor) Point(org.eclipse.swt.graphics.Point) CompositeDataSource(org.diirt.datasource.CompositeDataSource) CompositeDataSourceConfiguration(org.diirt.datasource.CompositeDataSourceConfiguration)

Example 12 with IWorkbenchWindowConfigurer

use of org.eclipse.ui.application.IWorkbenchWindowConfigurer in project yamcs-studio by yamcs.

the class ApplicationWorkbenchWindowAdvisor method preWindowOpen.

@Override
public void preWindowOpen() {
    IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
    configurer.setInitialSize(new Point(1920, 1200));
    configurer.setShowMenuBar(true);
    configurer.setShowCoolBar(true);
    configurer.setShowProgressIndicator(true);
    configurer.setShowPerspectiveBar(false);
    configurer.setShowStatusLine(true);
    configurer.setTitle("Yamcs Studio Runtime");
}
Also used : IWorkbenchWindowConfigurer(org.eclipse.ui.application.IWorkbenchWindowConfigurer) Point(org.eclipse.swt.graphics.Point)

Aggregations

IWorkbenchWindowConfigurer (org.eclipse.ui.application.IWorkbenchWindowConfigurer)12 Point (org.eclipse.swt.graphics.Point)7 IPerspectiveDescriptor (org.eclipse.ui.IPerspectiveDescriptor)2 IWorkbenchPage (org.eclipse.ui.IWorkbenchPage)2 CubridStatusLineContrItem (com.cubrid.cubridmanager.ui.spi.contribution.CubridStatusLineContrItem)1 CubridTitleLineContrItem (com.cubrid.cubridmanager.ui.spi.contribution.CubridTitleLineContrItem)1 CubridWorkbenchContrItem (com.cubrid.cubridmanager.ui.spi.contribution.CubridWorkbenchContrItem)1 EditorAreaDropAdapter (net.heartsome.cat.ts.drop.EditorAreaDropAdapter)1 CompositeDataSource (org.diirt.datasource.CompositeDataSource)1 CompositeDataSourceConfiguration (org.diirt.datasource.CompositeDataSourceConfiguration)1 IPreferenceStore (org.eclipse.jface.preference.IPreferenceStore)1 Rectangle (org.eclipse.swt.graphics.Rectangle)1 IPerspectiveListener (org.eclipse.ui.IPerspectiveListener)1 EditorAreaDropAdapter (org.eclipse.ui.internal.ide.EditorAreaDropAdapter)1 ParameterDataSourceProvider (org.yamcs.studio.css.core.pvmanager.ParameterDataSourceProvider)1