org.tizen.injector.location.log_1.0.0.201310291329

16:50:05.131 INFO  jd.cli.Main - Decompiling org.tizen.injector.location.log_1.0.0.201310291329.jar
package org.tizen.injector.location.log;

import java.util.ArrayList;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.Section;
import org.tizen.injector.location.log.page.LogFile;
import org.tizen.injector.provider.AbstractInjectorItem;

public class Log
  extends AbstractInjectorItem
{
  private static String LABEL = Messages.Log_0;
  
  protected void addPages()
  {
    addPage(new LogFile(this, Messages.Log_1));
  }
  
  public void setSiblingsEnabled(boolean paramBoolean)
  {
    ArrayList localArrayList = getCategoryItems("Location");
    for (int i = 0; i < localArrayList.size(); i++)
    {
      Section localSection = (Section)((AbstractInjectorItem)localArrayList.get(i)).getParent().getParent();
      if (!localSection.getText().equals(LABEL))
      {
        if (!paramBoolean) {
          localSection.setExpanded(paramBoolean);
        }
        localSection.setEnabled(paramBoolean);
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.location.log.Log
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.location.log;

import org.eclipse.osgi.util.NLS;

public class Messages
  extends NLS
{
  private static final String BUNDLE_NAME = "org.tizen.injector.location.log.messages";
  public static String Log_0;
  public static String Log_1;
  
  static
  {
    NLS.initializeMessages("org.tizen.injector.location.log.messages", Messages.class);
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.location.log.Messages
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.location.log.page;

import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;

class LogFile$1
  implements SelectionListener
{
  LogFile$1(LogFile paramLogFile) {}
  
  public void widgetSelected(SelectionEvent paramSelectionEvent)
  {
    String str = "";
    FileDialog localFileDialog = new FileDialog(new Shell());
    str = localFileDialog.open();
    if (str == null) {
      return;
    }
    LogFile.access$0(this$0).setText(str);
    LogFile.access$1(this$0).setEnabled(LogFile.access$2(this$0));
  }
  
  public void widgetDefaultSelected(SelectionEvent paramSelectionEvent) {}
}

/* Location:
 * Qualified Name:     org.tizen.injector.location.log.page.LogFile.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.location.log.page;

import java.io.File;
import java.io.IOException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.tizen.injector.location.core.injector.LocationInjector;

class LogFile$2$1
  extends Job
{
  LogFile$2$1(LogFile.2 param2, String paramString, File paramFile)
  {
    super(paramString);
  }
  
  protected IStatus run(IProgressMonitor paramIProgressMonitor)
  {
    try
    {
      LogFile.access$5(LogFile.2.access$0(this$1), new LocationInjector());
      boolean bool = LogFile.access$3(LogFile.2.access$0(this$1)).inject(val$file, paramIProgressMonitor);
      if (!bool)
      {
        LogFile.access$3(LogFile.2.access$0(this$1)).setCancel(true);
        paramIProgressMonitor.setCanceled(true);
      }
      if (paramIProgressMonitor.isCanceled())
      {
        localIStatus = Status.CANCEL_STATUS;
        return localIStatus;
      }
    }
    catch (IOException localIOException)
    {
      IStatus localIStatus = Status.CANCEL_STATUS;
      return localIStatus;
    }
    finally
    {
      LogFile.access$5(LogFile.2.access$0(this$1), null);
    }
    LogFile.access$5(LogFile.2.access$0(this$1), null);
    return Status.OK_STATUS;
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.location.log.page.LogFile.2.1
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.location.log.page;

import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.JobChangeAdapter;
import org.eclipse.swt.widgets.Button;
import org.tizen.injector.location.log.Log;

class LogFile$2$2
  extends JobChangeAdapter
{
  LogFile$2$2(LogFile.2 param2) {}
  
  public void scheduled(IJobChangeEvent paramIJobChangeEvent)
  {
    LogFile.access$1(LogFile.2.access$0(this$1)).setEnabled(false);
    LogFile.access$7(LogFile.2.access$0(this$1)).setEnabled(true);
    ((Log)LogFile.2.access$0(this$1).getParent()).setSiblingsEnabled(false);
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.location.log.page.LogFile.2.2
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.location.log.page;

import java.io.File;
import java.io.IOException;
import java.io.PrintStream;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.core.runtime.jobs.JobChangeAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Text;
import org.tizen.injector.location.core.injector.LocationInjector;
import org.tizen.injector.location.log.Log;

class LogFile$2
  implements SelectionListener
{
  LogFile$2(LogFile paramLogFile) {}
  
  public void widgetSelected(SelectionEvent paramSelectionEvent)
  {
    if (LogFile.access$3(this$0) != null)
    {
      LogFile.access$3(this$0).setCancel(true);
      if (LogFile.access$4(this$0) != null) {
        try
        {
          LogFile.access$4(this$0).join();
        }
        catch (InterruptedException localInterruptedException)
        {
          localInterruptedException.printStackTrace();
        }
      }
    }
    final File localFile = new File(LogFile.access$0(this$0).getText());
    if (localFile.exists())
    {
      LogFile.access$6(this$0, new Job("Inject Job")
      {
        protected IStatus run(IProgressMonitor paramAnonymousIProgressMonitor)
        {
          try
          {
            LogFile.access$5(this$0, new LocationInjector());
            boolean bool = LogFile.access$3(this$0).inject(localFile, paramAnonymousIProgressMonitor);
            if (!bool)
            {
              LogFile.access$3(this$0).setCancel(true);
              paramAnonymousIProgressMonitor.setCanceled(true);
            }
            if (paramAnonymousIProgressMonitor.isCanceled())
            {
              localIStatus = Status.CANCEL_STATUS;
              return localIStatus;
            }
          }
          catch (IOException localIOException)
          {
            IStatus localIStatus = Status.CANCEL_STATUS;
            return localIStatus;
          }
          finally
          {
            LogFile.access$5(this$0, null);
          }
          LogFile.access$5(this$0, null);
          return Status.OK_STATUS;
        }
      });
      LogFile.access$4(this$0).addJobChangeListener(new JobChangeAdapter()
      {
        public void scheduled(IJobChangeEvent paramAnonymousIJobChangeEvent)
        {
          LogFile.access$1(this$0).setEnabled(false);
          LogFile.access$7(this$0).setEnabled(true);
          ((Log)this$0.getParent()).setSiblingsEnabled(false);
        }
      });
      LogFile.access$4(this$0).schedule();
    }
    else
    {
      System.out.println("file is not exist");
    }
  }
  
  public void widgetDefaultSelected(SelectionEvent paramSelectionEvent) {}
}

/* Location:
 * Qualified Name:     org.tizen.injector.location.log.page.LogFile.2
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.location.log.page;

import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;
import org.tizen.injector.location.core.injector.LocationInjector;
import org.tizen.injector.location.log.Log;

class LogFile$3
  extends SelectionAdapter
{
  LogFile$3(LogFile paramLogFile) {}
  
  public void widgetSelected(SelectionEvent paramSelectionEvent)
  {
    LogFile.access$3(this$0).setCancel(true);
    if (LogFile.access$4(this$0) != null) {
      try
      {
        LogFile.access$4(this$0).join();
      }
      catch (InterruptedException localInterruptedException)
      {
        localInterruptedException.printStackTrace();
      }
    }
    LogFile.access$1(this$0).setEnabled(true);
    LogFile.access$7(this$0).setEnabled(false);
    ((Log)this$0.getParent()).setSiblingsEnabled(true);
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.location.log.page.LogFile.3
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.location.log.page;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.io.PrintStream;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.core.runtime.jobs.JobChangeAdapter;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.FileDialog;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.tizen.injector.location.core.injector.LocationInjector;
import org.tizen.injector.location.log.Log;
import org.tizen.injector.provider.AbstractInjectorItem;
import org.tizen.injector.provider.AbstractInjectorPage;
import org.tizen.injector.util.FormPageUtil;

public class LogFile
  extends AbstractInjectorPage
{
  private static String FILE_CHECK_VALUE = "$GP";
  private Text filenameText;
  private Button injectButton;
  private Button cancelButton;
  private LocationInjector injector = null;
  private Job injectJob = null;
  
  public LogFile(AbstractInjectorItem paramAbstractInjectorItem, String paramString)
  {
    super(paramAbstractInjectorItem, paramString);
  }
  
  protected void createContents()
  {
    createLogFileInjectComposite();
  }
  
  protected void registerReceivers() {}
  
  private Control createLogFileInjectComposite()
  {
    Composite localComposite1 = formUtil.createComposite(parent, 2);
    filenameText = formUtil.createText(localComposite1, "");
    Button localButton = formUtil.createButton(localComposite1, Messages.LogFile_2, 8);
    localButton.addSelectionListener(new SelectionListener()
    {
      public void widgetSelected(SelectionEvent paramAnonymousSelectionEvent)
      {
        String str = "";
        FileDialog localFileDialog = new FileDialog(new Shell());
        str = localFileDialog.open();
        if (str == null) {
          return;
        }
        filenameText.setText(str);
        injectButton.setEnabled(LogFile.this.validateFile());
      }
      
      public void widgetDefaultSelected(SelectionEvent paramAnonymousSelectionEvent) {}
    });
    Composite localComposite2 = formUtil.createComposite(localComposite1, 2);
    injectButton = formUtil.createButton(localComposite2, Messages.LogFile_4, 8);
    injectButton.addSelectionListener(new SelectionListener()
    {
      public void widgetSelected(SelectionEvent paramAnonymousSelectionEvent)
      {
        if (injector != null)
        {
          injector.setCancel(true);
          if (injectJob != null) {
            try
            {
              injectJob.join();
            }
            catch (InterruptedException localInterruptedException)
            {
              localInterruptedException.printStackTrace();
            }
          }
        }
        final File localFile = new File(filenameText.getText());
        if (localFile.exists())
        {
          injectJob = new Job("Inject Job")
          {
            protected IStatus run(IProgressMonitor paramAnonymous2IProgressMonitor)
            {
              try
              {
                injector = new LocationInjector();
                boolean bool = injector.inject(localFile, paramAnonymous2IProgressMonitor);
                if (!bool)
                {
                  injector.setCancel(true);
                  paramAnonymous2IProgressMonitor.setCanceled(true);
                }
                if (paramAnonymous2IProgressMonitor.isCanceled())
                {
                  localIStatus = Status.CANCEL_STATUS;
                  return localIStatus;
                }
              }
              catch (IOException localIOException)
              {
                IStatus localIStatus = Status.CANCEL_STATUS;
                return localIStatus;
              }
              finally
              {
                injector = null;
              }
              injector = null;
              return Status.OK_STATUS;
            }
          };
          injectJob.addJobChangeListener(new JobChangeAdapter()
          {
            public void scheduled(IJobChangeEvent paramAnonymous2IJobChangeEvent)
            {
              injectButton.setEnabled(false);
              cancelButton.setEnabled(true);
              ((Log)getParent()).setSiblingsEnabled(false);
            }
          });
          injectJob.schedule();
        }
        else
        {
          System.out.println("file is not exist");
        }
      }
      
      public void widgetDefaultSelected(SelectionEvent paramAnonymousSelectionEvent) {}
    });
    injectButton.setEnabled(false);
    cancelButton = formUtil.createButton(localComposite2, Messages.LogFile_6, 8);
    cancelButton.addSelectionListener(new SelectionAdapter()
    {
      public void widgetSelected(SelectionEvent paramAnonymousSelectionEvent)
      {
        injector.setCancel(true);
        if (injectJob != null) {
          try
          {
            injectJob.join();
          }
          catch (InterruptedException localInterruptedException)
          {
            localInterruptedException.printStackTrace();
          }
        }
        injectButton.setEnabled(true);
        cancelButton.setEnabled(false);
        ((Log)getParent()).setSiblingsEnabled(true);
      }
    });
    cancelButton.setEnabled(false);
    return localComposite1;
  }
  
  private boolean validateFile()
  {
    File localFile = new File(filenameText.getText());
    if (!localFile.exists()) {
      return false;
    }
    try
    {
      BufferedReader localBufferedReader = new BufferedReader(new FileReader(localFile));
      String str = localBufferedReader.readLine();
      if (!str.startsWith(FILE_CHECK_VALUE)) {
        return false;
      }
      localBufferedReader.close();
    }
    catch (IOException localIOException)
    {
      return false;
    }
    return true;
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.location.log.page.LogFile
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
package org.tizen.injector.location.log.page;

import org.eclipse.osgi.util.NLS;

public class Messages
  extends NLS
{
  private static final String BUNDLE_NAME = "org.tizen.injector.location.log.page.messages";
  public static String LogFile_2;
  public static String LogFile_4;
  public static String LogFile_6;
  
  static
  {
    NLS.initializeMessages("org.tizen.injector.location.log.page.messages", Messages.class);
  }
}

/* Location:
 * Qualified Name:     org.tizen.injector.location.log.page.Messages
 * Java Class Version: 6 (50.0)
 * JD-Core Version:    0.7.1
 */
1

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