org.tizen.tools.effecteditor_1.0.0.201310112030

16:50:26.986 INFO  jd.cli.Main - Decompiling org.tizen.tools.effecteditor_1.0.0.201310112030.jar
package org.tizen.tools.effecteditor;

import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbench;

class Application$1
  implements Runnable
{
  Application$1(Application paramApplication, Display paramDisplay, IWorkbench paramIWorkbench) {}
  
  public void run()
  {
    if (!val$display.isDisposed()) {
      val$workbench.close();
    }
  }
}

/* Location:
 * Qualified Name:     org.tizen.tools.effecteditor.Application.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.tools.effecteditor;

import java.io.File;
import java.io.FileOutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.net.URL;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.IWorkspaceDescription;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.Platform;
import org.eclipse.equinox.app.IApplication;
import org.eclipse.equinox.app.IApplicationContext;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.osgi.service.datalocation.Location;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.tizen.tools.effecteditor.simulator.runConfiguration.LaunchManager;

public class Application
  implements IApplication
{
  private static final String DATA_FOLDER = "data";
  private static final String IMAGES_FOLDER = "images";
  private static final String IMAGES_FOLDER_RESOURCE = "/images/";
  private static boolean isFirstLaunch = false;
  private static final String[] IMAGE_FILES = { "0.bmp", "1.bmp", "2.bmp", "3.bmp" };
  private static final String[] LIB_FILES = { "libeffectslib.dylib", "libtizenstub.dylib", "libglew.dylib" };
  
  public Object start(IApplicationContext paramIApplicationContext)
    throws Exception
  {
    initApplicationWorkspace(paramIApplicationContext);
    Display localDisplay = PlatformUI.createDisplay();
    try
    {
      Location localLocation1 = Platform.getInstanceLocation();
      if (localLocation1.isLocked())
      {
        Shell localShell = new Shell(localDisplay, 16384);
        MessageDialog.openError(localShell, "Error", "Workspace " + localLocation1.getURL().getPath() + " already in use");
        localInteger = IApplication.EXIT_OK;
        return localInteger;
      }
      if (localLocation1.isSet()) {
        localLocation1.lock();
      }
      int i = PlatformUI.createAndRunWorkbench(localDisplay, new ApplicationWorkbenchAdvisor());
      if (i == 1)
      {
        String str = System.getProperty("eclipse.exitdata");
        if (str != null)
        {
          localInteger = IApplication.EXIT_RELAUNCH;
          return localInteger;
        }
        localInteger = IApplication.EXIT_RESTART;
        return localInteger;
      }
      Integer localInteger = IApplication.EXIT_OK;
      return localInteger;
    }
    finally
    {
      localDisplay.dispose();
      if (localDisplay != null) {
        localDisplay.dispose();
      }
      Location localLocation2 = Platform.getInstanceLocation();
      if (localLocation2 != null) {
        localLocation2.release();
      }
    }
  }
  
  public void stop()
  {
    
    if (!PlatformUI.isWorkbenchRunning()) {
      return;
    }
    final IWorkbench localIWorkbench = PlatformUI.getWorkbench();
    final Display localDisplay = localIWorkbench.getDisplay();
    localDisplay.syncExec(new Runnable()
    {
      public void run()
      {
        if (!localDisplay.isDisposed()) {
          localIWorkbench.close();
        }
      }
    });
  }
  
  private boolean errorMacWorkspace()
  {
    if (!Platform.getOS().equals("macosx")) {
      return false;
    }
    boolean bool = !Platform.inDevelopmentMode();
    bool &= ((Platform.getInstanceLocation() == null) || (!Platform.getInstanceLocation().isSet()));
    return bool;
  }
  
  private boolean errorLinuxWorkspace()
  {
    if (!Platform.getOS().equals("linux")) {
      return false;
    }
    boolean bool = !Platform.inDevelopmentMode();
    URL localURL = Platform.getInstanceLocation().getDefault();
    Location localLocation = Platform.getInstanceLocation();
    bool &= ((localLocation == null) || (localLocation.getURL() == null) || ((localURL != null) && (localURL.equals(localLocation.getURL()))));
    if (!bool) {
      try
      {
        bool |= localLocation.isLocked();
      }
      catch (IOException localIOException)
      {
        EffectsLog.logError(localIOException);
      }
    }
    return bool;
  }
  
  private void initApplicationWorkspace(IApplicationContext paramIApplicationContext)
    throws IOException
  {
    String str1 = Platform.getInstallLocation().getURL().getPath();
    if ((errorMacWorkspace()) || (errorLinuxWorkspace()))
    {
      localObject1 = Platform.getInstallLocation().getURL().toString() + "workspace/";
      localObject2 = new URL((String)localObject1);
      try
      {
        Platform.getInstanceLocation().set((URL)localObject2, false);
      }
      catch (IllegalStateException localIllegalStateException)
      {
        EffectsLog.logError(localIllegalStateException);
      }
    }
    String str2 = str1;
    String str3 = str1;
    str1 = str1 + "data";
    str2 = str2 + "images";
    Object localObject1 = new File(str1);
    Object localObject2 = new File(str2);
    if (!((File)localObject1).isDirectory())
    {
      setFirstLaunch(true);
      ((File)localObject1).mkdir();
      customizePreferences();
    }
    if (!((File)localObject2).isDirectory()) {
      ((File)localObject2).mkdir();
    }
    if (Platform.getOS().equals("macosx"))
    {
      str3 = str3 + "lib";
      File localFile = new File(str3);
      if (!localFile.isDirectory()) {
        localFile.mkdir();
      }
      initDefaultLibs(localFile);
    }
    initDefaultImages((File)localObject2);
  }
  
  private void customizePreferences()
  {
    IWorkspace localIWorkspace = ResourcesPlugin.getWorkspace();
    IWorkspaceDescription localIWorkspaceDescription = localIWorkspace.getDescription();
    localIWorkspaceDescription.setAutoBuilding(true);
    try
    {
      localIWorkspace.setDescription(localIWorkspaceDescription);
    }
    catch (CoreException localCoreException)
    {
      localCoreException.printStackTrace();
    }
  }
  
  private void initDefaultImages(File paramFile)
  {
    ArrayList localArrayList = new ArrayList();
    Collections.addAll(localArrayList, IMAGE_FILES);
    File[] arrayOfFile1 = paramFile.listFiles();
    File[] arrayOfFile2;
    int j = (arrayOfFile2 = arrayOfFile1).length;
    for (int i = 0; i < j; i++)
    {
      File localFile = arrayOfFile2[i];
      localArrayList.remove(localFile.getName());
    }
    if (!localArrayList.isEmpty()) {
      copyImages(paramFile, localArrayList);
    }
  }
  
  private void initDefaultLibs(File paramFile)
  {
    ArrayList localArrayList = new ArrayList();
    Collections.addAll(localArrayList, LIB_FILES);
    File[] arrayOfFile1 = paramFile.listFiles();
    File[] arrayOfFile2;
    int j = (arrayOfFile2 = arrayOfFile1).length;
    for (int i = 0; i < j; i++)
    {
      File localFile = arrayOfFile2[i];
      localFile.delete();
      if (localFile.exists()) {
        localArrayList.remove(localFile.getName());
      }
    }
    if (!localArrayList.isEmpty()) {
      copyLibs(paramFile, localArrayList);
    }
  }
  
  private void copyLibs(File paramFile, List<String> paramList)
  {
    Iterator localIterator = paramList.iterator();
    while (localIterator.hasNext())
    {
      String str = (String)localIterator.next();
      try
      {
        copyFileFromResource("/" + str, new File(paramFile.getPath() + "/" + str));
      }
      catch (IOException localIOException)
      {
        EffectsLog.logError(localIOException);
      }
    }
  }
  
  private void copyImages(File paramFile, List<String> paramList)
  {
    Iterator localIterator = paramList.iterator();
    while (localIterator.hasNext())
    {
      String str = (String)localIterator.next();
      try
      {
        copyFileFromResource("/images/" + str, new File(paramFile.getPath() + "/" + str));
      }
      catch (IOException localIOException)
      {
        EffectsLog.logError(localIOException);
      }
    }
  }
  
  private void copyFileFromResource(String paramString, File paramFile)
    throws IOException
  {
    byte[] arrayOfByte = new byte['?'];
    if ((paramString != null) && (paramFile != null))
    {
      InputStream localInputStream = getClass().getResourceAsStream(paramString);
      FileOutputStream localFileOutputStream = new FileOutputStream(paramFile);
      for (;;)
      {
        int i = localInputStream.read(arrayOfByte);
        if (i == -1) {
          break;
        }
        localFileOutputStream.write(arrayOfByte, 0, i);
      }
      localInputStream.close();
      localFileOutputStream.close();
    }
    else {}
  }
  
  public static boolean isFirstLaunch()
  {
    return isFirstLaunch;
  }
  
  public static void setFirstLaunch(boolean paramBoolean)
  {
    isFirstLaunch = paramBoolean;
  }
}

/* Location:
 * Qualified Name:     org.tizen.tools.effecteditor.Application
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.tools.effecteditor;

import org.eclipse.jface.action.ActionContributionItem;
import org.eclipse.jface.action.IContributionItem;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IPartListener;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IViewSite;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.internal.console.ConsoleView;
import org.eclipse.ui.internal.console.OpenConsoleAction;
import org.eclipse.ui.internal.views.markers.ProblemsView;
import org.eclipse.ui.views.properties.PropertySheet;

class ApplicationActionBarAdvisor$1
  implements IPartListener
{
  ApplicationActionBarAdvisor$1(ApplicationActionBarAdvisor paramApplicationActionBarAdvisor) {}
  
  public void partOpened(IWorkbenchPart paramIWorkbenchPart)
  {
    if ((paramIWorkbenchPart instanceof IViewPart)) {
      lockDuplicateActions(paramIWorkbenchPart);
    }
  }
  
  public void partDeactivated(IWorkbenchPart paramIWorkbenchPart) {}
  
  public void partClosed(IWorkbenchPart paramIWorkbenchPart) {}
  
  public void partBroughtToTop(IWorkbenchPart paramIWorkbenchPart) {}
  
  public void partActivated(IWorkbenchPart paramIWorkbenchPart)
  {
    if ((paramIWorkbenchPart instanceof ConsoleView)) {
      lockDuplicateActions(paramIWorkbenchPart);
    }
  }
  
  private void lockDuplicateActions(IWorkbenchPart paramIWorkbenchPart)
  {
    IMenuManager localIMenuManager = ((IViewPart)paramIWorkbenchPart).getViewSite().getActionBars().getMenuManager();
    IToolBarManager localIToolBarManager = ((IViewPart)paramIWorkbenchPart).getViewSite().getActionBars().getToolBarManager();
    IContributionItem[] arrayOfIContributionItem1 = localIMenuManager.getItems();
    IContributionItem[] arrayOfIContributionItem2 = localIToolBarManager.getItems();
    if ((paramIWorkbenchPart instanceof ProblemsView)) {
      for (int i = 0; i < arrayOfIContributionItem1.length; i++) {
        if (arrayOfIContributionItem1[i].getId().equals("org.eclipse.ui.ide.OpenMarkersView"))
        {
          arrayOfIContributionItem1[i].dispose();
          break;
        }
      }
    } else if ((paramIWorkbenchPart instanceof PropertySheet)) {
      for (int k = 0; k < arrayOfIContributionItem1.length; k++)
      {
        String str = arrayOfIContributionItem1[k].getId();
        if ((str != null) && (str.equals("org.eclipse.ui.views.properties.NewPropertySheetCommand")))
        {
          arrayOfIContributionItem1[k].dispose();
          break;
        }
      }
    } else if ((paramIWorkbenchPart instanceof ConsoleView)) {
      for (int j = 0; j < arrayOfIContributionItem2.length; j++) {
        if ((arrayOfIContributionItem2[j] instanceof ActionContributionItem))
        {
          ActionContributionItem localActionContributionItem = (ActionContributionItem)arrayOfIContributionItem2[j];
          if ((localActionContributionItem.getAction() instanceof OpenConsoleAction))
          {
            arrayOfIContributionItem2[j].setVisible(false);
            localIToolBarManager.update(true);
          }
        }
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.tizen.tools.effecteditor.ApplicationActionBarAdvisor.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.tools.effecteditor;

import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.ui.IPageListener;
import org.eclipse.ui.IViewReference;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.tizen.tools.effecteditor.simulator.runConfiguration.LaunchManager;

class ApplicationActionBarAdvisor$2
  implements IPageListener
{
  ApplicationActionBarAdvisor$2(ApplicationActionBarAdvisor paramApplicationActionBarAdvisor, IWorkbenchWindow paramIWorkbenchWindow) {}
  
  public void pageOpened(IWorkbenchPage paramIWorkbenchPage)
  {
    paramIWorkbenchPage.addPartListener(ApplicationActionBarAdvisor.access$0(this$0));
    IViewReference[] arrayOfIViewReference1 = paramIWorkbenchPage.getViewReferences();
    IViewReference[] arrayOfIViewReference2;
    int j = (arrayOfIViewReference2 = arrayOfIViewReference1).length;
    for (int i = 0; i < j; i++)
    {
      IViewReference localIViewReference = arrayOfIViewReference2[i];
      if (localIViewReference.getId().equals("org.tizen.tools.effecteditor.simulator.JOGLView")) {
        paramIWorkbenchPage.hideView(localIViewReference);
      }
    }
    if (PlatformUI.getWorkbench().getWorkbenchWindowCount() == 1) {
      LaunchManager.init(val$window);
    } else {
      LaunchManager.refresh();
    }
    if (Application.isFirstLaunch())
    {
      DebugUITools.getPreferenceStore().setDefault("org.eclipse.debug.ui.build_before_launch", false);
      Application.setFirstLaunch(false);
    }
  }
  
  public void pageClosed(IWorkbenchPage paramIWorkbenchPage)
  {
    paramIWorkbenchPage.removePartListener(ApplicationActionBarAdvisor.access$0(this$0));
  }
  
  public void pageActivated(IWorkbenchPage paramIWorkbenchPage) {}
}

/* Location:
 * Qualified Name:     org.tizen.tools.effecteditor.ApplicationActionBarAdvisor.2
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.tools.effecteditor;

import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension;
import org.eclipse.debug.ui.DebugUITools;
import org.eclipse.jface.action.ActionContributionItem;
import org.eclipse.jface.action.IAction;
import org.eclipse.jface.action.IContributionItem;
import org.eclipse.jface.action.ICoolBarManager;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.action.ToolBarContributionItem;
import org.eclipse.jface.action.ToolBarManager;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IPageListener;
import org.eclipse.ui.IPartListener;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IViewReference;
import org.eclipse.ui.IViewSite;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.actions.ActionFactory.IWorkbenchAction;
import org.eclipse.ui.actions.NewProjectAction;
import org.eclipse.ui.application.ActionBarAdvisor;
import org.eclipse.ui.application.IActionBarConfigurer;
import org.eclipse.ui.cheatsheets.OpenCheatSheetAction;
import org.eclipse.ui.ide.IDEActionFactory;
import org.eclipse.ui.internal.WorkbenchPlugin;
import org.eclipse.ui.internal.console.ConsoleView;
import org.eclipse.ui.internal.console.OpenConsoleAction;
import org.eclipse.ui.internal.registry.ActionSetRegistry;
import org.eclipse.ui.internal.registry.IActionSetDescriptor;
import org.eclipse.ui.internal.views.markers.ProblemsView;
import org.eclipse.ui.views.properties.PropertySheet;
import org.tizen.tools.effecteditor.simulator.runConfiguration.LaunchManager;

public class ApplicationActionBarAdvisor
  extends ActionBarAdvisor
{
  private ActionFactory.IWorkbenchAction exitAction;
  private ActionFactory.IWorkbenchAction aboutAction;
  private ActionFactory.IWorkbenchAction newWindowAction;
  private ActionFactory.IWorkbenchAction preferencesAction;
  private ActionFactory.IWorkbenchAction openProj;
  private ActionFactory.IWorkbenchAction closeProj;
  private ActionFactory.IWorkbenchAction buildProj;
  private ActionFactory.IWorkbenchAction buildCurrProj;
  private ActionFactory.IWorkbenchAction buildAutoProj;
  private ActionFactory.IWorkbenchAction cleanProj;
  private ActionFactory.IWorkbenchAction helpCont;
  private OpenCheatSheetAction cheatSheet;
  private ActionFactory.IWorkbenchAction newFileAction;
  private IAction newProjectAction;
  private ActionFactory.IWorkbenchAction saveAction;
  private ActionFactory.IWorkbenchAction saveAllAction;
  private ActionFactory.IWorkbenchAction closeAction;
  private ActionFactory.IWorkbenchAction closeAllAction;
  private IPageListener pageListener;
  private IPartListener partListener;
  private ActionFactory.IWorkbenchAction exportAction;
  private ActionFactory.IWorkbenchAction importAction;
  private ActionFactory.IWorkbenchAction openWorkspace;
  
  public ApplicationActionBarAdvisor(IActionBarConfigurer paramIActionBarConfigurer)
  {
    super(paramIActionBarConfigurer);
  }
  
  protected void makeActions(IWorkbenchWindow paramIWorkbenchWindow)
  {
    addPageListener(paramIWorkbenchWindow);
    exitAction = ActionFactory.QUIT.create(paramIWorkbenchWindow);
    aboutAction = ActionFactory.ABOUT.create(paramIWorkbenchWindow);
    newWindowAction = ActionFactory.OPEN_NEW_WINDOW.create(paramIWorkbenchWindow);
    preferencesAction = ActionFactory.PREFERENCES.create(paramIWorkbenchWindow);
    openProj = IDEActionFactory.OPEN_PROJECT.create(paramIWorkbenchWindow);
    closeProj = IDEActionFactory.CLOSE_PROJECT.create(paramIWorkbenchWindow);
    buildProj = IDEActionFactory.BUILD.create(paramIWorkbenchWindow);
    buildCurrProj = IDEActionFactory.BUILD_PROJECT.create(paramIWorkbenchWindow);
    buildAutoProj = IDEActionFactory.BUILD_AUTOMATICALLY.create(paramIWorkbenchWindow);
    cleanProj = IDEActionFactory.BUILD_CLEAN.create(paramIWorkbenchWindow);
    helpCont = ActionFactory.HELP_CONTENTS.create(paramIWorkbenchWindow);
    exportAction = ActionFactory.EXPORT.create(paramIWorkbenchWindow);
    importAction = ActionFactory.IMPORT.create(paramIWorkbenchWindow);
    openWorkspace = IDEActionFactory.OPEN_WORKSPACE.create(paramIWorkbenchWindow);
    newFileAction = ActionFactory.NEW.create(paramIWorkbenchWindow);
    newProjectAction = new NewProjectAction(paramIWorkbenchWindow);
    saveAction = ActionFactory.SAVE.create(paramIWorkbenchWindow);
    saveAllAction = ActionFactory.SAVE_ALL.create(paramIWorkbenchWindow);
    closeAction = ActionFactory.CLOSE.create(paramIWorkbenchWindow);
    closeAllAction = ActionFactory.CLOSE_ALL.create(paramIWorkbenchWindow);
    cheatSheet = new OpenCheatSheetAction("org.tizen.tools.effecteditor.help.cheatsheet");
    cheatSheet.setText("Cheat Sheets...");
    register(ActionFactory.DELETE.create(paramIWorkbenchWindow));
    register(ActionFactory.COPY.create(paramIWorkbenchWindow));
    register(ActionFactory.PASTE.create(paramIWorkbenchWindow));
    register(ActionFactory.CUT.create(paramIWorkbenchWindow));
    register(ActionFactory.FIND.create(paramIWorkbenchWindow));
    register(ActionFactory.REDO.create(paramIWorkbenchWindow));
    register(ActionFactory.UNDO.create(paramIWorkbenchWindow));
    register(helpCont);
    register(exitAction);
    register(aboutAction);
    register(newWindowAction);
    register(newWindowAction);
    register(openProj);
    register(closeProj);
    register(buildProj);
    register(buildCurrProj);
    register(buildAutoProj);
    register(cleanProj);
    register(helpCont);
    register(openWorkspace);
    removeUnwantedItems();
    LaunchManager.setBuildAction(buildCurrProj);
  }
  
  private void addPageListener(final IWorkbenchWindow paramIWorkbenchWindow)
  {
    partListener = new IPartListener()
    {
      public void partOpened(IWorkbenchPart paramAnonymousIWorkbenchPart)
      {
        if ((paramAnonymousIWorkbenchPart instanceof IViewPart)) {
          lockDuplicateActions(paramAnonymousIWorkbenchPart);
        }
      }
      
      public void partDeactivated(IWorkbenchPart paramAnonymousIWorkbenchPart) {}
      
      public void partClosed(IWorkbenchPart paramAnonymousIWorkbenchPart) {}
      
      public void partBroughtToTop(IWorkbenchPart paramAnonymousIWorkbenchPart) {}
      
      public void partActivated(IWorkbenchPart paramAnonymousIWorkbenchPart)
      {
        if ((paramAnonymousIWorkbenchPart instanceof ConsoleView)) {
          lockDuplicateActions(paramAnonymousIWorkbenchPart);
        }
      }
      
      private void lockDuplicateActions(IWorkbenchPart paramAnonymousIWorkbenchPart)
      {
        IMenuManager localIMenuManager = ((IViewPart)paramAnonymousIWorkbenchPart).getViewSite().getActionBars().getMenuManager();
        IToolBarManager localIToolBarManager = ((IViewPart)paramAnonymousIWorkbenchPart).getViewSite().getActionBars().getToolBarManager();
        IContributionItem[] arrayOfIContributionItem1 = localIMenuManager.getItems();
        IContributionItem[] arrayOfIContributionItem2 = localIToolBarManager.getItems();
        if ((paramAnonymousIWorkbenchPart instanceof ProblemsView)) {
          for (int i = 0; i < arrayOfIContributionItem1.length; i++) {
            if (arrayOfIContributionItem1[i].getId().equals("org.eclipse.ui.ide.OpenMarkersView"))
            {
              arrayOfIContributionItem1[i].dispose();
              break;
            }
          }
        } else if ((paramAnonymousIWorkbenchPart instanceof PropertySheet)) {
          for (int k = 0; k < arrayOfIContributionItem1.length; k++)
          {
            String str = arrayOfIContributionItem1[k].getId();
            if ((str != null) && (str.equals("org.eclipse.ui.views.properties.NewPropertySheetCommand")))
            {
              arrayOfIContributionItem1[k].dispose();
              break;
            }
          }
        } else if ((paramAnonymousIWorkbenchPart instanceof ConsoleView)) {
          for (int j = 0; j < arrayOfIContributionItem2.length; j++) {
            if ((arrayOfIContributionItem2[j] instanceof ActionContributionItem))
            {
              ActionContributionItem localActionContributionItem = (ActionContributionItem)arrayOfIContributionItem2[j];
              if ((localActionContributionItem.getAction() instanceof OpenConsoleAction))
              {
                arrayOfIContributionItem2[j].setVisible(false);
                localIToolBarManager.update(true);
              }
            }
          }
        }
      }
    };
    pageListener = new IPageListener()
    {
      public void pageOpened(IWorkbenchPage paramAnonymousIWorkbenchPage)
      {
        paramAnonymousIWorkbenchPage.addPartListener(partListener);
        IViewReference[] arrayOfIViewReference1 = paramAnonymousIWorkbenchPage.getViewReferences();
        IViewReference[] arrayOfIViewReference2;
        int j = (arrayOfIViewReference2 = arrayOfIViewReference1).length;
        for (int i = 0; i < j; i++)
        {
          IViewReference localIViewReference = arrayOfIViewReference2[i];
          if (localIViewReference.getId().equals("org.tizen.tools.effecteditor.simulator.JOGLView")) {
            paramAnonymousIWorkbenchPage.hideView(localIViewReference);
          }
        }
        if (PlatformUI.getWorkbench().getWorkbenchWindowCount() == 1) {
          LaunchManager.init(paramIWorkbenchWindow);
        } else {
          LaunchManager.refresh();
        }
        if (Application.isFirstLaunch())
        {
          DebugUITools.getPreferenceStore().setDefault("org.eclipse.debug.ui.build_before_launch", false);
          Application.setFirstLaunch(false);
        }
      }
      
      public void pageClosed(IWorkbenchPage paramAnonymousIWorkbenchPage)
      {
        paramAnonymousIWorkbenchPage.removePartListener(partListener);
      }
      
      public void pageActivated(IWorkbenchPage paramAnonymousIWorkbenchPage) {}
    };
    paramIWorkbenchWindow.addPageListener(pageListener);
  }
  
  protected void fillCoolBar(ICoolBarManager paramICoolBarManager)
  {
    ToolBarManager localToolBarManager = new ToolBarManager(8404992);
    paramICoolBarManager.add(new ToolBarContributionItem(localToolBarManager, "main"));
    localToolBarManager.add(newFileAction);
    localToolBarManager.add(saveAction);
    localToolBarManager.add(saveAllAction);
  }
  
  protected void fillMenuBar(IMenuManager paramIMenuManager)
  {
    MenuManager localMenuManager1 = new MenuManager("&File", "file");
    MenuManager localMenuManager2 = new MenuManager("&Window", "window");
    MenuManager localMenuManager3 = new MenuManager("&Help", "help");
    MenuManager localMenuManager4 = new MenuManager("&Project", "project");
    MenuManager localMenuManager5 = new MenuManager("&Run", "launch");
    MenuManager localMenuManager6 = new MenuManager("&New", "new");
    paramIMenuManager.add(localMenuManager1);
    paramIMenuManager.add(localMenuManager4);
    paramIMenuManager.add(localMenuManager5);
    paramIMenuManager.add(localMenuManager2);
    paramIMenuManager.add(localMenuManager3);
    localMenuManager6.add(newProjectAction);
    localMenuManager6.add(newFileAction);
    localMenuManager1.add(localMenuManager6);
    localMenuManager1.add(new Separator());
    localMenuManager1.add(closeAction);
    localMenuManager1.add(closeAllAction);
    localMenuManager1.add(new Separator());
    localMenuManager1.add(saveAction);
    localMenuManager1.add(saveAllAction);
    localMenuManager1.add(new Separator());
    localMenuManager1.add(openWorkspace);
    localMenuManager1.add(new Separator());
    localMenuManager1.add(importAction);
    localMenuManager1.add(exportAction);
    localMenuManager1.add(new Separator());
    localMenuManager1.add(exitAction);
    localMenuManager2.add(preferencesAction);
    localMenuManager2.add(newWindowAction);
    localMenuManager4.add(openProj);
    localMenuManager4.add(closeProj);
    localMenuManager4.add(new Separator());
    localMenuManager4.add(buildCurrProj);
    localMenuManager4.add(buildProj);
    localMenuManager4.add(buildAutoProj);
    localMenuManager4.add(cleanProj);
    localMenuManager3.add(helpCont);
    localMenuManager3.add(cheatSheet);
    localMenuManager3.add(aboutAction);
  }
  
  public void dispose()
  {
    super.dispose();
    PlatformUI.getWorkbench().getActiveWorkbenchWindow().removePageListener(pageListener);
  }
  
  private void removeUnwantedItems()
  {
    ActionSetRegistry localActionSetRegistry = WorkbenchPlugin.getDefault().getActionSetRegistry();
    IActionSetDescriptor[] arrayOfIActionSetDescriptor = localActionSetRegistry.getActionSets();
    String[] arrayOfString = { "org.eclipse.search.searchActionSet", "org.eclipse.ui.actionSet.keyBindings", "org.eclipse.ui.edit.text.actionSet.navigation", "org.eclipse.ui.edit.text.actionSet.annotationNavigation", "org.eclipse.ui.edit.text.actionSet.convertLineDelimitersTo", "org.eclipse.ui.edit.text.actionSet.openExternalFile", "org.eclipse.ui.externaltools.ExternalToolsSet", "org.eclipse.ui.WorkingSetActionSet", "org.eclipse.update.ui.softwareUpdates", "org.eclipse.ui.actionSet.openFiles", "org.eclipse.mylyn.tasks.ui.navigation", "org.eclipse.egit.ui.navigation", "org.eclipse.team.ui.actionSet" };
    for (int i = 0; i < arrayOfIActionSetDescriptor.length; i++)
    {
      int j = 0;
      for (int k = 0; k < arrayOfString.length; k++) {
        if (arrayOfString[k].equals(arrayOfIActionSetDescriptor[i].getId())) {
          j = 1;
        }
      }
      if (j != 0)
      {
        IExtension localIExtension = arrayOfIActionSetDescriptor[i].getConfigurationElement().getDeclaringExtension();
        localActionSetRegistry.removeExtension(localIExtension, new Object[] { arrayOfIActionSetDescriptor[i] });
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.tizen.tools.effecteditor.ApplicationActionBarAdvisor
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.tools.effecteditor;

import java.net.URL;
import org.eclipse.core.resources.IWorkspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.application.IWorkbenchConfigurer;
import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
import org.eclipse.ui.application.WorkbenchAdvisor;
import org.eclipse.ui.application.WorkbenchWindowAdvisor;
import org.eclipse.ui.ide.IDE;
import org.osgi.framework.Bundle;
import org.tizen.tools.effecteditor.simulator.runConfiguration.LaunchManager;

public class ApplicationWorkbenchAdvisor
  extends WorkbenchAdvisor
{
  public WorkbenchWindowAdvisor createWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer paramIWorkbenchWindowConfigurer)
  {
    return new ApplicationWorkbenchWindowAdvisor(paramIWorkbenchWindowConfigurer);
  }
  
  public String getInitialWindowPerspectiveId()
  {
    return "org.tizen.tools.effecteditor.Perspective";
  }
  
  public void initialize(IWorkbenchConfigurer paramIWorkbenchConfigurer)
  {
    super.initialize(paramIWorkbenchConfigurer);
    paramIWorkbenchConfigurer.setSaveAndRestore(true);
    PlatformUI.getPreferenceStore().setValue("SHOW_TRADITIONAL_STYLE_TABS", false);
    IDE.registerAdapters();
    Bundle localBundle = Platform.getBundle("org.eclipse.ui.ide");
    declareWorkbenchImage(paramIWorkbenchConfigurer, localBundle, "IMG_OBJ_PROJECT", "icons/full/obj16/prj_obj.gif", true);
    declareWorkbenchImage(paramIWorkbenchConfigurer, localBundle, "IMG_OBJ_PROJECT_CLOSED", "icons/full/obj16/cprj_obj.gif", true);
    declareWorkbenchImage(paramIWorkbenchConfigurer, localBundle, "IMG_ETOOL_PROBLEMS_VIEW", "icons/full/eview16/problems_view.gif", true);
    declareWorkbenchImage(paramIWorkbenchConfigurer, localBundle, "IMG_ETOOL_PROBLEMS_VIEW_ERROR", "icons/full/eview16/problems_view_error.gif", true);
    declareWorkbenchImage(paramIWorkbenchConfigurer, localBundle, "IMG_ETOOL_PROBLEMS_VIEW_WARNING", "icons/full/eview16/problems_view_warning.gif", true);
    declareWorkbenchImage(paramIWorkbenchConfigurer, localBundle, "IMG_OBJS_ERROR_PATH", "icons/full/obj16/error_tsk.gif", true);
    declareWorkbenchImage(paramIWorkbenchConfigurer, localBundle, "IMG_OBJS_WARNING_PATH", "icons/full/obj16/warn_tsk.gif", true);
  }
  
  private void declareWorkbenchImage(IWorkbenchConfigurer paramIWorkbenchConfigurer, Bundle paramBundle, String paramString1, String paramString2, boolean paramBoolean)
  {
    URL localURL = paramBundle.getEntry(paramString2);
    ImageDescriptor localImageDescriptor = ImageDescriptor.createFromURL(localURL);
    paramIWorkbenchConfigurer.declareImage(paramString1, localImageDescriptor, paramBoolean);
  }
  
  public IAdaptable getDefaultPageInput()
  {
    return ResourcesPlugin.getWorkspace().getRoot();
  }
  
  public boolean preShutdown()
  {
    LaunchManager.dispose();
    return super.preShutdown();
  }
}

/* Location:
 * Qualified Name:     org.tizen.tools.effecteditor.ApplicationWorkbenchAdvisor
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.tools.effecteditor;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.swt.graphics.Point;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.application.ActionBarAdvisor;
import org.eclipse.ui.application.IActionBarConfigurer;
import org.eclipse.ui.application.IWorkbenchWindowConfigurer;
import org.eclipse.ui.application.WorkbenchWindowAdvisor;
import org.eclipse.ui.internal.dialogs.WorkbenchWizardElement;
import org.eclipse.ui.internal.wizards.AbstractExtensionWizardRegistry;
import org.eclipse.ui.wizards.IWizardCategory;
import org.eclipse.ui.wizards.IWizardDescriptor;
import org.eclipse.ui.wizards.IWizardRegistry;
import org.tizen.tools.effecteditor.script.editor.LuaMultiPageEditor;

public class ApplicationWorkbenchWindowAdvisor
  extends WorkbenchWindowAdvisor
{
  public ApplicationWorkbenchWindowAdvisor(IWorkbenchWindowConfigurer paramIWorkbenchWindowConfigurer)
  {
    super(paramIWorkbenchWindowConfigurer);
    LuaMultiPageEditor.addMarkerOpenListener();
  }
  
  public ActionBarAdvisor createActionBarAdvisor(IActionBarConfigurer paramIActionBarConfigurer)
  {
    return new ApplicationActionBarAdvisor(paramIActionBarConfigurer);
  }
  
  public void preWindowOpen()
  {
    IWorkbenchWindowConfigurer localIWorkbenchWindowConfigurer = getWindowConfigurer();
    localIWorkbenchWindowConfigurer.setInitialSize(new Point(1024, 768));
    localIWorkbenchWindowConfigurer.setShowCoolBar(true);
    localIWorkbenchWindowConfigurer.setShowStatusLine(true);
  }
  
  public void postWindowOpen()
  {
    super.postWindowOpen();
    AbstractExtensionWizardRegistry localAbstractExtensionWizardRegistry1 = (AbstractExtensionWizardRegistry)PlatformUI.getWorkbench().getNewWizardRegistry();
    IWizardCategory[] arrayOfIWizardCategory1 = PlatformUI.getWorkbench().getNewWizardRegistry().getRootCategory().getCategories();
    IWizardDescriptor[] arrayOfIWizardDescriptor1 = getAllWizards(arrayOfIWizardCategory1);
    String str = null;
    int j = (localObject = arrayOfIWizardDescriptor1).length;
    for (int i = 0; i < j; i++)
    {
      localAbstractExtensionWizardRegistry2 = localObject[i];
      str = localAbstractExtensionWizardRegistry2.getCategory().getId();
      if ((str.matches("org.eclipse.wst.xml.examples")) || (str.matches("org.eclipse.wst.XMLCategory")))
      {
        WorkbenchWizardElement localWorkbenchWizardElement1 = (WorkbenchWizardElement)localAbstractExtensionWizardRegistry2;
        localAbstractExtensionWizardRegistry1.removeExtension(localWorkbenchWizardElement1.getConfigurationElement().getDeclaringExtension(), new Object[] { localWorkbenchWizardElement1 });
      }
    }
    AbstractExtensionWizardRegistry localAbstractExtensionWizardRegistry2 = (AbstractExtensionWizardRegistry)PlatformUI.getWorkbench().getImportWizardRegistry();
    IWizardCategory[] arrayOfIWizardCategory2 = PlatformUI.getWorkbench().getImportWizardRegistry().getRootCategory().getCategories();
    IWizardDescriptor[] arrayOfIWizardDescriptor2 = getAllWizards(arrayOfIWizardCategory2);
    IWizardDescriptor[] arrayOfIWizardDescriptor4;
    int m = (arrayOfIWizardDescriptor4 = arrayOfIWizardDescriptor2).length;
    for (int k = 0; k < m; k++)
    {
      localObject = arrayOfIWizardDescriptor4[k];
      str = ((IWizardDescriptor)localObject).getCategory().getId();
      if ((str.matches("org.eclipse.debug.ui")) || (str.matches("org.eclipse.team.ui.importWizards")) || (str.matches("org.eclipse.wst.XMLCategory")))
      {
        WorkbenchWizardElement localWorkbenchWizardElement2 = (WorkbenchWizardElement)localObject;
        localAbstractExtensionWizardRegistry2.removeExtension(localWorkbenchWizardElement2.getConfigurationElement().getDeclaringExtension(), new Object[] { localWorkbenchWizardElement2 });
      }
    }
    Object localObject = (AbstractExtensionWizardRegistry)PlatformUI.getWorkbench().getExportWizardRegistry();
    IWizardCategory[] arrayOfIWizardCategory3 = PlatformUI.getWorkbench().getExportWizardRegistry().getRootCategory().getCategories();
    IWizardDescriptor[] arrayOfIWizardDescriptor3 = getAllWizards(arrayOfIWizardCategory3);
    IWizardDescriptor[] arrayOfIWizardDescriptor5;
    int i1 = (arrayOfIWizardDescriptor5 = arrayOfIWizardDescriptor3).length;
    for (int n = 0; n < i1; n++)
    {
      arrayOfIWizardDescriptor4 = arrayOfIWizardDescriptor5[n];
      str = arrayOfIWizardDescriptor4.getCategory().getId();
      if ((str.matches("org.eclipse.debug.ui")) || (str.matches("org.eclipse.team.ui.exportWizards")) || (str.matches("org.eclipse.wst.XMLCategory")))
      {
        WorkbenchWizardElement localWorkbenchWizardElement3 = (WorkbenchWizardElement)arrayOfIWizardDescriptor4;
        ((AbstractExtensionWizardRegistry)localObject).removeExtension(localWorkbenchWizardElement3.getConfigurationElement().getDeclaringExtension(), new Object[] { localWorkbenchWizardElement3 });
      }
    }
  }
  
  private IWizardDescriptor[] getAllWizards(IWizardCategory[] paramArrayOfIWizardCategory)
  {
    ArrayList localArrayList = new ArrayList();
    IWizardCategory[] arrayOfIWizardCategory;
    int j = (arrayOfIWizardCategory = paramArrayOfIWizardCategory).length;
    for (int i = 0; i < j; i++)
    {
      IWizardCategory localIWizardCategory = arrayOfIWizardCategory[i];
      localArrayList.addAll(Arrays.asList(localIWizardCategory.getWizards()));
      localArrayList.addAll(Arrays.asList(getAllWizards(localIWizardCategory.getCategories())));
    }
    return (IWizardDescriptor[])localArrayList.toArray(new IWizardDescriptor[0]);
  }
}

/* Location:
 * Qualified Name:     org.tizen.tools.effecteditor.ApplicationWorkbenchWindowAdvisor
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.tools.effecteditor;

import org.eclipse.core.runtime.ILog;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;

public class EffectsLog
{
  public static void logInfo(String paramString)
  {
    log(1, 0, paramString, null);
  }
  
  public static void logError(Throwable paramThrowable)
  {
    logError("Unexpected Exception", paramThrowable);
  }
  
  public static void logError(String paramString, Throwable paramThrowable)
  {
    log(4, 0, paramString, paramThrowable);
  }
  
  public static void log(int paramInt1, int paramInt2, String paramString, Throwable paramThrowable)
  {
    log(createStatus(paramInt1, paramInt2, paramString, paramThrowable));
  }
  
  public static IStatus createStatus(int paramInt1, int paramInt2, String paramString, Throwable paramThrowable)
  {
    return new Status(paramInt1, "org.tizen.tools.effecteditor", paramInt2, paramString, paramThrowable);
  }
  
  public static void log(IStatus paramIStatus)
  {
    EffectsPluginActivator.getDefault().getLog().log(paramIStatus);
    Throwable localThrowable = paramIStatus.getException();
    if (localThrowable != null) {
      localThrowable.printStackTrace();
    }
  }
}

/* Location:
 * Qualified Name:     org.tizen.tools.effecteditor.EffectsLog
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.tools.effecteditor;

import java.io.IOException;
import java.io.PrintStream;
import java.net.URL;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.resources.IProjectDescription;
import org.eclipse.core.runtime.Platform;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.ui.console.ConsolePlugin;
import org.eclipse.ui.console.IConsole;
import org.eclipse.ui.
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

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