Search in sources :

Example 1 with EditorAreaDropAdapter

use of org.eclipse.ui.internal.ide.EditorAreaDropAdapter 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)

Aggregations

CompositeDataSource (org.diirt.datasource.CompositeDataSource)1 CompositeDataSourceConfiguration (org.diirt.datasource.CompositeDataSourceConfiguration)1 Point (org.eclipse.swt.graphics.Point)1 IPerspectiveDescriptor (org.eclipse.ui.IPerspectiveDescriptor)1 IPerspectiveListener (org.eclipse.ui.IPerspectiveListener)1 IWorkbenchPage (org.eclipse.ui.IWorkbenchPage)1 IWorkbenchWindowConfigurer (org.eclipse.ui.application.IWorkbenchWindowConfigurer)1 EditorAreaDropAdapter (org.eclipse.ui.internal.ide.EditorAreaDropAdapter)1 ParameterDataSourceProvider (org.yamcs.studio.css.core.pvmanager.ParameterDataSourceProvider)1