org.tizen.nativecpp.uibuilder_2.0.0.201311071821

16:50:19.776 INFO  jd.cli.Main - Decompiling org.tizen.nativecpp.uibuilder_2.0.0.201311071821.jar
package org.tizen.nativecpp.uibuilder;

import org.eclipse.ui.IEditorReference;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;

class Activator$1
  implements Runnable
{
  Activator$1(Activator paramActivator, IWorkbenchWindow paramIWorkbenchWindow) {}
  
  public void run()
  {
    IWorkbenchPage[] pages = val$window.getPages();
    IWorkbenchPage[] arrayOfIWorkbenchPage1;
    int j = (arrayOfIWorkbenchPage1 = pages).length;
    for (int i = 0; i < j; i++)
    {
      IWorkbenchPage page = arrayOfIWorkbenchPage1[i];
      if (page != null)
      {
        IEditorReference[] editors = page.getEditorReferences();
        IEditorReference[] arrayOfIEditorReference1;
        int m = (arrayOfIEditorReference1 = editors).length;
        for (int k = 0; k < m; k++)
        {
          IEditorReference editorRef = arrayOfIEditorReference1[k];
          if (editorRef.getId().equals("org.tizen.nativecpp.uibuilder.workflow.editor")) {
            page.closeEditor(editorRef.getEditor(false), false);
          }
        }
      }
    }
  }
}

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

import org.eclipse.core.resources.IWorkspaceRoot;
import org.eclipse.core.runtime.CoreException;

class Activator$2
  implements Runnable
{
  Activator$2(IWorkspaceRoot paramIWorkspaceRoot) {}
  
  public void run()
  {
    try
    {
      val$root.refreshLocal(2, null);
    }
    catch (CoreException e)
    {
      Activator.setErrorMessage("Activator.setCurProject()", e.getLocalizedMessage(), e);
    }
  }
}

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

import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.tizen.nativecpp.uibuilder.resourceexplorer.ResourceExplorer;

class Activator$3$1
  implements Runnable
{
  Activator$3$1(Activator.3 param3) {}
  
  public void run()
  {
    IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
    IViewPart propertyView = page.findView("org.eclipse.ui.views.PropertySheet");
    if (propertyView != null) {
      page.activate(propertyView);
    }
    page.activate(ResourceExplorer.getResourceView());
  }
}

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

import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.tizen.nativecpp.uibuilder.resinfo.FRAME_INFO;
import org.tizen.nativecpp.uibuilder.resourceexplorer.ResourceExplorer;

class Activator$3
  implements Runnable
{
  Activator$3(ResourceExplorer paramResourceExplorer, int paramInt, String paramString1, String paramString2, FRAME_INFO paramFRAME_INFO) {}
  
  public void run()
  {
    val$view.openEditor(2, val$kind, val$key, val$id, val$info, true);
    
    Display.getDefault().asyncExec(new Runnable()
    {
      public void run()
      {
        IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
        IViewPart propertyView = page.findView("org.eclipse.ui.views.PropertySheet");
        if (propertyView != null) {
          page.activate(propertyView);
        }
        page.activate(ResourceExplorer.getResourceView());
      }
    });
  }
}

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

import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchWindow;
import org.tizen.nativecpp.uibuilder.resinfo.FrameConst;

class Activator$4
  implements Runnable
{
  Activator$4(IWorkbenchWindow paramIWorkbenchWindow) {}
  
  public void run()
  {
    Shell shell = val$window.getShell();
    if (shell != null)
    {
      boolean minimized = shell.getMinimized();
      if (!shell.isVisible()) {
        shell.setVisible(true);
      }
      if (FrameConst.PROPERTY_OS_NAME.contains("windows"))
      {
        if (!minimized) {
          shell.setMinimized(true);
        }
        shell.setMinimized(false);
      }
      else if (minimized)
      {
        shell.setMinimized(false);
      }
    }
  }
}

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

import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchWindow;

class Activator$5
  implements Runnable
{
  Activator$5(IWorkbenchWindow paramIWorkbenchWindow) {}
  
  public void run()
  {
    Shell shell = val$window.getShell();
    if (shell != null) {
      shell.forceActive();
    }
  }
}

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

import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.tizen.nativecpp.uibuilder.resourceexplorer.ResourceExplorer;

class Activator$6$1
  implements Runnable
{
  Activator$6$1(Activator.6 param6) {}
  
  public void run()
  {
    IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
    IViewPart propertyView = page.findView("org.eclipse.ui.views.PropertySheet");
    if (propertyView != null) {
      page.activate(propertyView);
    }
    page.activate(ResourceExplorer.getResourceView());
  }
}

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

import java.util.Hashtable;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.runtime.IPath;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.tizen.nativecpp.uibuilder.documents.DocuPanel;
import org.tizen.nativecpp.uibuilder.documents.FormMarkup;
import org.tizen.nativecpp.uibuilder.documents.PanelMarkup;
import org.tizen.nativecpp.uibuilder.documents.PopupMarkup;
import org.tizen.nativecpp.uibuilder.documents.QuickPanelFrameMarkup;
import org.tizen.nativecpp.uibuilder.documents.ResourceManager;
import org.tizen.nativecpp.uibuilder.resourceexplorer.ResourceExplorer;
import org.tizen.nativecpp.uibuilder.string.StringMarkup;

class Activator$6
  implements Runnable
{
  Activator$6(IFile paramIFile, ResourceExplorer paramResourceExplorer) {}
  
  public void run()
  {
    String key = val$openFile.getParent().getName();
    String id = val$openFile.getName().substring(0, val$openFile.getName().indexOf('.'));
    
    int kind = -1;int depth = 2;
    Object info = null;
    if (FormMarkup.isFormXML(val$openFile))
    {
      kind = 1;
    }
    else if (PopupMarkup.isPopupXML(val$openFile))
    {
      kind = 2;
    }
    else if (PanelMarkup.isPanelXML(val$openFile, 31))
    {
      kind = 3;
      Hashtable<String, DocuPanel> panels = (Hashtable)val$view.getManager().m_Panel.get(key);
      if ((panels != null) && (panels.get(id) != null)) {
        info = ((DocuPanel)panels.get(id)).getFrameInfo();
      }
    }
    else if (PanelMarkup.isPanelXML(val$openFile, 24))
    {
      kind = 4;
      Hashtable<String, DocuPanel> panels = (Hashtable)val$view.getManager().m_ScrollPanel.get(key);
      if ((panels != null) && (panels.get(id) != null)) {
        info = ((DocuPanel)panels.get(id)).getFrameInfo();
      }
    }
    else if (QuickPanelFrameMarkup.isQuickPanelFrameXML(val$openFile))
    {
      kind = 8;
    }
    else if (StringMarkup.isStringXML(val$openFile.getLocation().toFile()))
    {
      kind = 5;
    }
    else if (val$openFile.getName().compareTo("workflow.xml") == 0)
    {
      kind = 7;
    }
    else
    {
      return;
    }
    val$view.openEditor(depth, kind, key, id, info, true);
    
    Display.getDefault().asyncExec(new Runnable()
    {
      public void run()
      {
        IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
        IViewPart propertyView = page.findView("org.eclipse.ui.views.PropertySheet");
        if (propertyView != null) {
          page.activate(propertyView);
        }
        page.activate(ResourceExplorer.getResourceView());
      }
    });
  }
}

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

import org.eclipse.core.runtime.IProgressMonitor;
import org.tizen.nativecpp.uibuilder.documents.AbstractFrame;

class Activator$7$1
  implements Runnable
{
  Activator$7$1(Activator.7 param7, IProgressMonitor paramIProgressMonitor, AbstractFrame paramAbstractFrame) {}
  
  public void run()
  {
    Activator.7.access$0(this$1, val$monitor, val$frame);
  }
}

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

import java.util.Enumeration;
import java.util.Hashtable;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPartSite;
import org.tizen.nativecpp.uibuilder.documents.AbstractFrame;
import org.tizen.nativecpp.uibuilder.documents.DocuPanel;
import org.tizen.nativecpp.uibuilder.editor.AbstractFrameEditor;
import org.tizen.nativecpp.uibuilder.resourceexplorer.ResourceExplorer;

class Activator$7
  implements IRunnableWithProgress
{
  Activator$7(Shell paramShell, AbstractFrameEditor paramAbstractFrameEditor, AbstractFrame paramAbstractFrame) {}
  
  public void run(final IProgressMonitor monitor)
  {
    val$shell.getDisplay().syncExec(new Runnable()
    {
      public void run()
      {
        Activator.7.this.computePanelLayout(monitor, val$frame);
      }
    });
  }
  
  private void computePanelLayout(IProgressMonitor monitor, AbstractFrame frame)
  {
    Hashtable<String, DocuPanel> panels = frame.getPanels();
    if ((panels == null) || (panels.size() <= 0)) {
      return;
    }
    ResourceExplorer view = ResourceExplorer.getResourceView();
    if (view == null) {
      return;
    }
    if (val$frameEditor.getModeIndex() == 1)
    {
      val$frameEditor.setMode(org.tizen.nativecpp.uibuilder.resinfo.FrameConst.cszFrmMode[0]);
      val$frameEditor.setMode(org.tizen.nativecpp.uibuilder.resinfo.FrameConst.cszFrmMode[1]);
    }
    else
    {
      val$frameEditor.setMode(org.tizen.nativecpp.uibuilder.resinfo.FrameConst.cszFrmMode[1]);
      val$frameEditor.setMode(org.tizen.nativecpp.uibuilder.resinfo.FrameConst.cszFrmMode[0]);
    }
    if (monitor != null)
    {
      monitor.beginTask("Native UI Builder", 10 * (panels.size() + 1));
      monitor.subTask("computing panel layout... ");
      monitor.worked(10);
    }
    IWorkbenchPage page = view.getSite().getPage();
    Enumeration<String> keys = panels.keys();
    while (keys.hasMoreElements())
    {
      DocuPanel panel = (DocuPanel)panels.get(keys.nextElement());
      AbstractFrameEditor editor = ResourceExplorer.findFrameEditor(panel);
      
      editorOperation(view, page, editor, panel);
      if (monitor != null) {
        monitor.worked(5);
      }
      computePanelLayout(monitor, panel);
      if (monitor != null) {
        monitor.worked(5);
      }
    }
  }
  
  /* Error */
  private void editorOperation(ResourceExplorer view, IWorkbenchPage page, AbstractFrameEditor editor, DocuPanel panel)
  {
    // Byte code:
    //   0: iconst_m1
    //   1: istore 5
    //   3: aconst_null
    //   4: astore 6
    //   6: aload_3
    //   7: ifnonnull +90 -> 97
    //   10: aload_1
    //   11: invokevirtual 159	org/tizen/nativecpp/uibuilder/resourceexplorer/ResourceExplorer:getString	()Lorg/tizen/nativecpp/uibuilder/string/StringManager;
    //   14: astore 7
    //   16: aload_2
    //   17: new 163	org/tizen/nativecpp/uibuilder/editpanel/PanelEditorInput
    //   20: dup
    //   21: aload 4
    //   23: aload 4
    //   25: invokevirtual 165	org/tizen/nativecpp/uibuilder/documents/DocuPanel:getKey	()Ljava/lang/String;
    //   28: aload 4
    //   30: invokevirtual 169	org/tizen/nativecpp/uibuilder/documents/DocuPanel:getId	()Ljava/lang/String;
    //   33: aload 7
    //   35: invokespecial 172	org/tizen/nativecpp/uibuilder/editpanel/PanelEditorInput:<init>	(Lorg/tizen/nativecpp/uibuilder/documents/DocuPanel;Ljava/lang/String;Ljava/lang/String;Lorg/tizen/nativecpp/uibuilder/string/StringManager;)V
    //   38: ldc -81
    //   40: iconst_1
    //   41: invokeinterface 177 4 0
    //   46: astore 6
    //   48: aload 6
    //   50: instanceof 71
    //   53: ifeq +12 -> 65
    //   56: aload 6
    //   58: checkcast 71	org/tizen/nativecpp/uibuilder/editor/AbstractFrameEditor
    //   61: astore_3
    //   62: goto +41 -> 103
    //   65: iload 5
    //   67: iflt +13 -> 80
    //   70: aload_3
    //   71: getstatic 75	org/tizen/nativecpp/uibuilder/resinfo/FrameConst:cszFrmMode	[Ljava/lang/String;
    //   74: iload 5
    //   76: aaload
    //   77: invokevirtual 81	org/tizen/nativecpp/uibuilder/editor/AbstractFrameEditor:setMode	(Ljava/lang/String;)V
    //   80: aload 6
    //   82: instanceof 71
    //   85: ifeq +11 -> 96
    //   88: aload 6
    //   90: checkcast 71	org/tizen/nativecpp/uibuilder/editor/AbstractFrameEditor
    //   93: invokevirtual 181	org/tizen/nativecpp/uibuilder/editor/AbstractFrameEditor:close	()V
    //   96: return
    //   97: aload_3
    //   98: invokevirtual 70	org/tizen/nativecpp/uibuilder/editor/AbstractFrameEditor:getModeIndex	()I
    //   101: istore 5
    //   103: aload_3
    //   104: invokevirtual 70	org/tizen/nativecpp/uibuilder/editor/AbstractFrameEditor:getModeIndex	()I
    //   107: iconst_1
    //   108: if_icmpne +15 -> 123
    //   111: aload_3
    //   112: getstatic 75	org/tizen/nativecpp/uibuilder/resinfo/FrameConst:cszFrmMode	[Ljava/lang/String;
    //   115: iconst_0
    //   116: aaload
    //   117: invokevirtual 81	org/tizen/nativecpp/uibuilder/editor/AbstractFrameEditor:setMode	(Ljava/lang/String;)V
    //   120: goto +99 -> 219
    //   123: aload_3
    //   124: getstatic 75	org/tizen/nativecpp/uibuilder/resinfo/FrameConst:cszFrmMode	[Ljava/lang/String;
    //   127: iconst_1
    //   128: aaload
    //   129: invokevirtual 81	org/tizen/nativecpp/uibuilder/editor/AbstractFrameEditor:setMode	(Ljava/lang/String;)V
    //   132: goto +87 -> 219
    //   135: astore 7
    //   137: ldc -72
    //   139: aload 7
    //   141: invokevirtual 186	org/eclipse/ui/PartInitException:getLocalizedMessage	()Ljava/lang/String;
    //   144: aload 7
    //   146: invokestatic 191	org/tizen/nativecpp/uibuilder/Activator:setErrorMessage	(Ljava/lang/String;Ljava/lang/String;Ljava/lang/Exception;)V
    //   149: iload 5
    //   151: iflt +13 -> 164
    //   154: aload_3
    //   155: getstatic 75	org/tizen/nativecpp/uibuilder/resinfo/FrameConst:cszFrmMode	[Ljava/lang/String;
    //   158: iload 5
    //   160: aaload
    //   161: invokevirtual 81	org/tizen/nativecpp/uibuilder/editor/AbstractFrameEditor:setMode	(Ljava/lang/String;)V
    //   164: aload 6
    //   166: instanceof 71
    //   169: ifeq +81 -> 250
    //   172: aload 6
    //   174: checkcast 71	org/tizen/nativecpp/uibuilder/editor/AbstractFrameEditor
    //   177: invokevirtual 181	org/tizen/nativecpp/uibuilder/editor/AbstractFrameEditor:close	()V
    //   180: goto +70 -> 250
    //   183: astore 8
    //   185: iload 5
    //   187: iflt +13 -> 200
    //   190: aload_3
    //   191: getstatic 75	org/tizen/nativecpp/uibuilder/resinfo/FrameConst:cszFrmMode	[Ljava/lang/String;
    //   194: iload 5
    //   196: aaload
    //   197: invokevirtual 81	org/tizen/nativecpp/uibuilder/editor/AbstractFrameEditor:setMode	(Ljava/lang/String;)V
    //   200: aload 6
    //   202: instanceof 71
    //   205: ifeq +11 -> 216
    //   208: aload 6
    //   210: checkcast 71	org/tizen/nativecpp/uibuilder/editor/AbstractFrameEditor
    //   213: invokevirtual 181	org/tizen/nativecpp/uibuilder/editor/AbstractFrameEditor:close	()V
    //   216: aload 8
    //   218: athrow
    //   219: iload 5
    //   221: iflt +13 -> 234
    //   224: aload_3
    //   225: getstatic 75	org/tizen/nativecpp/uibuilder/resinfo/FrameConst:cszFrmMode	[Ljava/lang/String;
    //   228: iload 5
    //   230: aaload
    //   231: invokevirtual 81	org/tizen/nativecpp/uibuilder/editor/AbstractFrameEditor:setMode	(Ljava/lang/String;)V
    //   234: aload 6
    //   236: instanceof 71
    //   239: ifeq +11 -> 250
    //   242: aload 6
    //   244: checkcast 71	org/tizen/nativecpp/uibuilder/editor/AbstractFrameEditor
    //   247: invokevirtual 181	org/tizen/nativecpp/uibuilder/editor/AbstractFrameEditor:close	()V
    //   250: return
    // Line number table:
    //   Java source line #1529	-> byte code offset #0
    //   Java source line #1530	-> byte code offset #3
    //   Java source line #1532	-> byte code offset #6
    //   Java source line #1533	-> byte code offset #10
    //   Java source line #1534	-> byte code offset #16
    //   Java source line #1536	-> byte code offset #48
    //   Java source line #1537	-> byte code offset #56
    //   Java source line #1553	-> byte code offset #65
    //   Java source line #1554	-> byte code offset #70
    //   Java source line #1556	-> byte code offset #80
    //   Java source line #1557	-> byte code offset #88
    //   Java source line #1539	-> byte code offset #96
    //   Java source line #1542	-> byte code offset #97
    //   Java source line #1545	-> byte code offset #103
    //   Java source line #1546	-> byte code offset #111
    //   Java source line #1548	-> byte code offset #123
    //   Java source line #1550	-> byte code offset #135
    //   Java source line #1551	-> byte code offset #137
    //   Java source line #1553	-> byte code offset #149
    //   Java source line #1554	-> byte code offset #154
    //   Java source line #1556	-> byte code offset #164
    //   Java source line #1557	-> byte code offset #172
    //   Java source line #1552	-> byte code offset #183
    //   Java source line #1553	-> byte code offset #185
    //   Java source line #1554	-> byte code offset #190
    //   Java source line #1556	-> byte code offset #200
    //   Java source line #1557	-> byte code offset #208
    //   Java source line #1559	-> byte code offset #216
    //   Java source line #1553	-> byte code offset #219
    //   Java source line #1554	-> byte code offset #224
    //   Java source line #1556	-> byte code offset #234
    //   Java source line #1557	-> byte code offset #242
    //   Java source line #1560	-> byte code offset #250
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	251	0	this	7
    //   0	251	1	view	ResourceExplorer
    //   0	251	2	page	IWorkbenchPage
    //   0	251	3	editor	AbstractFrameEditor
    //   0	251	4	panel	DocuPanel
    //   1	228	5	modeIndex	int
    //   4	239	6	opendEditor	org.eclipse.ui.IEditorPart
    //   14	20	7	string	org.tizen.nativecpp.uibuilder.string.StringManager
    //   135	10	7	e	org.eclipse.ui.PartInitException
    //   183	34	8	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   6	65	135	org/eclipse/ui/PartInitException
    //   97	132	135	org/eclipse/ui/PartInitException
    //   6	65	183	finally
    //   97	149	183	finally
  }
}

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

import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchWindow;
import org.tizen.nativecpp.uibuilder.resinfo.FrameConst;

class Activator$8
  implements Runnable
{
  Activator$8(IWorkbenchWindow paramIWorkbenchWindow) {}
  
  public void run()
  {
    Shell shell = val$window.getShell();
    if (shell != null)
    {
      boolean minimized = shell.getMinimized();
      if (!shell.isVisible()) {
        shell.setVisible(true);
      }
      if (FrameConst.PROPERTY_OS_NAME.contains("windows"))
      {
        if (!minimized) {
          shell.setMinimized(true);
        }
        shell.setMinimized(false);
      }
      else if (minimized)
      {
        shell.setMinimized(false);
      }
    }
  }
}

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

import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbenchWindow;
import org.tizen.nativecpp.uibuilder.model.FrameNode;
import org.tizen.nativecpp.uibuilder.resourceexplorer.ResourceExplorer;

class Activator$9
  implements Runnable
{
  Activator$9(ResourceExplorer paramResourceExplorer, boolean paramBoolean, IWorkbenchWindow paramIWorkbenchWindow) {}
  
  public void run()
  {
    IProject project = val$view.getIProject();
    val$view.setCurProject("", val$isDeleted);
    if ((FrameNode.isLink()) && (project.exists())) {
      try
      {
        if ((project.getWorkspace() != null) && (!project.getWorkspace().isTreeLocked())) {
          project.delete(true, null);
        }
      }
      catch (CoreException exc)
      {
        exc.printStackTrace();
      }
    }
    if ((val$view.isDirty()) && (!val$isDeleted))
    {
      Shell shell = val$window.getShell();
      if (shell != null) {
        shell.forceActive();
      }
    }
  }
}

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

import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import java.lang.management.ManagementFactory;
import java.lang.management.RuntimeMXBean;
import java.net.URL;
import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collections;
import java.util.Date;
import java.util.Enumeration;
import java.util.Hashtable;
import java.util.List;
import java.util.Locale;
import java.util.StringTokenizer;
import java.util.Vector;
import org.eclipse.cdt.core.CConventions;
import org.eclipse.core.internal.resources.Workspace;
import org.eclipse.core.resources.IContainer;
import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
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.FileLocator;
import org.eclipse.core.runtime.ILog;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Path;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.action.IStatusLineManager;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.resource.ImageRegistry;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IEditorDescriptor;
import org.eclipse.ui.IEditorReference;
import org.eclipse.ui.IEditorRegistry;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PartInitException;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.internal.WWinActionBars;
import org.eclipse.ui.internal.WorkbenchPlugin;
import org.eclipse.ui.internal.WorkbenchWindow;
import org.eclipse.ui.internal.dialogs.WizardCollectionElement;
import org.eclipse.ui.internal.registry.EditorRegistry;
import org.eclipse.ui.internal.wizards.NewWizardRegistry;
import org.eclipse.ui.plugin.AbstractUIPlugin;
import org.eclipse.ui.wizards.IWizardCategory;
import org.eclipse.ui.wizards.IWizardDescriptor;
import org.eclipse.ui.wizards.IWizardRegistry;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.Version;
import org.tizen.nativecpp.uibuilder.documents.AbstractFrame;
import org.tizen.nativecpp.uibuilder.documents.DocuPanel;
import org.tizen.nativecpp.uibuilder.documents.FormMarkup;
import org.tizen.nativecpp.uibuilder.documents.PanelMarkup;
import org.tizen.nativecpp.uibuilder.documents.PopupMarkup;
import org.tizen.nativecpp.uibuilder.documents.QuickPanelFrameMarkup;
import org.tizen.nativecpp.uibuilder.documents.ResourceManager;
import org.tizen.nativecpp.uibuilder.editor.AbstractFrameEditor;
import org.tizen.nativecpp.uibuilder.model.FrameNode;
import org.tizen.nativecpp.uibuilder.resinfo.FRAME_INFO;
import org.tizen.nativecpp.uibuilder.resinfo.FrameConst;
import org.tizen.nativecpp.uibuilder.resourceexplorer.ResourceExplorer;
import org.tizen.nativecpp.uibuilder.string.StringEditor;
import org.tizen.nativecpp.uibuilder.string.StringMarkup;
import org.tizen.nativecpp.uibuilder.xmlstore.AppXmlReader;
import org.tizen.nativecpp.uibuilder.xmlstore.Image_info;
import org.tizen.nativecpp.uibuilder.xmlstore.ManifestXmlData;
import org.tizen.nativecpp.uibuilder.xmlstore.NewManifestXmlStore;
import org.tizen.nativecpp.uibuilder.xmlstore.PrivilegeData;
import org.tizen.nativecpp.uibuilder.xmlstore.ScreenSizeReader;
import org.tizen.nativecpp.uibuilder.xmlstore.integrate.AppXmlStoreData;
import org.tizen.nativecpp.uibuilder.xmlstore.integrate.NewAppXmlStore;

public class Activator
  extends AbstractUIPlugin
{
  public static final String PLUGIN_ID = "org.tizen.nativecpp.uibuilder";
  public static final String MANIFEST_NAME = "manifest.xml";
  public static final int SCREEN_NORMAL = 0;
  public static final int HD = 1;
  public static final int WVGA = 2;
  public static final int HVGA = 3;
  public static final int WQVGA = 4;
  public static final int BASE720_WVGA = 5;
  public static final int BASE480_HD = 6;
  public static final String[] sScreenSize = { "screen-size-normal", "720x1280", "480x800", "320x480", "240x400", "720x1200", "480x854" };
  public static final int SCREEN_DENSITY_HIGH = 0;
  public static final int SCREEN_DENSITY_MIDDLE = 1;
  public static final int SCREEN_DENSITY_XHIGH = 1;
  public static final int SCREEN_DENSITY_LOW = 2;
  private static final String AD_SERVICE = "AD_SERVICE";
  private static final String LOCATION_SERVICE = "LOCATION_SERVICE";
  private static final String FLASH_SERVICE = "FLASH_SERVICE";
  private static final String WEB_SERVICE = "WEB_SERVICE";
  
  public static String[] getScreenDensities()
  {
    if (FrameNode.isNotSupportedIn_3_0()) {
      return new String[] { "screen-density-high", "screen-density-xhigh" };
    }
    return new String[] { "screen-density-high", "screen-density-middle", "screen-density-low" };
  }
  
  public static String LINK_HELP = "For more information, refer to the Help Contents- Tizen Native App Programming > Multiple Screen Support Guide > Resource Fallback and Prescaling";
  private static Activator plugin;
  
  public static final int getScreenToDensityIndex(String screen)
  {
    if (FrameNode.isNotSupportedIn_3_0())
    {
      if ((screen == null) || (screen.isEmpty())) {
        return 1;
      }
      if ((screen.toUpperCase(Locale.getDefault()).equals(sScreenSize[2].toUpperCase(Locale.getDefault()))) || 
        (screen.toUpperCase(Locale.getDefault()).equals("480X720"))) {
        return 0;
      }
      return 1;
    }
    if ((screen == null) || (screen.isEmpty())) {
      return 0;
    }
    if ((screen.toUpperCase(Locale.getDefault()).equals(sScreenSize[2].toUpperCase(Locale.getDefault()))) || 
      (screen.toUpperCase(Locale.getDefault()).equals("480X720"))) {
      return 0;
    }
    if ((!FrameNode.isNotSupportedIn_3_0()) && (screen.toUpperCase(Locale.getDefault()).equals(sScreenSize[3].toUpperCase(Locale.getDefault())))) {
      return 1;
    }
    if ((!FrameNode.isNotSupportedIn_3_0()) && (screen.toUpperCase(Locale.getDefault()).equals(sScreenSize[4].toUpperCase(Locale.getDefault())))) {
      return 2;
    }
    return 0;
  }
  
  private static String apiVersion = "3.0";
  private static PrivilegeData privileges = new PrivilegeData();
  private static boolean bAutoScalingEnabled = true;
  private static String baseResolution = "";
  private static final String DEBUG_ARG = "-agentlib:jdwp";
  private static boolean isDebug = false;
  
  public static boolean isDebug()
  {
    return isDebug;
  }
  
  public void start(BundleContext context)
  {
    try
    {
      super.start(context);
    }
    catch (Exception e)
    {
      e.printStackTrace();
    }
    String qualifier = context.getBundle().getVersion().getQualifier();
    if ((qualifier != null) && (qualifier.length() > 8)) {
      qualifier = String.format("%s-%s", new Object[] { qualifier.substring(0, 8), qualifier.substring(8) });
    }
    System.setProperty("tizen.uibuilder.buildid", qualifier);
    if (FrameConst.PROPERTY_OS_NAME.contains("windows"))
    {
      String arg = ManagementFactory.getRuntimeMXBean().getInputArguments().toString();
      isDebug = (arg != null) && (arg.indexOf("-agentlib:jdwp") > 0);
    }
    else
    {
      isDebug = false;
    }
    plugin = this;
  }
  
  protected void initializeImageRegistry(ImageRegistry reg)
  {
    super.initializeImageRegistry(reg);
  }
  
  public IPreferenceStore getPreferenceStore()
  {
    IPreferenceStore store = super.getPreferenceStore();
    
    return store;
  }
  
  public void removeWorkflowExtension()
  {
    if (FrameNode.isWorkFlow()) {
      return;
    }
    IEditorRegistry iEdtReg = WorkbenchPlugin.getDefault().getEditorRegistry();
    if ((iEdtReg instanceof EditorRegistry))
    {
      EditorRegistry edtReg = (EditorRegistry)iEdtReg;
      IEditorDescriptor editor = edtReg.findEditor("org.tizen.nativecpp.uibuilder.workflow.editor");
      
      edtReg.removeExtension(null, new Object[] { editor });
      
      final IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
      if (window != null)
      {
        Display display = window.getShell().getDisplay();
        if (display != null) {
          display.asyncExec(new Runnable()
          {
            public void run()
            {
              IWorkbenchPage[] pages = window.getPages();
              IWorkbenchPage[] arrayOfIWorkbenchPage1;
              int j = (arrayOfIWorkbenchPage1 = pages).length;
              for (int i = 0; i < j; i++)
              {
                IWorkbenchPage page = arrayOfIWorkbenchPage1[i];
                if (page != null)
                {
                  IEditorReference[] editors = page.getEditorReferences();
                  IEditorReference[] arrayOfIEditorReference1;
                  int m = (arrayOfIEditorReference1 = editors).length;
                  for (int k = 0; k < m; k++)
                  {
                    IEditorReference editorRef = arrayOfIEditorReference1[k];
                    if (editorRef.getId().equals("org.tizen.nativecpp.uibuilder.workflow.editor")) {
                      page.closeEditor(editorRef.getEditor(false), false);
                    }
                  }
                }
              }
            }
          });
        }
      }
    }
    IWizardRegistry iWizardRegistry = WorkbenchPlugin.getDefault().getNewWizardRegistry();
    if ((iWizardRegistry instanceof NewWizardRegistry))
    {
      NewWizardRegistry wizardRegistry = (NewWizardRegistry)iWizardRegistry;
      IWizardCategory category = wizardRegistry.findCategory("org.eclipse.gef.examples");
      if ((category instanceof WizardCollectionElement))
      {
        WizardCollectionElement collection = (WizardCollectionElement)category;
        IWizardDescriptor wizard = wizardRegistry.findWizard("org.tizen.nativecpp.uibuilder.workflow.wizard");
        collection.remove(wizard);
      }
    }
  }
  
  public void stop(BundleContext context)
  {
    plugin = null;
    try
    {
      super.stop(context);
    }
    catch (Exception e)
    {
      e.printStackTrace();
    }
  }
  
  public static Activator getDefault()
  {
    return plugin;
  }
  
  public URL getResourceLocationURL(String path)
  {
    if (getBundle() != null)
    {
      URL installURL = getBundle().getEntry("/" + path);
      if (installURL == null) {
        return null;
      }
      URL localURL = null;
      try
      {
        return FileLocator.toFileURL(installURL);
      }
      catch (IOException e)
      {
        setErrorMessage(getClass().toString(), e.getLocalizedMessage(), e);
        return installURL;
      }
    }
    return null;
  }
  
  public static boolean isExistKey(Hashtable<String, ?> hashTable, String formName)
  {
    if ((hashTable != null) && (formName != null))
    {
      Enumeration<String> keys = hashTable.keys();
      while (keys.hasMoreElements())
      {
        String key = (String)keys.nextElement();
        if ((key != null) && (key.toUpperCase(Locale.getDefault()).equals(formName.toUpperCase(Locale.getDefault())))) {
          return true;
        }
      }
    }
    return false;
  }
  
  public static Vector<String> getExistKeys(Hashtable<String, ?> hashTable, String formName)
  {
    Vector<String> existKeys = new Vector();
    if ((hashTable != null) && (formName != null))
    {
      Enumeration<String> keys = hashTable.keys();
      while (keys.hasMoreElements())
      {
        String key = (String)keys.nextElement();
        if ((key != null) && (key.toUpperCase(Locale.getDefault()).equals(formName.toUpperCase(Locale.getDefault())))) {
          existKeys.add(key);
        }
      }
    }
    return existKeys;
  }
  
  public static Vector<String> getSortedKeys(Hashtable<String, ?> table, boolean isPrint)
  {
    Vector<String> v = new Vector(table.keySet());
    Collections.sort(v);
    if (isPrint)
    {
      Enumeration<String> keys = v.elements();
      while (keys.hasMoreElements())
      {
        StringBuilder printStr = new StringBuilder("Key : ");
        String key = (String)keys.nextElement();
        printStr = printStr.append(key);
        printStr = printStr.append(", Value : ");
        Object value = table.get(key);
        printStr = printStr.append(value);
        
        System.out.println(printStr.toString());
      }
    }
    return v;
  }
  
  public static Vector<?> getSortedValues(Hashtable<String, ?> table)
  {
    Vector<Object> values = new Vector();
    Vector<String> keys = getSortedKeys(table, false);
    for (int i = 0; i < keys.size(); i++)
    {
      Object value = table.get(keys.get(i));
      values.add(value);
    }
    return values;
  }
  
  public static Point getSScreenToPoint(String sPoint)
  {
    Point point = null;
    
    point = new Point(720, 1280);
    if ((sPoint != null) && (sPoint.equals(sScreenSize[0]))) {
      return point;
    }
    if ((sPoint != null) && (!sPoint.isEmpty()))
    {
      StringTokenizer stok = new StringTokenizer(sPoint, " xX");
      point = new Point(0, 0);
      if (stok.hasMoreTokens()) {
        try
        {
          x = Integer.parseInt(stok.nextToken());
          y = Integer.parseInt(stok.nextToken());
        }
        catch (NumberFormatException e)
        {
          setErrorMessage("Activator.getSScreenToPoint()", "Activator getScreen() NumberFormatException - " + e.getMessage(), e);
        }
      }
      if (x > y)
      {
        int temp = y;
        y = x;
        x = temp;
      }
    }
    return point;
  }
  
  public static void clearVersion()
  {
    apiVersion = "3.0";
    
    privileges = new PrivilegeData();
  }
  
  public static void loadVersion(IProject prjct)
  {
    if (prjct != null)
    {
      NewAppXmlStore newManifest = new NewAppXmlStore(prjct);
      if ((newManifest.loadXml()) && (newManifest.isValid()))
      {
        AppXmlStoreData appData = newManifest.getAppData();
        setVersion(appData);
      }
      else
      {
        NewManifestXmlStore newPropStore = new NewManifestXmlStore(prjct);
        if ((newPropStore.loadXml()) && (newPropStore.isValid()))
        {
          setVersion(newPropStore);
        }
        else
        {
          ScreenSizeReader propStore = new ScreenSizeReader(prjct);
          setVersion(propStore);
        }
      }
    }
    else
    {
      clearVersion();
    }
  }
  
  public static void setVersion(AppXmlStoreData appData)
  {
    if (appData == null)
    {
      clearVersion();
      return;
    }
    apiVersion = appData.getApiVersion();
    if ((apiVersion == null) || (apiVersion.isEmpty()))
    {
      clearVersion();
      return;
    }
    apiVersion = "3.0";
    if ((appData.getPrivileges() != null) && (appData.getPrivileges().size() > 0)) {
      for (String name : appData.getPrivileges()) {
        privileges.put(name);
      }
    }
  }
  
  public static void setVersion(ScreenSizeReader propStore)
  {
    if (propStore == null)
    {
      clearVersion();
      return;
    }
    apiVersion = propStore.getApiVersion();
    apiVersion = "3.0";
    
    privileges = propStore.getPrivileges();
  }
  
  public static void setVersion(NewManifestXmlStore propStore)
  {
    if (propStore == null)
    {
      clearVersion();
      return;
    }
    apiVersion = propStore.getApiVersion();
    apiVersion = "3.0";
    
    privileges = propStore.getManifestData().getPrivileges();
  }
  
  public static String getApiVersion()
  {
    return apiVersion;
  }
  
  public static void clearAutoScaling()
  {
    bAutoScalingEnabled = true;
    baseResolution = "";
  }
  
  public static void setAutoScaling(AppXmlReader appReader)
  {
    if (appReader == null)
    {
      clearAutoScaling();
      return;
    }
    bAutoScalingEnabled = appReader.getAutoScalingEnabled();
    baseResolution = appReader.getBaseResolution();
  }
  
  public static boolean getAutoScaling()
  {
    return bAutoScalingEnabled;
  }
  
  public static String getBaseResolution()
  {
    return baseResolution;
  }
  
  public static boolean isVersion_1_0()
  {
    return false;
  }
  
  public static boolean isVersion_1_1()
  {
    return false;
  }
  
  public static boolean isVersion_1_2()
  {
    return false;
  }
  
  public static boolean isVersion_2_0()
  {
    return false;
  }
  
  public static boolean isVersion_3_0()
  {
    return true;
  }
  
  public static boolean isVersion_Above_1_1()
  {
    return true;
  }
  
  public static boolean isVersion_Above_1_2()
  {
    return true;
  }
  
  public static boolean isVersion_Above_2_0()
  {
    return true;
  }
  
  public static boolean isVersion_Above_3_0()
  {
    return true;
  }
  
  public static boolean isAdPrivilegesExist()
  {
    return (privileges != null) &
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 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199

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