下面列出了怎么用org.eclipse.ui.application.IWorkbenchWindowConfigurer的API类实例代码及写法,或者点击链接到github查看源代码。
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 );
}
/**
* 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();
}
/**
* 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);
}
/**
* {@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$
}
@Override
public void preWindowOpen() {
IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
configurer.setInitialSize(new Point(700, 400));
configurer.setShowCoolBar(false);
configurer.setShowStatusLine(false);
configurer.setTitle("Nebula Examples");
}
@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();
}
@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 );
}
@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" );
}
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$$
}
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);
}
@Override
public void preWindowOpen() {
IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
configurer.setShowCoolBar(false);
configurer.setShowStatusLine(true);
configurer.setShowProgressIndicator(true);
}
@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");
}
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());
}
public void preWindowOpen() {
IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
configurer.setInitialSize(new Point(400, 300));
configurer.setShowCoolBar(false);
configurer.setShowStatusLine(false);
configurer.setTitle("OSGI Services Demo");
}
/**
* (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");
}
@Override
public void preWindowOpen() {
IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
configurer.setInitialSize(new Point(400, 300));
configurer.setShowCoolBar(true);
configurer.setShowStatusLine(false);
configurer.setTitle("RCP Application");
}
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));
}
public void preWindowOpen() {
IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
configurer.setInitialSize(new Point(400, 300));
configurer.setShowCoolBar(false);
configurer.setShowStatusLine(false);
configurer.setTitle("OSGI Services Demo");
}
/**
* (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");
}
@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;
}
public void preWindowOpen() {
IWorkbenchWindowConfigurer configurer = getWindowConfigurer();
configurer.setShowCoolBar(true);
configurer.setShowMenuBar(true);
configurer.setShowStatusLine(true);
}
@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());
}
/**
* {@inheritDoc}
*/
@Override
public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
return new ApplicationWorkbenchWindowAdvisor(configurer);
}
/**
* @param configurer
*/
public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
super(configurer);
}
@Override
public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
return new ApplicationWorkbenchWindowAdvisor(configurer);
}
public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer configurer) {
super(configurer);
}
@Override
public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(final IWorkbenchWindowConfigurer configurer) {
return new N4JSApplicationWorkbenchWindowAdvisor(this, configurer);
}
@Override
public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor ( final IWorkbenchWindowConfigurer configurer )
{
return new ApplicationWorkbenchWindowAdvisor ( configurer );
}
public ApplicationWorkbenchWindowAdvisor ( final IWorkbenchWindowConfigurer configurer )
{
super ( configurer );
}
@Override
public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor ( final IWorkbenchWindowConfigurer configurer )
{
return new ApplicationWorkbenchWindowAdvisor ( configurer );
}