org.eclipselabs.jsdt.jquery.ui_1.4.1.201311011708

16:49:40.003 INFO  jd.cli.Main - Decompiling org.eclipselabs.jsdt.jquery.ui_1.4.1.201311011708.jar
package org.eclipselabs.jsdt.jquery.ui;

import org.eclipse.osgi.util.NLS;

public class JQueryUiMessages
  extends NLS
{
  private static final String BUNDLE_NAME = "org.eclipselabs.jsdt.jquery.ui.messages";
  public static String jQueryLibraryWizardPage_title;
  public static String jQueryLibraryWizardPage_jQueryLibraryAdded;
  public static String jQueryLibraryWizardPage_BrowserSupport;
  public static String jQueryLibraryWizardPage_noConflict;
  public static String jQueryLibraryWizardPage_version;
  
  static
  {
    NLS.initializeMessages("org.eclipselabs.jsdt.jquery.ui.messages", JQueryUiMessages.class);
  }
}

/* Location:
 * Qualified Name:     org.eclipselabs.jsdt.jquery.ui.JQueryUiMessages
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipselabs.jsdt.jquery.ui.libraries;

import org.eclipse.core.runtime.IPath;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.wst.jsdt.core.IJavaScriptProject;
import org.eclipse.wst.jsdt.internal.ui.IJsGlobalScopeContainerInitializerExtension;

public class JQueryUiInitializer
  implements IJsGlobalScopeContainerInitializerExtension
{
  public ImageDescriptor getImage(IPath containerPath, String element, IJavaScriptProject project)
  {
    return ImageDescriptor.createFromFile(getClass(), "favicon.ico");
  }
}

/* Location:
 * Qualified Name:     org.eclipselabs.jsdt.jquery.ui.libraries.JQueryUiInitializer
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipselabs.jsdt.jquery.ui.wizards.buildpaths;

import org.eclipse.wst.jsdt.internal.ui.wizards.dialogfields.ComboDialogField;
import org.eclipse.wst.jsdt.internal.ui.wizards.dialogfields.DialogField;
import org.eclipse.wst.jsdt.internal.ui.wizards.dialogfields.IDialogFieldListener;

class JQueryLibraryWizardPage$1
  implements IDialogFieldListener
{
  JQueryLibraryWizardPage$1(JQueryLibraryWizardPage paramJQueryLibraryWizardPage) {}
  
  public void dialogFieldChanged(DialogField field)
  {
    JQueryLibraryWizardPage.access$0(this$0, ((ComboDialogField)field).getSelectionIndex());
  }
}

/* Location:
 * Qualified Name:     org.eclipselabs.jsdt.jquery.ui.wizards.buildpaths.JQueryLibraryWizardPage.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipselabs.jsdt.jquery.ui.wizards.buildpaths;

import org.eclipse.wst.jsdt.internal.ui.wizards.dialogfields.DialogField;
import org.eclipse.wst.jsdt.internal.ui.wizards.dialogfields.IDialogFieldListener;
import org.eclipse.wst.jsdt.internal.ui.wizards.dialogfields.SelectionButtonDialogField;

class JQueryLibraryWizardPage$2
  implements IDialogFieldListener
{
  JQueryLibraryWizardPage$2(JQueryLibraryWizardPage paramJQueryLibraryWizardPage) {}
  
  public void dialogFieldChanged(DialogField field)
  {
    JQueryLibraryWizardPage.access$1(this$0, ((SelectionButtonDialogField)field).isSelected());
  }
}

/* Location:
 * Qualified Name:     org.eclipselabs.jsdt.jquery.ui.wizards.buildpaths.JQueryLibraryWizardPage.2
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipselabs.jsdt.jquery.ui.wizards.buildpaths;

import java.util.List;
import org.eclipse.core.runtime.IPath;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.wst.jsdt.core.IIncludePathEntry;
import org.eclipse.wst.jsdt.core.IJavaScriptProject;
import org.eclipse.wst.jsdt.core.JavaScriptCore;
import org.eclipse.wst.jsdt.internal.ui.JavaPluginImages;
import org.eclipse.wst.jsdt.internal.ui.wizards.dialogfields.ComboDialogField;
import org.eclipse.wst.jsdt.internal.ui.wizards.dialogfields.DialogField;
import org.eclipse.wst.jsdt.internal.ui.wizards.dialogfields.IDialogFieldListener;
import org.eclipse.wst.jsdt.internal.ui.wizards.dialogfields.LayoutUtil;
import org.eclipse.wst.jsdt.internal.ui.wizards.dialogfields.SelectionButtonDialogField;
import org.eclipse.wst.jsdt.ui.wizards.IJsGlobalScopeContainerPage;
import org.eclipse.wst.jsdt.ui.wizards.IJsGlobalScopeContainerPageExtension;
import org.eclipse.wst.jsdt.ui.wizards.IJsGlobalScopeContainerPageExtension2;
import org.eclipse.wst.jsdt.ui.wizards.NewElementWizardPage;
import org.eclipselabs.jsdt.jquery.api.JQueryApiPlugin;
import org.eclipselabs.jsdt.jquery.api.JQueryContainer;
import org.eclipselabs.jsdt.jquery.api.JQuerySupport;
import org.eclipselabs.jsdt.jquery.api.Version;
import org.eclipselabs.jsdt.jquery.ui.JQueryUiMessages;

public class JQueryLibraryWizardPage
  extends NewElementWizardPage
  implements IJsGlobalScopeContainerPage, IJsGlobalScopeContainerPageExtension, IJsGlobalScopeContainerPageExtension2
{
  private IIncludePathEntry selection;
  private boolean noConflict;
  private int versionIndex;
  private ComboDialogField versionField;
  private SelectionButtonDialogField noConflictField;
  
  public JQueryLibraryWizardPage()
  {
    super("jQueryBrowserLib");
    setTitle(JQueryUiMessages.jQueryLibraryWizardPage_title);
    setImageDescriptor(JavaPluginImages.DESC_WIZBAN_ADD_LIBRARY);
  }
  
  public void createControl(Composite parent)
  {
    Composite composite = new Composite(parent, 0);
    composite.setFont(parent.getFont());
    
    DialogField descriptionField = new DialogField();
    descriptionField.setLabelText(JQueryUiMessages.jQueryLibraryWizardPage_jQueryLibraryAdded);
    
    versionField = new ComboDialogField(8);
    versionField.setLabelText(JQueryUiMessages.jQueryLibraryWizardPage_version);
    versionField.setItems(getItems());
    versionField.setDialogFieldListener(new IDialogFieldListener()
    {
      public void dialogFieldChanged(DialogField field)
      {
        versionIndex = ((ComboDialogField)field).getSelectionIndex();
      }
    });
    initVersion();
    
    noConflictField = new SelectionButtonDialogField(32);
    noConflictField.setLabelText(JQueryUiMessages.jQueryLibraryWizardPage_noConflict);
    noConflictField.setDialogFieldListener(new IDialogFieldListener()
    {
      public void dialogFieldChanged(DialogField field)
      {
        noConflict = ((SelectionButtonDialogField)field).isSelected();
      }
    });
    initNoConflict();
    
    LayoutUtil.doDefaultLayout(composite, new DialogField[] { descriptionField, versionField, noConflictField }, 
      false, -1, -1);
    Dialog.applyDialogFont(composite);
    setControl(composite);
    setDescription(JQueryUiMessages.jQueryLibraryWizardPage_BrowserSupport);
  }
  
  private String[] getItems()
  {
    List<Version> versions = getAllVersions();
    String[] items = new String[versions.size()];
    int i = 0;
    for (Version version : versions) {
      items[(i++)] = version.toString();
    }
    return items;
  }
  
  private List<Version> getAllVersions()
  {
    return JQueryApiPlugin.getJQuerySupport().getAllVersions();
  }
  
  private Version getVersion()
  {
    return (Version)getAllVersions().get(versionIndex);
  }
  
  public IIncludePathEntry[] getNewContainers()
  {
    IPath includePath = JQueryContainer.createIncludePath(getVersion(), noConflict);
    IIncludePathEntry library = JavaScriptCore.newContainerEntry(includePath);
    return new IIncludePathEntry[] { library };
  }
  
  public void initialize(IJavaScriptProject project, IIncludePathEntry[] currentEntries)
  {
    versionIndex = 0;
    setNoConflict(false);
    IIncludePathEntry[] arrayOfIIncludePathEntry;
    int j = (arrayOfIIncludePathEntry = currentEntries).length;
    for (int i = 0; i < j; i++)
    {
      IIncludePathEntry entry = arrayOfIIncludePathEntry[i];
      IPath path = entry.getPath();
      if (JQueryContainer.isQueryContainer(path.toString()))
      {
        setVersion(JQueryContainer.extractVersion(path));
        setNoConflict(JQueryContainer.extractNoConflict(path));
      }
    }
  }
  
  private void initVersion()
  {
    versionField.selectItem(0);
  }
  
  private void initNoConflict()
  {
    noConflictField.setSelection(noConflict);
  }
  
  private void setVersion(Version version)
  {
    int i = 0;
    for (Version candidate : getAllVersions())
    {
      if (candidate.equals(version))
      {
        versionIndex = i;
        return;
      }
      i++;
    }
  }
  
  private void setNoConflict(boolean noConflict)
  {
    this.noConflict = noConflict;
  }
  
  public boolean finish()
  {
    return true;
  }
  
  public IIncludePathEntry getSelection()
  {
    return selection;
  }
  
  public void setSelection(IIncludePathEntry containerEntry)
  {
    selection = containerEntry;
  }
}

/* Location:
 * Qualified Name:     org.eclipselabs.jsdt.jquery.ui.wizards.buildpaths.JQueryLibraryWizardPage
 * Java Class Version: 6 (50.0)
 * 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-2017. Infinite Loop Ltd