Search in sources :

Example 6 with IWorkbenchWindowConfigurer

use of org.eclipse.ui.application.IWorkbenchWindowConfigurer in project knime-core by knime.

the class KNIMEApplicationWorkbenchWindowAdvisor method preWindowOpen.

/**
 * Configures the initial settings of the application window.
 */
@Override
public void preWindowOpen() {
    IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
    // configurer.setInitialSize(new Point(1024, 768));
    configurer.setShowCoolBar(true);
    configurer.setShowStatusLine(true);
    configurer.setShowProgressIndicator(true);
    configurer.setTitle(computeTitle());
    // see https://bugs.eclipse.org/bugs/show_bug.cgi?id=36961
    // We want to use ResourceNavigator, so we have to introduce this
    // dependency to org.eclipse.ui.ide (otherwise we don't see our
    // Resources)
    org.eclipse.ui.ide.IDE.registerAdapters();
}
Also used : IWorkbenchWindowConfigurer(org.eclipse.ui.application.IWorkbenchWindowConfigurer)

Example 7 with IWorkbenchWindowConfigurer

use of org.eclipse.ui.application.IWorkbenchWindowConfigurer in project dbeaver by serge-rider.

the class ApplicationWorkbenchWindowAdvisor method preWindowOpen.

@Override
public void preWindowOpen() {
    log.debug("Configure workbench window");
    // Set timeout for short jobs (like SQL queries)
    // Jobs longer than this will show progress dialog
    ProgressManagerUtil.SHORT_OPERATION_TIME = 100;
    // Configure window
    Rectangle displaySize = Display.getCurrent().getPrimaryMonitor().getBounds();
    IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
    configurer.setInitialSize(new Point(displaySize.width * 3 / 4, displaySize.height * 3 / 4));
    configurer.setShowCoolBar(true);
    configurer.setShowStatusLine(true);
    configurer.setShowPerspectiveBar(true);
    configurer.setShowProgressIndicator(true);
    configurer.configureEditorAreaDropListener(new EditorAreaDropAdapter());
    configurer.addEditorAreaTransfer(EditorInputTransfer.getInstance());
    configurer.addEditorAreaTransfer(ResourceTransfer.getInstance());
    configurer.addEditorAreaTransfer(FileTransfer.getInstance());
    configurer.addEditorAreaTransfer(MarkerTransfer.getInstance());
    configurer.configureEditorAreaDropListener(new org.eclipse.ui.internal.ide.EditorAreaDropAdapter(configurer.getWindow()));
//PreferenceManager preferenceManager = PlatformUI.getWorkbench().getPreferenceManager();
//preferenceManager.remove("org.eclipse.ui.preferencePages.Workbench/org.eclipse.ui.preferencePages.Perspectives");
//preferenceManager.remove("org.eclipse.ui.preferencePages.Workbench/org.eclipse.ui.preferencePages.Workspace");
// Show heap usage
//PlatformUI.getPreferenceStore().setValue(IWorkbenchPreferenceConstants.SHOW_MEMORY_MONITOR, true);
}
Also used : Rectangle(org.eclipse.swt.graphics.Rectangle) IWorkbenchWindowConfigurer(org.eclipse.ui.application.IWorkbenchWindowConfigurer) Point(org.eclipse.swt.graphics.Point)

Example 8 with IWorkbenchWindowConfigurer

use of org.eclipse.ui.application.IWorkbenchWindowConfigurer in project cubrid-manager by CUBRID.

the class ApplicationWorkbenchWindowAdvisor method preWindowOpen.

/**
	 * Performs arbitrary actions before the window is opened.
	 */
public void preWindowOpen() {
    IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
    configurer.setShowCoolBar(true);
    configurer.setShowStatusLine(true);
    configurer.setShowProgressIndicator(true);
}
Also used : IWorkbenchWindowConfigurer(org.eclipse.ui.application.IWorkbenchWindowConfigurer)

Example 9 with IWorkbenchWindowConfigurer

use of org.eclipse.ui.application.IWorkbenchWindowConfigurer in project ACS by ACS-Community.

the class ApplicationWorkbenchWindowAdvisor method preWindowOpen.

public void preWindowOpen() {
    IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
    configurer.setInitialSize(new Point(700, 800));
    configurer.setShowCoolBar(false);
    configurer.setShowStatusLine(true);
    configurer.setTitle("Alarms Configuration GUI");
}
Also used : IWorkbenchWindowConfigurer(org.eclipse.ui.application.IWorkbenchWindowConfigurer) Point(org.eclipse.swt.graphics.Point)

Example 10 with IWorkbenchWindowConfigurer

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

the class YamcsStudioWorkbenchWindowAdvisor method updateTitle.

private void updateTitle() {
    IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
    String title = Platform.getProduct().getName();
    IWorkbenchPage currentPage = configurer.getWindow().getActivePage();
    if (currentPage != null) {
        IPerspectiveDescriptor perspective = currentPage.getPerspective();
        if (perspective != null) {
            title = perspective.getLabel();
        }
    }
    configurer.setTitle(title);
}
Also used : IWorkbenchPage(org.eclipse.ui.IWorkbenchPage) IWorkbenchWindowConfigurer(org.eclipse.ui.application.IWorkbenchWindowConfigurer) IPerspectiveDescriptor(org.eclipse.ui.IPerspectiveDescriptor)

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