/** * @see org.eclipse.core.runtime.IPlatformRunnable#run(java.lang.Object) */ public Object run( Object args ) throws Exception { Display display = PlatformUI.createDisplay( ); TrayDialog.setDialogHelpAvailable( true ); try { int code = PlatformUI.createAndRunWorkbench( display, new DesignerWorkbenchAdvisor( ) ); // exit the application with an appropriate return code return code == PlatformUI.RETURN_RESTART ? EXIT_RESTART : EXIT_OK; } finally { if ( display != null ) display.dispose( ); } }
@Override public void initialize(IWorkbenchConfigurer configurer) { super.initialize(configurer); configurer.setSaveAndRestore(true); final String ICONS_PATH = "icons/full/"; //$NON-NLS-1$ final String PATH_OBJECT = ICONS_PATH + "obj16/"; //$NON-NLS-1$ Bundle ideBundle = Platform.getBundle(IDEWorkbenchPlugin.IDE_WORKBENCH); declareWorkbenchImage(configurer, ideBundle, IDE.SharedImages.IMG_OBJ_PROJECT, PATH_OBJECT + "prj_obj.gif", //$NON-NLS-1$ true); declareWorkbenchImage(configurer, ideBundle, IDE.SharedImages.IMG_OBJ_PROJECT_CLOSED, PATH_OBJECT + "cprj_obj.gif", true); //$NON-NLS-1$ declareWorkbenchImage(configurer, ideBundle, IDEInternalWorkbenchImages.IMG_DLGBAN_SAVEAS_DLG, PATH_OBJECT + "saveas_wiz.png", false); //$NON-NLS-1$ declareWorkbenchImage(configurer, ideBundle, IDE.SharedImages.IMG_OBJ_PROJECT, PATH_OBJECT + "prj_obj.gif", //$NON-NLS-1$ true); declareWorkbenchImage(configurer, ideBundle, IDE.SharedImages.IMG_OBJ_PROJECT_CLOSED, PATH_OBJECT + "cprj_obj.gif", true); //$NON-NLS-1$ // Force the default setting for the help (tray) button in dialogs. // It seems that in Windows and Linux platforms as default this value is set to true. // However in Mac OS X the button does not shown as default behavior. TrayDialog.setDialogHelpAvailable(true); // Sets the branding information BrandingInfo info = new BrandingInfo(); info.setProductName(Messages.ApplicationWorkbenchAdvisor_ProductName); info.setProductVersion(Activator.getDefault().getBundle().getVersion().toString()); info.setProductMainBundleID(Activator.PLUGIN_ID); JaspersoftStudioPlugin.getInstance().setBrandingInformation(info); }
public TrayDialog createChartImageDialog( Shell parentShell, Fill fCurrent, ChartWizardContext context, boolean bEmbeddedImageEnabled, boolean bResourceImageEnabled ) { return new ImageDialog( parentShell, fCurrent, context, bEmbeddedImageEnabled, bResourceImageEnabled ); }
public void initialize(IWorkbenchConfigurer configurer) { PluginActionBuilder.setAllowIdeLogging(true); // make sure we always save and restore workspace state configurer.setSaveAndRestore(true); // register workspace adapters IDE.registerAdapters(); // get the command line arguments String[] cmdLineArgs = Platform.getCommandLineArgs(); // include the workspace location in the title // if the command line option -showlocation is specified for (int i = 0; i < cmdLineArgs.length; i++) { if ("-showlocation".equalsIgnoreCase(cmdLineArgs[i])) { //$NON-NLS-1$ String name = null; if (cmdLineArgs.length > i + 1) { name = cmdLineArgs[i + 1]; } if (name != null && name.indexOf("-") == -1) { //$NON-NLS-1$ workspaceLocation = name; } else { workspaceLocation = Platform.getLocation().toOSString(); } break; } } // register shared images declareWorkbenchImages(); // initialize the activity helper activityHelper = IDEWorkbenchActivityHelper.getInstance(); // initialize idle handler idleHelper = new IDEIdleHelper(configurer); // initialize the workspace undo monitor workspaceUndoMonitor = WorkspaceUndoMonitor.getInstance(); // show Help button in JFace dialogs TrayDialog.setDialogHelpAvailable(true); Policy.setComparator(Collator.getInstance()); }
/** * Create contents of the wizard. * * @param parent */ @Override public void createControl(Composite parent) { setShellLoc(this.getShell()); final ScrolledComposite scrolledComposite = new ScrolledComposite(parent,SWT.NULL); GridData gridDataComposite = new GridData(); gridDataComposite.horizontalSpan=SWT.FILL; gridDataComposite.verticalSpan=SWT.FILL; scrolledComposite.setData(gridDataComposite); final Composite container = new Composite(scrolledComposite, SWT.NULL); setControl(scrolledComposite); container.setLayout(new FillLayout(SWT.HORIZONTAL)); mainSection = new Composite(container, SWT.NONE); GridLayout mainLayout = new GridLayout(1, false); mainLayout.marginHeight = 5; mainLayout.marginWidth = 5; mainSection.setLayout(mainLayout); projectOptionsSection = new Composite(mainSection, SWT.NONE); columns = 10; GridLayout gridProjectOptionsSection = new GridLayout(columns, false); gridProjectOptionsSection.marginHeight = 10; gridProjectOptionsSection.marginWidth = 10; projectOptionsSection.setLayout(gridProjectOptionsSection); GridData gridData = new GridData(); gridData.horizontalAlignment = SWT.FILL; gridData.grabExcessHorizontalSpace = true; projectOptionsSection.setLayoutData(gridData); if (!isRequireLocationSection()) { getModel().setLocation(getSaveLocation()); } // Create the project options section addProjectOptionUI(); if (isRequireLocationSection()) { Composite projectLocationSection = new Composite(mainSection, SWT.NONE); projectLocationSection.setLayout(new FillLayout(SWT.HORIZONTAL)); gridDataInfo = new GridData(); gridDataInfo.horizontalAlignment = SWT.FILL; gridDataInfo.grabExcessHorizontalSpace = true; projectLocationSection.setLayoutData(gridDataInfo); locationInfoComposite = new LocationInfoComposite(projectLocationSection, SWT.NONE, model, getSaveLocation(), getProjectOptionsInfo(), this); } if (isRequiredWorkingSets()) { Composite workigSetSection = new Composite(mainSection, SWT.NONE); workigSetSection.setLayout(new FillLayout(SWT.HORIZONTAL)); gridDataInfo = new GridData(); gridDataInfo.horizontalAlignment = SWT.FILL; gridDataInfo.grabExcessHorizontalSpace = true; workigSetSection.setLayoutData(gridDataInfo); new WorkingSetComposite(workigSetSection, SWT.NONE, model); } TrayDialog.setDialogHelpAvailable(false); scrolledComposite.setContent(container); scrolledComposite.setExpandHorizontal(true); scrolledComposite.setExpandVertical(true); // TODO: Dynamically resize a scrolledComposite when child resized. Point compositeSize = container.computeSize(SWT.DEFAULT, SWT.DEFAULT); compositeSize.y += 100; scrolledComposite.setMinSize(compositeSize); }
public TrayDialog createChartMarkerIconDialog( Shell parent, Fill fill, ChartWizardContext context ) { return new ImageDialog( parent, fill, context, true, false, true ); }
/** * Create marker icon dialog. * * @param parent * @param fill * @param context * @return marker icon dialog */ TrayDialog createChartMarkerIconDialog( Shell parent, Fill fill, ChartWizardContext context );
/** * Create image dialog * * @return image dialog */ TrayDialog createChartImageDialog( Shell parentShell, Fill fCurrent, ChartWizardContext context, boolean bEmbeddedImageEnabled, boolean bResourceImageEnabled );