org.eclipse.pde.core_3.7.1.v20120103_r372

e line #74	-> byte code offset #138
    //   Java source line #75	-> byte code offset #140
    //   Java source line #80	-> byte code offset #145
    //   Java source line #81	-> byte code offset #149
    //   Java source line #82	-> byte code offset #153
    //   Java source line #84	-> byte code offset #160
    //   Java source line #86	-> byte code offset #173
    //   Java source line #76	-> byte code offset #177
    //   Java source line #77	-> byte code offset #179
    //   Java source line #80	-> byte code offset #184
    //   Java source line #81	-> byte code offset #188
    //   Java source line #82	-> byte code offset #192
    //   Java source line #84	-> byte code offset #199
    //   Java source line #86	-> byte code offset #212
    //   Java source line #78	-> byte code offset #216
    //   Java source line #80	-> byte code offset #218
    //   Java source line #81	-> byte code offset #222
    //   Java source line #82	-> byte code offset #226
    //   Java source line #84	-> byte code offset #233
    //   Java source line #86	-> byte code offset #246
    //   Java source line #88	-> byte code offset #247
    //   Java source line #80	-> byte code offset #250
    //   Java source line #81	-> byte code offset #254
    //   Java source line #82	-> byte code offset #258
    //   Java source line #84	-> byte code offset #265
    //   Java source line #86	-> byte code offset #278
    //   Java source line #89	-> byte code offset #279
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	280	0	url	URL
    //   0	280	1	handler	org.xml.sax.helpers.DefaultHandler
    //   1	254	2	input	java.io.InputStream
    //   3	263	3	connection	URLConnection
    //   21	3	4	parser	SAXParserWrapper
    //   66	3	4	e	IOException
    //   138	3	4	e	javax.xml.parsers.ParserConfigurationException
    //   177	3	4	e	javax.xml.parsers.FactoryConfigurationError
    //   216	32	5	localObject	Object
    //   33	1	9	localMalformedURLException	MalformedURLException
    //   62	1	10	localIOException1	IOException
    //   101	1	11	localIOException2	IOException
    //   105	1	12	localSAXException	org.xml.sax.SAXException
    //   134	1	13	localIOException3	IOException
    //   173	1	14	localIOException4	IOException
    //   212	1	15	localIOException5	IOException
    //   246	1	16	localIOException6	IOException
    //   278	1	17	localIOException7	IOException
    // Exception table:
    //   from	to	target	type
    //   4	30	33	java/net/MalformedURLException
    //   34	59	62	java/io/IOException
    //   4	30	66	java/io/IOException
    //   73	98	101	java/io/IOException
    //   4	30	105	org/xml/sax/SAXException
    //   106	131	134	java/io/IOException
    //   4	30	138	javax/xml/parsers/ParserConfigurationException
    //   145	170	173	java/io/IOException
    //   4	30	177	javax/xml/parsers/FactoryConfigurationError
    //   184	209	212	java/io/IOException
    //   4	34	216	finally
    //   66	73	216	finally
    //   105	106	216	finally
    //   138	145	216	finally
    //   177	184	216	finally
    //   218	243	246	java/io/IOException
    //   250	275	278	java/io/IOException
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.internal.core.util.SchemaUtil
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.internal.core.util;

import java.io.File;
import java.util.ArrayList;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jdt.launching.IVMInstall;
import org.eclipse.jdt.launching.IVMInstallType;
import org.eclipse.jdt.launching.JavaRuntime;
import org.eclipse.jdt.launching.environments.IExecutionEnvironment;
import org.eclipse.jdt.launching.environments.IExecutionEnvironmentsManager;
import org.eclipse.osgi.util.NLS;
import org.eclipse.pde.internal.core.PDECoreMessages;

public class VMUtil
{
  public static IVMInstall[] getAllVMInstances()
  {
    ArrayList res = new ArrayList();
    IVMInstallType[] types = JavaRuntime.getVMInstallTypes();
    for (int i = 0; i < types.length; i++)
    {
      IVMInstall[] installs = types[i].getVMInstalls();
      for (int k = 0; k < installs.length; k++) {
        res.add(installs[k]);
      }
    }
    return (IVMInstall[])res.toArray(new IVMInstall[res.size()]);
  }
  
  public static String[] getVMInstallNames()
  {
    IVMInstall[] installs = getAllVMInstances();
    String[] names = new String[installs.length];
    for (int i = 0; i < installs.length; i++) {
      names[i] = installs[i].getName();
    }
    return names;
  }
  
  public static String getDefaultVMInstallName()
  {
    IVMInstall install = JavaRuntime.getDefaultVMInstall();
    if (install != null) {
      return install.getName();
    }
    return "";
  }
  
  public static String getDefaultVMInstallLocation()
  {
    IVMInstall install = JavaRuntime.getDefaultVMInstall();
    if (install != null) {
      return install.getInstallLocation().getAbsolutePath();
    }
    return null;
  }
  
  public static IVMInstall getVMInstall(String name)
  {
    if (name != null)
    {
      IVMInstall[] installs = getAllVMInstances();
      for (int i = 0; i < installs.length; i++) {
        if (installs[i].getName().equals(name)) {
          return installs[i];
        }
      }
    }
    return JavaRuntime.getDefaultVMInstall();
  }
  
  public static IExecutionEnvironment[] getExecutionEnvironments()
  {
    IExecutionEnvironmentsManager manager = JavaRuntime.getExecutionEnvironmentsManager();
    return manager.getExecutionEnvironments();
  }
  
  public static IExecutionEnvironment getExecutionEnvironment(String id)
  {
    IExecutionEnvironmentsManager manager = JavaRuntime.getExecutionEnvironmentsManager();
    return manager.getEnvironment(id);
  }
  
  public static String getVMInstallName(IExecutionEnvironment ee)
    throws CoreException
  {
    IPath containerPath = JavaRuntime.newJREContainerPath(ee);
    IVMInstall vmi = JavaRuntime.getVMInstall(containerPath);
    if (vmi == null) {
      throw new CoreException(createErrorStatus(NLS.bind(PDECoreMessages.VMHelper_noJreForExecEnv, ee.getId())));
    }
    return vmi.getName();
  }
  
  public static IStatus createErrorStatus(String message)
  {
    return new Status(4, "org.eclipse.pde.core", 0, message, null);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.internal.core.util.VMUtil
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.internal.core.util;

import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.osgi.service.resolver.VersionRange;
import org.eclipse.pde.internal.core.PDECoreMessages;
import org.osgi.framework.Version;

public class VersionUtil
{
  public static IStatus validateVersion(String versionString)
  {
    try
    {
      if (versionString != null) {
        new Version(versionString.trim());
      }
    }
    catch (IllegalArgumentException e)
    {
      return new Status(4, "org.eclipse.pde.core", 4, PDECoreMessages.BundleErrorReporter_InvalidFormatInBundleVersion, e);
    }
    return Status.OK_STATUS;
  }
  
  public static IStatus validateVersionRange(String versionRangeString)
  {
    try
    {
      new VersionRange(versionRangeString);
    }
    catch (IllegalArgumentException e)
    {
      return new Status(4, "org.eclipse.pde.core", 4, PDECoreMessages.BundleErrorReporter_invalidVersionRangeFormat, e);
    }
    return Status.OK_STATUS;
  }
  
  public static boolean compare(String id1, String version1, String id2, String version2, int match)
  {
    if (!id1.equals(id2)) {
      return false;
    }
    try
    {
      Version v1 = Version.parseVersion(version1);
      Version v2 = Version.parseVersion(version2);
      switch (match)
      {
      case 0: 
      case 2: 
        return isCompatibleWith(v1, v2);
      case 1: 
        return isEquivalentTo(v1, v2);
      case 3: 
        return v1.equals(v2);
      case 4: 
        return isGreaterOrEqualTo(v1, v2);
      }
    }
    catch (RuntimeException localRuntimeException) {}
    return version1.equals(version2);
  }
  
  public static boolean isEmptyVersion(String version)
  {
    if (version == null) {
      return true;
    }
    version = version.trim();
    return (version.length() == 0) || (version.equals(Version.emptyVersion.toString()));
  }
  
  public static boolean isCompatibleWith(Version v1, Version v2)
  {
    if (v1.getMajor() != v2.getMajor()) {
      return false;
    }
    if (v1.getMinor() > v2.getMinor()) {
      return true;
    }
    if (v1.getMinor() < v2.getMinor()) {
      return false;
    }
    if (v1.getMicro() > v2.getMicro()) {
      return true;
    }
    if (v1.getMicro() < v2.getMicro()) {
      return false;
    }
    return v1.getQualifier().compareTo(v2.getQualifier()) >= 0;
  }
  
  public static boolean isEquivalentTo(Version v1, Version v2)
  {
    if ((v1.getMajor() != v2.getMajor()) || (v1.getMinor() != v2.getMinor())) {
      return false;
    }
    if (v1.getMicro() > v2.getMicro()) {
      return true;
    }
    if (v1.getMicro() < v2.getMicro()) {
      return false;
    }
    return v1.getQualifier().compareTo(v2.getQualifier()) >= 0;
  }
  
  public static boolean isGreaterOrEqualTo(Version v1, Version v2)
  {
    if (v1.getMajor() > v2.getMajor()) {
      return true;
    }
    if (v1.getMajor() == v2.getMajor())
    {
      if (v1.getMinor() > v2.getMinor()) {
        return true;
      }
      if (v1.getMinor() == v2.getMinor())
      {
        if (v1.getMicro() > v2.getMicro()) {
          return true;
        }
        if (v1.getMicro() == v2.getMicro()) {
          return v1.getQualifier().compareTo(v2.getQualifier()) >= 0;
        }
      }
    }
    return false;
  }
  
  public static int compareMacroMinorMicro(Version v1, Version v2)
  {
    int result = v1.getMajor() - v2.getMajor();
    if (result != 0) {
      return result;
    }
    result = v1.getMinor() - v2.getMinor();
    if (result != 0) {
      return result;
    }
    result = v1.getMicro() - v2.getMicro();
    return result;
  }
  
  public static String computeInitialPluginVersion(String version)
  {
    if ((version != null) && (validateVersion(version).isOK()))
    {
      Version pvi = Version.parseVersion(version);
      return pvi.getMajor() + "." + pvi.getMinor() + 
        "." + pvi.getMicro();
    }
    return version;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.internal.core.util.VersionUtil
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.internal.core.util;

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.Map;

public class XMLComponentRegistry
{
  private static XMLComponentRegistry fPinstance;
  public static final String F_NAME = "n";
  public static final String F_DESCRIPTION = "d";
  public static final int F_SCHEMA_COMPONENT = 2;
  public static final int F_ELEMENT_COMPONENT = 4;
  public static final int F_ATTRIBUTE_COMPONENT = 8;
  private static ArrayList fConsumers = new ArrayList();
  private Map fSchemaComponentMap;
  private Map fAttributeComponentMap;
  private Map fElementComponentMap;
  
  private XMLComponentRegistry()
  {
    fSchemaComponentMap = Collections.synchronizedMap(new HashMap());
    fAttributeComponentMap = Collections.synchronizedMap(new HashMap());
    fElementComponentMap = Collections.synchronizedMap(new HashMap());
  }
  
  public static XMLComponentRegistry Instance()
  {
    if (fPinstance == null) {
      fPinstance = new XMLComponentRegistry();
    }
    return fPinstance;
  }
  
  public void dispose()
  {
    if (fSchemaComponentMap != null) {
      fSchemaComponentMap.clear();
    }
    if (fAttributeComponentMap != null) {
      fAttributeComponentMap.clear();
    }
    if (fElementComponentMap != null) {
      fElementComponentMap.clear();
    }
  }
  
  public void putDescription(String key, String value, int mapType)
  {
    putValue("d", key, value, mapType);
  }
  
  public void putName(String key, String value, int mapType)
  {
    putValue("n", key, value, mapType);
  }
  
  private Map getTargetMap(int mask)
  {
    Map targetMap = null;
    if (mask == 2) {
      targetMap = fSchemaComponentMap;
    } else if (mask == 8) {
      targetMap = fAttributeComponentMap;
    } else if (mask == 4) {
      targetMap = fElementComponentMap;
    }
    return targetMap;
  }
  
  private void putValue(String valueKey, String key, String value, int mapType)
  {
    if (key != null)
    {
      Map targetMap = getTargetMap(mapType);
      if (targetMap == null) {
        return;
      }
      HashMap previousValue = (HashMap)targetMap.get(key);
      if (previousValue == null)
      {
        HashMap newValue = new HashMap();
        newValue.put(valueKey, value);
        targetMap.put(key, newValue);
      }
      else
      {
        previousValue.put(valueKey, value);
      }
    }
  }
  
  public void put(String key, HashMap value, int mapType)
  {
    if (key != null)
    {
      Map targetMap = getTargetMap(mapType);
      if (targetMap == null) {
        return;
      }
      targetMap.put(key, value);
    }
  }
  
  public HashMap get(String key, int mapType)
  {
    Map targetMap = getTargetMap(mapType);
    if (targetMap == null) {
      return null;
    }
    return (HashMap)targetMap.get(key);
  }
  
  private String getValue(String valueKey, String key, int mapType)
  {
    if (key != null)
    {
      HashMap map = get(key, mapType);
      if (map != null) {
        return (String)map.get(valueKey);
      }
    }
    return null;
  }
  
  public String getDescription(String key, int mapType)
  {
    return getValue("d", key, mapType);
  }
  
  public String getName(String key, int mapType)
  {
    return getValue("n", key, mapType);
  }
  
  public void connect(Object consumer)
  {
    if (!fConsumers.contains(consumer)) {
      fConsumers.add(consumer);
    }
  }
  
  public void disconnect(Object consumer)
  {
    fConsumers.remove(consumer);
    if (fConsumers.size() == 0) {
      dispose();
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.internal.core.util.XMLComponentRegistry
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.internal.core.variables;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.variables.IDynamicVariable;
import org.eclipse.core.variables.IDynamicVariableResolver;
import org.eclipse.pde.core.plugin.TargetPlatform;

public class TargetHomeDynamicVariableResolver
  implements IDynamicVariableResolver
{
  public String resolveValue(IDynamicVariable variable, String argument)
    throws CoreException
  {
    return TargetPlatform.getLocation();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.internal.core.variables.TargetHomeDynamicVariableResolver
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.internal.core.variables;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.variables.IDynamicVariable;
import org.eclipse.core.variables.IDynamicVariableResolver;
import org.eclipse.pde.core.plugin.TargetPlatform;

public class TargetNLVariableResolver
  implements IDynamicVariableResolver
{
  public String resolveValue(IDynamicVariable variable, String argument)
    throws CoreException
  {
    return TargetPlatform.getNL();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.internal.core.variables.TargetNLVariableResolver
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.internal.core.variables;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.variables.IDynamicVariable;
import org.eclipse.core.variables.IDynamicVariableResolver;
import org.eclipse.pde.core.plugin.TargetPlatform;

public class TargetOSArchVariableResolver
  implements IDynamicVariableResolver
{
  public String resolveValue(IDynamicVariable variable, String argument)
    throws CoreException
  {
    return TargetPlatform.getOSArch();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.internal.core.variables.TargetOSArchVariableResolver
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.internal.core.variables;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.variables.IDynamicVariable;
import org.eclipse.core.variables.IDynamicVariableResolver;
import org.eclipse.pde.core.plugin.TargetPlatform;

public class TargetOSVariableResolver
  implements IDynamicVariableResolver
{
  public String resolveValue(IDynamicVariable variable, String argument)
    throws CoreException
  {
    return TargetPlatform.getOS();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.internal.core.variables.TargetOSVariableResolver
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.pde.internal.core.variables;

import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.variables.IDynamicVariable;
import org.eclipse.core.variables.IDynamicVariableResolver;
import org.eclipse.pde.core.plugin.TargetPlatform;

public class TargetWSVariableResolver
  implements IDynamicVariableResolver
{
  public String resolveValue(IDynamicVariable variable, String argument)
    throws CoreException
  {
    return TargetPlatform.getWS();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.pde.internal.core.variables.TargetWSVariableResolver
 * Java Class Version: 1.2 (46.0)
 * JD-Core Version:    0.7.1
 */
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64

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