org.eclipse.mylyn.tasks.ui_3.7.1.v20120425-0100

2	org/eclipse/core/runtime/Status
          //   179: dup
          //   180: iconst_4
          //   181: ldc 4
          //   183: ldc 3
          //   185: aload 7
          //   187: invokespecial 153	org/eclipse/core/runtime/Status:<init>	(ILjava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
          //   190: invokestatic 154	org/eclipse/mylyn/commons/core/StatusHandler:log	(Lorg/eclipse/core/runtime/IStatus;)V
          //   193: aload 6
          //   195: athrow
          //   196: aload_2
          //   197: invokevirtual 145	java/io/InputStream:close	()V
          //   200: goto +46 -> 246
          //   203: astore 7
          //   205: new 72	org/eclipse/core/runtime/Status
          //   208: dup
          //   209: iconst_4
          //   210: ldc 4
          //   212: ldc 3
          //   214: aload 7
          //   216: invokespecial 153	org/eclipse/core/runtime/Status:<init>	(ILjava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
          //   219: invokestatic 154	org/eclipse/mylyn/commons/core/StatusHandler:log	(Lorg/eclipse/core/runtime/IStatus;)V
          //   222: goto +24 -> 246
          //   225: astore_2
          //   226: new 69	java/lang/reflect/InvocationTargetException
          //   229: dup
          //   230: aload_2
          //   231: invokespecial 152	java/lang/reflect/InvocationTargetException:<init>	(Ljava/lang/Throwable;)V
          //   234: athrow
          //   235: astore 8
          //   237: aload_1
          //   238: invokeinterface 163 1 0
          //   243: aload 8
          //   245: athrow
          //   246: aload_1
          //   247: invokeinterface 163 1 0
          //   252: return
          // Line number table:
          //   Java source line #250	-> byte code offset #0
          //   Java source line #251	-> byte code offset #10
          //   Java source line #253	-> byte code offset #25
          //   Java source line #254	-> byte code offset #35
          //   Java source line #255	-> byte code offset #43
          //   Java source line #257	-> byte code offset #60
          //   Java source line #259	-> byte code offset #63
          //   Java source line #260	-> byte code offset #70
          //   Java source line #257	-> byte code offset #77
          //   Java source line #258	-> byte code offset #97
          //   Java source line #257	-> byte code offset #103
          //   Java source line #262	-> byte code offset #106
          //   Java source line #263	-> byte code offset #119
          //   Java source line #264	-> byte code offset #129
          //   Java source line #281	-> byte code offset #155
          //   Java source line #282	-> byte code offset #156
          //   Java source line #283	-> byte code offset #165
          //   Java source line #285	-> byte code offset #167
          //   Java source line #286	-> byte code offset #174
          //   Java source line #287	-> byte code offset #176
          //   Java source line #288	-> byte code offset #183
          //   Java source line #287	-> byte code offset #187
          //   Java source line #290	-> byte code offset #193
          //   Java source line #285	-> byte code offset #196
          //   Java source line #286	-> byte code offset #203
          //   Java source line #287	-> byte code offset #205
          //   Java source line #288	-> byte code offset #212
          //   Java source line #287	-> byte code offset #216
          //   Java source line #290	-> byte code offset #222
          //   Java source line #291	-> byte code offset #225
          //   Java source line #292	-> byte code offset #226
          //   Java source line #293	-> byte code offset #235
          //   Java source line #294	-> byte code offset #237
          //   Java source line #295	-> byte code offset #243
          //   Java source line #294	-> byte code offset #246
          //   Java source line #296	-> byte code offset #252
          // Local variable table:
          //   start	length	slot	name	signature
          //   0	253	0	this	4
          //   0	253	1	monitor	org.eclipse.core.runtime.IProgressMonitor
          //   24	173	2	in	InputStream
          //   225	6	2	e	org.eclipse.core.runtime.CoreException
          //   42	70	3	content	StringBuilder
          //   155	6	3	e	java.io.IOException
          //   58	20	4	reader	java.io.BufferedReader
          //   63	2	5	line	String
          //   83	3	5	line	String
          //   165	29	6	localObject1	Object
          //   174	12	7	e	java.io.IOException
          //   203	12	7	e	java.io.IOException
          //   235	9	8	localObject2	Object
          // Exception table:
          //   from	to	target	type
          //   25	152	155	java/io/IOException
          //   25	165	165	finally
          //   167	171	174	java/io/IOException
          //   196	200	203	java/io/IOException
          //   0	222	225	org/eclipse/core/runtime/CoreException
          //   0	235	235	finally
        }
      });
    }
    catch (InvocationTargetException e)
    {
      StatusHandler.log(new Status(4, "org.eclipse.mylyn.tasks.ui", "Error generating preview", e));
      createErrorPreview(composite, Messages.AttachmentPreviewPage_Could_not_create_preview);
      return null;
    }
    catch (InterruptedException localInterruptedException)
    {
      return null;
    }
    return result[0];
  }
  
  private boolean isImageAttachment()
  {
    return imageTypes.contains(model.getContentType());
  }
  
  private boolean isTextAttachment()
  {
    return textTypes.contains(model.getContentType());
  }
  
  public boolean runInBackground()
  {
    return runInBackgroundButton.getSelection();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.tasks.ui.wizards.AttachmentPreviewPage
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.mylyn.internal.tasks.ui.wizards;

import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.graphics.Image;

class AttachmentPreviewPage$2
  implements DisposeListener
{
  AttachmentPreviewPage$2(AttachmentPreviewPage paramAttachmentPreviewPage, Image paramImage) {}
  
  public void widgetDisposed(DisposeEvent event)
  {
    val$bufferedImage.dispose();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.tasks.ui.wizards.AttachmentPreviewPage.2
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.mylyn.internal.tasks.ui.wizards;

import org.eclipse.core.commands.Command;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.handlers.IHandlerService;

class SelectRepositoryConnectorPage$3
  extends SelectionAdapter
{
  SelectRepositoryConnectorPage$3(SelectRepositoryConnectorPage paramSelectRepositoryConnectorPage, Command paramCommand) {}
  
  public void widgetSelected(SelectionEvent event)
  {
    IHandlerService handlerService = (IHandlerService)PlatformUI.getWorkbench().getService(
      IHandlerService.class);
    try
    {
      handlerService.executeCommand(val$discoveryWizardCommand.getId(), null);
    }
    catch (Exception e)
    {
      IStatus status = new Status(4, "org.eclipse.mylyn.tasks.ui", NLS.bind(
        Messages.SelectRepositoryConnectorPage_discoveryProblemMessage, 
        new Object[] { e.getMessage() }), e);
      TasksUiInternal.logAndDisplayStatus(
        Messages.SelectRepositoryConnectorPage_discoveryProblemTitle, status);
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.tasks.ui.wizards.SelectRepositoryConnectorPage.3
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.mylyn.internal.tasks.ui.wizards;

import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.SelectionChangedEvent;

class AttachmentSourcePage$7
  implements ISelectionChangedListener
{
  AttachmentSourcePage$7(AttachmentSourcePage paramAttachmentSourcePage) {}
  
  public void selectionChanged(SelectionChangedEvent event)
  {
    AttachmentSourcePage.access$1(this$0);
    AttachmentSourcePage.access$4(this$0);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.tasks.ui.wizards.AttachmentSourcePage.7
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.mylyn.internal.tasks.ui.wizards;

import com.ibm.icu.text.SimpleDateFormat;
import java.io.File;
import java.util.Date;
import java.util.Locale;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.mylyn.commons.core.CoreUtil;
import org.eclipse.mylyn.commons.core.ICoreRunnable;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IImportWizard;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;

public class TaskDataImportWizard
  extends Wizard
  implements IImportWizard
{
  private TaskDataImportWizardPage importPage = null;
  
  public TaskDataImportWizard()
  {
    IDialogSettings masterSettings = TasksUiPlugin.getDefault().getDialogSettings();
    setDialogSettings(getSettingsSection(masterSettings));
    setNeedsProgressMonitor(true);
    setWindowTitle(Messages.TaskDataImportWizard_Import);
  }
  
  private IDialogSettings getSettingsSection(IDialogSettings master)
  {
    IDialogSettings settings = master.getSection("org.eclipse.mylyn.tasklist.ui.importWizard");
    if (settings == null) {
      settings = master.addNewSection("org.eclipse.mylyn.tasklist.ui.importWizard");
    }
    return settings;
  }
  
  public void addPages()
  {
    importPage = new TaskDataImportWizardPage();
    importPage.setWizard(this);
    addPage(importPage);
  }
  
  public void init(IWorkbench workbench, IStructuredSelection selection) {}
  
  public boolean canFinish()
  {
    return importPage.isPageComplete();
  }
  
  public boolean performFinish()
  {
    String sourceZip = importPage.getSourceZipFile();
    File sourceZipFile = new File(sourceZip);
    if (!sourceZipFile.exists())
    {
      MessageDialog.openError(getShell(), Messages.TaskDataImportWizard_File_not_found, sourceZipFile.toString() + 
        Messages.TaskDataImportWizard_could_not_be_found);
      return false;
    }
    if ((!CoreUtil.TEST_MODE) && 
      (!MessageDialog.openConfirm(getShell(), Messages.TaskDataImportWizard_confirm_overwrite, 
      Messages.TaskDataImportWizard_existing_task_data_about_to_be_erased_proceed))) {
      return false;
    }
    if (performFinish(sourceZipFile, getContainer()))
    {
      importPage.saveSettings();
      return true;
    }
    return false;
  }
  
  /* Error */
  public static boolean performFinish(File sourceZipFile, org.eclipse.jface.wizard.IWizardContainer container)
  {
    // Byte code:
    //   0: invokestatic 230	org/eclipse/mylyn/tasks/ui/TasksUi:getTaskActivityManager	()Lorg/eclipse/mylyn/tasks/core/ITaskActivityManager;
    //   3: invokestatic 230	org/eclipse/mylyn/tasks/ui/TasksUi:getTaskActivityManager	()Lorg/eclipse/mylyn/tasks/core/ITaskActivityManager;
    //   6: invokeinterface 234 1 0
    //   11: invokeinterface 235 2 0
    //   16: iconst_0
    //   17: invokestatic 229	org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetUpdater:setEnabled	(Z)V
    //   20: aload_1
    //   21: ifnull +18 -> 39
    //   24: aload_1
    //   25: new 104	org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizard$FileCopyJob
    //   28: dup
    //   29: aload_0
    //   30: invokespecial 223	org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizard$FileCopyJob:<init>	(Ljava/io/File;)V
    //   33: invokestatic 210	org/eclipse/mylyn/commons/ui/CommonUiUtil:run	(Lorg/eclipse/jface/operation/IRunnableContext;Lorg/eclipse/mylyn/commons/core/ICoreRunnable;)V
    //   36: goto +70 -> 106
    //   39: new 104	org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizard$FileCopyJob
    //   42: dup
    //   43: aload_0
    //   44: invokespecial 223	org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizard$FileCopyJob:<init>	(Ljava/io/File;)V
    //   47: invokestatic 211	org/eclipse/mylyn/commons/workbench/WorkbenchUtil:busyCursorWhile	(Lorg/eclipse/mylyn/commons/core/ICoreRunnable;)V
    //   50: goto +56 -> 106
    //   53: astore_2
    //   54: new 93	org/eclipse/core/runtime/Status
    //   57: dup
    //   58: iconst_4
    //   59: ldc 3
    //   61: ldc 1
    //   63: aload_2
    //   64: invokevirtual 205	org/eclipse/core/runtime/CoreException:getMessage	()Ljava/lang/String;
    //   67: invokestatic 231	org/eclipse/osgi/util/NLS:bind	(Ljava/lang/String;Ljava/lang/Object;)Ljava/lang/String;
    //   70: aload_2
    //   71: invokespecial 206	org/eclipse/core/runtime/Status:<init>	(ILjava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
    //   74: astore_3
    //   75: getstatic 196	org/eclipse/mylyn/internal/tasks/ui/wizards/Messages:TaskDataImportWizard_task_data_import_failed	Ljava/lang/String;
    //   78: aload_3
    //   79: invokestatic 214	org/eclipse/mylyn/internal/tasks/ui/util/TasksUiInternal:logAndDisplayStatus	(Ljava/lang/String;Lorg/eclipse/core/runtime/IStatus;)V
    //   82: iconst_1
    //   83: invokestatic 229	org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetUpdater:setEnabled	(Z)V
    //   86: goto +24 -> 110
    //   89: pop
    //   90: iconst_1
    //   91: invokestatic 229	org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetUpdater:setEnabled	(Z)V
    //   94: goto +16 -> 110
    //   97: astore 4
    //   99: iconst_1
    //   100: invokestatic 229	org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetUpdater:setEnabled	(Z)V
    //   103: aload 4
    //   105: athrow
    //   106: iconst_1
    //   107: invokestatic 229	org/eclipse/mylyn/internal/tasks/ui/workingsets/TaskWorkingSetUpdater:setEnabled	(Z)V
    //   110: iconst_1
    //   111: ireturn
    // Line number table:
    //   Java source line #117	-> byte code offset #0
    //   Java source line #119	-> byte code offset #16
    //   Java source line #121	-> byte code offset #20
    //   Java source line #122	-> byte code offset #24
    //   Java source line #124	-> byte code offset #39
    //   Java source line #126	-> byte code offset #53
    //   Java source line #127	-> byte code offset #54
    //   Java source line #128	-> byte code offset #61
    //   Java source line #127	-> byte code offset #67
    //   Java source line #128	-> byte code offset #70
    //   Java source line #127	-> byte code offset #71
    //   Java source line #129	-> byte code offset #75
    //   Java source line #133	-> byte code offset #82
    //   Java source line #130	-> byte code offset #89
    //   Java source line #133	-> byte code offset #90
    //   Java source line #132	-> byte code offset #97
    //   Java source line #133	-> byte code offset #99
    //   Java source line #134	-> byte code offset #103
    //   Java source line #133	-> byte code offset #106
    //   Java source line #135	-> byte code offset #110
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	112	0	sourceZipFile	File
    //   0	112	1	container	org.eclipse.jface.wizard.IWizardContainer
    //   53	18	2	e	CoreException
    //   74	5	3	status	org.eclipse.core.runtime.Status
    //   97	7	4	localObject	Object
    //   89	1	5	localOperationCanceledException	org.eclipse.core.runtime.OperationCanceledException
    // Exception table:
    //   from	to	target	type
    //   16	50	53	org/eclipse/core/runtime/CoreException
    //   16	50	89	org/eclipse/core/runtime/OperationCanceledException
    //   16	82	97	finally
    //   89	90	97	finally
  }
  
  static class FileCopyJob
    implements ICoreRunnable
  {
    private static final String PREFIX_BACKUP = ".backup-";
    private final String JOB_LABEL = Messages.TaskDataImportWizard_Importing_Data;
    private final File sourceZipFile;
    
    public FileCopyJob(File sourceZipFile)
    {
      this.sourceZipFile = sourceZipFile;
    }
    
    /* Error */
    public void run(org.eclipse.core.runtime.IProgressMonitor monitor)
      throws CoreException
    {
      // Byte code:
      //   0: iconst_0
      //   1: istore_2
      //   2: iconst_0
      //   3: istore_3
      //   4: new 102	java/util/zip/ZipFile
      //   7: dup
      //   8: aload_0
      //   9: getfield 209	org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizard$FileCopyJob:sourceZipFile	Ljava/io/File;
      //   12: iconst_1
      //   13: invokespecial 229	java/util/zip/ZipFile:<init>	(Ljava/io/File;I)V
      //   16: astore 4
      //   18: aload 4
      //   20: invokevirtual 230	java/util/zip/ZipFile:entries	()Ljava/util/Enumeration;
      //   23: astore 5
      //   25: goto +33 -> 58
      //   28: aload 5
      //   30: invokeinterface 244 1 0
      //   35: checkcast 101	java/util/zip/ZipEntry
      //   38: astore 6
      //   40: aload 6
      //   42: invokevirtual 227	java/util/zip/ZipEntry:getName	()Ljava/lang/String;
      //   45: ldc 4
      //   47: invokevirtual 221	java/lang/String:equals	(Ljava/lang/Object;)Z
      //   50: ifeq +5 -> 55
      //   53: iconst_1
      //   54: istore_2
      //   55: iinc 3 1
      //   58: aload 5
      //   60: invokeinterface 243 1 0
      //   65: ifne -37 -> 28
      //   68: goto +13 -> 81
      //   71: astore 7
      //   73: aload 4
      //   75: invokevirtual 228	java/util/zip/ZipFile:close	()V
      //   78: aload 7
      //   80: athrow
      //   81: aload 4
      //   83: invokevirtual 228	java/util/zip/ZipFile:close	()V
      //   86: iload_3
      //   87: ifle +131 -> 218
      //   90: aload_1
      //   91: aload_0
      //   92: getfield 210	org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizard$FileCopyJob:JOB_LABEL	Ljava/lang/String;
      //   95: iload_3
      //   96: invokeinterface 247 3 0
      //   101: invokestatic 233	org/eclipse/core/runtime/jobs/Job:getJobManager	()Lorg/eclipse/core/runtime/jobs/IJobManager;
      //   104: getstatic 207	org/eclipse/mylyn/internal/tasks/core/ITasksCoreConstants:ROOT_SCHEDULING_RULE	Lorg/eclipse/core/runtime/jobs/ISchedulingRule;
      //   107: aload_1
      //   108: invokeinterface 249 3 0
      //   113: aload_1
      //   114: invokeinterface 246 1 0
      //   119: ifeq +21 -> 140
      //   122: invokestatic 233	org/eclipse/core/runtime/jobs/Job:getJobManager	()Lorg/eclipse/core/runtime/jobs/IJobManager;
      //   125: getstatic 207	org/eclipse/mylyn/internal/tasks/core/ITasksCoreConstants:ROOT_SCHEDULING_RULE	Lorg/eclipse/core/runtime/jobs/ISchedulingRule;
      //   128: invokeinterface 248 2 0
      //   133: aload_1
      //   134: invokeinterface 245 1 0
      //   139: return
      //   140: aload_0
      //   141: getfield 209	org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizard$FileCopyJob:sourceZipFile	Ljava/io/File;
      //   144: invokestatic 237	org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin:getDefault	()Lorg/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin;
      //   147: invokevirtual 236	org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin:getDataDirectory	()Ljava/lang/String;
      //   150: aload_1
      //   151: invokestatic 234	org/eclipse/mylyn/internal/commons/core/ZipFileUtil:unzipFiles	(Ljava/io/File;Ljava/lang/String;Lorg/eclipse/core/runtime/IProgressMonitor;)Ljava/util/List;
      //   154: pop
      //   155: iload_2
      //   156: ifne +7 -> 163
      //   159: aload_0
      //   160: invokespecial 239	org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizard$FileCopyJob:renameTaskList	()V
      //   163: aload_0
      //   164: invokespecial 238	org/eclipse/mylyn/internal/tasks/ui/wizards/TaskDataImportWizard$FileCopyJob:readTaskListData	()V
      //   167: goto +51 -> 218
      //   170: astore_2
      //   171: new 105	org/eclipse/core/runtime/Status
      //   174: dup
      //   175: iconst_4
      //   176: ldc 3
      //   178: aload_2
      //   179: invokevirtual 219	java/io/IOException:getMessage	()Ljava/lang/String;
      //   182: aload_2
      //   183: invokespecial 232	org/eclipse/core/runtime/Status:<init>	(ILjava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
      //   186: astore_3
      //   187: new 103	org/eclipse/core/runtime/CoreException
      //   190: dup
      //   191: aload_3
      //   192: invokespecial 231	org/eclipse/core/runtime/CoreException:<init>	(Lorg/eclipse/core/runtime/IStatus;)V
      //   195: athrow
      //   196: astore 8
      //   198: invokestatic 233	org/eclipse/core/runtime/jobs/Job:getJobManager	()Lorg/eclipse/core/runtime/jobs/IJobManager;
      //   201: getstatic 207	org/eclipse/mylyn/internal/tasks/core/ITasksCoreConstants:ROOT_SCHEDULING_RULE	Lorg/eclipse/core/runtime/jobs/ISchedulingRule;
      //   204: invokeinterface 248 2 0
      //   209: aload_1
      //   210: invokeinterface 245 1 0
      //   215: aload 8
      //   217: athrow
      //   218: invokestatic 233	org/eclipse/core/runtime/jobs/Job:getJobManager	()Lorg/eclipse/core/runtime/jobs/IJobManager;
      //   221: getstatic 207	org/eclipse/mylyn/internal/tasks/core/ITasksCoreConstants:ROOT_SCHEDULING_RULE	Lorg/eclipse/core/runtime/jobs/ISchedulingRule;
      //   224: invokeinterface 248 2 0
      //   229: aload_1
      //   230: invokeinterface 245 1 0
      //   235: return
      // Line number table:
      //   Java source line #153	-> byte code offset #0
      //   Java source line #154	-> byte code offset #2
      //   Java source line #157	-> byte code offset #4
      //   Java source line #159	-> byte code offset #18
      //   Java source line #160	-> byte code offset #25
      //   Java source line #161	-> byte code offset #28
      //   Java source line #162	-> byte code offset #40
      //   Java source line #163	-> byte code offset #53
      //   Java source line #165	-> byte code offset #55
      //   Java source line #160	-> byte code offset #58
      //   Java source line #167	-> byte code offset #71
      //   Java source line #168	-> byte code offset #73
      //   Java source line #169	-> byte code offset #78
      //   Java source line #168	-> byte code offset #81
      //   Java source line #171	-> byte code offset #86
      //   Java source line #172	-> byte code offset #90
      //   Java source line #173	-> byte code offset #101
      //   Java source line #175	-> byte code offset #113
      //   Java source line #191	-> byte code offset #122
      //   Java source line #192	-> byte code offset #133
      //   Java source line #176	-> byte code offset #139
      //   Java source line #179	-> byte code offset #140
      //   Java source line #181	-> byte code offset #155
      //   Java source line #182	-> byte code offset #159
      //   Java source line #185	-> byte code offset #163
      //   Java source line #187	-> byte code offset #170
      //   Java source line #188	-> byte code offset #171
      //   Java source line #189	-> byte code offset #187
      //   Java source line #190	-> byte code offset #196
      //   Java source line #191	-> byte code offset #198
      //   Java source line #192	-> byte code offset #209
      //   Java source line #193	-> byte code offset #215
      //   Java source line #191	-> byte code offset #218
      //   Java source line #192	-> byte code offset #229
      //   Java source line #194	-> byte code offset #235
      // Local variable table:
      //   start	length	slot	name	signature
      //   0	236	0	this	FileCopyJob
      //   0	236	1	monitor	org.eclipse.core.runtime.IProgressMonitor
      //   1	155	2	hasDefaultTaskList	boolean
      //   170	13	2	e	java.io.IOException
      //   3	93	3	numEntries	int
      //   186	6	3	status	org.eclipse.core.runtime.Status
      //   16	66	4	zipFile	java.util.zip.ZipFile
      //   23	36	5	entries	java.util.Enumeration<? extends java.util.zip.ZipEntry>
      //   38	3	6	entry	java.util.zip.ZipEntry
      //   71	8	7	localObject1	Object
      //   196	20	8	localObject2	Object
      // Exception table:
      //   from	to	target	type
      //   18	71	71	finally
      //   0	122	170	java/io/IOException
      //   140	167	170	java/io/IOException
      //   0	122	196	finally
      //   140	196	196	finally
    }
    
    private void readTaskListData()
    {
      if (!CoreUtil.TEST_MODE) {
        PlatformUI.getWorkbench().getDisplay().syncExec(new Runnable()
        {
          public void run()
          {
            try
            {
              TasksUiPlugin.getDefault().reloadDataDirectory();
            }
            catch (CoreException e)
            {
              TasksUiInternal.displayStatus(Messages.TaskDataImportWizard_Import_Error, e.getStatus());
            }
          }
        });
      } else {
        TasksUiPlugin.getDefault().initializeDataSources();
      }
    }
    
    private void renameTaskList()
    {
      SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd-HHmmss", 
        Locale.ENGLISH);
      String date = format.format(new Date());
      
      File taskListFile = new File(TasksUiPlugin.getDefault().getDataDirectory(), 
        "tasks.xml.zip");
      if (taskListFile.exists()) {
        taskListFile.renameTo(new File(taskListFile.getParentFile(), taskListFile.getName() + ".backup-" + 
          date));
      }
      File taskListFileSnapshot = new File(TasksUiPlugin.getDefault().getDataDirectory(), 
        ".tasks.xml.zip");
      if (taskListFileSnapshot.exists()) {
        taskListFileSnapshot.renameTo(new File(taskListFile.getParentFile(), taskListFileSnapshot.getName() + 
          ".backup-" + date));
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.tasks.ui.wizards.TaskDataImportWizard
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.mylyn.internal.tasks.ui.wizards;

import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.swt.widgets.Shell;

public class NewAttachmentWizardDialog
  extends WizardDialog
{
  private static final String ATTACHMENT_WIZARD_SETTINGS_SECTION = "PatchWizard";
  
  public NewAttachmentWizardDialog(Shell parent, IWizard wizard, boolean modal)
  {
    super(parent, wizard);
    if (modal) {
      setShellStyle(getShellStyle() | 0x10);
    } else {
      setShellStyle(2160);
    }
    setMinimumPageSize(600, 300);
    setPageSize(600, 300);
    setBlockOnOpen(modal);
  }
  
  protected IDialogSettings getDialogBoundsSettings()
  {
    IDialogSettings settings = TasksUiPlugin.getDefault().getDialogSettings();
    IDialogSettings section = settings.getSection("PatchWizard");
    if (section == null) {
      section = settings.addNewSection("PatchWizard");
    }
    return section;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.tasks.ui.wizards.NewAttachmentWizardDialog
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.mylyn.internal.tasks.ui.notifications;

import java.util.ArrayList;
import java.util.List;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.mylyn.commons.notifications.ui.AbstractUiNotification;
import org.eclipse.mylyn.commons.ui.CommonUiUtil;
import org.eclipse.mylyn.commons.workbench.AbstractWorkbenchNotificationPopup;
import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
import org.eclipse.mylyn.internal.tasks.core.data.TaskDataManager;
import org.eclipse.mylyn.internal.tasks.ui.TaskScalingHyperlink;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.forms.FormColors;
import org.eclipse.ui.forms.events.HyperlinkAdapter;
import org.eclipse.ui.forms.events.HyperlinkEvent;

public class TaskListNotificationPopup
  extends AbstractWorkbenchNotificationPopup
{
  private static final String NOTIFICATIONS_HIDDEN = Messages.TaskListNotificationPopup_more;
  private static final int NUM_NOTIFICATIONS_TO_DISPLAY = 4;
  private List<AbstractUiNotification> notifications;
  
  public TaskListNotificationPopup(Shell parent)
  {
    super(parent.getDisplay());
  }
  
  public void setContents(List<AbstractUiNotification> notifications)
  {
    this.notifications = notifications;
  }
  
  public List<AbstractUiNotification> getNotifications()
  {
    return new ArrayList(notifications);
  }
  
  protected void createTitleArea(Composite parent)
  {
    super.createTitleArea(parent);
  }
  
  protected Color getTitleForeground()
  {
    return TasksUiPlugin.getDefault().getFormColors(Display.getDefault()).getColor("org.eclipse.ui.forms.TITLE");
  }
  
  protected void createContentArea(Composite parent)
  {
    int count = 0;
    for (final AbstractUiNotification notification : notifications)
    {
      Composite notificationComposite = new Composite(parent, 524288);
      GridLayout gridLayout = new GridLayout(2, false);
      GridDataFactory.fillDefaults().grab(true, false).align(4, 128).applyTo(notificationComposite);
      notificationComposite.setLayout(gridLayout);
      notificationComposite.setBackground(parent.getBackground());
      if (count < 4)
      {
        final Label notificationLabelIcon = new Label(notificationComposite, 524288);
        notificationLabelIcon.setBackground(parent.getBackground());
        notificationLabelIcon.setImage(notification.getNotificationKindImage());
        if (!(notification instanceof TaskListNotificationReminder))
        {
          final AbstractTask task = (AbstractTask)notification.getAdapter(AbstractTask.class);
          if (task != null)
          {
            notificationLabelIcon.addMouseListener(new MouseAdapter()
            {
              public void mouseUp(MouseEvent e)
              {
                TasksUiPlugin.getTaskDataManager().setTaskRead(task, true);
                notificationLabelIcon.setImage(null);
                notificationLabelIcon.setToolTipText(null);
              }
            });
            notificationLabelIcon.setToolTipText(Messages.TaskListNotificationPopup_Mark_Task_Read);
          }
        }
        TaskScalingHyperlink itemLink = new TaskScalingHyperlink(notificationComposite, 524289);
        
        GridDataFactory.fillDefaults().grab(true, false).align(4, 128).applyTo(itemLink);
        
        itemLink.setText(CommonUiUtil.toLabel(notification.getLabel()));
        itemLink.setImage(notification.getNotificationImage());
        itemLink.setBackground(parent.getBackground());
        itemLink.addHyperlinkListener(new HyperlinkAdapter()
        {
          public void linkActivated(HyperlinkEvent e)
          {
            notification.open();
            IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
            if (window != null)
            {
              Shell windowShell = window.getShell();
              if (windowShell != null)
              {
                if (windowShell.getMinimized()) {
                  windowShell.setMinimized(false);
                }
                windowShell.open();
                windowShell.forceActive();
              }
            }
          }
        });
        String descriptionText = null;
        if (notification.getDescription() != null) {
          descriptionText = notification.getDescription();
        }
        if ((descriptionText != null) && (!descriptionText.trim().equals("")))
        {
          Label descriptionLabel = new Label(notificationComposite, 524288);
          descriptionLabel.setText(CommonUiUtil.toLabel(descriptionText));
          descriptionLabel.setBackground(parent.getBackground());
          GridDataFactory.fillDefaults()
            .span(2, -1)
            .grab(true, false)
            .align(4, 128)
            .applyTo(descriptionLabel);
        }
      }
      else
      {
        int numNotificationsRemain = notifications.size() - count;
        TaskScalingHyperlink remainingHyperlink = new TaskScalingHyperlink(notificationComposite, 524288);
        remainingHyperlink.setBackground(parent.getBackground());
        
        remainingHyperlink.setText(numNotificationsRemain + " " + NOTIFICATIONS_HIDDEN);
        GridDataFactory.fillDefaults().span(2, -1).applyTo(remainingHyperlink);
        remainingHyperlink.addHyperlinkListener(new HyperlinkAdapter()
        {
          public void linkActivated(HyperlinkEvent e)
          {
            TasksUiUtil.openTasksViewInActivePerspective().setFocus();
            IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
            if (window != null)
            {
              Shell windowShell = window.getShell();
              if (windowShell != null)
              {
                windowShell.setMaximized(true);
                windowShell.open();
              }
            }
          }
        });
        break;
      }
      count++;
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.tasks.ui.notifications.TaskListNotificationPopup
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.mylyn.internal.tasks.ui.notifications;

import org.eclipse.mylyn.commons.ui.CommonImages;
import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
import org.eclipse.swt.graphics.Image;

public class TaskListNotificationReminder
  extends TaskListNotification
{
  private static final String ID_EVENT_TASK_DUE = "org.eclipse.mylyn.tasks.ui.events.TaskDue";
  
  public TaskListNotificationReminder(AbstractTask task)
  {
    super("org.eclipse.mylyn.tasks.ui.events.TaskDue", task);
  }
  
  public Image getNotificationKindImage()
  {
    return CommonImages.getImage(CommonImages.OVERLAY_DATE_DUE);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.tasks.ui.notifications.TaskListNotificationReminder
 * Java Class Version: 5 (49.0)
 * JD-Core Version:    0.7.1
 */
package org.eclipse.mylyn.internal.tasks.ui.notifications;

import java.text.MessageFormat;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import org.eclipse.mylyn.internal.tasks.core.data.TaskAttributeDiff;
import org.eclipse.mylyn.internal.tasks.core.data.TaskDataDiff;
import org.eclipse.mylyn.tasks.core.IRepositoryPerson;
import org.eclipse.mylyn.tasks.core.ITaskComment;
import org.eclipse.mylyn.tasks.core.data.ITaskAttributeDiff;
import org.eclipse.swt.graphics.Drawable;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Composite;

public class TaskDiffUtil
{
  private static final int MAX_CHANGED_ATTRIBUTES = 2;
  private static final String ELLIPSIS = "...";
  private static int DRAW_FLAGS = 15;
  
  public static String toString(TaskDataDiff diff)
  {
    return toString(diff, 60, true);
  }
  
  public static String toString(TaskDataDiff diff, int maxWidth, boolean includeNewest)
  {
    StringBuilder sb = new StringBuilder();
    String sep = "";
    
    int newCommentCount = diff.getNewComments().size();
    if (newCommentCount > 0)
    {
      Iterator<ITaskComment> iter = diff.getNewComments().iterator();
      ITaskComment comment = (ITaskComment)iter.next();
      if (includeNewest) {
        while (iter.hasNext()) {
          comment = (ITaskComment)iter.next();
        }
      }
      sb.append(trim(commentToString(comment), 60));
      if (newCommentCount > 1) {
        sb.append(" (" + (newCommentCount - 1) + Messages.TaskDataDiff_more_);
      }
      sep = "\n";
    }
    int n = 0;
    for (ITaskAttributeDiff changedAttribute : diff.getChangedAttributes())
    {
      TaskAttributeDiff attributeDiff = (TaskAttributeDiff)changedAttribute;
      String label = attributeDiff.getLabel();
      if (label != null)
      {
        sb.append(sep);
        sb.append(" ");
        sb.append(label);
        sb.append(" ");
        sb.append(trim(listToString(attributeDiff.getRemovedValues()), 28));
        sb.append(" -> ");
        sb.append(trim(listToString(attributeDiff.getAddedValues()), 28));
        n++;
        if (n == 2) {
          break;
        }
        sep = "\n";
      }
    }
    return sb.toString();
  }
  
  public static String commentToString(ITaskComment comment)
  {
    StringBuilder sb = new StringBuilder();
    sb.append(MessageFormat.format(Messages.TaskDiffUtil_Comment_by_X, new Object[] { personToString(comment.getAuthor()) }));
    sb.append(": ");
    sb.append(cleanCommentText(comment.getText()));
    return sb.toString();
  }
  
  private static String personToString(IRepositoryPerson author)
  {
    if (author == null) {
      return Messages.TaskDiffUtil_Unknown;
    }
    if (author.getName() != null) {
      return author.getName();
    }
    return author.getPersonId();
  }
  
  public static String cleanCommentText(String value)
  {
    String text = "";
    String[] lines = value.split("\n");
    boolean attachment = false;
    boolean needSeparator = false;
    String[] arrayOfString1;
    int j = (arrayOfString1 = lines).length;
    for (int i = 0; i < j; i++)
    {
      String line = arrayOfString1[i];
      if (attachment)
      {
        text = text + Messages.TaskDiffUtil_attachment + line;
        needSeparator = true;
        attachment = false;
      }
      else if ((line.startsWith(">")) || 
        (line.matches("^\\s*\\(In reply to comment.*")))
      {
        needSeparator = true;
      }
      else if (line.startsWith("Created an attachment (id="))
      {
        attachment = true;
      }
      else
      {
        if ((needSeparator) && 
          (!text.matches(".*\\p{Punct}\\s*")))
        {
          text = text.trim();
          if (text.length() > 0) {
            text = text + ".";
          }
        }
        text = text + " " + line;
        attachment = false;
        needSeparator = false;
      }
    }
    return foldSpaces(text);
  }
  
  public static String listToString(List<String> values)
  {
    if (values == null) {
      return "";
    }
    StringBuilder sb = new StringBuilder();
    boolean first = true;
    for (String value : values)
    {
      if (!first) {
        sb.append(", ");
      } else {
        first = false;
      }
      sb.append(foldSpaces(value));
    }
    return sb.toString();
  }
  
  public static String foldSpaces(String value)
  {
    return value.replaceAll("\\s+", " ").trim();
  }
  
  public static String trim(String value, int length)
  {
    if (value.length() > length) {
      value = value.substring(0, length - 3) + "...";
    }
    return value;
  }
  
  public static final String shortenText2(Composite composite, String t, int width)
  {
    GC gc = new GC(composite);
    if (t == null) {
      return null;
    }
    int w = textExtent"..."DRAW_FLAGSx;
    if (width <= w) {
      return t;
    }
    int l = t.length();
    int max = l / 2;
    int min = 0;
    int mid = (max + min) / 2 - 1;
    if (mid <= 0) {
      return t;
  
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

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-2019. Infinite Loop Ltd