org.eclipse.ui.application.IWorkbenchWindowConfigurer Java Examples

The following examples show how to use org.eclipse.ui.application.IWorkbenchWindowConfigurer. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: DesignerWorkbenchWindowAdvisor.java    From birt with Eclipse Public License 1.0 6 votes vote down vote up
public void preWindowOpen( )
{
	IWorkbenchWindowConfigurer configurer = getWindowConfigurer( );
	configurer.setShowCoolBar( true );
	configurer.setShowStatusLine( true );

	String title = null;
	IProduct product = Platform.getProduct( );
	if ( product != null )
	{
		title = product.getName( );
	}

	if ( title == null )
	{
		title = DesignerWorkbenchMessages.Workbench_title;
	}
	configurer.setTitle( title );
}
 
Example #2
Source File: ApplicationWorkbenchWindowAdvisor.java    From elexis-3-core with Eclipse Public License 1.0 6 votes vote down vote up
/**
 * Diese Methode wird jeweils unmittelbar vor dem öffnen des Anwendungsfensters ausgeführt.
 */
public void preWindowOpen(){
	IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
	// configurer.setInitialSize(new Point(900, 700));
	configurer.setShowCoolBar(true);
	configurer.setShowStatusLine(true);
	configurer.setShowProgressIndicator(true);
	configurer.setTitle(Hub.APPLICATION_NAME + " " + Elexis.VERSION);
	configurer.setShowFastViewBars(true);
	if (CoreHub.localCfg.get(Preferences.SHOWPERSPECTIVESELECTOR, Boolean.toString(false))
		.equals(Boolean.toString(true))) {
		configurer.setShowPerspectiveBar(true);
	} else {
		configurer.setShowPerspectiveBar(false);
	}
	// Wir wollen die schicken runden Tabs von Eclipse 3.x
	PlatformUI.getPreferenceStore().setValue(
		IWorkbenchPreferenceConstants.SHOW_TRADITIONAL_STYLE_TABS, false);
	// Aber die Animationen sind eher nervend, nicht?
	PlatformUI.getPreferenceStore().setValue(IWorkbenchPreferenceConstants.ENABLE_ANIMATIONS,
		false);
	
}
 
Example #3
Source File: BonitaStudioWorkbenchWindowAdvisor.java    From bonita-studio with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Register to selection service to update button enablement
 * Register the Automatic Perspective switch part listener
 */
@Override
public void postWindowOpen() {
    IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
    configurer.addEditorAreaTransfer(EditorInputTransfer.getInstance());
    configurer.addEditorAreaTransfer(ResourceTransfer.getInstance());
    configurer.addEditorAreaTransfer(FileTransfer.getInstance());
    configurer.addEditorAreaTransfer(MarkerTransfer.getInstance());
    configurer.configureEditorAreaDropListener(new EditorAreaDropAdapter(
            configurer.getWindow()));

    final MWindow model = ((WorkbenchPage) window.getActivePage()).getWindowModel();
    model.getContext().get(EPartService.class).addPartListener(new AutomaticSwitchPerspectivePartListener());
    final Object widget = model.getWidget();
    if (widget instanceof Shell) {
        ((Widget) widget).setData(SWTBotConstants.SWTBOT_WIDGET_ID_KEY, SWTBotConstants.SWTBOT_ID_MAIN_SHELL);
    }
    // Replace ObjectActionContributorManager with filtered actions
    CustomObjectActionContributorManager.getManager();
}
 
Example #4
Source File: ApplicationWorkbenchWindowAdvisor.java    From tmxeditor8 with GNU General Public License v2.0 5 votes vote down vote up
public void preWindowOpen() {
	IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
	configurer.setInitialSize(new Point(400, 300));
	configurer.setShowCoolBar(false);
	configurer.setShowStatusLine(false);
	configurer.setTitle("OSGI Services Demo");
}
 
Example #5
Source File: ApplicationWorkbenchWindowAdvisor.java    From nebula with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public void preWindowOpen() {
	IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
	configurer.setInitialSize(new Point(700, 400));
	configurer.setShowCoolBar(false);
	configurer.setShowStatusLine(false);
	configurer.setTitle("Nebula Examples");
}
 
Example #6
Source File: ApplicationWorkbenchWindowAdvisor.java    From codeexamples-eclipse with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public void preWindowOpen() {
	IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
	configurer.setInitialSize(new Point(400, 300));
	configurer.setShowCoolBar(true);
	configurer.setShowStatusLine(false);
	configurer.setTitle("RCP Application");
}
 
Example #7
Source File: ApplicationWorkbenchWindowAdvisor.java    From translationstudio8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * (non-Javadoc)
 * @see org.eclipse.ui.application.WorkbenchWindowAdvisor#preWindowOpen()
 */
public void preWindowOpen() {
	IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
	configurer.setInitialSize(new Point(400, 300));
	configurer.setShowCoolBar(false);
	configurer.setShowStatusLine(false);
	configurer.setTitle("RAP Converter Application");
}
 
Example #8
Source File: N4JSApplicationWorkbenchWindowAdvisor.java    From n4js with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public void preWindowOpen() {
	super.preWindowOpen();
	final IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
	configurer.setInitialSize(new Point(1024, 768));
	configurer.setShowCoolBar(true);
	configurer.setShowStatusLine(true);
	configurer.setShowProgressIndicator(true);
	configurer.setShowPerspectiveBar(true);
	initN4Context();
	updateDefaultEditorMappingIfAbsent();
	reviewDisabledCategoriesFromAppModel();

}
 
Example #9
Source File: ApplicationWorkbenchWindowAdvisor.java    From MergeProcessor with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
public void preWindowOpen() {
	IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
	configurer.setInitialSize(new Point(631, 218));
	configurer.setShowCoolBar(true);
	configurer.setShowStatusLine(true);
	final IConfiguration configuration = E4CompatibilityUtil.getApplicationContext().get(IConfiguration.class);
	configurer.setTitle("MergeProcessor " + Configuration.getVersion() + " <" + configuration.getUser() + "@" //$NON-NLS-1$//$NON-NLS-2$//$NON-NLS-3$
			+ configuration.getSftpConfiguration().getHost() + ">"); //$NON-NLS-1$
}
 
Example #10
Source File: ApplicationWorkbenchWindowAdvisor.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public void preWindowOpen ()
{
    final IWorkbenchWindowConfigurer configurer = getWindowConfigurer ();
    configurer.setInitialSize ( new Point ( 400 * 3, 300 * 3 ) );
    configurer.setShowFastViewBars ( false );
    configurer.setShowProgressIndicator ( true );
    configurer.setShowMenuBar ( true );
    configurer.setShowCoolBar ( true );
    configurer.setShowStatusLine ( true );
}
 
Example #11
Source File: ApplicationWorkbenchWindowAdvisor.java    From translationstudio8 with GNU General Public License v2.0 5 votes vote down vote up
public void preWindowOpen() {
	IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
	configurer.setInitialSize(new Point(400, 300));
	configurer.setShowCoolBar(false);
	configurer.setShowStatusLine(false);
	configurer.setTitle("OSGI Services Demo");
}
 
Example #12
Source File: RcpWindowAdvisor.java    From olca-app with Mozilla Public License 2.0 5 votes vote down vote up
@Override
public void preWindowOpen() {
	IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
	configurer.setInitialSize(new Point(800, 600));
	configurer.setShowCoolBar(true);
	configurer.setShowStatusLine(true);
	configurer.setShowProgressIndicator(true);
	configurer.setShowMenuBar(true);
	configurer.setTitle(Config.APPLICATION_NAME + " " + App.getVersion());
}
 
Example #13
Source File: ApplicationWorkbenchWindowAdvisor.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public void preWindowOpen ()
{
    IWorkbenchWindowConfigurer configurer = getWindowConfigurer ();
    configurer.setInitialSize ( new Point ( 400 * 3, 300 * 3 ) );
    configurer.setShowFastViewBars ( false );
    configurer.setShowPerspectiveBar ( true );
    configurer.setShowProgressIndicator ( true );
    configurer.setShowMenuBar ( true );
    configurer.setShowCoolBar ( true );
    configurer.setShowStatusLine ( true );
    configurer.setTitle ( "Eclipse SCADA Admin Client" );
}
 
Example #14
Source File: ApplicationWorkbenchWindowAdvisor.java    From neoscada with Eclipse Public License 1.0 5 votes vote down vote up
public void preWindowOpen() {
    IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
    configurer.setInitialSize ( new Point ( 1200, 1024 ) );
    configurer.setShowCoolBar ( false );
    configurer.setShowStatusLine ( true );
    configurer.setShowProgressIndicator ( true );
    configurer.setShowMenuBar ( true );
    configurer.setTitle("Eclipse NeoSCADA Client"); //$$NON-NLS-1$$
}
 
Example #15
Source File: ClientWorkbenchWindowAdvisor.java    From ice with Eclipse Public License 1.0 5 votes vote down vote up
@Override
public void preWindowOpen() {
	// Get Display width and height
	Rectangle bounds = PlatformUI.getWorkbench().getDisplay().getBounds();

	// Grab the Workbench Window Configurer, used to set things such as
	// perspectives bar, coolbar, etc..
	IWorkbenchWindowConfigurer configurer = getWindowConfigurer();

	// Set the size of the application the the size of the Display
	configurer.setInitialSize(new Point(bounds.width, bounds.height));

	// Turn on the Coolbar, status bar, menu bar, and Perspectives bar
	configurer.setShowCoolBar(true);
	configurer.setShowStatusLine(true);
	configurer.setShowMenuBar(true);
	configurer.setShowPerspectiveBar(true);

	// Set the Application Title
	configurer.setTitle("ICE - "
			+ "Eclipse Integrated Computational Environment"); //$NON-NLS-1$

	// Move the Perspectives Bar to the Top Right, and make the editor tabs
	// curved instead of boxy and rectangular (looks better)
	PlatformUI.getPreferenceStore().setValue(
			IWorkbenchPreferenceConstants.SHOW_TRADITIONAL_STYLE_TABS,
			false);

	return;
}
 
Example #16
Source File: ApplicationWorkbenchWindowAdvisor.java    From tlaplus with MIT License 5 votes vote down vote up
public void preWindowOpen()
{
    IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
    configurer.setInitialSize(new Point(800, 600));
    configurer.setShowFastViewBars(true);
    configurer.setShowStatusLine(true);
    configurer.setShowProgressIndicator(true);
    configurer.setShowCoolBar(false);
    
    // A DropTargetAdapter is need for editor DND support
    final DropTargetListener dtl = new EditorAreaDropAdapter(
            configurer.getWindow());
    configurer.configureEditorAreaDropListener(dtl);
}
 
Example #17
Source File: ApplicationWorkbenchWindowAdvisor.java    From tracecompass with Eclipse Public License 2.0 5 votes vote down vote up
@Override
public void preWindowOpen() {
    IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
    configurer.setShowCoolBar(false);
    configurer.setShowStatusLine(true);
    configurer.setShowProgressIndicator(true);
}
 
Example #18
Source File: ApplicationWorkbenchWindowAdvisor.java    From depan with Apache License 2.0 5 votes vote down vote up
@Override
public void preWindowOpen() {
  IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
  configurer.setInitialSize(new Point(750, 550));
  configurer.setShowMenuBar(true);
  configurer.setShowCoolBar(true);
  configurer.setShowStatusLine(true);
  configurer.setShowProgressIndicator(true);
  configurer.setTitle("DepAn");
}
 
Example #19
Source File: ApplicationWorkbenchWindowAdvisor.java    From tmxeditor8 with GNU General Public License v2.0 5 votes vote down vote up
public void preWindowOpen() {
	IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
	configurer.setShowCoolBar(true);
	configurer.setShowProgressIndicator(true);
	configurer.setShowStatusLine(false);
	Rectangle clientArea = Display.getDefault().getClientArea();
	configurer.setInitialSize(new Point(clientArea.width, clientArea.height));
}
 
Example #20
Source File: ApplicationWorkbenchWindowAdvisor.java    From tmxeditor8 with GNU General Public License v2.0 5 votes vote down vote up
/**
 * (non-Javadoc)
 * @see org.eclipse.ui.application.WorkbenchWindowAdvisor#preWindowOpen()
 */
public void preWindowOpen() {
	IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
	configurer.setInitialSize(new Point(400, 300));
	configurer.setShowCoolBar(false);
	configurer.setShowStatusLine(false);
	configurer.setTitle("RAP Converter Application");
}
 
Example #21
Source File: ApplicationWorkbenchWindowAdvisor.java    From gama with GNU General Public License v3.0 5 votes vote down vote up
public ApplicationWorkbenchWindowAdvisor(final ApplicationWorkbenchAdvisor adv,
	final IWorkbenchWindowConfigurer configurer) {
	super(adv, configurer);

	// Hack and workaround for the inability to find launcher icons...

	final Bundle bundle = Platform.getBundle("msi.gama.application");

	final ImageDescriptor myImage =
		ImageDescriptor.createFromURL(FileLocator.find(bundle, new Path("branding_icons/icon256.png"), null));
	configurer.getWindow().getShell().setImage(myImage.createImage());
}
 
Example #22
Source File: ApplicationWorkbenchWindowAdvisor.java    From jbt with Apache License 2.0 5 votes vote down vote up
public void preWindowOpen() {
	IWorkbenchWindowConfigurer configurer = getWindowConfigurer();

	configurer.setShowCoolBar(true);
	configurer.setShowMenuBar(true);
	configurer.setShowStatusLine(true);
}
 
Example #23
Source File: ApplicationWorkbenchWindowAdvisor.java    From translationstudio8 with GNU General Public License v2.0 4 votes vote down vote up
public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
	super(configurer);
}
 
Example #24
Source File: ApplicationWorkbenchWindowAdvisor.java    From tmxeditor8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * @param configurer
 */
public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
	super(configurer);
}
 
Example #25
Source File: ApplicationWorkbenchAdvisor.java    From tmxeditor8 with GNU General Public License v2.0 4 votes vote down vote up
public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(
		IWorkbenchWindowConfigurer configurer) {
	return new ApplicationWorkbenchWindowAdvisor(configurer);
}
 
Example #26
Source File: ApplicationWorkbenchAdvisor.java    From tmxeditor8 with GNU General Public License v2.0 4 votes vote down vote up
@Override
public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
	WorkbenchWindowAdvisor = new ApplicationWorkbenchWindowAdvisor(configurer); 
       return WorkbenchWindowAdvisor;
}
 
Example #27
Source File: ApplicationWorkbenchWindowAdvisor.java    From codeexamples-eclipse with Eclipse Public License 1.0 4 votes vote down vote up
public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
	super(configurer);
}
 
Example #28
Source File: ApplicationWorkbenchAdvisor.java    From tmxeditor8 with GNU General Public License v2.0 4 votes vote down vote up
public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
	return new ApplicationWorkbenchWindowAdvisor(configurer);
}
 
Example #29
Source File: ApplicationWorkbenchWindowAdvisor.java    From tmxeditor8 with GNU General Public License v2.0 4 votes vote down vote up
public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
	super(configurer);
}
 
Example #30
Source File: ApplicationWorkbenchWindowAdvisor.java    From tmxeditor8 with GNU General Public License v2.0 4 votes vote down vote up
/**
 * (non-Javadoc)
 * @see org.eclipse.ui.application.WorkbenchWindowAdvisor#preWindowOpen()
 */
public void preWindowOpen() {
	IWorkbenchWindowConfigurer configurer = getWindowConfigurer();

	// show the shortcut bar and progress indicator, which are hidden by default
	configurer.setShowCoolBar(true);

	// 检查是否显示装态栏 robert 2011-11-04 true为显示,false为隐藏,默认显示.
	IPreferenceStore prefs = Activator.getDefault().getPreferenceStore();
	boolean visibleStatus = prefs.getBoolean(TsPreferencesConstant.TS_statusBar_status);
	configurer.setShowStatusLine(visibleStatus);
	configurer.setShowProgressIndicator(true);
	// 添加“编辑区域”的传递者(org.eclipse.swt.dnd.Transfer)
	configurer.addEditorAreaTransfer(LocalSelectionTransfer.getTransfer());
	configurer.addEditorAreaTransfer(FileTransfer.getInstance());
	// 添加“编辑区域”的释放拖拽监听
	configurer.configureEditorAreaDropListener(new EditorAreaDropAdapter(configurer.getWindow()));

	// 注释整理
	// TODO 根据注册的转换器插件,动态添加 XLIFF Editor 映射的文件后缀名。
	// abw,html,htm,inx,properties,js,mif,doc,xls,ppt,docx,xlsx,pptx,ppsx,sxw,sxc,sxi,sxd,odt,ods,odp,odg,txt,ttx,po,pot,rc,resx,rtf,svg,xml
	// String[] extensions = FileFormatUtils.getExtensions();
	// for (String extension : extensions) {
	// PlatformUI
	// .getWorkbench()
	// .getEditorRegistry()
	// .setDefaultEditor(extension,
	// "net.heartsome.cat.ts.ui.xliffeditor.nattable.editor");
	// }

	// begin屏蔽掉向导中的General部分
	// AbstractExtensionWizardRegistry wizardRegistry = (AbstractExtensionWizardRegistry) WorkbenchPlugin
	// .getDefault().getNewWizardRegistry();
	// IWizardCategory[] categories = WorkbenchPlugin.getDefault()
	// .getNewWizardRegistry().getRootCategory().getCategories();
	// for (IWizardDescriptor wizard : getAllWizards(categories)) {
	// WorkbenchWizardElement wizardElement = (WorkbenchWizardElement) wizard;
	// if (!allowedWizard(wizardElement.getId())) {
	// wizardRegistry.removeExtension(wizardElement
	// .getConfigurationElement().getDeclaringExtension(),
	// new Object[] { wizardElement });
	// }
	// }
	// end
	configurer.setShowPerspectiveBar(true);
}