org.eclipse.update.ui_3.2.300.v20100512

16:48:46.864 INFO  jd.cli.Main - Decompiling org.eclipse.update.ui_3.2.300.v20100512.jar
package org.eclipse.update.internal.ui;

import org.eclipse.jface.action.Action;

class ConfigurationManagerWindow$1
  extends Action
{
  final ConfigurationManagerWindow this$0;
  
  ConfigurationManagerWindow$1(ConfigurationManagerWindow paramConfigurationManagerWindow)
  {
    this$0 = paramConfigurationManagerWindow;
  }
  
  public void run()
  {
    this$0.close();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.update.internal.ui.ConfigurationManagerWindow.1
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.update.internal.ui;

import java.util.Hashtable;
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.IJobChangeListener;
import org.eclipse.core.runtime.jobs.IJobManager;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.update.ui.UpdateJob;

class ConfigurationManagerWindow$2
  implements IJobChangeListener
{
  final ConfigurationManagerWindow this$0;
  
  ConfigurationManagerWindow$2(ConfigurationManagerWindow paramConfigurationManagerWindow)
  {
    this$0 = paramConfigurationManagerWindow;
  }
  
  public void aboutToRun(IJobChangeEvent event) {}
  
  public void awake(IJobChangeEvent event) {}
  
  public void done(IJobChangeEvent event)
  {
    Job job = event.getJob();
    if (job.belongsTo(UpdateJob.FAMILY))
    {
      Job[] remaining = Job.getJobManager().find(UpdateJob.FAMILY);
      ConfigurationManagerWindow.access$0(this$0, false, remaining);
      ConfigurationManagerWindow.access$1(this$0).remove(job);
    }
  }
  
  public void running(IJobChangeEvent event)
  {
    Job job = event.getJob();
    if (job.belongsTo(UpdateJob.FAMILY))
    {
      Job[] existing = Job.getJobManager().find(UpdateJob.FAMILY);
      ConfigurationManagerWindow.access$0(this$0, true, existing);
    }
  }
  
  public void scheduled(IJobChangeEvent event) {}
  
  public void sleeping(IJobChangeEvent event) {}
}

/* Location:
 * Qualified Name:     org.eclipse.update.internal.ui.ConfigurationManagerWindow.2
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.update.internal.ui;

import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.action.StatusLineManager;

class ConfigurationManagerWindow$3
  implements Runnable
{
  final ConfigurationManagerWindow this$0;
  private final boolean val$begin;
  private final Job[] val$jobs;
  
  ConfigurationManagerWindow$3(ConfigurationManagerWindow paramConfigurationManagerWindow, boolean paramBoolean, Job[] paramArrayOfJob)
  {
    this$0 = paramConfigurationManagerWindow;val$begin = paramBoolean;val$jobs = paramArrayOfJob;
  }
  
  public void run()
  {
    IProgressMonitor monitor = ConfigurationManagerWindow.access$2(this$0)
      .getProgressMonitor();
    if (val$begin)
    {
      if (val$jobs.length == 1) {
        monitor.beginTask("", -1);
      }
      ConfigurationManagerWindow.access$3(this$0, monitor, val$jobs);
      ConfigurationManagerWindow.access$2(this$0).setCancelEnabled(true);
    }
    else if (val$jobs.length == 0)
    {
      ConfigurationManagerWindow.access$2(this$0).setCancelEnabled(false);
      monitor.done();
    }
    else
    {
      ConfigurationManagerWindow.access$3(this$0, monitor, val$jobs);
    }
    ConfigurationManagerWindow.access$2(this$0).update(true);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.update.internal.ui.ConfigurationManagerWindow.3
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.update.internal.ui;

import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;

class ConfigurationManagerWindow$GlobalAction
  extends Action
  implements IPropertyChangeListener
{
  private IAction handler;
  final ConfigurationManagerWindow this$0;
  
  public ConfigurationManagerWindow$GlobalAction(ConfigurationManagerWindow paramConfigurationManagerWindow)
  {
    this$0 = paramConfigurationManagerWindow;
  }
  
  public void setActionHandler(IAction action)
  {
    if (handler != null)
    {
      handler.removePropertyChangeListener(this);
      handler = null;
    }
    if (action != null)
    {
      handler = action;
      action.addPropertyChangeListener(this);
    }
    if (handler != null)
    {
      setEnabled(handler.isEnabled());
      setChecked(handler.isChecked());
    }
  }
  
  public void propertyChange(PropertyChangeEvent event)
  {
    if (event.getProperty().equals("enabled"))
    {
      Boolean bool = (Boolean)event.getNewValue();
      setEnabled(bool.booleanValue());
    }
    else if (event.getProperty().equals("checked"))
    {
      Boolean bool = (Boolean)event.getNewValue();
      setChecked(bool.booleanValue());
    }
  }
  
  public void run()
  {
    if (handler != null) {
      handler.run();
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.update.internal.ui.ConfigurationManagerWindow.GlobalAction
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.update.internal.ui;

import java.util.Hashtable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.IJobChangeListener;
import org.eclipse.core.runtime.jobs.IJobManager;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.action.StatusLineManager;
import org.eclipse.jface.action.ToolBarManager;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.window.ApplicationWindow;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.update.internal.ui.views.ConfigurationView;
import org.eclipse.update.ui.UpdateJob;

public class ConfigurationManagerWindow
  extends ApplicationWindow
{
  private ConfigurationView view;
  private GlobalAction propertiesAction;
  private IAction propertiesActionHandler;
  private IJobChangeListener jobListener;
  private Hashtable jobNames;
  
  class GlobalAction
    extends Action
    implements IPropertyChangeListener
  {
    private IAction handler;
    
    public GlobalAction() {}
    
    public void setActionHandler(IAction action)
    {
      if (handler != null)
      {
        handler.removePropertyChangeListener(this);
        handler = null;
      }
      if (action != null)
      {
        handler = action;
        action.addPropertyChangeListener(this);
      }
      if (handler != null)
      {
        setEnabled(handler.isEnabled());
        setChecked(handler.isChecked());
      }
    }
    
    public void propertyChange(PropertyChangeEvent event)
    {
      if (event.getProperty().equals("enabled"))
      {
        Boolean bool = (Boolean)event.getNewValue();
        setEnabled(bool.booleanValue());
      }
      else if (event.getProperty().equals("checked"))
      {
        Boolean bool = (Boolean)event.getNewValue();
        setChecked(bool.booleanValue());
      }
    }
    
    public void run()
    {
      if (handler != null) {
        handler.run();
      }
    }
  }
  
  public ConfigurationManagerWindow(Shell parentShell)
  {
    super(parentShell);
    setShellStyle(getShellStyle() | 0x10000);
    
    addMenuBar();
    addActions();
    addToolBar(8388608);
    addStatusLine();
  }
  
  public boolean isProgressCanceled()
  {
    return getStatusLineManager().getProgressMonitor().isCanceled();
  }
  
  private void addActions()
  {
    IMenuManager menuBar = getMenuBarManager();
    IMenuManager fileMenu = new MenuManager(
      UpdateUIMessages.ConfigurationManagerWindow_fileMenu);
    menuBar.add(fileMenu);
    
    propertiesAction = new GlobalAction();
    propertiesAction
      .setText(UpdateUIMessages.ConfigurationManagerWindow_properties);
    propertiesAction.setEnabled(false);
    
    fileMenu.add(propertiesAction);
    fileMenu.add(new Separator());
    
    Action closeAction = new Action()
    {
      public void run()
      {
        close();
      }
    };
    closeAction.setText(UpdateUIMessages.ConfigurationManagerWindow_close);
    fileMenu.add(closeAction);
  }
  
  private void hookGlobalActions()
  {
    if (propertiesActionHandler != null) {
      propertiesAction.setActionHandler(propertiesActionHandler);
    }
  }
  
  protected Control createContents(Composite parent)
  {
    view = new ConfigurationView(this);
    Composite container = new Composite(parent, 0);
    GridLayout layout = new GridLayout();
    marginWidth = (marginHeight = 0);
    verticalSpacing = 0;
    container.setLayout(layout);
    
    addSeparator(container);
    
    view.createPartControl(container);
    Control viewControl = view.getControl();
    GridData gd = new GridData(1808);
    viewControl.setLayoutData(gd);
    
    addSeparator(container);
    
    hookGlobalActions();
    
    updateActionBars();
    
    UpdateLabelProvider provider = UpdateUI.getDefault().getLabelProvider();
    getShell().setImage(provider.get(UpdateUIImages.DESC_CONFIGS_VIEW, 0));
    
    return container;
  }
  
  public void updateStatusLine(String message, Image image)
  {
    getStatusLineManager().setMessage(image, message);
    getStatusLineManager().update(true);
  }
  
  public void trackUpdateJob(Job job, String name)
  {
    if (jobListener == null)
    {
      jobNames = new Hashtable();
      jobListener = new IJobChangeListener()
      {
        public void aboutToRun(IJobChangeEvent event) {}
        
        public void awake(IJobChangeEvent event) {}
        
        public void done(IJobChangeEvent event)
        {
          Job job = event.getJob();
          if (job.belongsTo(UpdateJob.FAMILY))
          {
            Job[] remaining = Job.getJobManager().find(UpdateJob.FAMILY);
            ConfigurationManagerWindow.this.updateProgress(false, remaining);
            jobNames.remove(job);
          }
        }
        
        public void running(IJobChangeEvent event)
        {
          Job job = event.getJob();
          if (job.belongsTo(UpdateJob.FAMILY))
          {
            Job[] existing = Job.getJobManager().find(UpdateJob.FAMILY);
            ConfigurationManagerWindow.this.updateProgress(true, existing);
          }
        }
        
        public void scheduled(IJobChangeEvent event) {}
        
        public void sleeping(IJobChangeEvent event) {}
      };
      Job.getJobManager().addJobChangeListener(jobListener);
    }
    jobNames.put(job, name);
  }
  
  private void updateProgress(boolean begin, Job[] jobs)
  {
    getShell().getDisplay().asyncExec(new Runnable()
    {
      private final boolean val$begin;
      private final Job[] val$jobs;
      
      public void run()
      {
        IProgressMonitor monitor = getStatusLineManager()
          .getProgressMonitor();
        if (val$begin)
        {
          if (val$jobs.length == 1) {
            monitor.beginTask("", -1);
          }
          ConfigurationManagerWindow.this.updateTaskName(monitor, val$jobs);
          getStatusLineManager().setCancelEnabled(true);
        }
        else if (val$jobs.length == 0)
        {
          getStatusLineManager().setCancelEnabled(false);
          monitor.done();
        }
        else
        {
          ConfigurationManagerWindow.this.updateTaskName(monitor, val$jobs);
        }
        getStatusLineManager().update(true);
      }
    });
  }
  
  private void updateTaskName(IProgressMonitor monitor, Job[] jobs)
  {
    StringBuffer buf = new StringBuffer();
    for (int i = 0; i < jobs.length; i++)
    {
      String name = (String)jobNames.get(jobs[i]);
      if (name != null)
      {
        if (buf.length() > 0) {
          buf.append(", ");
        }
        buf.append(name);
      }
    }
    monitor.subTask(NLS.bind(
      UpdateUIMessages.ConfigurationManagerWindow_searchTaskName, 
      buf.toString()));
  }
  
  private void addSeparator(Composite parent)
  {
    Label separator = new Label(parent, 258);
    GridData gd = new GridData(256);
    heightHint = 1;
    separator.setLayoutData(gd);
  }
  
  private void updateActionBars()
  {
    getMenuBarManager().updateAll(false);
    getToolBarManager().update(false);
    getStatusLineManager().update(false);
  }
  
  public boolean close()
  {
    if (jobListener != null) {
      Job.getJobManager().removeJobChangeListener(jobListener);
    }
    if (view != null) {
      view.dispose();
    }
    return super.close();
  }
  
  public void create()
  {
    super.create();
    
    getShell().setText(UpdateUIMessages.ConfigurationManagerAction_title);
    getShell().setSize(800, 600);
  }
  
  public int open()
  {
    updateActionBars();
    return super.open();
  }
  
  public void setPropertiesActionHandler(IAction handler)
  {
    propertiesActionHandler = handler;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.update.internal.ui.ConfigurationManagerWindow
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.update.internal.ui;

import org.eclipse.core.runtime.IProduct;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.update.operations.OperationsManager;

public class RestartDialog
  extends MessageDialog
{
  private static final int CONTINUE = 2;
  private static final String[] yesNo = { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL };
  private static final String[] yesNoApply = { IDialogConstants.YES_LABEL, IDialogConstants.NO_LABEL, UpdateUIMessages.ApplyChanges };
  private int buttonId = 0;
  
  public RestartDialog(Shell parent, String title, String message, boolean restartNeeded)
  {
    super(parent, title, null, message, 3, restartNeeded ? yesNo : yesNoApply, 0);
  }
  
  public static boolean openQuestion(Shell parent, boolean restartIsReallyNeeded)
  {
    String title = UpdateUIMessages.RestartTitle;
    IProduct product = Platform.getProduct();
    String productName = (product != null) && (product.getName() != null) ? product.getName() : UpdateUIMessages.ApplicationInRestartDialog;
    String message = NLS.bind(restartIsReallyNeeded ? UpdateUIMessages.RestartMessage : UpdateUIMessages.OptionalRestartMessage, productName);
    RestartDialog dialog = new RestartDialog(parent, title, message, restartIsReallyNeeded);
    int button = dialog.open();
    if (button == 2) {
      OperationsManager.applyChangesNow();
    }
    return button == 0;
  }
  
  protected void buttonPressed(int id)
  {
    if (id == 2) {
      buttonId = 2;
    }
    super.buttonPressed(id);
  }
  
  public int getResult()
  {
    return buttonId;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.update.internal.ui.RestartDialog
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.update.internal.ui;

import java.io.ByteArrayOutputStream;
import java.io.UnsupportedEncodingException;

public class URLCoder
{
  public static String encode(String s)
    throws UnsupportedEncodingException
  {
    return urlEncode(s.getBytes("UTF8"));
  }
  
  public static String decode(String s)
    throws UnsupportedEncodingException
  {
    return new String(urlDecode(s), "UTF8");
  }
  
  private static String urlEncode(byte[] data)
  {
    StringBuffer buf = new StringBuffer(data.length);
    for (int i = 0; i < data.length; i++)
    {
      buf.append('%');
      buf.append(Character.forDigit((data[i] & 0xF0) >>> 4, 16));
      buf.append(Character.forDigit(data[i] & 0xF, 16));
    }
    return buf.toString();
  }
  
  private static byte[] urlDecode(String encodedURL)
  {
    int len = encodedURL.length();
    ByteArrayOutputStream os = new ByteArrayOutputStream(len);
    for (int i = 0; i < len;) {
      switch (encodedURL.charAt(i))
      {
      case '%': 
        if (len >= i + 3) {
          os.write(Integer.parseInt(encodedURL.substring(i + 1, i + 3), 16));
        }
        i += 3;
        break;
      case '+': 
        os.write(32);
        i++;
        break;
      default: 
        os.write(encodedURL.charAt(i++));
      }
    }
    return os.toByteArray();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.update.internal.ui.URLCoder
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.update.internal.ui;

import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.swt.graphics.Image;
import org.eclipse.update.configuration.IConfiguredSite;
import org.eclipse.update.internal.ui.parts.SharedLabelProvider;

public class UpdateLabelProvider
  extends SharedLabelProvider
{
  public String getText(Object obj)
  {
    return super.getText(obj);
  }
  
  public Image getImage(Object obj)
  {
    return super.getImage(obj);
  }
  
  public ImageDescriptor getLocalSiteDescriptor(IConfiguredSite csite)
  {
    if (csite.isProductSite()) {
      return UpdateUIImages.DESC_PSITE_OBJ;
    }
    if (csite.isExtensionSite()) {
      return UpdateUIImages.DESC_ESITE_OBJ;
    }
    return UpdateUIImages.DESC_LSITE_OBJ;
  }
  
  public Image getLocalSiteImage(IConfiguredSite csite)
  {
    ImageDescriptor desc = getLocalSiteDescriptor(csite);
    return get(desc);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.update.internal.ui.UpdateLabelProvider
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.update.internal.ui;

import java.io.UnsupportedEncodingException;
import java.lang.reflect.InvocationTargetException;
import java.net.MalformedURLException;
import java.net.URL;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.ILog;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Preferences;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.browser.IWebBrowser;
import org.eclipse.ui.browser.IWorkbenchBrowserSupport;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.update.internal.ui.model.UpdateModel;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;

public class UpdateUI
  extends AbstractUIPlugin
{
  public static final String PLUGIN_ID = "org.eclipse.update.ui";
  public static final String WEB_APP_ID = "org.eclipse.update";
  public static final String P_DISCOVERY_SITES_ENABLED = "discoverySitesEnabled";
  private static UpdateUI plugin;
  private UpdateModel model;
  private String appServerHost;
  private int appServerPort;
  private UpdateLabelProvider labelProvider;
  
  public UpdateUI()
  {
    plugin = this;
  }
  
  public static UpdateUI getDefault()
  {
    return plugin;
  }
  
  public static Shell getActiveWorkbenchShell()
  {
    IWorkbenchWindow window = getActiveWorkbenchWindow();
    return window != null ? window.getShell() : getStandardDisplay().getActiveShell();
  }
  
  public static IWorkbenchWindow getActiveWorkbenchWindow()
  {
    return getDefault().getWorkbench().getActiveWorkbenchWindow();
  }
  
  public static String getPluginId()
  {
    return getDefault().getBundle().getSymbolicName();
  }
  
  public UpdateLabelProvider getLabelProvider()
  {
    if (labelProvider == null) {
      labelProvider = new UpdateLabelProvider();
    }
    return labelProvider;
  }
  
  public void start(BundleContext context)
    throws Exception
  {
    super.start(context);
    model = new UpdateModel();
    int historyPref = 
      getPluginPreferences().getInt("org.eclipse.update.core.historySize");
    if (historyPref > 0) {
      org.eclipse.update.internal.core.UpdateCore.DEFAULT_HISTORY = historyPref;
    }
  }
  
  public String getAppServerHost()
  {
    return appServerHost;
  }
  
  public int getAppServerPort()
  {
    return appServerPort;
  }
  
  public void stop(BundleContext context)
    throws Exception
  {
    if (model != null) {
      model.shutdown();
    }
    if (labelProvider != null) {
      labelProvider.dispose();
    }
    super.stop(context);
  }
  
  public UpdateModel getUpdateModel()
  {
    return model;
  }
  
  public static void logException(Throwable e)
  {
    logException(e, true);
  }
  
  public static void logException(Throwable e, boolean showErrorDialog)
  {
    if ((e instanceof InvocationTargetException)) {
      e = ((InvocationTargetException)e).getTargetException();
    }
    IStatus status = null;
    if ((e instanceof CoreException))
    {
      status = ((CoreException)e).getStatus();
    }
    else
    {
      String message = e.getMessage();
      if (message == null) {
        message = e.toString();
      }
      status = 
        new Status(
        4, 
        getPluginId(), 
        0, 
        message, 
        e);
    }
    log(status, showErrorDialog);
  }
  
  public static void log(IStatus status, boolean showErrorDialog)
  {
    Bundle bundle = Platform.getBundle("org.eclipse.update.ui");
    Platform.getLog(bundle).log(status);
    if ((Display.getCurrent() == null) || (!showErrorDialog)) {
      return;
    }
    if (status.getSeverity() != 1) {
      ErrorDialog.openError(getActiveWorkbenchShell(), null, null, status);
    } else {
      MessageDialog.openInformation(getActiveWorkbenchShell(), null, status.getMessage());
    }
  }
  
  public static URL getOriginatingURL(String id)
  {
    IDialogSettings section = getOriginatingURLSection();
    String value = section.get(id);
    if (value != null) {
      try
      {
        return new URL(value);
      }
      catch (MalformedURLException localMalformedURLException) {}
    }
    return null;
  }
  
  public static void setOriginatingURL(String id, URL url)
  {
    IDialogSettings section = getOriginatingURLSection();
    section.put(id, url.toString());
  }
  
  private static IDialogSettings getOriginatingURLSection()
  {
    IDialogSettings settings = getDefault().getDialogSettings();
    IDialogSettings section = settings.getSection("originatingURLs");
    if (section == null) {
      section = settings.addNewSection("originatingURLs");
    }
    return section;
  }
  
  public static boolean requestRestart(boolean restartIsReallyNeeded)
  {
    boolean restart = 
      RestartDialog.openQuestion(
      getActiveWorkbenchShell(), 
      restartIsReallyNeeded);
    if (restart) {
      return PlatformUI.getWorkbench().restart();
    }
    return false;
  }
  
  public static void showURL(String url)
  {
    showURL(url, false);
  }
  
  public static void showURL(String url, boolean encodeHostAndPort)
  {
    if (encodeHostAndPort) {
      url = encodeHostAndPort(url);
    }
    IWorkbenchBrowserSupport support = PlatformUI.getWorkbench().getBrowserSupport();
    try
    {
      IWebBrowser browser = support.getExternalBrowser();
      browser.openURL(new URL(url));
    }
    catch (MalformedURLException e)
    {
      logException(e);
    }
    catch (PartInitException e)
    {
      logException(e);
    }
  }
  
  private static String encodeHostAndPort(String urlName)
  {
    String callbackURL = getCallbackURLAsString();
    if (callbackURL == null) {
      return urlName;
    }
    String callbackParameter = "updateURL=" + callbackURL;
    if (urlName.indexOf('?') != -1) {
      return urlName + "&" + callbackParameter;
    }
    return urlName + "?" + callbackParameter;
  }
  
  private static String getCallbackURLAsString()
  {
    String host = getDefault().getAppServerHost();
    int port = getDefault().getAppServerPort();
    if ((host == null) || (port == 0)) {
      return null;
    }
    String value = 
      "http://" + 
      host + 
      ":" + 
      port + 
      "/" + 
      "org.eclipse.update" + 
      "/install";
    try
    {
      value = URLCoder.encode(value);
    }
    catch (UnsupportedEncodingException localUnsupportedEncodingException) {}
    return value;
  }
  
  public static Display getStandardDisplay()
  {
    Display display = Display.getCurrent();
    if (display == null) {
      display = Display.getDefault();
    }
    return display;
  }
  
  protected void initializeDefaultPluginPreferences()
  {
    Preferences store = getPluginPreferences();
    store.setDefault("discoverySitesEnabled", true);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.update.internal.ui.UpdateUI
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.update.internal.ui;

import java.net.URL;
import org.eclipse.core.runtime.FileLocator;
import org.eclipse.core.runtime.Path;
import org.eclipse.jface.resource.ImageDescriptor;

public class UpdateUIImages
{
  public static final String ICONS_PATH = "icons/";
  private static final String PATH_OBJ = "icons/obj16/";
  private static final String PATH_VIEW = "icons/eview16/";
  private static final String PATH_LCL = "icons/elcl16/";
  private static final String PATH_LCL_DISABLED = "icons/dlcl16/";
  private static final String PATH_OVR = "icons/ovr16/";
  private static final String PATH_WIZBAN = "icons/wizban/";
  public static final String PATH_FORMS = "icons/forms/";
  public static final ImageDescriptor DESC_APP_OBJ = create("icons/obj16/", "app_obj.gif");
  public static final ImageDescriptor DESC_CATEGORY_OBJ = create("icons/obj16/", "category_obj.gif");
  public static final ImageDescriptor DESC_CONFIG_OBJ = create("icons/obj16/", "config_obj.gif");
  public static final ImageDescriptor DESC_FEATURE_OBJ = create("icons/obj16/", "feature_obj.gif");
  public static final ImageDescriptor DESC_EFIX_OBJ = create("icons/obj16/", "efix2_obj.gif");
  public static final ImageDescriptor DESC_HISTORY_OBJ = create("icons/obj16/", "history_obj.gif");
  public static final ImageDescriptor DESC_LSITE_OBJ = create("icons/obj16/", "lsite_obj.gif");
  public static final ImageDescriptor DESC_PSITE_OBJ = create("icons/obj16/", "psite_obj.gif");
  public static final ImageDescriptor DESC_ESITE_OBJ = create("icons/obj16/", "esite_obj.gif");
  public static final ImageDescriptor DESC_SITE_OBJ = create("icons/obj16/", "site_obj.gif");
  public static final ImageDescriptor DESC_UNCONF_FEATURE_OBJ = create("icons/obj16/", "unconf_feature_obj.gif");
  public static final ImageDescriptor DESC_NOTINST_FEATURE_OBJ = create("icons/obj16/", "notinstalled_feature_obj.gif");
  public static final ImageDescriptor DESC_ERR_ST_OBJ = create("icons/obj16/", "error_st_obj.gif");
  public static final ImageDescriptor DESC_OK_ST_OBJ = create("icons/obj16/", "ok_st_obj.gif");
  public static final ImageDescriptor DESC_LINKED_CO = create("icons/ovr16/", "linked_co.gif");
  public static final ImageDescriptor DESC_UPDATED_CO = create("icons/ovr16/", "updated_co.gif");
  public static final ImageDescriptor DESC_CURRENT_CO = create("icons/ovr16/", "current_co.gif");
  public static final ImageDescriptor DESC_ERROR_CO = create("icons/ovr16/", "error_co.gif");
  public static final ImageDescriptor DESC_WARNING_CO = create("icons/ovr16/", "warning_co.gif");
  public static final ImageDescriptor DESC_MOD_CO = create("icons/ovr16/", "mod_co.gif");
  public static final ImageDescriptor DESC_ADD_CO = create("icons/ovr16/", "add_stat.gif");
  public static final ImageDescriptor DESC_DEL_CO = create("icons/ovr16/", "del_stat.gif");
  public static final ImageDescriptor DESC_UNCONF_CO = create("icons/ovr16/", "unconfigured_co.gif");
  public static final ImageDescriptor DESC_CONFIGS_VIEW = create("icons/eview16/", "configs.gif");
  public static final ImageDescriptor DESC_COLLAPSE_ALL = create("icons/elcl16/", "collapseall.gif");
  public static final ImageDescriptor DESC_SHOW_HIERARCHY = create("icons/elcl16/", "hierarchicalLayout.gif");
  public static final ImageDescriptor DESC_SHOW_HIERARCHY_D = create("icons/dlcl16/", "hierarchicalLayout.gif");
  public static final ImageDescriptor DESC_UPDATE_WIZ = create("icons/wizban/", "update_wiz.gif");
  public static final ImageDescriptor DESC_CONFIG_WIZ = create("icons/wizban/", "config_wiz.gif");
  public static final ImageDescriptor DESC_INSTALL_BANNER = create("icons/wizban/", "def_wizban.jpg");
  public static final ImageDescriptor DESC_PROVIDER = create("icons/forms/", "def_provider.jpg");
  
  private static ImageDescriptor create(String prefix, String name)
  {
    return ImageDescriptor.createFromURL(makeImageURL(prefix, name));
  }
  
  private static URL makeImageURL(String prefix, String name)
  {
    String path = "$nl$/" + prefix + name;
    return FileLocator.find(UpdateUI.getDefault().getBundle(), new Path(path), null);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.update.internal.ui.UpdateUIImages
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.update.internal.ui;

import org.eclipse.osgi.util.NLS;

public final class UpdateUIMessages
  extends NLS
{
  private static final String BUNDLE_NAME = "org.eclipse.update.internal.ui.UpdateUIPluginResources";
  public static String RestartTitle;
  public static String RestartMessage;
  public static String OptionalRestartMessage;
  public static String ApplicationInRestartDialog;
  public static String ApplyChanges;
  public static String ConfigurationManagerAction_title;
  public static String ConfigurationManagerWindow_fileMenu;
  public static String ConfigurationManagerWindow_properties;
  public static String ConfigurationManagerWindow_close;
  public static String InstallWizardAction_title;
  public static String InstallWizard_retryTitle;
  public static String InstallWizard_retry;
  public static String TargetPage_Feature_Size;
  public static String TargetPage_Feature_Version;
  public static String TargetPage_FeatureNameColumn;
  public static String TargetPage_InstallationDirectoryColumn;
  public static String DiscoveryFolder_name;
  public static String FeatureAdapter_failure;
  public static String SiteBookmark_connecting;
  public static String SiteBookmark_downloading;
  public static String MainPreferencePage_checkSignature;
  public static String MainPreferencePage_automaticallyChooseMirror;
  public static String MainPreferencePage_historySize;
  public static String MainPreferencePage_invalidHistorySize;
  public static String MainPreferencePage_updateVersions;
  public static String MainPreferencePage_updateVersions_equivalent;
  public static String MainPreferencePage_updateVersions_compatible;
  public static String MainPreferencePage_updatePolicy;
  public static String MainPreferencePage_updatePolicyURL;
  public static String MainPreferencePage_proxyGroup;
  public static String MainPreferencePage_digitalSignature_title;
  public static String MainPreferencePage_digitalSignature_message;
  public static String UpdateSettingsPreferencePage_description;
  public static String UpdateSettingsPreferencePage_label;
  public static String UpdateSettingsPreferencePage_invalid;
  public static String ConfiguredSitePropertyPage_path;
  public static String ConfiguredSitePropertyPage_type;
  public static String ConfiguredSitePropertyPage_enabled;
  public static String ConfiguredSitePropertyPage_yes;
  public static String ConfiguredSitePropertyPage_no;
  public static String ConfiguredSitePropertyPage_extension;
  public static String ConfiguredSitePropertyPage_product;
  public static String ConfiguredSitePropertyPage_unknown;
  public static String FeatureCopyrightPropertyPage_showInBrowser;
  public static String FeatureCopyrightPropertyPage_noCopyright;
  public static String FeatureGeneralPropertyPage_name;
  public static String FeatureGeneralPropertyPage_id;
  public static String FeatureGeneralPropertyPage_version;
  public static String FeatureGeneralPropertyPage_provider;
  public static String FeatureGeneralPropertyPage_size;
  public static String FeatureGeneralPropertyPage_platforms;
  public static String FeatureGeneralPropertyPage_ws;
  public static String FeatureGeneralPropertyPage_arch;
  public static String FeatureGeneralPropertyPage_nl;
  public static String FeatureGeneralPropertyPage_all;
  public static String FeatureGeneralPropertyPage_os;
  public static String FeatureGeneralPropertyPage_desc;
  public static String FeatureGeneralPropertyPage_Kilobytes;
  public static String FeatureLicensePropertyPage_showInBrowser;
  public static String FeatureLicensePropertyPage_noLicense;
  public static String FeatureStatusPropertyPage_pendingChanges;
  public static String FeatureStatusPropertyPage_reason;
  public static String FeatureStatusPropertyPage_missingOptional;
  public static String FeatureStatusPropertyPage_missing;
  public static String FeatureStatusPropertyPage_goodConfiguration;
  public static String JarVerificationDialog_wtitle;
  public static String JarVerificationDialog_Title;
  public static String JarVerificationDialog_Verification;
  public static String JarVerificationDialog_ComponentNotInstalled;
  public static String JarVerificationDialog_AboutToInstall_File;
  public static String JarVerificationDialog_NotDigitallySigned_File;
  public static String JarVerificationDialog_CannotVerifyProvider_File;
  public static String JarVerificationDialog_CorruptedContent_File;
  public static String JarVerificationDialog_SignedComponent_File;
  public static String JarVerificationDialog_UnknownCertificate_File;
  public static String JarVerificationDialog_UnableToVerifyProvider_File;
  public static String JarVerificationDialog_ProviderKnown_File;
  public static String JarVerificationDialog_KnownCertificate_File;
  public static String JarVerificationDialog_AboutToInstall_Feature;
  public static String JarVerificationDialog_NotDigitallySigned_Feature;
  public static String JarVerificationDialog_CannotVerifyProvider_Feature;
  public static String JarVerificationDialog_CorruptedContent_Feature;
  public static String JarVerificationDialog_SignedComponent_Feature;
  public static String JarVerificationDialog_UnknownCertificate_Feature;
  public static String JarVerificationDialog_UnableToVerifyProvider_Feature;
  public static String JarVerificationDialog_ProviderKnown_Feature;
  public static String JarVerificationDialog_KnownCertificate_Feature;
  public static String JarVerificationDialog_FileName;
  public static String JarVerificationDialog_FeatureName;
  public static String JarVerificationDialog_FeatureIdentifier;
  public static String JarVerificationDialog_Provider;
  public static String JarVerificationDialog_MayChooseToInstall;
  public static String JarVerificationDialog_MayChooseToContinue;
  public static String JarVerificationDialog_Install;
  public static String JarVerificationDialog_InstallAll;
  public static String JarVerificationDialog_Continue;
  public static String JarVerificationDialog_Cancel;
  public static String JarVerificationDialog_RootCA;
  public static String JarVerificationDialog_SubjectCA;
  public static String JarVerificationDialog_CertificateInfo;
  public static String UserVerificationDialog_PasswordRequired;
  public static String UserVerificationDialog_ConnectTo;
  public static String UserVerificationDialog_Password;
  public static String UserVerificationDialog_UserName;
  public static String ConfigurationPreviewForm_configDescription;
  public static String ConfigurationPreviewForm_install;
  public static String ConfigurationPreviewForm_AvailableTasks;
  public static String ConfigurationView_missingFeature;
  public static String ConfigurationView_current;
  public static String ConfigurationView_pending;
  public static String ConfigurationView_error;
  public static String ConfigurationView_collapseLabel;
  public static String ConfigurationView_collapseTooltip;
  public static String ConfigurationView_revertLabel;
  public static String ConfigurationView_installHistory;
  public static String ConfigurationView_extLocation;
  public static String ConfigurationView_uninstall;
  public static String ConfigurationView_unconfigureAndUninstall;
  public static String ConfigurationView_install;
  public static String ConfigurationView_anotherVersion;
  public static String ConfigurationView_findUpdates;
  public static String ConfigurationView_showNestedFeatures;
  public static String ConfigurationView_showNestedTooltip;
  public static String ConfigurationView_showInstall;
  public static String ConfigurationView_showInstallTooltip;
  public static String ConfigurationView_showDisabled;
  public static String ConfigurationView_showDisabledTooltip;
  public static String ConfigurationView_showActivitiesLabel;
  public static String ConfigurationView_new;
  public static String ConfigurationView_replaceWith;
  public static String ConfigurationView_revertPreviousLabel;
  public static String ConfigurationView_revertPreviousDesc;
  public static String ConfigurationView_updateLabel;
  public static String ConfigurationView_updateDesc;
  public static String ConfigurationView_installHistLabel;
  public static String ConfigurationView_installHistDesc;
  public static String ConfigurationView_activitiesLabel;
  public static String ConfigurationView_activitiesDesc;
  public static String ConfigurationView_enableLocDesc;
  public static String ConfigurationView_extLocLabel;
  public static String ConfigurationView_extLocDesc;
  public static String ConfigurationView_propertiesLabel;
  public static String ConfigurationView_installPropDesc;
  public static String ConfigurationView_replaceVersionLabel;
  public static String ConfigurationView_replaceVersionDesc;
  public static String ConfigurationView_enableFeatureDesc;
  public static String ConfigurationView_installOptionalLabel;
  public static String ConfigurationView_installOptionalDesc;
  public static String ConfigurationView_uninstallLabel;
  public static String ConfigurationView_uninstallDesc;
  public static String ConfigurationView_uninstallDesc2;
  public static String ConfigurationView_scanLabel;
  public static String ConfigurationView_scanDesc;
  public static String ConfigurationView_featurePropLabel;
  public static String ConfigurationView_featurePropDesc;
  public static String ConfigurationView_loading;
  public static String Actions_brokenConfigQuestion;
  public static String FeatureStateAction_disable;
  public static String FeatureStateAction_enable;
  public static String FeatureStateAction_disableQuestion;
  public static String FeatureStateAction_EnableQuestion;
  public static String FeatureStateAction_dialogTitle;
  public static String FeatureUninstallAction_uninstall;
  public static String FeatureUninstallAction_uninstallQuestion;
  public static String FeatureUninstallAction_dialogTitle;
  public static String FeatureUnconfigureAndUninstallAction_uninstall;
  public static String FeatureUnconfigureAndUninstallAction_question;
  public static String FeatureUnconfigureAndUninstallAction_dialogTitle;
  public static String SiteStateAction_dialogTitle;
  public static String SiteStateAction_disableLabel;
  public static String SiteStateAction_disableMessage;
  public static String SiteStateAc
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19

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