Search in sources :

Example 1 with IWorkbenchWindowConfigurer

use of org.eclipse.ui.application.IWorkbenchWindowConfigurer in project translationstudio8 by heartsome.

the class ApplicationWorkbenchWindowAdvisor method preWindowOpen.

/**
	 * (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");
}
Also used : IWorkbenchWindowConfigurer(org.eclipse.ui.application.IWorkbenchWindowConfigurer) Point(org.eclipse.swt.graphics.Point)

Example 2 with IWorkbenchWindowConfigurer

use of org.eclipse.ui.application.IWorkbenchWindowConfigurer in project translationstudio8 by heartsome.

the class ApplicationWorkbenchWindowAdvisor method preWindowOpen.

/**
	 * (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
}
Also used : EditorAreaDropAdapter(net.heartsome.cat.ts.drop.EditorAreaDropAdapter) IWorkbenchWindowConfigurer(org.eclipse.ui.application.IWorkbenchWindowConfigurer) IPreferenceStore(org.eclipse.jface.preference.IPreferenceStore)

Example 3 with IWorkbenchWindowConfigurer

use of org.eclipse.ui.application.IWorkbenchWindowConfigurer in project translationstudio8 by heartsome.

the class ApplicationWorkbenchWindowAdvisor method preWindowOpen.

public void preWindowOpen() {
    IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
    configurer.setInitialSize(new Point(400, 300));
    configurer.setShowCoolBar(false);
    configurer.setShowStatusLine(false);
    configurer.setTitle("OSGI Services Demo");
}
Also used : IWorkbenchWindowConfigurer(org.eclipse.ui.application.IWorkbenchWindowConfigurer) Point(org.eclipse.swt.graphics.Point)

Example 4 with IWorkbenchWindowConfigurer

use of org.eclipse.ui.application.IWorkbenchWindowConfigurer in project tdi-studio-se by Talend.

the class ApplicationWorkbenchWindowAdvisor method preWindowOpen.

public void preWindowOpen() {
    IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
    configurer.setInitialSize(new Point(1000, 750));
    configurer.setShowCoolBar(false);
    configurer.setShowStatusLine(false);
    //$NON-NLS-1$
    configurer.setTitle(Messages.getString("ApplicationWorkbenchWindowAdvisor.rcpApp"));
    chooseProjectLocation();
}
Also used : IWorkbenchWindowConfigurer(org.eclipse.ui.application.IWorkbenchWindowConfigurer) Point(org.eclipse.swt.graphics.Point)

Example 5 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);
    LayoutManager.getInstance().setStatusLineContrItem(new CubridStatusLineContrItem());
    LayoutManager.getInstance().setTitleLineContrItem(new CubridTitleLineContrItem());
    LayoutManager.getInstance().setWorkbenchContrItem(new CubridWorkbenchContrItem());
}
Also used : CubridWorkbenchContrItem(com.cubrid.cubridmanager.ui.spi.contribution.CubridWorkbenchContrItem) CubridStatusLineContrItem(com.cubrid.cubridmanager.ui.spi.contribution.CubridStatusLineContrItem) IWorkbenchWindowConfigurer(org.eclipse.ui.application.IWorkbenchWindowConfigurer) CubridTitleLineContrItem(com.cubrid.cubridmanager.ui.spi.contribution.CubridTitleLineContrItem)

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