org.eclipse.ui_3.7.0.v20110928-1505

16:48:41.673 INFO  jd.cli.Main - Decompiling org.eclipse.ui_3.7.0.v20110928-1505.jar
package org.eclipse.ui.internal;

import org.eclipse.core.runtime.Plugin;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.ui.internal.util.PrefUtil.ICallback;
import org.eclipse.ui.plugin.AbstractUIPlugin;

class UIPlugin$1
  implements PrefUtil.ICallback
{
  final UIPlugin this$0;
  
  UIPlugin$1(UIPlugin paramUIPlugin)
  {
    this$0 = paramUIPlugin;
  }
  
  public IPreferenceStore getPreferenceStore()
  {
    return this$0.getPreferenceStore();
  }
  
  public void savePreferences()
  {
    this$0.savePluginPreferences();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.ui.internal.UIPlugin.1
 * Java Class Version: 1.1 (45.3)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.internal;

import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.Plugin;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.ui.internal.util.PrefUtil;
import org.eclipse.ui.internal.util.PrefUtil.ICallback;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;

public final class UIPlugin
  extends AbstractUIPlugin
{
  private static UIPlugin inst;
  
  public UIPlugin()
  {
    inst = this;
  }
  
  protected ImageRegistry createImageRegistry()
  {
    Assert.isLegal(false);
    return null;
  }
  
  public ImageRegistry getImageRegistry()
  {
    Assert.isLegal(false);
    return null;
  }
  
  public static UIPlugin getDefault()
  {
    return inst;
  }
  
  public void start(BundleContext context)
    throws Exception
  {
    super.start(context);
    
    PrefUtil.setUICallback(new PrefUtil.ICallback()
    {
      public IPreferenceStore getPreferenceStore()
      {
        return UIPlugin.this.getPreferenceStore();
      }
      
      public void savePreferences()
      {
        savePluginPreferences();
      }
    });
  }
}

/* Location:
 * Qualified Name:     org.eclipse.ui.internal.UIPlugin
 * Java Class Version: 1.1 (45.3)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.internal;

import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.IEclipsePreferences.INodeChangeListener;
import org.eclipse.core.runtime.preferences.IEclipsePreferences.NodeChangeEvent;
import org.osgi.service.prefs.Preferences;

class UIPreferenceInitializer$1
  implements IEclipsePreferences.INodeChangeListener
{
  final UIPreferenceInitializer this$0;
  private final String val$uiName;
  
  UIPreferenceInitializer$1(UIPreferenceInitializer paramUIPreferenceInitializer, String paramString)
  {
    this$0 = paramUIPreferenceInitializer;val$uiName = paramString;
  }
  
  public void added(IEclipsePreferences.NodeChangeEvent event)
  {
    if (!event.getChild().name().equals(val$uiName)) {
      return;
    }
    ((IEclipsePreferences)event.getChild()).addPreferenceChangeListener(
      PlatformUIPreferenceListener.getSingleton());
  }
  
  public void removed(IEclipsePreferences.NodeChangeEvent event) {}
}

/* Location:
 * Qualified Name:     org.eclipse.ui.internal.UIPreferenceInitializer.1
 * Java Class Version: 1.1 (45.3)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.ui.internal;

import org.eclipse.core.runtime.ILog;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Plugin;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.eclipse.core.runtime.preferences.DefaultScope;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import org.eclipse.core.runtime.preferences.IEclipsePreferences.INodeChangeListener;
import org.eclipse.core.runtime.preferences.IEclipsePreferences.NodeChangeEvent;
import org.eclipse.core.runtime.preferences.IPreferencesService;
import org.eclipse.core.runtime.preferences.IScopeContext;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.Bundle;
import org.osgi.service.prefs.BackingStoreException;
import org.osgi.service.prefs.Preferences;

public class UIPreferenceInitializer
  extends AbstractPreferenceInitializer
{
  public void initializeDefaultPreferences()
  {
    IScopeContext context = new DefaultScope();
    IEclipsePreferences node = context.getNode(UIPlugin.getDefault()
      .getBundle().getSymbolicName());
    node.put("OPEN_NEW_PERSPECTIVE", 
      "OPEN_PERSPECTIVE_REPLACE");
    
    node.put("PROJECT_OPEN_NEW_PERSPECTIVE", 
      "OPEN_PERSPECTIVE_REPLACE");
    node.put("SHIFT_OPEN_NEW_PERSPECTIVE", 
      "OPEN_PERSPECTIVE_REPLACE");
    node.put("ALTERNATE_OPEN_NEW_PERSPECTIVE", 
      "OPEN_PERSPECTIVE_REPLACE");
    
    node.putBoolean("LINK_NAVIGATOR_TO_EDITOR", 
      false);
    
    node.put("presentationFactoryId", 
      "org.eclipse.ui.presentations.default");
    node
      .putBoolean(
      "SHOW_TRADITIONAL_STYLE_TABS", 
      true);
    node.putBoolean("ENABLE_ANIMATIONS", true);
    node.putBoolean("USE_COLORED_LABELS", true);
    node.put("DOCK_PERSPECTIVE_BAR", 
      "topLeft");
    node.putBoolean(
      "SHOW_TEXT_ON_PERSPECTIVE_BAR", 
      true);
    node.putBoolean(
      "SHOW_OTHER_IN_PERSPECTIVE_MENU", 
      true);
    node.putBoolean(
      "SHOW_OPEN_ON_PERSPECTIVE_BAR", 
      true);
    
    node.put("initialFastViewBarLocation", 
      "bottom");
    
    node.putBoolean("showIntro", true);
    
    node.put("KEY_CONFIGURATION_ID", 
      "org.eclipse.ui.defaultAcceleratorConfiguration");
    
    node.putBoolean("SHOW_SYSTEM_JOBS", false);
    
    node
      .putInt(
      "EDITOR_MINIMUM_CHARACTERS", 
      -1);
    
    node.putInt("VIEW_MINIMUM_CHARACTERS", 1);
    
    node.putBoolean("CLOSE_EDITORS_ON_EXIT", 
      false);
    
    node
      .putBoolean(
      "USE_WINDOW_WORKING_SET_BY_DEFAULT", 
      false);
    
    node
      .putBoolean("SHOW_FILTERED_TEXTS", 
      true);
    
    node.putBoolean("ENABLE_DETACHED_VIEWS", 
      true);
    
    node.putBoolean(
      "PROMPT_WHEN_SAVEABLE_STILL_OPEN", 
      true);
    
    node.putBoolean("ENABLE_MIN_MAX", true);
    
    node.putBoolean("disableNewFastView", 
      false);
    
    node.putBoolean(
      "ENABLE_32_STICKY_CLOSE_BEHAVIOR", 
      false);
    
    node.putInt("VIEW_TAB_POSITION", 128);
    node.putInt("EDITOR_TAB_POSITION", 128);
    node.putBoolean(
      "SHOW_MULTIPLE_EDITOR_TABS", true);
    
    node.putInt("RECENTLY_USED_WORKINGSETS_SIZE", 5);
    
    migrateInternalPreferences();
    
    IEclipsePreferences rootNode = (IEclipsePreferences)
      Platform.getPreferencesService().getRootNode()
      .node("instance");
    
    String uiName = UIPlugin.getDefault().getBundle()
      .getSymbolicName();
    try
    {
      if (rootNode.nodeExists(uiName)) {
        ((IEclipsePreferences)rootNode.node(uiName)).addPreferenceChangeListener(
          PlatformUIPreferenceListener.getSingleton());
      }
    }
    catch (BackingStoreException e)
    {
      IStatus status = new Status(4, UIPlugin.getDefault()
        .getBundle().getSymbolicName(), 4, e
        .getLocalizedMessage(), e);
      UIPlugin.getDefault().getLog().log(status);
    }
    rootNode.addNodeChangeListener(new IEclipsePreferences.INodeChangeListener()
    {
      private final String val$uiName;
      
      public void added(IEclipsePreferences.NodeChangeEvent event)
      {
        if (!event.getChild().name().equals(val$uiName)) {
          return;
        }
        ((IEclipsePreferences)event.getChild()).addPreferenceChangeListener(
          PlatformUIPreferenceListener.getSingleton());
      }
      
      public void removed(IEclipsePreferences.NodeChangeEvent event) {}
    });
  }
  
  private void migrateInternalPreferences()
  {
    IPreferenceStore internalStore = WorkbenchPlugin.getDefault()
      .getPreferenceStore();
    IPreferenceStore apiStore = PlatformUI.getPreferenceStore();
    if (internalStore.contains("VIEW_TAB_POSITION"))
    {
      apiStore.setValue("VIEW_TAB_POSITION", 
        internalStore.getInt("VIEW_TAB_POSITION"));
      internalStore
        .setToDefault("VIEW_TAB_POSITION");
    }
    if (internalStore.contains("EDITOR_TAB_POSITION"))
    {
      apiStore.setValue(
        "EDITOR_TAB_POSITION", 
        internalStore.getInt("EDITOR_TAB_POSITION"));
      internalStore
        .setToDefault("EDITOR_TAB_POSITION");
    }
    if (internalStore.contains("SHOW_MULTIPLE_EDITOR_TABS"))
    {
      apiStore.setValue(
        "SHOW_MULTIPLE_EDITOR_TABS", 
        internalStore
        .getBoolean("SHOW_MULTIPLE_EDITOR_TABS"));
      internalStore
        .setToDefault("SHOW_MULTIPLE_EDITOR_TABS");
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.ui.internal.UIPreferenceInitializer
 * Java Class Version: 1.1 (45.3)
 * JD-Core Version:    0.7.1
 */
1

Further reading...

For more information on Java 1.5 Tiger, you may find Java 1.5 Tiger, A developer's Notebook by D. Flanagan and B. McLaughlin from O'Reilly of interest.

New!JAR listings


Copyright 2006-2019. Infinite Loop Ltd