org.eclipse.pde.core_3.7.1.v20120103_r372

[i];
      }
    }
    return null;
  }
  
  private boolean isNLFragment(BundleDescription fragment)
  {
    String symbolicName = fragment.getSymbolicName();
    int idx = symbolicName.lastIndexOf('.');
    return (idx > -1) && (symbolicName.regionMatches(true, idx + 1, "nl", 0, 2));
  }
  
  protected void createFeature(String featureID, String featureLocation, String[][] configurations, boolean includeLauncher)
    throws IOException
  {
    File file = new File(featureLocation);
    if ((!file.exists()) || (!file.isDirectory())) {
      file.mkdirs();
    }
    try
    {
      DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
      Document doc = factory.newDocumentBuilder().newDocument();
      Element root = doc.createElement("feature");
      root.setAttribute("id", featureID);
      root.setAttribute("version", "1.0");
      doc.appendChild(root);
      if (includeLauncher)
      {
        IFeatureModel model = PDECore.getDefault().getFeatureModelManager().getDeltaPackFeature();
        if (model != null)
        {
          IFeature feature = model.getFeature();
          Element includes = doc.createElement("includes");
          includes.setAttribute("id", feature.getId());
          includes.setAttribute("version", feature.getVersion());
          root.appendChild(includes);
        }
        else
        {
          IPluginModelBase launcherPlugin = PluginRegistry.findModel("org.eclipse.equinox.launcher");
          if (launcherPlugin != null)
          {
            BundleDescription bundle = launcherPlugin.getBundleDescription();
            if (bundle != null)
            {
              Element plugin = doc.createElement("plugin");
              plugin.setAttribute("id", bundle.getSymbolicName());
              plugin.setAttribute("version", bundle.getVersion().toString());
              plugin.setAttribute("unpack", "false");
              root.appendChild(plugin);
              BundleDescription[] fragments = bundle.getFragments();
              for (int i = 0; i < configurations.length; i++)
              {
                BundleDescription launcherFragment = getMatchingLauncher(configurations[i], fragments);
                if (launcherFragment != null)
                {
                  Element fragment = doc.createElement("plugin");
                  fragment.setAttribute("id", launcherFragment.getSymbolicName());
                  fragment.setAttribute("version", launcherFragment.getVersion().toString());
                  fragment.setAttribute("fragment", "true");
                  setFilterAttributes(fragment, configurations[i]);
                  root.appendChild(fragment);
                }
              }
            }
          }
        }
      }
      List workspacePlugins = Arrays.asList(PluginRegistry.getWorkspaceModels());
      for (int i = 0; i < fInfo.items.length; i++) {
        if ((fInfo.items[i] instanceof IFeatureModel))
        {
          IFeature feature = ((IFeatureModel)fInfo.items[i]).getFeature();
          Element includes = doc.createElement("includes");
          includes.setAttribute("id", feature.getId());
          includes.setAttribute("version", feature.getVersion());
          root.appendChild(includes);
          if ((fInfo.exportSource) && (fInfo.exportSourceBundle))
          {
            includes = doc.createElement("includes");
            includes.setAttribute("id", feature.getId() + ".source");
            includes.setAttribute("version", feature.getVersion());
            root.appendChild(includes);
          }
        }
        else
        {
          BundleDescription bundle = null;
          if ((fInfo.items[i] instanceof IPluginModelBase)) {
            bundle = ((IPluginModelBase)fInfo.items[i]).getBundleDescription();
          }
          if ((bundle == null) && 
            ((fInfo.items[i] instanceof BundleDescription))) {
            bundle = (BundleDescription)fInfo.items[i];
          }
          if (bundle != null)
          {
            List configs = new ArrayList();
            if (configurations.length > 1) {
              configs.add(GENERIC_CONFIG);
            }
            configs.addAll(Arrays.asList(configurations));
            for (Iterator iterator = configs.iterator(); iterator.hasNext();)
            {
              String[] currentConfig = (String[])iterator.next();
              Dictionary environment = getEnvironment(currentConfig);
              if (shouldAddPlugin(bundle, environment))
              {
                Element plugin = doc.createElement("plugin");
                plugin.setAttribute("id", bundle.getSymbolicName());
                plugin.setAttribute("version", bundle.getVersion().toString());
                setFilterAttributes(plugin, currentConfig);
                setAdditionalAttributes(plugin, bundle);
                root.appendChild(plugin);
                if ((fInfo.exportSource) && (fInfo.exportSourceBundle)) {
                  if (workspacePlugins.contains(PluginRegistry.findModel(bundle)))
                  {
                    plugin = doc.createElement("plugin");
                    plugin.setAttribute("id", bundle.getSymbolicName() + ".source");
                    plugin.setAttribute("version", bundle.getVersion().toString());
                    setFilterAttributes(plugin, currentConfig);
                    setAdditionalAttributes(plugin, bundle);
                    root.appendChild(plugin);
                  }
                  else
                  {
                    IPluginModelBase model = PluginRegistry.findModel(bundle.getSymbolicName() + ".source");
                    if (model != null)
                    {
                      bundle = model.getBundleDescription();
                      plugin = doc.createElement("plugin");
                      plugin.setAttribute("id", bundle.getSymbolicName());
                      plugin.setAttribute("version", bundle.getVersion().toString());
                      setFilterAttributes(plugin, currentConfig);
                      setAdditionalAttributes(plugin, bundle);
                      root.appendChild(plugin);
                    }
                  }
                }
                if (currentConfig == GENERIC_CONFIG) {
                  break;
                }
              }
            }
          }
        }
      }
      XMLPrintHandler.writeFile(doc, new File(file, "feature.xml"));
    }
    catch (DOMException localDOMException) {}catch (FactoryConfigurationError localFactoryConfigurationError) {}catch (ParserConfigurationException localParserConfigurationException) {}
  }
  
  protected void setAdditionalAttributes(Element plugin, BundleDescription bundle) {}
  
  public static void errorFound()
  {
    fHasErrors = true;
  }
  
  public boolean hasAntErrors()
  {
    return fHasErrors;
  }
  
  protected boolean shouldAddPlugin(BundleDescription bundle, Dictionary environment)
  {
    String filterSpec = bundle.getPlatformFilter();
    try
    {
      return (filterSpec == null) || (PDECore.getDefault().getBundleContext().createFilter(filterSpec).match(environment));
    }
    catch (InvalidSyntaxException localInvalidSyntaxException) {}
    return false;
  }
  
  protected IStatus testBuildWorkspaceBeforeExport(IProgressMonitor monitor)
    throws CoreException
  {
    try
    {
      monitor.beginTask("", 50);
      Object localObject2;
      if (fInfo.useWorkspaceCompiledClasses)
      {
        getWorkspaceExportHelper().buildBeforeExport(fInfo.items, new SubProgressMonitor(monitor, 45));
        Set errors = getWorkspaceExportHelper().checkForErrors(fInfo.items);
        if (!errors.isEmpty())
        {
          monitor.worked(5);
          return new Status(4, "org.eclipse.pde.core", NLS.bind(PDECoreMessages.FeatureExportOperation_workspaceBuildErrorsFoundDuringExport, errors.toString()));
        }
        monitor.worked(5);
      }
      return Status.OK_STATUS;
    }
    finally
    {
      monitor.done();
    }
  }
  
  protected WorkspaceExportHelper getWorkspaceExportHelper()
  {
    if (fWorkspaceExportHelper == null) {
      fWorkspaceExportHelper = new WorkspaceExportHelper();
    }
    return fWorkspaceExportHelper;
  }
}

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

import java.io.File;
import java.util.Dictionary;
import org.eclipse.osgi.service.resolver.BundleDescription;
import org.eclipse.osgi.service.resolver.State;
import org.eclipse.osgi.service.resolver.StateObjectFactory;
import org.eclipse.pde.core.plugin.TargetPlatform;
import org.eclipse.pde.internal.core.TargetPlatformHelper;
import org.eclipse.pde.internal.core.util.CoreUtility;
import org.w3c.dom.Element;

public class PluginExportOperation
  extends FeatureBasedExportOperation
{
  public PluginExportOperation(FeatureExportInfo info, String name)
  {
    super(info, name);
  }
  
  protected void createPostProcessingFiles()
  {
    createPostProcessingFile(new File(fFeatureLocation, PLUGIN_POST_PROCESSING));
  }
  
  protected State getState(String os, String ws, String arch)
  {
    if ((os.equals(TargetPlatform.getOS())) && (ws.equals(TargetPlatform.getWS())) && (arch.equals(TargetPlatform.getOSArch())) && (fStateCopy != null))
    {
      fStateCopy.resolve(true);
      return fStateCopy;
    }
    return super.getState(os, ws, arch);
  }
  
  protected boolean shouldAddPlugin(BundleDescription bundle, Dictionary environment)
  {
    boolean conflict = !super.shouldAddPlugin(bundle, environment);
    if (conflict)
    {
      if (fStateCopy == null) {
        copyState(TargetPlatformHelper.getState());
      }
      BundleDescription desc = fStateCopy.removeBundle(bundle.getBundleId());
      BundleDescription newDesc = fStateCopy.getFactory().createBundleDescription(desc.getBundleId(), desc.getSymbolicName(), desc.getVersion(), desc.getLocation(), desc.getRequiredBundles(), desc.getHost(), desc.getImportPackages(), desc.getExportPackages(), desc.isSingleton(), desc.attachFragments(), desc.dynamicFragments(), null, desc.getExecutionEnvironments(), desc.getGenericRequires(), desc.getGenericCapabilities());
      fStateCopy.addBundle(newDesc);
    }
    return true;
  }
  
  protected void setAdditionalAttributes(Element plugin, BundleDescription bundle)
  {
    plugin.setAttribute("unpack", Boolean.toString(CoreUtility.guessUnpack(bundle)));
  }
}

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

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Arrays;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Properties;
import java.util.StringTokenizer;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.MultiStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.osgi.service.resolver.BundleDescription;
import org.eclipse.osgi.util.NLS;
import org.eclipse.pde.core.plugin.IPluginModelBase;
import org.eclipse.pde.core.plugin.PluginRegistry;
import org.eclipse.pde.core.plugin.TargetPlatform;
import org.eclipse.pde.internal.build.BuildScriptGenerator;
import org.eclipse.pde.internal.core.FeatureModelManager;
import org.eclipse.pde.internal.core.PDECore;
import org.eclipse.pde.internal.core.PDECoreMessages;
import org.eclipse.pde.internal.core.TargetPlatformHelper;
import org.eclipse.pde.internal.core.ifeature.IFeature;
import org.eclipse.pde.internal.core.ifeature.IFeatureModel;
import org.eclipse.pde.internal.core.iproduct.IJREInfo;
import org.eclipse.pde.internal.core.iproduct.ILauncherInfo;
import org.eclipse.pde.internal.core.iproduct.IProduct;
import org.eclipse.pde.internal.core.iproduct.IProductModel;
import org.eclipse.pde.internal.core.util.CoreUtility;
import org.osgi.framework.Bundle;
import org.w3c.dom.Element;

public class ProductExportOperation
  extends FeatureExportOperation
{
  private static final String STATUS_MESSAGE = "!MESSAGE";
  private static final String STATUS_ENTRY = "!ENTRY";
  private static final String STATUS_SUBENTRY = "!SUBENTRY";
  private static final String ECLIPSE_APP_MACOS = "Eclipse.app/Contents/MacOS";
  private static final String ECLIPSE_APP_CONTENTS = "Eclipse.app/Contents";
  private static final String MAC_JAVA_FRAMEWORK = "/System/Library/Frameworks/JavaVM.framework";
  private String fFeatureLocation;
  private String fRoot;
  private IProduct fProduct;
  protected static String errorMessage;
  
  public static void setErrorMessage(String message)
  {
    errorMessage = message;
  }
  
  public static String getErrorMessage()
  {
    return errorMessage;
  }
  
  public static IStatus parseErrorMessage(CoreException e)
  {
    if (errorMessage == null) {
      return null;
    }
    MultiStatus status = null;
    StringTokenizer tokenizer = new StringTokenizer(errorMessage, "\n");
    while (tokenizer.hasMoreTokens())
    {
      String line = tokenizer.nextToken().trim();
      if ((line.startsWith("!ENTRY")) && (tokenizer.hasMoreElements()))
      {
        String next = tokenizer.nextToken();
        if (next.startsWith("!MESSAGE")) {
          status = new MultiStatus("org.eclipse.pde.core", 0, next.substring(8), null);
        }
      }
      else if ((line.startsWith("!SUBENTRY")) && (tokenizer.hasMoreElements()) && (status != null))
      {
        String next = tokenizer.nextToken();
        if (next.startsWith("!MESSAGE")) {
          status.add(new Status(4, "org.eclipse.pde.core", next.substring(8)));
        }
      }
    }
    if (status != null) {
      return status;
    }
    return new MultiStatus("org.eclipse.pde.core", 0, new IStatus[] { e.getStatus() }, errorMessage, null);
  }
  
  public ProductExportOperation(FeatureExportInfo info, String name, IProduct product, String root)
  {
    super(info, name);
    fProduct = product;
    fRoot = root;
  }
  
  /* Error */
  protected IStatus run(org.eclipse.core.runtime.IProgressMonitor monitor)
  {
    // Byte code:
    //   0: aload_0
    //   1: getfield 670	org/eclipse/pde/internal/core/exports/ProductExportOperation:fInfo	Lorg/eclipse/pde/internal/core/exports/FeatureExportInfo;
    //   4: getfield 663	org/eclipse/pde/internal/core/exports/FeatureExportInfo:targets	[[Ljava/lang/String;
    //   7: astore_2
    //   8: aload_2
    //   9: ifnonnull +39 -> 48
    //   12: iconst_1
    //   13: anewarray 380	[Ljava/lang/String;
    //   16: dup
    //   17: iconst_0
    //   18: iconst_4
    //   19: anewarray 386	java/lang/String
    //   22: dup
    //   23: iconst_0
    //   24: invokestatic 724	org/eclipse/pde/core/plugin/TargetPlatform:getOS	()Ljava/lang/String;
    //   27: aastore
    //   28: dup
    //   29: iconst_1
    //   30: invokestatic 726	org/eclipse/pde/core/plugin/TargetPlatform:getWS	()Ljava/lang/String;
    //   33: aastore
    //   34: dup
    //   35: iconst_2
    //   36: invokestatic 725	org/eclipse/pde/core/plugin/TargetPlatform:getOSArch	()Ljava/lang/String;
    //   39: aastore
    //   40: dup
    //   41: iconst_3
    //   42: invokestatic 723	org/eclipse/pde/core/plugin/TargetPlatform:getNL	()Ljava/lang/String;
    //   45: aastore
    //   46: aastore
    //   47: astore_2
    //   48: aload_0
    //   49: invokespecial 740	org/eclipse/pde/internal/core/exports/ProductExportOperation:cleanupBuildRepo	()V
    //   52: aconst_null
    //   53: putstatic 664	org/eclipse/pde/internal/core/exports/ProductExportOperation:errorMessage	Ljava/lang/String;
    //   56: aload_1
    //   57: ldc 1
    //   59: bipush 10
    //   61: invokeinterface 770 3 0
    //   66: ldc 9
    //   68: astore_3
    //   69: aload_0
    //   70: new 387	java/lang/StringBuffer
    //   73: dup
    //   74: aload_0
    //   75: getfield 665	org/eclipse/pde/internal/core/exports/ProductExportOperation:fBuildTempLocation	Ljava/lang/String;
    //   78: invokestatic 691	java/lang/String:valueOf	(Ljava/lang/Object;)Ljava/lang/String;
    //   81: invokespecial 695	java/lang/StringBuffer:<init>	(Ljava/lang/String;)V
    //   84: getstatic 653	java/io/File:separator	Ljava/lang/String;
    //   87: invokevirtual 696	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   90: aload_3
    //   91: invokevirtual 696	java/lang/StringBuffer:append	(Ljava/lang/String;)Ljava/lang/StringBuffer;
    //   94: invokevirtual 694	java/lang/StringBuffer:toString	()Ljava/lang/String;
    //   97: putfield 667	org/eclipse/pde/internal/core/exports/ProductExportOperation:fFeatureLocation	Ljava/lang/String;
    //   100: aload_0
    //   101: aload_3
    //   102: aload_0
    //   103: getfield 667	org/eclipse/pde/internal/core/exports/ProductExportOperation:fFeatureLocation	Ljava/lang/String;
    //   106: aload_2
    //   107: aload_0
    //   108: getfield 671	org/eclipse/pde/internal/core/exports/ProductExportOperation:fProduct	Lorg/eclipse/pde/internal/core/iproduct/IProduct;
    //   111: invokeinterface 779 1 0
    //   116: invokevirtual 758	org/eclipse/pde/internal/core/exports/ProductExportOperation:createFeature	(Ljava/lang/String;Ljava/lang/String;[[Ljava/lang/String;Z)V
    //   119: aload_0
    //   120: aload_0
    //   121: getfield 667	org/eclipse/pde/internal/core/exports/ProductExportOperation:fFeatureLocation	Ljava/lang/String;
    //   124: aload_2
    //   125: invokespecial 752	org/eclipse/pde/internal/core/exports/ProductExportOperation:createBuildPropertiesFile	(Ljava/lang/String;[[Ljava/lang/String;)V
    //   128: aload_0
    //   129: aload_3
    //   130: aconst_null
    //   131: aload_0
    //   132: getfield 667	org/eclipse/pde/internal/core/exports/ProductExportOperation:fFeatureLocation	Ljava/lang/String;
    //   135: aload_2
    //   136: new 408	org/eclipse/core/runtime/SubProgressMonitor
    //   139: dup
    //   140: aload_1
    //   141: bipush 8
    //   143: invokespecial 718	org/eclipse/core/runtime/SubProgressMonitor:<init>	(Lorg/eclipse/core/runtime/IProgressMonitor;I)V
    //   146: invokevirtual 760	org/eclipse/pde/internal/core/exports/ProductExportOperation:doExport	(Ljava/lang/String;Ljava/lang/String;Ljava/lang/String;[[Ljava/lang/String;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   149: goto +394 -> 543
    //   152: astore_3
    //   153: aload_3
    //   154: invokestatic 730	org/eclipse/pde/internal/core/PDECore:log	(Ljava/lang/Throwable;)V
    //   157: iconst_0
    //   158: istore 6
    //   160: goto +30 -> 190
    //   163: aload_0
    //   164: aload_0
    //   165: getfield 670	org/eclipse/pde/internal/core/exports/ProductExportOperation:fInfo	Lorg/eclipse/pde/internal/core/exports/FeatureExportInfo;
    //   168: getfield 661	org/eclipse/pde/internal/core/exports/FeatureExportInfo:items	[Ljava/lang/Object;
    //   171: iload 6
    //   173: aaload
    //   174: invokevirtual 744	org/eclipse/pde/internal/core/exports/ProductExportOperation:deleteBuildFiles	(Ljava/lang/Object;)V
    //   177: goto +10 -> 187
    //   180: astore 7
    //   182: aload 7
    //   184: invokestatic 730	org/eclipse/pde/internal/core/PDECore:log	(Ljava/lang/Throwable;)V
    //   187: iinc 6 1
    //   190: iload 6
    //   192: aload_0
    //   193: getfield 670	org/eclipse/pde/internal/core/exports/ProductExportOperation:fInfo	Lorg/eclipse/pde/internal/core/exports/FeatureExportInfo;
    //   196: getfield 661	org/eclipse/pde/internal/core/exports/FeatureExportInfo:items	[Ljava/lang/Object;
    //   199: arraylength
    //   200: if_icmplt -37 -> 163
    //   203: aload_0
    //   204: aconst_null
    //   205: new 408	org/eclipse/core/runtime/SubProgressMonitor
    //   208: dup
    //   209: aload_1
    //   210: iconst_1
    //   211: invokespecial 718	org/eclipse/core/runtime/SubProgressMonitor:<init>	(Lorg/eclipse/core/runtime/IProgressMonitor;I)V
    //   214: invokevirtual 756	org/eclipse/pde/internal/core/exports/ProductExportOperation:cleanup	([Ljava/lang/String;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   217: goto +386 -> 603
    //   220: astore_3
    //   221: new 407	org/eclipse/core/runtime/Status
    //   224: dup
    //   225: iconst_4
    //   226: ldc 10
    //   228: getstatic 655	org/eclipse/pde/internal/core/PDECoreMessages:FeatureBasedExportOperation_ProblemDuringExport	Ljava/lang/String;
    //   231: aload_3
    //   232: invokevirtual 699	java/lang/reflect/InvocationTargetException:getTargetException	()Ljava/lang/Throwable;
    //   235: invokespecial 717	org/eclipse/core/runtime/Status:<init>	(ILjava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
    //   238: astore 5
    //   240: iconst_0
    //   241: istore 6
    //   243: goto +30 -> 273
    //   246: aload_0
    //   247: aload_0
    //   248: getfield 670	org/eclipse/pde/internal/core/exports/ProductExportOperation:fInfo	Lorg/eclipse/pde/internal/core/exports/FeatureExportInfo;
    //   251: getfield 661	org/eclipse/pde/internal/core/exports/FeatureExportInfo:items	[Ljava/lang/Object;
    //   254: iload 6
    //   256: aaload
    //   257: invokevirtual 744	org/eclipse/pde/internal/core/exports/ProductExportOperation:deleteBuildFiles	(Ljava/lang/Object;)V
    //   260: goto +10 -> 270
    //   263: astore 7
    //   265: aload 7
    //   267: invokestatic 730	org/eclipse/pde/internal/core/PDECore:log	(Ljava/lang/Throwable;)V
    //   270: iinc 6 1
    //   273: iload 6
    //   275: aload_0
    //   276: getfield 670	org/eclipse/pde/internal/core/exports/ProductExportOperation:fInfo	Lorg/eclipse/pde/internal/core/exports/FeatureExportInfo;
    //   279: getfield 661	org/eclipse/pde/internal/core/exports/FeatureExportInfo:items	[Ljava/lang/Object;
    //   282: arraylength
    //   283: if_icmplt -37 -> 246
    //   286: aload_0
    //   287: aconst_null
    //   288: new 408	org/eclipse/core/runtime/SubProgressMonitor
    //   291: dup
    //   292: aload_1
    //   293: iconst_1
    //   294: invokespecial 718	org/eclipse/core/runtime/SubProgressMonitor:<init>	(Lorg/eclipse/core/runtime/IProgressMonitor;I)V
    //   297: invokevirtual 756	org/eclipse/pde/internal/core/exports/ProductExportOperation:cleanup	([Ljava/lang/String;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   300: aload_1
    //   301: invokeinterface 769 1 0
    //   306: aconst_null
    //   307: putstatic 664	org/eclipse/pde/internal/core/exports/ProductExportOperation:errorMessage	Ljava/lang/String;
    //   310: aload 5
    //   312: areturn
    //   313: astore_3
    //   314: getstatic 664	org/eclipse/pde/internal/core/exports/ProductExportOperation:errorMessage	Ljava/lang/String;
    //   317: ifnull +82 -> 399
    //   320: aload_3
    //   321: invokestatic 757	org/eclipse/pde/internal/core/exports/ProductExportOperation:parseErrorMessage	(Lorg/eclipse/core/runtime/CoreException;)Lorg/eclipse/core/runtime/IStatus;
    //   324: astore 5
    //   326: iconst_0
    //   327: istore 6
    //   329: goto +30 -> 359
    //   332: aload_0
    //   333: aload_0
    //   334: getfield 670	org/eclipse/pde/internal/core/exports/ProductExportOperation:fInfo	Lorg/eclipse/pde/internal/core/exports/FeatureExportInfo;
    //   337: getfield 661	org/eclipse/pde/internal/core/exports/FeatureExportInfo:items	[Ljava/lang/Object;
    //   340: iload 6
    //   342: aaload
    //   343: invokevirtual 744	org/eclipse/pde/internal/core/exports/ProductExportOperation:deleteBuildFiles	(Ljava/lang/Object;)V
    //   346: goto +10 -> 356
    //   349: astore 7
    //   351: aload 7
    //   353: invokestatic 730	org/eclipse/pde/internal/core/PDECore:log	(Ljava/lang/Throwable;)V
    //   356: iinc 6 1
    //   359: iload 6
    //   361: aload_0
    //   362: getfield 670	org/eclipse/pde/internal/core/exports/ProductExportOperation:fInfo	Lorg/eclipse/pde/internal/core/exports/FeatureExportInfo;
    //   365: getfield 661	org/eclipse/pde/internal/core/exports/FeatureExportInfo:items	[Ljava/lang/Object;
    //   368: arraylength
    //   369: if_icmplt -37 -> 332
    //   372: aload_0
    //   373: aconst_null
    //   374: new 408	org/eclipse/core/runtime/SubProgressMonitor
    //   377: dup
    //   378: aload_1
    //   379: iconst_1
    //   380: invokespecial 718	org/eclipse/core/runtime/SubProgressMonitor:<init>	(Lorg/eclipse/core/runtime/IProgressMonitor;I)V
    //   383: invokevirtual 756	org/eclipse/pde/internal/core/exports/ProductExportOperation:cleanup	([Ljava/lang/String;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   386: aload_1
    //   387: invokeinterface 769 1 0
    //   392: aconst_null
    //   393: putstatic 664	org/eclipse/pde/internal/core/exports/ProductExportOperation:errorMessage	Ljava/lang/String;
    //   396: aload 5
    //   398: areturn
    //   399: aload_3
    //   400: invokevirtual 711	org/eclipse/core/runtime/CoreException:getStatus	()Lorg/eclipse/core/runtime/IStatus;
    //   403: astore 5
    //   405: iconst_0
    //   406: istore 6
    //   408: goto +30 -> 438
    //   411: aload_0
    //   412: aload_0
    //   413: getfield 670	org/eclipse/pde/internal/core/exports/ProductExportOperation:fInfo	Lorg/eclipse/pde/internal/core/exports/FeatureExportInfo;
    //   416: getfield 661	org/eclipse/pde/internal/core/exports/FeatureExportInfo:items	[Ljava/lang/Object;
    //   419: iload 6
    //   421: aaload
    //   422: invokevirtual 744	org/eclipse/pde/internal/core/exports/ProductExportOperation:deleteBuildFiles	(Ljava/lang/Object;)V
    //   425: goto +10 -> 435
    //   428: astore 7
    //   430: aload 7
    //   432: invokestatic 730	org/eclipse/pde/internal/core/PDECore:log	(Ljava/lang/Throwable;)V
    //   435: iinc 6 1
    //   438: iload 6
    //   440: aload_0
    //   441: getfield 670	org/eclipse/pde/internal/core/exports/ProductExportOperation:fInfo	Lorg/eclipse/pde/internal/core/exports/FeatureExportInfo;
    //   444: getfield 661	org/eclipse/pde/internal/core/exports/FeatureExportInfo:items	[Ljava/lang/Object;
    //   447: arraylength
    //   448: if_icmplt -37 -> 411
    //   451: aload_0
    //   452: aconst_null
    //   453: new 408	org/eclipse/core/runtime/SubProgressMonitor
    //   456: dup
    //   457: aload_1
    //   458: iconst_1
    //   459: invokespecial 718	org/eclipse/core/runtime/SubProgressMonitor:<init>	(Lorg/eclipse/core/runtime/IProgressMonitor;I)V
    //   462: invokevirtual 756	org/eclipse/pde/internal/core/exports/ProductExportOperation:cleanup	([Ljava/lang/String;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   465: aload_1
    //   466: invokeinterface 769 1 0
    //   471: aconst_null
    //   472: putstatic 664	org/eclipse/pde/internal/core/exports/ProductExportOperation:errorMessage	Ljava/lang/String;
    //   475: aload 5
    //   477: areturn
    //   478: astore 4
    //   480: iconst_0
    //   481: istore 6
    //   483: goto +30 -> 513
    //   486: aload_0
    //   487: aload_0
    //   488: getfield 670	org/eclipse/pde/internal/core/exports/ProductExportOperation:fInfo	Lorg/eclipse/pde/internal/core/exports/FeatureExportInfo;
    //   491: getfield 661	org/eclipse/pde/internal/core/exports/FeatureExportInfo:items	[Ljava/lang/Object;
    //   494: iload 6
    //   496: aaload
    //   497: invokevirtual 744	org/eclipse/pde/internal/core/exports/ProductExportOperation:deleteBuildFiles	(Ljava/lang/Object;)V
    //   500: goto +10 -> 510
    //   503: astore 7
    //   505: aload 7
    //   507: invokestatic 730	org/eclipse/pde/internal/core/PDECore:log	(Ljava/lang/Throwable;)V
    //   510: iinc 6 1
    //   513: iload 6
    //   515: aload_0
    //   516: getfield 670	org/eclipse/pde/internal/core/exports/ProductExportOperation:fInfo	Lorg/eclipse/pde/internal/core/exports/FeatureExportInfo;
    //   519: getfield 661	org/eclipse/pde/internal/core/exports/FeatureExportInfo:items	[Ljava/lang/Object;
    //   522: arraylength
    //   523: if_icmplt -37 -> 486
    //   526: aload_0
    //   527: aconst_null
    //   528: new 408	org/eclipse/core/runtime/SubProgressMonitor
    //   531: dup
    //   532: aload_1
    //   533: iconst_1
    //   534: invokespecial 718	org/eclipse/core/runtime/SubProgressMonitor:<init>	(Lorg/eclipse/core/runtime/IProgressMonitor;I)V
    //   537: invokevirtual 756	org/eclipse/pde/internal/core/exports/ProductExportOperation:cleanup	([Ljava/lang/String;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   540: aload 4
    //   542: athrow
    //   543: iconst_0
    //   544: istore 6
    //   546: goto +30 -> 576
    //   549: aload_0
    //   550: aload_0
    //   551: getfield 670	org/eclipse/pde/internal/core/exports/ProductExportOperation:fInfo	Lorg/eclipse/pde/internal/core/exports/FeatureExportInfo;
    //   554: getfield 661	org/eclipse/pde/internal/core/exports/FeatureExportInfo:items	[Ljava/lang/Object;
    //   557: iload 6
    //   559: aaload
    //   560: invokevirtual 744	org/eclipse/pde/internal/core/exports/ProductExportOperation:deleteBuildFiles	(Ljava/lang/Object;)V
    //   563: goto +10 -> 573
    //   566: astore 7
    //   568: aload 7
    //   570: invokestatic 730	org/eclipse/pde/internal/core/PDECore:log	(Ljava/lang/Throwable;)V
    //   573: iinc 6 1
    //   576: iload 6
    //   578: aload_0
    //   579: getfield 670	org/eclipse/pde/internal/core/exports/ProductExportOperation:fInfo	Lorg/eclipse/pde/internal/core/exports/FeatureExportInfo;
    //   582: getfield 661	org/eclipse/pde/internal/core/exports/FeatureExportInfo:items	[Ljava/lang/Object;
    //   585: arraylength
    //   586: if_icmplt -37 -> 549
    //   589: aload_0
    //   590: aconst_null
    //   591: new 408	org/eclipse/core/runtime/SubProgressMonitor
    //   594: dup
    //   595: aload_1
    //   596: iconst_1
    //   597: invokespecial 718	org/eclipse/core/runtime/SubProgressMonitor:<init>	(Lorg/eclipse/core/runtime/IProgressMonitor;I)V
    //   600: invokevirtual 756	org/eclipse/pde/internal/core/exports/ProductExportOperation:cleanup	([Ljava/lang/String;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   603: aload_0
    //   604: invokevirtual 741	org/eclipse/pde/internal/core/exports/ProductExportOperation:hasAntErrors	()Z
    //   607: ifeq +56 -> 663
    //   610: new 407	org/eclipse/core/runtime/Status
    //   613: dup
    //   614: iconst_2
    //   615: ldc 10
    //   617: getstatic 656	org/eclipse/pde/internal/core/PDECoreMessages:FeatureExportOperation_CompilationErrors	Ljava/lang/String;
    //   620: aload_0
    //   621: getfield 670	org/eclipse/pde/internal/core/exports/ProductExportOperation:fInfo	Lorg/eclipse/pde/internal/core/exports/FeatureExportInfo;
    //   624: getfield 662	org/eclipse/pde/internal/core/exports/FeatureExportInfo:destinationDirectory	Ljava/lang/String;
    //   627: invokestatic 719	org/eclipse/osgi/util/NLS:bind	(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String;
    //   630: invokespecial 716	org/eclipse/core/runtime/Status:<init>	(ILjava/lang/String;Ljava/lang/String;)V
    //   633: astore 9
    //   635: aload_1
    //   636: invokeinterface 769 1 0
    //   641: aconst_null
    //   642: putstatic 664	org/eclipse/pde/internal/core/exports/ProductExportOperation:errorMessage	Ljava/lang/String;
    //   645: aload 9
    //   647: areturn
    //   648: astore 8
    //   650: aload_1
    //   651: invokeinterface 769 1 0
    //   656: aconst_null
    //   657: putstatic 664	org/eclipse/pde/internal/core/exports/ProductExportOperation:errorMessage	Ljava/lang/String;
    //   660: aload 8
    //   662: athrow
    //   663: aload_1
    //   664: invokeinterface 769 1 0
    //   669: aconst_null
    //   670: putstatic 664	org/eclipse/pde/internal/core/exports/ProductExportOperation:errorMessage	Ljava/lang/String;
    //   673: getstatic 654	org/eclipse/core/runtime/Status:OK_STATUS	Lorg/eclipse/core/runtime/IStatus;
    //   676: areturn
    // Line number table:
    //   Java source line #90	-> byte code offset #0
    //   Java source line #91	-> byte code offset #8
    //   Java source line #92	-> byte code offset #12
    //   Java source line #94	-> byte code offset #48
    //   Java source line #95	-> byte code offset #52
    //   Java source line #98	-> byte code offset #56
    //   Java source line #101	-> byte code offset #66
    //   Java source line #102	-> byte code offset #69
    //   Java source line #104	-> byte code offset #100
    //   Java source line #105	-> byte code offset #119
    //   Java source line #106	-> byte code offset #128
    //   Java source line #107	-> byte code offset #152
    //   Java source line #108	-> byte code offset #153
    //   Java source line #117	-> byte code offset #157
    //   Java source line #119	-> byte code offset #163
    //   Java source line #120	-> byte code offset #180
    //   Java source line #121	-> byte code offset #182
    //   Java source line #117	-> byte code offset #187
    //   Java source line #124	-> byte code offset #203
    //   Java source line #109	-> byte code offset #220
    //   Java source line #110	-> byte code offset #221
    //   Java source line #117	-> byte code offset #240
    //   Java source line #119	-> byte code offset #246
    //   Java source line #120	-> byte code offset #263
    //   Java source line #121	-> byte code offset #265
    //   Java source line #117	-> byte code offset #270
    //   Java source line #124	-> byte code offset #286
    //   Java source line #132	-> byte code offset #300
    //   Java source line #133	-> byte code offset #306
    //   Java source line #110	-> byte code offset #310
    //   Java source line #111	-> byte code offset #313
    //   Java source line #112	-> byte code offset #314
    //   Java source line #113	-> byte code offset #320
    //   Java source line #117	-> byte code offset #326
    //   Java source line #119	-> byte code offset #332
    //   Java source line #120	-> byte code offset #349
    //   Java source line #121	-> byte code offset #351
    //   Java source line #117	-> byte code offset #356
    //   Java source line #124	-> byte code offset #372
    //   Java source line #132	-> byte code offset #386
    //   Java source line #133	-> byte code offset #392
    //   Java source line #113	-> byte code offset #396
    //   Java source line #114	-> byte code offset #399
    //   Java source line #117	-> byte code offset #405
    //   Java source line #119	-> byte code offset #411
    //   Java source line #120	-> byte code offset #428
    //   Java source line #121	-> byte code offset #430
    //   Java source line #117	-> byte code offset #435
    //   Java source line #124	-> byte code offset #451
    //   Java source line #132	-> byte code offset #465
    //   Java source line #133	-> byte code offset #471
    //   Java source line #114	-> byte code offset #475
    //   Java source line #115	-> byte code offset #478
    //   Java source line #117	-> byte code offset #480
    //   Java source line #119	-> byte code offset #486
    //   Java source line #120	-> byte code offset #503
    //   Java source line #121	-> byte code offset #505
    //   Java source line #117	-> byte code offset #510
    //   Java source line #124	-> byte code offset #526
    //   Java source line #125	-> byte code offset #540
    //   Java source line #117	-> byte code offset #543
    //   Java source line #119	-> byte code offset #549
    //   Java source line #120	-> byte code offset #566
    //   Java source line #121	-> byte code offset #568
    //   Java source line #117	-> byte code offset #573
    //   Java source line #124	-> byte code offset #589
    //   Java source line #127	-> byte code offset #603
    //   Java source line #128	-> byte code offset #610
    //   Java source line #132	-> byte code offset #635
    //   Java source line #133	-> byte code offset #641
    //   Java source line #128	-> byte code offset #645
    //   Java source line #131	-> byte code offset #648
    //   Java source line #132	-> byte code offset #650
    //   Java source line #133	-> byte code offset #656
    //   Java source line #134	-> byte code offset #660
    //   Java source line #132	-> byte code offset #663
    //   Java source line #133	-> byte code offset #669
    //   Java source line #135	-> byte code offset #673
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	677	0	this	ProductExportOperation
    //   0	677	1	monitor	org.eclipse.core.runtime.IProgressMonitor
    //   7	129	2	configurations	String[][]
    //   68	62	3	featureID	String
    //   152	2	3	e	IOException
    //   220	12	3	e	java.lang.reflect.InvocationTargetException
    //   313	8	3	e	CoreException
    //   399	1	3	e	CoreException
    //   478	63	4	localObject1	Object
    //   238	238	5	localObject2	Object
    //   158	33	6	j	int
    //   241	33	6	j	int
    //   327	33	6	j	int
    //   406	33	6	j	int
    //   481	33	6	j	int
    //   544	33	6	j	int
    //   180	3	7	e	CoreException
    //   263	3	7	e	CoreException
    //   349	3	7	e	CoreException
    //   428	3	7	e	CoreException
    //   503	3	7	e	CoreException
    //   566	3	7	e	CoreException
    //   648	13	8	localObject3	Object
    //   633	13	9	localStatus	Status
    // Exception table:
    //   from	to	target	type
    //   66	149	152	java/io/IOException
    //   163	177	180	org/eclipse/core/runtime/CoreException
    //   66	149	220	java/lang/reflect/InvocationTargetException
    //   246	260	263	org/eclipse/core/runtime/CoreException
    //   66	149	313	org/eclipse/core/runtime/CoreException
    //   332	346	349	org/eclipse/core/runtime/CoreException
    //   411	425	428	org/eclipse/core/runtime/CoreException
    //   66	157	478	finally
    //   220	240	478	finally
    //   313	326	478	finally
    //   399	405	478	finally
    //   486	500	503	org/eclipse/core/runtime/CoreException
    //   549	563	566	org/eclipse/core/runtime/CoreException
    //   56	300	648	finally
    //   313	386	648	finally
    //   399	465	648	finally
    //   478	635	648	finally
  }
  
  protected boolean groupedConfigurations()
  {
    return false;
  }
  
  private void cleanupBuildRepo()
  {
    File metadataTemp = new File(fBuildTempMetadataLocation);
    if (metadataTemp.exists()) {
      deleteDir(metadataTemp);
    }
  }
  
  protected String[] getPaths()
  {
    String[] paths = super.getPaths();
    String[] all = new String[paths.length + 1];
    all[0] = (fFeatureLocation + File.separator + "feature.xml");
    System.arraycopy(paths, 0, all, 1, paths.length);
    return all;
  }
  
  private void createBuildPropertiesFile(String featureLocation, String[][] configurations)
  {
    File file = new File(featureLocation);
    if ((!file.exists()) || (!file.isDirectory())) {
      file.mkdirs();
    }
    boolean hasLaunchers = PDECore.getDefault().getFeatureModelManager().getDeltaPackFeature() != null;
    Properties properties = new Properties();
    if ((fProduct.includeLaunchers()) && (!hasLaunchers) && (configurations.length > 0))
    {
      String rootPrefix = "root." + configurations[0][0] + "." + configurations[0][1] + "." + configurations[0][2];
      properties.put(rootPrefix, getRootFileLocations(hasLaunchers));
      if (TargetPlatform.getOS().equals("macosx"))
      {
        String plist = createMacInfoPList();
        if (plist != null) {
          properties.put(rootPrefix + ".folder." + "Eclipse.app/Contents", "absolute:file:" + plist);
        }
        properties.put(rootPrefix + ".folder." + "Eclipse.app/Contents/MacOS", getLauncherLocations(hasLaunchers));
        properties.put(rootPrefix 
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