Java 类org.eclipse.ui.application.IWorkbenchConfigurer 实例源码

项目:tlaplus    文件:ApplicationWorkbenchAdvisor.java   
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();
}
项目:yamcs-studio    文件:YamcsStudioWorkbenchAdvisor.java   
@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();
}
项目:gama    文件:ApplicationWorkbenchAdvisor.java   
@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();
    }

}
项目:synergyview    文件:ApplicationWorkbenchAdvisor.java   
@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.");
}

   }
项目:Environment    文件:ApplicationWorkbenchAdvisor.java   
@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);
}
项目:tlaplus    文件:ApplicationWorkbenchAdvisor.java   
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);
}
项目:PDFReporter-Studio    文件:ApplicationWorkbenchAdvisor.java   
@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);
}
项目:translationstudio8    文件:ApplicationWorkbenchAdvisor.java   
@Override
public void initialize(IWorkbenchConfigurer configurer) {
    super.initialize(configurer);
    // make sure we always save and restore workspace state
    configurer.setSaveAndRestore(true);

    IDE.registerAdapters();
    declareWorkbenchImages();
}
项目:tmxeditor8    文件:ApplicationWorkbenchAdvisor.java   
@Override
public void initialize(IWorkbenchConfigurer configurer) {
    // make sure we always save and restore workspace state
    configurer.setSaveAndRestore(true);

    IDE.registerAdapters();
    declareWorkbenchImages();
}
项目:stammbaum    文件:ApplicationWorkbenchAdvisor.java   
@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);
}
项目:maru    文件:ApplicationWorkbenchAdvisor.java   
@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. */
}
项目:olca-app    文件:RcpWorkbenchAdvisor.java   
@Override
public void initialize(IWorkbenchConfigurer configurer) {
    super.initialize(configurer);
    configurer.setSaveAndRestore(false);
    if (LoggerPreference.getShowConsole()) {
        Console.show();
    }
    changeWorkbenchImages();
}
项目:neoscada    文件:ApplicationWorkbenchAdvisor.java   
@Override
public void initialize ( final IWorkbenchConfigurer configurer )
{
    super.initialize ( configurer );
    configurer.setSaveAndRestore ( true );
}
项目:neoscada    文件:ApplicationWorkbenchAdvisor.java   
@Override
public void initialize ( final IWorkbenchConfigurer configurer )
{
    super.initialize ( configurer );
    configurer.setSaveAndRestore ( true );
}
项目:Hydrograph    文件:ApplicationWorkbenchAdvisor.java   
@Override
public void initialize(IWorkbenchConfigurer configurer) {
    super.initialize(configurer);
}
项目:triquetrum    文件:TriquetrumEditorAdvisor.java   
/**
 * @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);
}
项目:depan    文件:WorkbenchAdvisorHack.java   
@Override
public void initialize(IWorkbenchConfigurer configurer) {
  configurer.setSaveAndRestore(true);
  declareWorkbenchImages();
}
项目:scouter    文件:ApplicationWorkbenchAdvisor.java   
public void initialize(IWorkbenchConfigurer configurer) {
    super.initialize(configurer);
    configurer.setSaveAndRestore(true);
}
项目:PDFReporter-Studio    文件:ApplicationWorkbenchAdvisor.java   
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);
}
项目:IDRT-Import-and-Mapping-Tool    文件:ApplicationWorkbenchAdvisor.java   
@Override
public void initialize(final IWorkbenchConfigurer configurer) {
    super.initialize(configurer);
    configurer.setSaveAndRestore(true);
}
项目:IDRT-Import-and-Mapping-Tool    文件:ApplicationWorkbenchAdvisor.java   
@Override
public void initialize(IWorkbenchConfigurer configurer) {
    super.initialize(configurer);
    configurer.setSaveAndRestore(true);
}
项目:limpet    文件:ApplicationWorkbenchAdvisor.java   
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());
}
项目:limpet    文件:IDEIdleHelper.java   
/**
 * 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);
}
项目:slr-toolkit    文件:ApplicationWorkbenchAdvisor.java   
public void initialize(IWorkbenchConfigurer configurer) 
{
    IDE.registerAdapters();
}
项目:mytourbook    文件:ApplicationWorkbenchAdvisor.java   
@Override
public void initialize(final IWorkbenchConfigurer configurer) {
    configurer.setSaveAndRestore(true);
}
项目:jo-widgets    文件:JoWorkbenchAdvisor.java   
@Override
public void initialize(final IWorkbenchConfigurer configurer) {
    configurer.setSaveAndRestore(saveAndRestore);
    super.initialize(configurer);
}
项目:OpenSPIFe    文件:EnsembleWorkbenchAdvisor.java   
@Override
public void initialize(IWorkbenchConfigurer configurer) {
    super.initialize(configurer);
    configurer.setSaveAndRestore(true);
}
项目:Environment    文件:ApplicationWorkbenchAdvisor.java   
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);
}
项目:tmxeditor8    文件:ApplicationWorkbenchAdvisor.java   
@Override
public void initialize(IWorkbenchConfigurer configurer) {
    super.initialize(configurer);
    configurer.setSaveAndRestore(true);
}
项目:birt    文件:DesignerWorkbenchAdvisor.java   
public void initialize( IWorkbenchConfigurer configurer )
{
    super.initialize( configurer );
    configurer.setSaveAndRestore( true );
}
项目:stammbaum    文件:ApplicationWorkbenchAdvisor.java   
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);
}
项目:redmine.rap    文件:ApplicationWorkbenchAdvisor.java   
@Override
public void initialize(IWorkbenchConfigurer configurer) {
    super.initialize(configurer);
}
项目:maru    文件:ApplicationWorkbenchAdvisor.java   
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);
}
项目:elexis-3-core    文件:ApplicationWorkbenchAdvisor.java   
@Override
public void initialize(final IWorkbenchConfigurer configurer){
    Hub.pin.initializeDisplayPreferences(UiDesk.getDisplay());
    configurer.setSaveAndRestore(true);
    super.initialize(configurer);
}
项目:mondo-demo-wt    文件:WTSpec4MEditorAdvisor.java   
/**
 * @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);
}
项目:OpenSPIFe    文件:DictionaryEditorAdvisor.java   
/**
 * @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);
}
项目:LiquibaseEditor    文件:DbchangelogEditorAdvisor.java   
/**
 * @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);
}
项目:Environment    文件:OverviewEditorAdvisor.java   
/**
 * @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);
}