org.tizen.web.project_2.0.0.201311011708

16:50:46.144 INFO  jd.cli.Main - Decompiling org.tizen.web.project_2.0.0.201311011708.jar
package org.tizen.web.project;

import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.osgi.framework.BundleContext;

public class Activator
  extends AbstractUIPlugin
{
  public static final String PLUGIN_ID = "org.tizen.web.project";
  private static Activator plugin;
  public static final String WIDGET_SCHEMAS_PATH = "schemas/";
  public static final String[] WIDGET_ROOT_SCHEMA = {
    "widgets.xsd" };
  public static final String SIGN_SCHEMA = "signature_schema.xsd";
  
  public static Activator getInstance()
  {
    return plugin;
  }
  
  public void start(BundleContext context)
    throws Exception
  {
    super.start(context);
    plugin = this;
  }
  
  public void stop(BundleContext context)
    throws Exception
  {
    plugin = null;
    super.stop(context);
  }
  
  public static Activator getDefault()
  {
    return plugin;
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.project.Activator
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.project;

import org.eclipse.osgi.util.NLS;

public class Messages
  extends NLS
{
  private static final String BUNDLE_NAME = "org.tizen.web.project.messages";
  public static String WidgetConfigurator_Project_Error;
  public static String WidgetConfigurator_File_Error;
  public static String ContentChecker_0;
  public static String ContentChecker_1;
  public static String NonSchemaBasedValidator_1;
  public static String NonSchemaBasedValidator_2;
  public static String NonSchemaBasedValidator_NotEqualPkgId;
  public static String NonSchemaBasedValidator_InvalidRequiredVersion;
  public static String PackageChangeListener_ProblemDescription;
  public static String PackageManager_ConfigurationReadError;
  public static String PackageManager_FailToSynchronizeAppID;
  public static String PackageManager_PackagingException;
  public static String WebBuilder_ErrorHeader;
  public static String WebBuilder_FailedToJoinValidator;
  public static String WebBuilder_UnknownBuild;
  public static String WebBuildExecutor_1;
  public static String WebBuildExecutor_2;
  public static String WebBuildExecutor_5;
  public static String WebBuildExecutor_6;
  public static String EssentialFile_Not_Found;
  public static String EssentialFile_Check_Failed;
  public static String HybridAppBuilder_CannotEnableBuilder;
  public static String HybridAppBuilder_FailToGetArchitecture;
  public static String HybridAppBuilder_GuideForNotMatchedArch;
  public static String HybridAppBuilder_NotMatchedArchContinueQuestion;
  public static String Validator_MalformedIRI;
  public static String Validator_MalformedURL;
  public static String Validator_MalformedMail;
  public static String Validator_ResourceNotFound;
  public static String Validator_InvalidFileName;
  public static String Validator_InvalidContentElement;
  public static String Validator_InvalidTizenIconElement;
  public static String Validator_InvalidSRCAttribute;
  public static String Validator_InvalidVersionAttribute;
  public static String Validator_InvalidPreviewAttribute;
  public static String Validator_BlankAttribute;
  public static String Validator_PrivilegeLevel;
  public static String Validator_ContainedScreenSizeFeature;
  public static String Validator_DuplicateAppControl;
  public static String LoadClassError;
  
  static
  {
    NLS.initializeMessages("org.tizen.web.project.messages", Messages.class);
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.project.Messages
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.project.builder;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.SubProgressMonitor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.tizen.common.builder.BuildProcess;
import org.tizen.common.builder.Builder;
import org.tizen.common.builder.ResourceLayer;
import org.tizen.common.file.FileHandler;
import org.tizen.common.file.StandardFileHandler;
import org.tizen.common.util.Assert;
import org.tizen.common.util.ProjectUtil;

public class BuildResourceManager
{
  protected static final Logger logger = LoggerFactory.getLogger(BuildResourceManager.class);
  public static final String DOT = ".";
  public static final String TEMP_BUILD_DIRECTORY = ".build";
  public static final String FILTER_KEY = "buildResourceFilter";
  private IProject project;
  private IFolder buildFolder;
  private static List<IPath> exclusiveFiles = new ArrayList();
  private static Map<IProject, BuildProcess> buildProcessors = new HashMap();
  private static Map<IProject, ResourceLayer> projectLayers = new HashMap();
  private static Map<IProject, Boolean> projectCleanBuildState = new HashMap();
  private String filterPattern;
  
  public BuildResourceManager(IProject project)
  {
    Assert.notNull(project);
    
    this.project = project;
    filterPattern = null;
  }
  
  public static void setProjectCleanBuildState(IProject project, Boolean state)
  {
    Assert.notNull(project);
    Assert.notNull(state);
    
    projectCleanBuildState.put(project, state);
  }
  
  public static Boolean getProjectCleanBuildState(IProject project)
  {
    Assert.notNull(project);
    if (projectCleanBuildState.containsKey(project)) {
      return (Boolean)projectCleanBuildState.get(project);
    }
    return Boolean.valueOf(false);
  }
  
  public ResourceLayer getProjectResourceLayer()
  {
    return getProjectResourceLayer(project);
  }
  
  public static ResourceLayer getProjectResourceLayer(IProject project)
  {
    Assert.notNull(project);
    if (!projectLayers.containsKey(project))
    {
      StandardFileHandler projectFileHandler = new StandardFileHandler();
      projectFileHandler.setCurrentWorkingDirectory(project.getLocation().toString());
      ResourceLayer projectResourceLayer = new ResourceLayer(project.getName(), projectFileHandler);
      
      projectLayers.put(project, projectResourceLayer);
    }
    return (ResourceLayer)projectLayers.get(project);
  }
  
  public static boolean hasBuildProcess(IProject project)
  {
    return buildProcessors.containsKey(project);
  }
  
  public static BuildProcess getBuildProcess(IProject project)
  {
    Assert.notNull(project);
    if (!hasBuildProcess(project)) {
      buildProcessors.put(project, new BuildProcess());
    }
    return (BuildProcess)buildProcessors.get(project);
  }
  
  public BuildProcess getBuildProcess()
  {
    return getBuildProcess(project);
  }
  
  public static void cleanProjectResourceLayer(IProject project)
  {
    Assert.notNull(project);
    
    projectLayers.remove(project);
  }
  
  public void cleanProjectResourceLayer()
  {
    cleanProjectResourceLayer(project);
  }
  
  public void cleanBuildProcess()
  {
    Assert.notNull(project);
    
    cleanProjectResourceLayer();
    buildProcessors.remove(project);
  }
  
  public static String getLastWorkingDirectory(IProject project)
  {
    BuildProcess buildProcess = getBuildProcess(project);
    Builder lastBuilder = buildProcess.getLastBuilder();
    if (lastBuilder == null)
    {
      logger.debug("Cannot find a last builder of BuildProcess in {} project,", project.getName());
      return null;
    }
    return lastBuilder.getResourceLayer().getFileHandler().getCurrentWorkingDirectory();
  }
  
  public static IPath getLastWorkingRelativePath(IProject project)
  {
    String lastWorkingDirectory = getLastWorkingDirectory(project);
    if (lastWorkingDirectory == null) {
      return null;
    }
    IPath path = new Path(lastWorkingDirectory);
    return path.makeRelativeTo(project.getLocation());
  }
  
  public static IContainer getLastWorkingFolder(IProject project)
  {
    IPath relativePath = getLastWorkingRelativePath(project);
    
    logger.debug("Last working folder : {} ", relativePath);
    if (relativePath == null) {
      return null;
    }
    IFolder folder = project.getFolder(relativePath);
    try
    {
      checkParent(folder);
      return folder;
    }
    catch (CoreException e)
    {
      logger.error(e.getMessage(), e);
    }
    return null;
  }
  
  protected static void checkParent(IContainer container)
    throws CoreException
  {
    Assert.notNull(container);
    
    IContainer parent = container.getParent();
    if ((parent instanceof IFolder))
    {
      checkParent(parent);
      if (!parent.exists())
      {
        IFolder parentFolder = (IFolder)parent;
        parentFolder.create(true, true, null);
        parentFolder.refreshLocal(2, null);
      }
    }
  }
  
  public IContainer getLastWorkingFolder()
  {
    return getLastWorkingFolder(project);
  }
  
  protected IFolder getBuildFolder(IProgressMonitor monitor)
    throws CoreException
  {
    if (buildFolder == null) {
      buildFolder = project.getFolder(".build");
    }
    if (!buildFolder.isSynchronized(0)) {
      buildFolder.refreshLocal(0, new SubProgressMonitor(monitor, 1));
    }
    if (!buildFolder.exists()) {
      buildFolder.create(true, true, new SubProgressMonitor(monitor, 1));
    }
    return buildFolder;
  }
  
  protected void clearBuildFolder(IProgressMonitor monitor)
    throws CoreException
  {
    if (monitor == null) {
      monitor = new NullProgressMonitor();
    }
    IFolder folder = getBuildFolder(monitor);
    if (folder.isAccessible())
    {
      if (!folder.isSynchronized(2)) {
        folder.refreshLocal(2, new SubProgressMonitor(monitor, 1));
      }
      folder.delete(true, new SubProgressMonitor(monitor, 1));
    }
  }
  
  public static void addExclusivePath(IPath projectRelativeFullPath)
  {
    Assert.notNull(projectRelativeFullPath);
    if (!exclusiveFiles.contains(projectRelativeFullPath)) {
      exclusiveFiles.add(projectRelativeFullPath);
    }
  }
  
  public static void addExclusiveList(List<IPath> projectRelativeFullPathList)
  {
    Assert.notNull(projectRelativeFullPathList);
    for (IPath projectRelativeFullPath : projectRelativeFullPathList) {
      addExclusivePath(projectRelativeFullPath);
    }
  }
  
  public static IPath[] getExclusiveFileList()
  {
    return (IPath[])exclusiveFiles.toArray(new IPath[0]);
  }
  
  public static void removeExclusiveFile(IPath projectRelativeFullPath)
  {
    Assert.notNull(projectRelativeFullPath);
    if (exclusiveFiles.contains(projectRelativeFullPath)) {
      exclusiveFiles.remove(projectRelativeFullPath);
    }
  }
  
  public static void removeExclusiveFileList(List<IPath> projectRelativeFullPathList)
  {
    Assert.notNull(projectRelativeFullPathList);
    for (IPath projectRelativeFullPath : projectRelativeFullPathList) {
      removeExclusiveFile(projectRelativeFullPath);
    }
  }
  
  public boolean isFilteredResource(IResource resource)
  {
    Assert.notNull(resource);
    if (resource.getName().startsWith(".")) {
      return true;
    }
    if ((resource.getType() == 1) && 
      ("wgt".equalsIgnoreCase(resource.getFileExtension()))) {
      return true;
    }
    IPath resourcePath = resource.getFullPath();
    IPath[] arrayOfIPath;
    int j = (arrayOfIPath = getExclusiveFileList()).length;
    for (int i = 0; i < j; i++)
    {
      IPath projectRelativeFullPath = arrayOfIPath[i];
      if (projectRelativeFullPath.equals(resourcePath)) {
        return true;
      }
    }
    String externalFilter = getExternalFilter();
    if ((externalFilter != null) && (resource.getLocation().toString().matches(externalFilter))) {
      return true;
    }
    return false;
  }
  
  protected String getExternalFilter()
  {
    if (filterPattern == null)
    {
      Map<String, String> buildCommandArgument = ProjectUtil.getBuildCommandArgument(project, "org.tizen.web.project.builder.WebBuilder");
      if ((buildCommandArgument != null) && 
        (buildCommandArgument.containsKey("buildResourceFilter"))) {
        filterPattern = ((String)buildCommandArgument.get("buildResourceFilter"));
      }
    }
    return filterPattern;
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.project.builder.BuildResourceManager
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.project.builder;

import org.eclipse.core.resources.IProject;
import org.tizen.common.builder.ResourceLayer;
import org.tizen.web.builder.CssMinifyBuilder;

public class CssMinifyBuilderForEclipse
  extends CssMinifyBuilder
{
  private IProject project;
  
  public CssMinifyBuilderForEclipse(IProject project, ResourceLayer resourceLayer)
  {
    super(resourceLayer);
    this.project = project;
  }
  
  /* Error */
  public org.tizen.common.builder.BuildResult build(org.tizen.common.builder.Resource resource)
    throws org.tizen.common.builder.exception.BuildException
  {
    // Byte code:
    //   0: aconst_null
    //   1: astore_2
    //   2: aload_0
    //   3: aload_1
    //   4: invokespecial 26	org/tizen/web/builder/CssMinifyBuilder:build	(Lorg/tizen/common/builder/Resource;)Lorg/tizen/common/builder/BuildResult;
    //   7: areturn
    //   8: pop
    //   9: aconst_null
    //   10: astore_3
    //   11: new 28	org/tizen/common/builder/BuildResult
    //   14: dup
    //   15: invokespecial 30	org/tizen/common/builder/BuildResult:<init>	()V
    //   18: astore_2
    //   19: aload_1
    //   20: invokevirtual 33	org/tizen/common/builder/Resource:getContents	()Ljava/io/InputStream;
    //   23: astore_3
    //   24: aload_0
    //   25: getfield 39	org/tizen/web/project/builder/CssMinifyBuilderForEclipse:logger	Lorg/slf4j/Logger;
    //   28: ldc 43
    //   30: aload_1
    //   31: invokevirtual 45	org/tizen/common/builder/Resource:getPath	()Ljava/lang/String;
    //   34: invokeinterface 49 3 0
    //   39: aload_0
    //   40: getfield 55	org/tizen/web/project/builder/CssMinifyBuilderForEclipse:layer	Lorg/tizen/common/builder/ResourceLayer;
    //   43: aload_1
    //   44: invokevirtual 45	org/tizen/common/builder/Resource:getPath	()Ljava/lang/String;
    //   47: aload_3
    //   48: invokevirtual 58	org/tizen/common/builder/ResourceLayer:addResource	(Ljava/lang/String;Ljava/io/InputStream;)Lorg/tizen/common/builder/Resource;
    //   51: astore 4
    //   53: aload_2
    //   54: aload_1
    //   55: aload 4
    //   57: invokevirtual 64	org/tizen/common/builder/BuildResult:addDependency	(Lorg/tizen/common/builder/Resource;Lorg/tizen/common/builder/Resource;)V
    //   60: goto +31 -> 91
    //   63: astore 4
    //   65: new 24	org/tizen/common/builder/exception/BuildException
    //   68: dup
    //   69: aload 4
    //   71: invokespecial 68	org/tizen/common/builder/exception/BuildException:<init>	(Ljava/lang/Throwable;)V
    //   74: athrow
    //   75: astore 5
    //   77: iconst_1
    //   78: anewarray 71	java/lang/Object
    //   81: dup
    //   82: iconst_0
    //   83: aload_3
    //   84: aastore
    //   85: invokestatic 73	org/tizen/common/util/IOUtil:tryClose	([Ljava/lang/Object;)V
    //   88: aload 5
    //   90: athrow
    //   91: iconst_1
    //   92: anewarray 71	java/lang/Object
    //   95: dup
    //   96: iconst_0
    //   97: aload_3
    //   98: aastore
    //   99: invokestatic 73	org/tizen/common/util/IOUtil:tryClose	([Ljava/lang/Object;)V
    //   102: aload_2
    //   103: areturn
    // Line number table:
    //   Java source line #50	-> byte code offset #0
    //   Java source line #53	-> byte code offset #2
    //   Java source line #54	-> byte code offset #8
    //   Java source line #58	-> byte code offset #9
    //   Java source line #61	-> byte code offset #11
    //   Java source line #62	-> byte code offset #19
    //   Java source line #64	-> byte code offset #24
    //   Java source line #66	-> byte code offset #39
    //   Java source line #67	-> byte code offset #53
    //   Java source line #68	-> byte code offset #63
    //   Java source line #69	-> byte code offset #65
    //   Java source line #70	-> byte code offset #75
    //   Java source line #71	-> byte code offset #83
    //   Java source line #72	-> byte code offset #88
    //   Java source line #70	-> byte code offset #91
    //   Java source line #71	-> byte code offset #97
    //   Java source line #74	-> byte code offset #102
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	104	0	this	CssMinifyBuilderForEclipse
    //   0	104	1	resource	org.tizen.common.builder.Resource
    //   1	102	2	ret	org.tizen.common.builder.BuildResult
    //   10	88	3	is	java.io.InputStream
    //   51	5	4	out	org.tizen.common.builder.Resource
    //   63	7	4	ioException	java.io.IOException
    //   75	14	5	localObject	Object
    //   8	1	7	localMinifyException	org.tizen.web.builder.exception.MinifyException
    // Exception table:
    //   from	to	target	type
    //   2	7	8	org/tizen/web/builder/exception/MinifyException
    //   11	60	63	java/io/IOException
    //   11	75	75	finally
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.project.builder.CssMinifyBuilderForEclipse
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.project.builder;

import org.eclipse.core.resources.IProject;
import org.eclipse.jface.dialogs.MessageDialogWithToggle;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.swt.widgets.Display;
import org.tizen.web.project.Activator;
import org.tizen.web.project.Messages;

class DialogRunnable
  implements Runnable
{
  private static final String PREF_NO_PROMPT_ON_BUILD = "prefNoPromptOnBuild";
  private final String TITLE = Messages.WebBuildExecutor_1;
  private final String TOGGLE_MESSAGE = Messages.WebBuildExecutor_6;
  private final String message;
  private boolean shouldPack;
  
  public DialogRunnable(IProject project)
  {
    message = (Messages.WebBuildExecutor_2 + ":\n\n" + project.getName() + "\n\n" + Messages.WebBuildExecutor_5);
    shouldPack = false;
  }
  
  public void run()
  {
    IPreferenceStore preferenceStore = Activator.getDefault().getPreferenceStore();
    boolean dontShowDialog = preferenceStore.getBoolean("prefNoPromptOnBuild");
    if (dontShowDialog)
    {
      shouldPack = true;
      return;
    }
    MessageDialogWithToggle dialog = MessageDialogWithToggle.open(
      3, Display.getCurrent().getActiveShell(), TITLE, 
      message, TOGGLE_MESSAGE, false, null, null, 0);
    if (dialog.getToggleState()) {
      preferenceStore.setValue("prefNoPromptOnBuild", true);
    }
    if (dialog.getReturnCode() == 2) {
      shouldPack = true;
    }
  }
  
  public boolean shouldPack()
  {
    return shouldPack;
  }
}

/* Location:
 * Qualified Name:     org.tizen.web.project.builder.DialogRunnable
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.web.project.builder;

import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.Status;
import org.eclipse.osgi.util.NLS;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.tizen.common.Architecture;
import org.tizen.common.Architecture.Group;
import org.tizen.common.CommonPlugin;
import org.tizen.common.IApplicationConfiguration;
import org.tizen.common.ITizenNativeXMLStore;
import org.tizen.common.TizenProjectType;
import org.tizen.common.builder.BuildResult;
import org.tizen.common.builder.Resource;
import org.tizen.common.builder.ResourceLayer;
import org.tizen.common.builder.core.AbstractBuilder;
import org.tizen.common.core.command.ExecutionContext;
import org.tizen.common.core.command.Executor;
import org.tizen.common.core.command.Policy;
import org.tizen.common.core.command.Prompter;
import org.tizen.common.core.command.policy.OptionPolicy;
import org.tizen.common.core.command.prompter.FileHandlingOption;
import org.tizen.common.core.command.prompter.Option;
import org.tizen.common.core.command.prompter.RunnableOption;
import org.tizen.common.file.FileHandler;
import org.tizen.common.file.FileHandler.Attribute;
import org.tizen.common.util.Assert;
import org.tizen.common.util.DialogUtil;
import org.tizen.common.util.FileUtil;
import org.tizen.common.util.FilenameUtil;
import org.tizen.common.util.IOUtil;
import org.tizen.common.util.PluginUtil;
import org.tizen.common.util.ProjectUtil;
import org.tizen.sdblib.Arch;
import org.tizen.sdblib.IDevice;
import org.tizen.web.builder.file.handler.BuildFileHandler;
import org.tizen.web.project.Messages;
import org.tizen.web.project.configuration.ConfigurationException;
import org.tizen.web.project.configuration.WidgetConfigurator;
import org.tizen.web.project.util.BuildErrorChecker;

public class HybridAppBuilder
  extends AbstractBuilder
{
  protected final Logger logger = LoggerFactory.getLogger(HybridAppBuilder.class);
  public static final String RESOURCE_LAYER_NAME = "Hybrid Resource Layer";
  public static final String OSP_FOLDER_MANIFEST = "info";
  private static final String OSP_FOLDER_BINARY = "bin";
  private static final String OSP_FOLDER_RESOURCE = "res";
  private static final String[] OSP_MOVABLE_FOLDER = {
    "shared", "setting", "data", "icons", "lib", "llvm", "res" };
  private static final String SHARED_LIB_FOLDER = "plugins";
  public static final String OSP_MANIFEST = "manifest.xml";
  private static final String APPID_ELEMENT_NAME = "Id";
  private static final String APPID_OPEN_ELEMENT = "<Id>";
  private static final String APPID_CLOSE_ELEMENT = "</Id>";
  protected IProject project;
  List<IProject> referenceProjectList = new ArrayList();
  private FileHandlingOption selectedAllFlagOption;
  
  public HybridAppBuilder(ResourceLayer parentLayer)
  {
    super(parentLayer);
  }
  
  public HybridAppBuilder(IProject project, String cwdPath, ResourceLayer parentLayer)
  {
    Assert.notNull(project);
    Assert.notNull(parentLayer);
    
    this.project = project;
    bEnabled = false;
    
    BuildFileHandler hybridFileHandler = new BuildFileHandler(cwdPath, ".build");
    ResourceLayer hybridResourceLayer = new ResourceLayer("Hybrid Resource Layer", parentLayer, hybridFileHandler);
    
    setResourceLayer(hybridResourceLayer);
  }
  
  /* Error */
  public BuildResult build(Resource resource)
    throws org.tizen.common.builder.exception.BuildException
  {
    // Byte code:
    //   0: new 129	org/tizen/common/builder/BuildResult
    //   3: dup
    //   4: invokespecial 131	org/tizen/common/builder/BuildResult:<init>	()V
    //   7: astore_2
    //   8: aconst_null
    //   9: astore_3
    //   10: aload_1
    //   11: invokevirtual 132	org/tizen/common/builder/Resource:getContents	()Ljava/io/InputStream;
    //   14: astore_3
    //   15: aload_0
    //   16: invokespecial 138	org/tizen/web/project/builder/HybridAppBuilder:hasTizenCppServiceApplication	()Z
    //   19: ifeq +93 -> 112
    //   22: aload_0
    //   23: aload_1
    //   24: invokespecial 142	org/tizen/web/project/builder/HybridAppBuilder:getProject	(Lorg/tizen/common/builder/Resource;)Lorg/eclipse/core/resources/IProject;
    //   27: invokestatic 146	org/tizen/common/util/ProjectUtil:isTizenWebProject	(Lorg/eclipse/core/resources/IProject;)Z
    //   30: ifeq +82 -> 112
    //   33: aload_1
    //   34: invokevirtual 152	org/tizen/common/builder/Resource:getLayer	()Lorg/tizen/common/builder/ResourceLayer;
    //   37: invokevirtual 156	org/tizen/common/builder/ResourceLayer:getName	()Ljava/lang/String;
    //   40: aload_0
    //   41: getfield 99	org/tizen/web/project/builder/HybridAppBuilder:project	Lorg/eclipse/core/resources/IProject;
    //   44: invokeinterface 160 1 0
    //   49: invokevirtual 163	java/lang/String:equals	(Ljava/lang/Object;)Z
    //   52: ifeq +43 -> 95
    //   55: new 167	org/eclipse/core/runtime/Path
    //   58: dup
    //   59: ldc 19
    //   61: invokespecial 169	org/eclipse/core/runtime/Path:<init>	(Ljava/lang/String;)V
    //   64: ldc -84
    //   66: invokevirtual 174	org/eclipse/core/runtime/Path:append	(Ljava/lang/String;)Lorg/eclipse/core/runtime/IPath;
    //   69: aload_1
    //   70: invokevirtual 178	org/tizen/common/builder/Resource:getPath	()Ljava/lang/String;
    //   73: invokeinterface 181 2 0
    //   78: invokeinterface 184 1 0
    //   83: astore 4
    //   85: aload_0
    //   86: aload_1
    //   87: aload 4
    //   89: aload_3
    //   90: aload_2
    //   91: invokevirtual 187	org/tizen/web/project/builder/HybridAppBuilder:addResource	(Lorg/tizen/common/builder/Resource;Ljava/lang/String;Ljava/io/InputStream;Lorg/tizen/common/builder/BuildResult;)Lorg/tizen/common/builder/Resource;
    //   94: pop
    //   95: aload_2
    //   96: astore 6
    //   98: iconst_1
    //   99: anewarray 191	java/lang/Object
    //   102: dup
    //   103: iconst_0
    //   104: aload_3
    //   105: aastore
    //   106: invokestatic 193	org/tizen/common/util/IOUtil:tryClose	([Ljava/lang/Object;)V
    //   109: aload 6
    //   111: areturn
    //   112: aload_0
    //   113: aload_1
    //   114: invokespecial 199	org/tizen/web/project/builder/HybridAppBuilder:getOSPProjectType	(Lorg/tizen/common/builder/Resource;)Lorg/tizen/common/TizenProjectType;
    //   117: astore 4
    //   119: invokestatic 203	org/tizen/web/project/builder/HybridAppBuilder:$SWITCH_TABLE$org$tizen$common$TizenProjectType	()[I
    //   122: aload 4
    //   124: invokevirtual 206	org/tizen/common/TizenProjectType:ordinal	()I
    //   127: iaload
    //   128: tableswitch	default:+39->167, 6:+24->152, 7:+33->161
    //   152: aload_0
    //   153: aload_1
    //   154: aload_2
    //   155: invokespecial 212	org/tizen/web/project/builder/HybridAppBuilder:addResourceAboutTizenCppService	(Lorg/tizen/common/builder/Resource;Lorg/tizen/common/builder/BuildResult;)V
    //   158: goto +52 -> 210
    //   161: aload_0
    //   162: aload_1
    //   163: aload_2
    //   164: invokespecial 216	org/tizen/web/project/builder/HybridAppBuilder:addResourceAboutTizenCppSharedLibrary	(Lorg/tizen/common/builder/Resource;Lorg/tizen/common/builder/BuildResult;)V
    //   167: goto +43 -> 210
    //   170: astore 4
    //   172: new 127	org/tizen/common/builder/exception/BuildException
    //   175: dup
    //   176: aload 4
    //   178: invokespecial 219	org/tizen/common/builder/exception/BuildException:<init>	(Ljava/lang/Throwable;)V
    //   181: athrow
    //   182: astore 4
    //   184: new 127	org/tizen/common/builder/exception/BuildException
    //   187: dup
    //   188: aload 4
    //   190: invokespecial 219	org/tizen/common/builder/exception/BuildException:<init>	(Ljava/lang/Throwable;)V
    //   193: athrow
    //   194: astore 5
    //   196: iconst_1
    //   197: anewarray 191	java/lang/Object
    //   200: dup
    //   201: iconst_0
    //   202: aload_3
    //   203: aastore
    //   204: invokestatic 193	org/tizen/common/util/IOUtil:tryClose	([Ljava/lang/Object;)V
    //   207: aload 5
    //   209: athrow
    //   210: iconst_1
    //   211: anewarray 191	java/lang/Object
    //   214: dup
    //   215: iconst_0
    //   216: aload_3
    //   217: aastore
    //   218: invokestatic 193	org/tizen/common/util/IOUtil:tryClose	([Ljava/lang/Object;)V
    //   221: aload_2
    //   222: areturn
    // Line number table:
    //   Java source line #135	-> byte code offset #0
    //   Java source line #137	-> byte code offset #8
    //   Java source line #139	-> byte code offset #10
    //   Java source line #141	-> byte code offset #15
    //   Java source line #142	-> byte code offset #22
    //   Java source line #143	-> byte code offset #33
    //   Java source line #145	-> byte code offset #55
    //   Java source line #146	-> byte code offset #64
    //   Java source line #147	-> byte code offset #69
    //   Java source line #145	-> byte code offset #83
    //   Java source line #148	-> byte code offset #85
    //   Java source line #150	-> byte code offset #95
    //   Java source line #166	-> byte code offset #98
    //   Java source line #167	-> byte code offset #104
    //   Java source line #150	-> byte code offset #109
    //   Java source line #153	-> byte code offset #112
    //   Java source line #154	-> byte code offset #119
    //   Java source line #154	-> byte code offset #122
    //   Java source line #156	-> byte code offset #152
    //   Java source line #157	-> byte code offset #158
    //   Java source line #159	-> byte code offset #161
    //   Java source line #161	-> byte code offset #167
    //   Java source line #162	-> byte code offset #170
    //   Java source line #163	-> byte code offset #172
    //   Java source line #164	-> byte code offset #182
    //   Java source line #165	-> byte code offset #184
    //   Java source line #166	-> byte code offset #194
    //   Java source line #167	-> byte code offset #202
    //   Java source line #168	-> byte code offset #207
    //   Java source line #166	-> byte code offset #210
    //   Java source line #167	-> byte code offset #216
    //   Java source line #170	-> byte code offset #221
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	223	0	this	HybridAppBuilder
    //   0	223	1	resource	Resource
    //   7	215	2	result	BuildResult
    //   9	208	3	contents	InputStream
    //   83	5	4	newPath	String
    //   117	6	4	type	TizenProjectType
    //   170	7	4	e	IOException
    //   182	7	4	e	CoreException
    //   194	14	5	localObject	Object
    //   96	14	6	localBuildResult1	BuildResult
    // Exception table:
    //   from	to	target	type
    //   10	98	170	java/io/IOException
    //   112	167	170	java/io/IOException
    //   10	98	182	org/eclipse/core/runtime/CoreException
    //   112	167	182	org/eclipse/core/runtime/CoreException
    //   10	98	194	finally
    //   112	194	194	finally
  }
  
  private IProject getProject(Resource resource)
  {
    IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(resource.getLayer().getName());
    return project;
  }
  
  /* Error */
  private void addResourceAboutTizenCppSharedLibrary(Resource resource, BuildResult result)
    throws CoreException, IOException
  {
    // Byte code:
    //   0: aload_1
    //   1: invokevirtual 178	org/tizen/common/builder/Resource:getPath	()Ljava/lang/String;
    //   4: astore_3
    //   5: new 167	org/eclipse/core/runtime/Path
    //   8: dup
    //   9: aload_3
    //   10: invokespecial 169	org/eclipse/core/runtime/Path:<init>	(Ljava/lang/String;)V
    //   13: astore 4
    //   15: aload 4
    //   17: iconst_0
    //   18: invokeinterface 260 2 0
    //   23: astore 5
    //   25: aconst_null
    //   26: astore 6
    //   28: aload_1
    //   29: invokevirtual 132	org/tizen/common/builder/Resource:getContents	()Ljava/io/InputStream;
    //   32: astore 6
    //   34: aload 4
    //   36: invokeinterface 264 1 0
    //   41: iconst_2
    //   42: if_icmpne +162 -> 204
    //   45: aload 4
    //   47: iconst_1
    //   48: invokeinterface 260 2 0
    //   53: astore 7
    //   55: aload_0
    //   56: aload_0
    //   57: aload_1
    //   58: invokespecial 142	org/tizen/web/project/builder/HybridAppBuilder:getProject	(Lorg/tizen/common/builder/Resource;)Lorg/eclipse/core/resources/IProject;
    //   61: aload 5
    //   63: invokevirtual 267	org/tizen/web/project/builder/HybridAppBuilder:isBinaryFolder	(Lorg/eclipse/core/resources/IProject;Ljava/lang/String;)Z
    //   66: ifeq +138 -> 204
    //   69: aload_0
    //   70: aload_0
    //   71: aload_1
    //   72: invokespecial 142	org/tizen/web/project/builder/HybridAppBuilder:getProject	(Lorg/tizen/common/builder/Resource;)Lorg/eclipse/core/resources/IProject;
    //   75: aload 7
    //   77: invokevirtual 271	org/tizen/web/project/builder/HybridAppBuilder:isBinaryFile	(Lorg/eclipse/core/resources/IProject;Ljava/lang/String;)Z
    //   80: ifeq +124 -> 204
    //   83: aload_0
    //   84: aload_1
    //   85: invokespecial 142	org/tizen/web/project/builder/HybridAppBuilder:getProject	(Lorg/tizen/common/builder/Resource;)Lorg/eclipse/core/resources/IProject;
    //   88: invokestatic 274	org/tizen/web/project/builder/HybridAppBuilder:getBuildArchitecture	(Lorg/eclipse/core/resources/IProject;)Ljava/lang/String;
    //   91: astore 8
    //   93: aload 8
    //   95: invokestatic 278	org/tizen/common/Architecture:getGroup	(Ljava/lang/String;)Lorg/tizen/common/Architecture$Group;
    //   98: invokevirtual 284	org/tizen/common/Architecture$Group:name	()Ljava/lang/String;
    //   101: astore 9
    //   103: new 167	org/eclipse/core/runtime/Path
    //   106: dup
    //   107: ldc 24
    //   109: invokespecial 169	org/eclipse/core/runtime/Path:<init>	(Ljava/lang/String;)V
    //   112: aload 9
    //   114: invokevirtual 174	org/eclipse/core/runtime/Path:append	(Ljava/lang/String;)Lorg/eclipse/core/runtime/IPath;
    //   117: aload 7
    //   119: invokeinterface 181 2 0
    //   124: invokeinterface 184 1 0
    //   129: astore 10
    //   131: aload_0
    //   132: invokespecial 138	org/tizen/web/project/builder/HybridAppBuilder:hasTizenCppServiceApplication	()Z
    //   135: ifeq +45 -> 180
    //   138: new 167	org/eclipse/core/runtime/Path
    //   141: dup
    //   142: ldc 19
    //   144: invokespecial 169	org/eclipse/core/runtime/Path:<init>	(Ljava/lang/String;)V
    //   147: ldc -84
    //   149: invokevirtual 174	org/eclipse/core/runtime/Path:append	(Ljava/lang/String;)Lorg/eclipse/core/runtime/IPath;
    //   152: ldc 24
    //   154: invokeinterface 181 2 0
    //   159: aload 9
    //   161: invokeinterface 181 2 0
    //   166: aload 7
    //   168: invokeinterface 181 2 0
    //   173: invokeinterface 184 1 0
    //   178: astore 10
    //   180: aload_0
    //   181: aload_1
    //   182: aload 10
    //   184: aload 6
    //   186: aload_2
    //   187: invokevirtual 187	org/tizen/web/project/builder/HybridAppBuilder:addResource	(Lorg/tizen/common/builder/Resource;Ljava/lang/String;Ljava/io/InputStream;Lorg/tizen/common/builder/BuildResult;)Lorg/tizen/common/builder/Resource;
    //   190: pop
    //   191: iconst_1
    //   192: anewarray 191	java/lang/Object
    //   195: dup
    //   196: iconst_0
    //   197: aload 6
    //   199: aastore
    //   200: invokestatic 193	org/tizen/common/util/IOUtil:tryClose	([Ljava/lang/Object;)V
    //   203: return
    //   204: aload_0
    //   205: aload_1
    //   206: aload_3
    //   207: aload 6
    //   209: aload_2
    //   210: invokevirtual 187	org/tizen/web/project/builder/HybridAppBuilder:addResource	(Lorg/tizen/common/builder/Resource;Ljava/lang/String;Ljava/io/InputStream;Lorg/tizen/common/builder/BuildResult;)Lorg/tizen/common/builder/Resource;
    //   213: astore 7
    //   215: aload_0
    //   216: invokevirtual 289	org/tizen/web/project/builder/HybridAppBuilder:getResourceLayer	()Lorg/tizen/common/builder/ResourceLayer;
    //   219: astore 8
    //   221: aload_0
    //   222: getfield 79	org/tizen/web/project/builder/HybridAppBuilder:logger	Lorg/slf4j/Logger;
    //   225: ldc_w 292
    //   228: aload_3
    //   229: aload 8
    //   231: invokeinterface 294 4 0
    //   236: aload 8
    //   238: aload 7
    //   240: invokevirtual 300	org/tizen/common/builder/ResourceLayer:isFilterResource	(Lorg/tizen/common/builder/Resource;)Z
    //   243: ifne +30 -> 273
    //   246: aload 8
    //   248: aload 7
    //   250: invokevirtual 304	org/tizen/common/builder/ResourceLayer:addFilterResource	(Lorg/tizen/common/builder/Resource;)V
    //   253: goto +20 -> 273
    //   256: astore 11
    //   258: iconst_1
    //   259: anewarray 191	java/lang/Object
    //   262: dup
    //   263: iconst_0
    //   264: aload 6
    //   266: aastore
    //   267: invokestatic 193	org/tizen/common/util/IOUtil:tryClose	([Ljava/lang/Object;)V
    //   270: aload 11
    //   272: athrow
    //   273: iconst_1
    //   274: anewarray 191	java/lang/Object
    //   277: dup
    //   278: iconst_0
    //   279: aload 6
    //   281: aastore
    //   282: invokestatic 193	org/tizen/common/util/IOUtil:tryClose	([Ljava/lang/Object;)V
    //   285: return
    // Line number table:
    //   Java source line #191	-> byte code offset #0
    //   Java source line #192	-> byte code offset #5
    //   Java source line #193	-> byte code offset #15
    //   Java source line #195	-> byte code offset #25
    //   Java source line #197	-> byte code offset #28
    //   Java source line #199	-> byte code offset #34
    //   Java source line #200	-> byte code offset #45
    //   Java source line #201	-> byte code offset #55
    //   Java source line #203	-> byte code offset #83
    //   Java source line #206	-> byte code offset #93
    //   Java source line #207	-> byte code offset #103
    //   Java source line #208	-> byte code offset #131
    //   Java source line #209	-> byte code offset #138
    //   Java source line #210	-> byte code offset #147
    //   Java source line #211	-> byte code offset #152
    //   Java source line #212	-> byte code offset #159
    //   Java source line #213	-> byte code offset #166
    //   Java source line #214	-> byte code offset #173
    //   Java source line #209	-> byte code offset #178
    //   Java source line #216	-> byte code offset #180
    //   Java source line #228	-> byte code offset #191
    //   Java source line #229	-> byte code offset #197
    //   Java source line #217	-> byte code offset #203
    //   Java source line #222	-> byte code offset #204
    //   Java source line #223	-> byte code offset #215
    //   Java source line #224	-> byte code offset #221
    //   Java source line #225	-> byte code offset #236
    //   Java source line #226	-> byte code offset #246
    //   Java source line #228	-> byte code offset #256
    //   Java source line #229	-> byte code offset #264
    //   Java source line #230	-> byte code offset #270
    //   Java source line #228	-> byte code offset #273
    //   Java source line #229	-> byte code offset #279
    //   Java source line #231	-> byte code offset #285
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	286	0	this	HybridAppBuilder
    //   0	286	1	resource	Resource
    //   0	286	2	result	BuildResult
    //   4	225	3	pathStr	String
    //   13	33	4	path	org.eclipse.core.runtime.IPath
    //   23	39	5	segment	String
    //   26	254	6	contents	InputStream
    //   53	114	7	segment2nd	String
    //   213	36	7	out	Resource
    //   91	3	8	arch	String
    //   219	28	8	thisLayer	ResourceLayer
    //   101	59	9	archGroupName	String
    //   129	54	10	newPath	String
    //   256	15	11	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   28	191	256	finally
    //   204	256	256	finally
  }
  
  /* Error */
  private void addResourceAboutTizenCppService(Resource resource, BuildResult result)
    throws IOException, CoreException
  {
    // Byte code:
    //   0: aload_1
    //   1: invokevirtual 178	org/tizen/common/builder/Resource:getPath	()Ljava/lang/String;
    //   4: astore_3
    //   5: new 167	org/eclipse/core/runtime/Path
    //   8: dup
    //   9: aload_3
    //   10: invokespecial 169	org/eclipse/core/runtime/Path:<init>	(Ljava/lang/String;)V
    //   13: astore 4
    //   15: aload 4
    //   17: iconst_0
    //   18: invokeinterface 260 2 0
    //   23: astore 5
    //   25: aconst_null
    //   26: astore 6
    //   28
1 2 3 4 5 6 7 8 9

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