public void initialize(IWorkbenchConfigurer configurer) { // save the positions of windows etc... configurer.setSaveAndRestore(true); super.initialize(configurer); Bundle ideBundle = Platform.getBundle(IDE_PLUGIN); declareWorkbenchImage(configurer, ideBundle, IDE.SharedImages.IMG_OBJ_PROJECT, PRJ_OBJ, true); declareWorkbenchImage(configurer, ideBundle, IDE.SharedImages.IMG_OBJ_PROJECT_CLOSED, PRJ_OBJ_C, true); declareWorkbenchImage(configurer, ideBundle, IMG_DLGBAN_SAVEAS_DLG, SAVEAS_DLG, true); // register adapter IDE.registerAdapters(); }
@SuppressWarnings("nls") @Override public void initialize(IWorkbenchConfigurer configurer) { // Per default, state is not preserved (RCP book 5.1.1) configurer.setSaveAndRestore(true); // Register adapters needed by Navigator view to display workspace files IDE.registerAdapters(); // Declares all IDE-specific workbench images. This includes both "shared" // images (named in {@link IDE.SharedImages}) and internal images. configurer.declareImage(IDE.SharedImages.IMG_OBJ_PROJECT, RCPUtils.getImageDescriptor(YamcsStudioWorkbenchAdvisor.class, "icons/project_open.png"), true); configurer.declareImage(IDE.SharedImages.IMG_OBJ_PROJECT_CLOSED, RCPUtils.getImageDescriptor(YamcsStudioWorkbenchAdvisor.class, "icons/project_close.png"), true); declareWorkbenchImages(); }
@Override public void initialize(final IWorkbenchConfigurer configurer) { ResourcesPlugin.getPlugin().getStateLocation(); try { super.initialize(configurer); IDE.registerAdapters(); configurer.setSaveAndRestore(true); final IDecoratorManager dm = configurer.getWorkbench().getDecoratorManager(); dm.setEnabled("org.eclipse.pde.ui.binaryProjectDecorator", false); dm.setEnabled("org.eclipse.team.svn.ui.decorator.SVNLightweightDecorator", false); dm.setEnabled("msi.gama.application.decorator", true); dm.setEnabled("org.eclipse.ui.LinkedResourceDecorator", false); dm.setEnabled("org.eclipse.ui.VirtualResourceDecorator", false); dm.setEnabled("org.eclipse.xtext.builder.nature.overlay", false); } catch (final CoreException e) { // e.printStackTrace(); } }
@Override public void initialize(IWorkbenchConfigurer configurer) { super.initialize(configurer); org.eclipse.ui.ide.IDE.registerAdapters(); declareWorkbenchImages(); boolean found = false; String vlcLib = ManagementFactory.getRuntimeMXBean().getSystemProperties().get("vlc"); if (vlcLib != null) { found = true; NativeLibrary.addSearchPath("vlc", vlcLib); } if (!found) { found = new NativeDiscovery().discover(); } if (!found) { MessageDialog.openError(PlatformUI.getWorkbench().getDisplay().getActiveShell(), "Error", "Cannot play videos. VLC is either not installed or located in an unexpected directory. " + "If VLC is installed in an unexpected directory you can provide the path to its library. " + "Find SynergyView.ini and add a line to the end (if not already there) starting with " + "-Dvlc= followed by the path to an installation instance of VLC's lib folder."); } }
@Override public void initialize(IWorkbenchConfigurer configurer) { super.initialize(configurer); configurer.setSaveAndRestore(true); PlatformUI.getPreferenceStore().setValue( IWorkbenchPreferenceConstants.SHOW_TRADITIONAL_STYLE_TABS, false); // inserted: register workbench adapters IDE.registerAdapters(); // inserted: register images for rendering explorer view final String ICONS_PATH = "icons/full/"; final String PATH_OBJECT = ICONS_PATH + "obj16/"; Bundle ideBundle = Platform.getBundle(IDEWorkbenchPlugin.IDE_WORKBENCH); declareWorkbenchImage(configurer, ideBundle, IDE.SharedImages.IMG_OBJ_PROJECT, PATH_OBJECT + "prj_obj.gif", true); declareWorkbenchImage(configurer, ideBundle, IDE.SharedImages.IMG_OBJ_PROJECT_CLOSED, PATH_OBJECT + "cprj_obj.gif", true); }
private void declareWorkbenchImage(IWorkbenchConfigurer configurer, Bundle ideBundle, String symbolicName, String path, boolean shared) { URL url = ideBundle.getEntry(path); ImageDescriptor desc = ImageDescriptor.createFromURL(url); configurer.declareImage(symbolicName, desc, shared); }
@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); }
@Override public void initialize(IWorkbenchConfigurer configurer) { super.initialize(configurer); // make sure we always save and restore workspace state configurer.setSaveAndRestore(true); IDE.registerAdapters(); declareWorkbenchImages(); }
@Override public void initialize(IWorkbenchConfigurer configurer) { // make sure we always save and restore workspace state configurer.setSaveAndRestore(true); IDE.registerAdapters(); declareWorkbenchImages(); }
@Override public void initialize(IWorkbenchConfigurer configurer) { super.initialize(configurer); configurer.setSaveAndRestore(true); // inserted: register workbench adapters IDE.registerAdapters(); // inserted: register images for rendering explorer view final String ICONS_PATH = "icons/full/"; final String PATH_OBJECT = ICONS_PATH + "obj16/"; Bundle ideBundle = Platform.getBundle(IDEWorkbenchPlugin.IDE_WORKBENCH); declareWorkbenchImage(configurer, ideBundle, IDE.SharedImages.IMG_OBJ_PROJECT, PATH_OBJECT + "prj_obj.gif", true); declareWorkbenchImage(configurer, ideBundle, IDE.SharedImages.IMG_OBJ_PROJECT_CLOSED, PATH_OBJECT + "cprj_obj.gif", true); }
@Override public void initialize(IWorkbenchConfigurer configurer) { super.initialize(configurer); configurer.setSaveAndRestore(true); /* * Project Explorer and Common Navigator fail to show projects without * this hack. All reports I have read are about icons not showing up but * in my case the navigators don't even show a project's name. * The override of getDefaultPageInput() is also part of the * workaround. * * For more details: * https://bugs.eclipse.org/bugs/show_bug.cgi?id=234252 * http://help.eclipse.org/indigo/topic/org.eclipse.platform.doc.isv/guide/cnf.htm * http://francisu.wordpress.com/2008/05/27/magic-required-to-use-the-common-navigator-in-an-rcp-application/ * http://stackoverflow.com/questions/10345977/showing-project-explorer-view-and-its-functionality-to-rcp */ IDE.registerAdapters(); final String ICONS_PATH = "icons/full/"; Bundle ideBundle = Platform.getBundle(IDEWorkbenchPlugin.IDE_WORKBENCH); declareWorkbenchImage(configurer, ideBundle,IDE.SharedImages.IMG_OBJ_PROJECT, ICONS_PATH + "obj16/prj_obj.gif",true); declareWorkbenchImage(configurer, ideBundle,IDE.SharedImages.IMG_OBJ_PROJECT_CLOSED, ICONS_PATH + "obj16/cprj_obj.gif", true); declareWorkbenchImage(configurer, ideBundle, IDEInternalWorkbenchImages.IMG_ETOOL_PROBLEMS_VIEW, ICONS_PATH + "eview16/problems_view.gif", true); declareWorkbenchImage(configurer, ideBundle, IDEInternalWorkbenchImages.IMG_ETOOL_PROBLEMS_VIEW_ERROR, ICONS_PATH + "eview16/problems_view_error.gif", true); declareWorkbenchImage(configurer, ideBundle, IDEInternalWorkbenchImages.IMG_ETOOL_PROBLEMS_VIEW_WARNING, ICONS_PATH + "eview16/problems_view_warning.gif", true); declareWorkbenchImage(configurer, ideBundle, IDEInternalWorkbenchImages.IMG_OBJS_ERROR_PATH, ICONS_PATH + "obj16/error_tsk.gif", true); declareWorkbenchImage(configurer, ideBundle, IDEInternalWorkbenchImages.IMG_OBJS_WARNING_PATH, ICONS_PATH + "obj16/warn_tsk.gif", true); /* End of hack. */ }
@Override public void initialize(IWorkbenchConfigurer configurer) { super.initialize(configurer); configurer.setSaveAndRestore(false); if (LoggerPreference.getShowConsole()) { Console.show(); } changeWorkbenchImages(); }
@Override public void initialize ( final IWorkbenchConfigurer configurer ) { super.initialize ( configurer ); configurer.setSaveAndRestore ( true ); }
@Override public void initialize(IWorkbenchConfigurer configurer) { super.initialize(configurer); }
/** * @see org.eclipse.ui.application.WorkbenchAdvisor#initialize(org.eclipse.ui.application.IWorkbenchConfigurer) <!-- begin-user-doc --> <!-- end-user-doc --> * @generated */ @Override public void initialize(IWorkbenchConfigurer configurer) { super.initialize(configurer); configurer.setSaveAndRestore(true); }
@Override public void initialize(IWorkbenchConfigurer configurer) { configurer.setSaveAndRestore(true); declareWorkbenchImages(); }
public void initialize(IWorkbenchConfigurer configurer) { super.initialize(configurer); configurer.setSaveAndRestore(true); }
private void declareWorkbenchImage(IWorkbenchConfigurer configurer_p, Bundle ideBundle, String symbolicName, String path, boolean shared) { URL url = ideBundle.getEntry(path); ImageDescriptor desc = ImageDescriptor.createFromURL(url); configurer_p.declareImage(symbolicName, desc, shared); }
@Override public void initialize(final IWorkbenchConfigurer configurer) { super.initialize(configurer); configurer.setSaveAndRestore(true); }
@Override public void initialize(IWorkbenchConfigurer configurer) { super.initialize(configurer); configurer.setSaveAndRestore(true); }
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()); }
/** * Creates and initializes the idle handler * * @param aConfigurer * The workbench configurer. */ IDEIdleHelper(IWorkbenchConfigurer aConfigurer) { this.configurer = aConfigurer; // don't gc while running tests because performance tests are sensitive to timing (see bug // 121562) if (PlatformUI.getTestableObject().getTestHarness() != null) { return; } String enabled = System.getProperty(PROP_GC); // gc is turned on by default if property is missing if (enabled != null && enabled.equalsIgnoreCase(Boolean.FALSE.toString())) { return; } // init gc interval Integer prop = Integer.getInteger(PROP_GC_INTERVAL); if (prop != null && prop.intValue() >= 0) { minGCInterval = prop.intValue(); nextGCInterval = prop.intValue(); } // init max gc interval prop = Integer.getInteger(PROP_GC_MAX); if (prop != null) { maxGC = prop.intValue(); } createGarbageCollectionJob(); // hook idle handler final Display display = configurer.getWorkbench().getDisplay(); handler = new Runnable() { public void run() { if (!display.isDisposed() && !configurer.getWorkbench().isClosing()) { int nextInterval; final long start = System.currentTimeMillis(); // don't garbage collect if background jobs are running if (!Job.getJobManager().isIdle()) { nextInterval = IDLE_INTERVAL; } else if ((start - lastGC) < nextGCInterval) { // don't garbage collect if we have collected within the specific interval nextInterval = nextGCInterval - (int) (start - lastGC); } else { gcJob.schedule(); nextInterval = minGCInterval; } display.timerExec(nextInterval, this); } } }; idleListener = new Listener() { public void handleEvent(Event event) { display.timerExec(IDLE_INTERVAL, handler); } }; display.addFilter(SWT.KeyUp, idleListener); display.addFilter(SWT.MouseUp, idleListener); }
public void initialize(IWorkbenchConfigurer configurer) { IDE.registerAdapters(); }
@Override public void initialize(final IWorkbenchConfigurer configurer) { configurer.setSaveAndRestore(true); }
@Override public void initialize(final IWorkbenchConfigurer configurer) { configurer.setSaveAndRestore(saveAndRestore); super.initialize(configurer); }
public void initialize( IWorkbenchConfigurer configurer ) { super.initialize( configurer ); configurer.setSaveAndRestore( true ); }
private void declareWorkbenchImage(IWorkbenchConfigurer cfg, Bundle ideBundle, String symbolicName, String path, boolean shared) { URL url = ideBundle.getEntry(path); ImageDescriptor desc = ImageDescriptor.createFromURL(url); cfg.declareImage(symbolicName, desc, shared); }
@Override public void initialize(final IWorkbenchConfigurer configurer){ Hub.pin.initializeDisplayPreferences(UiDesk.getDisplay()); configurer.setSaveAndRestore(true); super.initialize(configurer); }
/** * @see org.eclipse.ui.application.WorkbenchAdvisor#initialize(org.eclipse.ui.application.IWorkbenchConfigurer) * <!-- begin-user-doc --> * <!-- end-user-doc --> * @generated */ @Override public void initialize(IWorkbenchConfigurer configurer) { super.initialize(configurer); configurer.setSaveAndRestore(true); }