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

 task);
      }
    }
    return false;
  }
  
  public static boolean canDownloadAttachment(ITask task)
  {
    TaskRepository repository = TasksUi.getRepositoryManager().getRepository(task.getConnectorKind(), 
      task.getRepositoryUrl());
    if (repository != null)
    {
      AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
        repository.getConnectorKind());
      AbstractTaskAttachmentHandler attachmentHandler = connector.getTaskAttachmentHandler();
      if (attachmentHandler != null) {
        return attachmentHandler.canGetContent(repository, task);
      }
    }
    return false;
  }
  
  /* Error */
  public static void downloadAttachment(ITaskAttachment attachment, java.io.OutputStream out, IProgressMonitor monitor)
    throws CoreException
  {
    // Byte code:
    //   0: aload_2
    //   1: getstatic 505	org/eclipse/mylyn/internal/tasks/ui/util/Messages:AttachmentUtil_Downloading_attachment	Ljava/lang/String;
    //   4: iconst_m1
    //   5: invokeinterface 580 3 0
    //   10: invokestatic 564	org/eclipse/mylyn/tasks/ui/TasksUi:getRepositoryManager	()Lorg/eclipse/mylyn/tasks/core/IRepositoryManager;
    //   13: aload_0
    //   14: invokeinterface 593 1 0
    //   19: invokeinterface 587 2 0
    //   24: astore_3
    //   25: aload_3
    //   26: invokevirtual 549	org/eclipse/mylyn/tasks/core/AbstractRepositoryConnector:getTaskAttachmentHandler	()Lorg/eclipse/mylyn/tasks/core/data/AbstractTaskAttachmentHandler;
    //   29: astore 4
    //   31: aload 4
    //   33: ifnonnull +27 -> 60
    //   36: new 263	org/eclipse/core/runtime/CoreException
    //   39: dup
    //   40: new 287	org/eclipse/mylyn/tasks/core/RepositoryStatus
    //   43: dup
    //   44: iconst_1
    //   45: ldc_w 247
    //   48: bipush 7
    //   50: ldc_w 239
    //   53: invokespecial 550	org/eclipse/mylyn/tasks/core/RepositoryStatus:<init>	(ILjava/lang/String;ILjava/lang/String;)V
    //   56: invokespecial 529	org/eclipse/core/runtime/CoreException:<init>	(Lorg/eclipse/core/runtime/IStatus;)V
    //   59: athrow
    //   60: aload 4
    //   62: aload_0
    //   63: invokeinterface 598 1 0
    //   68: aload_0
    //   69: invokeinterface 597 1 0
    //   74: aload_0
    //   75: invokeinterface 599 1 0
    //   80: aload_2
    //   81: invokevirtual 558	org/eclipse/mylyn/tasks/core/data/AbstractTaskAttachmentHandler:getContent	(Lorg/eclipse/mylyn/tasks/core/TaskRepository;Lorg/eclipse/mylyn/tasks/core/ITask;Lorg/eclipse/mylyn/tasks/core/data/TaskAttribute;Lorg/eclipse/core/runtime/IProgressMonitor;)Ljava/io/InputStream;
    //   84: astore 5
    //   86: sipush 1024
    //   89: newarray <illegal type>
    //   91: astore 6
    //   93: aload_2
    //   94: invokestatic 533	org/eclipse/mylyn/commons/net/Policy:checkCanceled	(Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   97: aload 5
    //   99: aload 6
    //   101: invokevirtual 511	java/io/InputStream:read	([B)I
    //   104: istore 7
    //   106: iload 7
    //   108: iconst_m1
    //   109: if_icmpne +39 -> 148
    //   112: aload 5
    //   114: invokevirtual 510	java/io/InputStream:close	()V
    //   117: goto +24 -> 141
    //   120: astore 9
    //   122: new 266	org/eclipse/core/runtime/Status
    //   125: dup
    //   126: iconst_4
    //   127: ldc_w 246
    //   130: ldc_w 237
    //   133: aload 9
    //   135: invokespecial 531	org/eclipse/core/runtime/Status:<init>	(ILjava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
    //   138: invokestatic 532	org/eclipse/mylyn/commons/core/StatusHandler:log	(Lorg/eclipse/core/runtime/IStatus;)V
    //   141: aload_2
    //   142: invokeinterface 579 1 0
    //   147: return
    //   148: aload_1
    //   149: aload 6
    //   151: iconst_0
    //   152: iload 7
    //   154: invokevirtual 512	java/io/OutputStream:write	([BII)V
    //   157: goto -64 -> 93
    //   160: astore 6
    //   162: new 263	org/eclipse/core/runtime/CoreException
    //   165: dup
    //   166: new 287	org/eclipse/mylyn/tasks/core/RepositoryStatus
    //   169: dup
    //   170: aload_0
    //   171: invokeinterface 598 1 0
    //   176: iconst_4
    //   177: ldc_w 247
    //   180: iconst_5
    //   181: new 255	java/lang/StringBuilder
    //   184: dup
    //   185: ldc_w 238
    //   188: invokespecial 520	java/lang/StringBuilder:<init>	(Ljava/lang/String;)V
    //   191: aload 6
    //   193: invokevirtual 509	java/io/IOException:getMessage	()Ljava/lang/String;
    //   196: invokevirtual 521	java/lang/StringBuilder:append	(Ljava/lang/String;)Ljava/lang/StringBuilder;
    //   199: invokevirtual 519	java/lang/StringBuilder:toString	()Ljava/lang/String;
    //   202: aload 6
    //   204: invokespecial 551	org/eclipse/mylyn/tasks/core/RepositoryStatus:<init>	(Lorg/eclipse/mylyn/tasks/core/TaskRepository;ILjava/lang/String;ILjava/lang/String;Ljava/lang/Throwable;)V
    //   207: invokespecial 529	org/eclipse/core/runtime/CoreException:<init>	(Lorg/eclipse/core/runtime/IStatus;)V
    //   210: athrow
    //   211: astore 8
    //   213: aload 5
    //   215: invokevirtual 510	java/io/InputStream:close	()V
    //   218: goto +24 -> 242
    //   221: astore 9
    //   223: new 266	org/eclipse/core/runtime/Status
    //   226: dup
    //   227: iconst_4
    //   228: ldc_w 246
    //   231: ldc_w 237
    //   234: aload 9
    //   236: invokespecial 531	org/eclipse/core/runtime/Status:<init>	(ILjava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
    //   239: invokestatic 532	org/eclipse/mylyn/commons/core/StatusHandler:log	(Lorg/eclipse/core/runtime/IStatus;)V
    //   242: aload 8
    //   244: athrow
    //   245: astore 10
    //   247: aload_2
    //   248: invokeinterface 579 1 0
    //   253: aload 10
    //   255: athrow
    // Line number table:
    //   Java source line #267	-> byte code offset #0
    //   Java source line #269	-> byte code offset #10
    //   Java source line #270	-> byte code offset #13
    //   Java source line #269	-> byte code offset #19
    //   Java source line #271	-> byte code offset #25
    //   Java source line #272	-> byte code offset #31
    //   Java source line #273	-> byte code offset #36
    //   Java source line #274	-> byte code offset #48
    //   Java source line #273	-> byte code offset #56
    //   Java source line #277	-> byte code offset #60
    //   Java source line #278	-> byte code offset #74
    //   Java source line #277	-> byte code offset #81
    //   Java source line #280	-> byte code offset #86
    //   Java source line #282	-> byte code offset #93
    //   Java source line #283	-> byte code offset #97
    //   Java source line #284	-> byte code offset #106
    //   Java source line #295	-> byte code offset #112
    //   Java source line #296	-> byte code offset #120
    //   Java source line #297	-> byte code offset #122
    //   Java source line #298	-> byte code offset #130
    //   Java source line #297	-> byte code offset #135
    //   Java source line #302	-> byte code offset #141
    //   Java source line #285	-> byte code offset #147
    //   Java source line #287	-> byte code offset #148
    //   Java source line #281	-> byte code offset #157
    //   Java source line #289	-> byte code offset #160
    //   Java source line #290	-> byte code offset #162
    //   Java source line #291	-> byte code offset #177
    //   Java source line #292	-> byte code offset #191
    //   Java source line #290	-> byte code offset #207
    //   Java source line #293	-> byte code offset #211
    //   Java source line #295	-> byte code offset #213
    //   Java source line #296	-> byte code offset #221
    //   Java source line #297	-> byte code offset #223
    //   Java source line #298	-> byte code offset #231
    //   Java source line #297	-> byte code offset #236
    //   Java source line #300	-> byte code offset #242
    //   Java source line #301	-> byte code offset #245
    //   Java source line #302	-> byte code offset #247
    //   Java source line #303	-> byte code offset #253
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	256	0	attachment	ITaskAttachment
    //   0	256	1	out	java.io.OutputStream
    //   0	256	2	monitor	IProgressMonitor
    //   24	2	3	connector	AbstractRepositoryConnector
    //   29	32	4	handler	AbstractTaskAttachmentHandler
    //   84	130	5	in	java.io.InputStream
    //   91	9	6	buffer	byte[]
    //   148	2	6	buffer	byte[]
    //   160	43	6	e	java.io.IOException
    //   104	3	7	count	int
    //   148	5	7	count	int
    //   211	32	8	localObject1	Object
    //   120	14	9	e	java.io.IOException
    //   221	14	9	e	java.io.IOException
    //   245	9	10	localObject2	Object
    // Exception table:
    //   from	to	target	type
    //   112	117	120	java/io/IOException
    //   86	112	160	java/io/IOException
    //   148	160	160	java/io/IOException
    //   86	112	211	finally
    //   148	211	211	finally
    //   213	218	221	java/io/IOException
    //   0	141	245	finally
    //   148	245	245	finally
  }
  
  public static ITaskAttachment getSelectedAttachment()
  {
    List<ITaskAttachment> attachments = getSelectedAttachments(null);
    if (attachments.isEmpty()) {
      return null;
    }
    return (ITaskAttachment)attachments.get(0);
  }
  
  public static List<ITaskAttachment> getSelectedAttachments(ExecutionEvent event)
  {
    if (event == null)
    {
      IHandlerService service = (IHandlerService)PlatformUI.getWorkbench().getService(IHandlerService.class);
      if (service != null) {
        event = new ExecutionEvent(null, Collections.emptyMap(), null, service.getCurrentState());
      } else {
        return Collections.emptyList();
      }
    }
    ISelection selection = HandlerUtil.getActiveMenuSelection(event);
    if ((selection == null) || (selection.isEmpty())) {
      selection = HandlerUtil.getCurrentSelection(event);
    }
    if (((selection instanceof IStructuredSelection)) && (!selection.isEmpty()))
    {
      List<?> items = ((IStructuredSelection)selection).toList();
      List<ITaskAttachment> attachments = new ArrayList();
      for (Object item : items) {
        if ((item instanceof ITaskAttachment)) {
          attachments.add((ITaskAttachment)item);
        }
      }
      return attachments;
    }
    return Collections.emptyList();
  }
  
  @Deprecated
  public static List<ITaskAttachment> getSelectedAttachments()
  {
    IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    if (window != null)
    {
      ISelection windowSelection = window.getSelectionService().getSelection();
      if (((windowSelection instanceof IStructuredSelection)) && (!windowSelection.isEmpty()))
      {
        IStructuredSelection selection = (IStructuredSelection)windowSelection;
        List<?> items = selection.toList();
        
        List<ITaskAttachment> attachments = new ArrayList();
        for (Object item : items) {
          if ((item instanceof ITaskAttachment)) {
            attachments.add((ITaskAttachment)item);
          }
        }
        return attachments;
      }
    }
    return Collections.emptyList();
  }
  
  public static String getAttachmentFilename(ITaskAttachment attachment)
  {
    String name = attachment.getFileName();
    if ((name == null) || ("".equals(name)))
    {
      String ctype = attachment.getContentType();
      if (ctype.endsWith("html")) {
        name = "attachment.html";
      } else if (ctype.startsWith("text")) {
        name = "attachment.txt";
      } else if (ctype.endsWith("octet-stream")) {
        name = "attachment";
      } else if (ctype.endsWith("zip")) {
        name = "attachment.zip";
      } else {
        name = "attachment." + ctype.substring(ctype.indexOf("/") + 1);
      }
    }
    return name;
  }
}

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

import org.eclipse.core.runtime.Assert;
import org.eclipse.ui.IMemento;

public class SortCriterion
{
  private SortKey key;
  private int direction;
  private static final String MEMENTO_KEY_SORT_KEY = "sortKey";
  private static final String MEMENTO_KEY_SORT_DIRECTION = "sortDirection";
  
  public static enum SortKey
  {
    NONE,  DATE_CREATED,  PRIORITY,  RANK,  SUMMARY,  TASK_ID,  TASK_TYPE,  DUE_DATE,  MODIFICATION_DATE;
    
    public static SortKey valueOfLabel(String label)
    {
      SortKey[] arrayOfSortKey;
      int j = (arrayOfSortKey = values()).length;
      for (int i = 0; i < j; i++)
      {
        SortKey value = arrayOfSortKey[i];
        if (value.getLabel().equals(label)) {
          return value;
        }
      }
      return null;
    }
    
    public String getLabel()
    {
      switch (this)
      {
      case DATE_CREATED: 
        return Messages.SortKindEntry_None;
      case MODIFICATION_DATE: 
        return Messages.SortKindEntry_Priority;
      case PRIORITY: 
        return Messages.SortKindEntry_Summary;
      case NONE: 
        return Messages.SortKindEntry_Rank;
      case DUE_DATE: 
        return Messages.SortKindEntry_Date_Created;
      case RANK: 
        return Messages.SortKindEntry_Task_ID;
      case SUMMARY: 
        return Messages.SortCriterion_Type;
      case TASK_ID: 
        return Messages.SortKindEntry_Due_Date;
      case TASK_TYPE: 
        return Messages.SortCriterion_Modification_Date;
      }
      return null;
    }
  }
  
  private static final SortKey DEFAULT_SORT_KIND = SortKey.NONE;
  private static final int DEFAULT_SORT_DIRECTION = 1;
  public static final int kindCount = SortKey.values().length - 1;
  
  public SortCriterion()
  {
    key = DEFAULT_SORT_KIND;
    direction = 1;
  }
  
  public SortCriterion(SortKey kind, int sortDirection)
  {
    key = kind;
    direction = sortDirection;
  }
  
  public SortKey getKey()
  {
    return key;
  }
  
  public void setKey(SortKey kind)
  {
    Assert.isNotNull(kind);
    key = kind;
  }
  
  public int getDirection()
  {
    return direction;
  }
  
  public void setDirection(int sortDirection)
  {
    Assert.isTrue((sortDirection == -1) || (sortDirection == 1));
    direction = sortDirection;
  }
  
  private SortKey getSortKey(IMemento memento, String key, SortKey defaultValue)
  {
    String value = memento.getString(key);
    if (value != null) {
      try
      {
        return SortKey.valueOf(value);
      }
      catch (IllegalArgumentException localIllegalArgumentException) {}
    }
    return defaultValue;
  }
  
  private int getSortDirection(IMemento memento, String key, int defaultValue)
  {
    Integer value = memento.getInteger(key);
    if (value != null) {
      return value.intValue() >= 0 ? 1 : -1;
    }
    return defaultValue;
  }
  
  public void restoreState(IMemento memento)
  {
    setKey(getSortKey(memento, "sortKey", DEFAULT_SORT_KIND));
    setDirection(getSortDirection(memento, "sortDirection", 1));
  }
  
  public void saveState(IMemento memento)
  {
    memento.putString("sortKey", getKey().name());
    memento.putInteger("sortDirection", getDirection());
  }
}

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

import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.SWTError;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Shell;

@Deprecated
public class WebBrowserDialog
  extends MessageDialog
{
  private String data = null;
  private static Boolean browserAvailable;
  
  public WebBrowserDialog(Shell parentShell, String dialogTitle, Image dialogTitleImage, String dialogMessage, int dialogImageType, String[] dialogButtonLabels, int defaultIndex, String data)
  {
    super(parentShell, dialogTitle, dialogTitleImage, dialogMessage, dialogImageType, dialogButtonLabels, defaultIndex);
    this.data = data;
    setShellStyle(1264);
  }
  
  /* Error */
  public static int openAcceptAgreement(Shell parent, String title, String message, String data)
  {
    // Byte code:
    //   0: aload_0
    //   1: invokestatic 185	org/eclipse/mylyn/internal/tasks/ui/util/WebBrowserDialog:isInternalBrowserAvailable	(Lorg/eclipse/swt/widgets/Composite;)Z
    //   4: ifeq +35 -> 39
    //   7: new 92	org/eclipse/mylyn/internal/tasks/ui/util/WebBrowserDialog
    //   10: dup
    //   11: aload_0
    //   12: aload_1
    //   13: aconst_null
    //   14: aload_2
    //   15: iconst_0
    //   16: iconst_1
    //   17: anewarray 85	java/lang/String
    //   20: dup
    //   21: iconst_0
    //   22: getstatic 162	org/eclipse/jface/dialogs/IDialogConstants:OK_LABEL	Ljava/lang/String;
    //   25: aastore
    //   26: iconst_0
    //   27: aload_3
    //   28: invokespecial 186	org/eclipse/mylyn/internal/tasks/ui/util/WebBrowserDialog:<init>	(Lorg/eclipse/swt/widgets/Shell;Ljava/lang/String;Lorg/eclipse/swt/graphics/Image;Ljava/lang/String;I[Ljava/lang/String;ILjava/lang/String;)V
    //   31: astore 4
    //   33: aload 4
    //   35: invokevirtual 183	org/eclipse/mylyn/internal/tasks/ui/util/WebBrowserDialog:open	()I
    //   38: ireturn
    //   39: aconst_null
    //   40: astore 4
    //   42: ldc 3
    //   44: ldc 1
    //   46: invokestatic 174	java/io/File:createTempFile	(Ljava/lang/String;Ljava/lang/String;)Ljava/io/File;
    //   49: astore 4
    //   51: aload 4
    //   53: invokevirtual 171	java/io/File:deleteOnExit	()V
    //   56: new 80	java/io/BufferedWriter
    //   59: dup
    //   60: new 82	java/io/FileWriter
    //   63: dup
    //   64: aload 4
    //   66: invokespecial 175	java/io/FileWriter:<init>	(Ljava/io/File;)V
    //   69: invokespecial 169	java/io/BufferedWriter:<init>	(Ljava/io/Writer;)V
    //   72: astore 5
    //   74: aload 5
    //   76: aload_2
    //   77: invokevirtual 170	java/io/BufferedWriter:write	(Ljava/lang/String;)V
    //   80: goto +13 -> 93
    //   83: astore 6
    //   85: aload 5
    //   87: invokevirtual 168	java/io/BufferedWriter:close	()V
    //   90: aload 6
    //   92: athrow
    //   93: aload 5
    //   95: invokevirtual 168	java/io/BufferedWriter:close	()V
    //   98: goto +35 -> 133
    //   101: astore 5
    //   103: aload 4
    //   105: ifnull +9 -> 114
    //   108: aload 4
    //   110: invokevirtual 172	java/io/File:delete	()Z
    //   113: pop
    //   114: new 87	org/eclipse/core/runtime/Status
    //   117: dup
    //   118: iconst_4
    //   119: ldc 4
    //   121: ldc 2
    //   123: aload 5
    //   125: invokespecial 179	org/eclipse/core/runtime/Status:<init>	(ILjava/lang/String;Ljava/lang/String;Ljava/lang/Throwable;)V
    //   128: invokestatic 181	org/eclipse/mylyn/commons/core/StatusHandler:log	(Lorg/eclipse/core/runtime/IStatus;)V
    //   131: iconst_1
    //   132: ireturn
    //   133: aload 4
    //   135: invokevirtual 173	java/io/File:toURI	()Ljava/net/URI;
    //   138: invokevirtual 178	java/net/URI:toString	()Ljava/lang/String;
    //   141: sipush 128
    //   144: invokestatic 182	org/eclipse/mylyn/commons/workbench/browser/BrowserUtil:openUrl	(Ljava/lang/String;I)V
    //   147: iconst_0
    //   148: ireturn
    // Line number table:
    //   Java source line #60	-> byte code offset #0
    //   Java source line #61	-> byte code offset #7
    //   Java source line #62	-> byte code offset #14
    //   Java source line #61	-> byte code offset #28
    //   Java source line #64	-> byte code offset #33
    //   Java source line #66	-> byte code offset #39
    //   Java source line #68	-> byte code offset #42
    //   Java source line #69	-> byte code offset #51
    //   Java source line #70	-> byte code offset #56
    //   Java source line #72	-> byte code offset #74
    //   Java source line #73	-> byte code offset #83
    //   Java source line #74	-> byte code offset #85
    //   Java source line #75	-> byte code offset #90
    //   Java source line #74	-> byte code offset #93
    //   Java source line #76	-> byte code offset #101
    //   Java source line #77	-> byte code offset #103
    //   Java source line #78	-> byte code offset #108
    //   Java source line #80	-> byte code offset #114
    //   Java source line #81	-> byte code offset #121
    //   Java source line #80	-> byte code offset #125
    //   Java source line #82	-> byte code offset #131
    //   Java source line #84	-> byte code offset #133
    //   Java source line #85	-> byte code offset #147
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	149	0	parent	Shell
    //   0	149	1	title	String
    //   0	149	2	message	String
    //   0	149	3	data	String
    //   31	3	4	dialog	WebBrowserDialog
    //   40	94	4	file	java.io.File
    //   72	22	5	writer	java.io.BufferedWriter
    //   101	23	5	e	java.io.IOException
    //   83	8	6	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   74	83	83	finally
    //   42	98	101	java/io/IOException
  }
  
  public Control createCustomArea(Composite parent)
  {
    GridLayout layout = new GridLayout();
    parent.setLayout(layout);
    numColumns = 1;
    
    Browser b = new Browser(parent, 0);
    GridData gd = new GridData(1808);
    horizontalSpan = 1;
    verticalSpan = 50;
    b.setLayoutData(gd);
    b.setText(data);
    
    return parent;
  }
  
  private static synchronized boolean isInternalBrowserAvailable(Composite composite)
  {
    if (browserAvailable == null) {
      try
      {
        Browser browser = new Browser(composite, 0);
        browser.dispose();
        browserAvailable = Boolean.valueOf(true);
      }
      catch (SWTError localSWTError)
      {
        browserAvailable = Boolean.valueOf(false);
      }
    }
    return browserAvailable.booleanValue();
  }
}

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

import org.eclipse.core.expressions.PropertyTester;
import org.eclipse.mylyn.tasks.core.ITaskAttachment;

public class TaskAttachmentPropertyTester
  extends PropertyTester
{
  private static final String PROPERTY_IS_CONTEXT = "isContext";
  private static final String PROPERTY_HAS_URL = "hasUrl";
  
  private boolean equals(boolean value, Object expectedValue)
  {
    return new Boolean(value).equals(expectedValue);
  }
  
  public boolean test(Object receiver, String property, Object[] args, Object expectedValue)
  {
    if ((receiver instanceof ITaskAttachment))
    {
      ITaskAttachment taskAttachment = (ITaskAttachment)receiver;
      if ("isContext".equals(property)) {
        return equals(AttachmentUtil.isContext(taskAttachment), expectedValue);
      }
      if ("hasUrl".equals(property)) {
        return equals((taskAttachment.getUrl() != null) && (taskAttachment.getUrl().length() > 0), expectedValue);
      }
    }
    return false;
  }
}

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

import org.eclipse.swt.dnd.Clipboard;
import org.eclipse.swt.dnd.TextTransfer;
import org.eclipse.swt.dnd.Transfer;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;

class CopyAttachmentToClipboardJob$1
  implements Runnable
{
  CopyAttachmentToClipboardJob$1(CopyAttachmentToClipboardJob paramCopyAttachmentToClipboardJob, String paramString) {}
  
  public void run()
  {
    Clipboard clipboard = new Clipboard(PlatformUI.getWorkbench().getDisplay());
    clipboard.setContents(new Object[] { val$contents }, new Transfer[] { TextTransfer.getInstance() });
    clipboard.dispose();
  }
}

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

import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.ProgressMonitorWrapper;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;

class TasksUiInternal$1
  extends ProgressMonitorWrapper
{
  TasksUiInternal$1(IProgressMonitor $anonymous0)
  {
    super($anonymous0);
  }
  
  public void beginTask(final String name, final int totalWork)
  {
    PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable()
    {
      public void run()
      {
        getWrappedProgressMonitor().beginTask(name, totalWork);
      }
    });
  }
  
  public void done()
  {
    PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable()
    {
      public void run()
      {
        getWrappedProgressMonitor().done();
      }
    });
  }
  
  public void subTask(final String name)
  {
    PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable()
    {
      public void run()
      {
        getWrappedProgressMonitor().subTask(name);
      }
    });
  }
  
  public void worked(final int work)
  {
    PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable()
    {
      public void run()
      {
        getWrappedProgressMonitor().worked(work);
      }
    });
  }
}

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

import org.eclipse.core.runtime.IStatus;

class TasksUiInternal$10
  implements Runnable
{
  TasksUiInternal$10(String paramString, IStatus paramIStatus) {}
  
  public void run()
  {
    TasksUiInternal.logAndDisplayStatus(val$title, val$status);
  }
}

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

import org.eclipse.core.runtime.IProgressMonitor;

class TasksUiInternal$1$1
  implements Runnable
{
  TasksUiInternal$1$1(TasksUiInternal.1 param1, String paramString, int paramInt) {}
  
  public void run()
  {
    this$1.getWrappedProgressMonitor().beginTask(val$name, val$totalWork);
  }
}

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

import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.JobChangeAdapter;
import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
import org.eclipse.mylyn.tasks.core.ITask;

class TasksUiInternal$8
  extends JobChangeAdapter
{
  TasksUiInternal$8(ITask paramITask) {}
  
  public void done(IJobChangeEvent event)
  {
    if (((val$task instanceof AbstractTask)) && (((AbstractTask)val$task).getStatus() != null)) {
      TasksUiInternal.asyncLogAndDisplayStatus(Messages.TasksUiInternal_Task_Synchronization_Failed, 
        ((AbstractTask)val$task).getStatus());
    }
  }
}

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

import java.util.List;
import org.eclipse.core.runtime.ISafeRunnable;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.SafeRunner;
import org.eclipse.core.runtime.Status;
import org.eclipse.mylyn.commons.core.ExtensionPointReader;
import org.eclipse.mylyn.commons.core.StatusHandler;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.mylyn.tasks.ui.TaskDropListener;
import org.eclipse.mylyn.tasks.ui.TaskDropListener.Operation;
import org.eclipse.mylyn.tasks.ui.TaskDropListener.TaskDropEvent;

public class TaskDropHandler
{
  private List<TaskDropListener> taskDropListeners;
  
  public void loadTaskDropListeners()
  {
    if (taskDropListeners == null)
    {
      ExtensionPointReader<TaskDropListener> reader = new ExtensionPointReader(
        "org.eclipse.mylyn.tasks.ui", "taskDropListener", "listener", TaskDropListener.class);
      IStatus status = reader.read();
      if (!status.isOK()) {
        StatusHandler.log(status);
      }
      taskDropListeners = reader.getItems();
    }
  }
  
  public void fireTaskDropped(List<ITask> tasksToMove, ITask currentTarget, TaskDropListener.Operation operation)
  {
    final TaskDropListener.TaskDropEvent event = new TaskDropListener.TaskDropEvent(tasksToMove, currentTarget, operation);
    for (final TaskDropListener listener : taskDropListeners) {
      SafeRunner.run(new ISafeRunnable()
      {
        public void run()
          throws Exception
        {
          listener.tasksDropped(event);
        }
        
        public void handleException(Throwable exception)
        {
          StatusHandler.log(new Status(4, "org.eclipse.mylyn.tasks.ui", exception.getMessage(), 
            exception));
        }
      });
    }
  }
}

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

import org.eclipse.core.commands.common.EventManager;
import org.eclipse.core.runtime.SafeRunner;
import org.eclipse.jface.util.SafeRunnable;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.ISelectionProvider;
import org.eclipse.jface.viewers.SelectionChangedEvent;

@Deprecated
public class SelectionProviderAdapter
  extends EventManager
  implements ISelectionProvider
{
  private ISelection selection;
  
  public void addSelectionChangedListener(ISelectionChangedListener listener)
  {
    addListenerObject(listener);
  }
  
  public ISelection getSelection()
  {
    return selection;
  }
  
  public void removeSelectionChangedListener(ISelectionChangedListener listener)
  {
    removeListenerObject(listener);
  }
  
  protected void selectionChanged(final SelectionChangedEvent event)
  {
    Object[] listeners = getListeners();
    for (int i = 0; i < listeners.length; i++)
    {
      final ISelectionChangedListener listener = (ISelectionChangedListener)listeners[i];
      SafeRunner.run(new SafeRunnable()
      {
        public void run()
        {
          listener.selectionChanged(event);
        }
      });
    }
  }
  
  public void setSelection(ISelection selection)
  {
    this.selection = selection;
    selectionChanged(new SelectionChangedEvent(this, selection));
  }
}

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

class AbstractRetrieveTitleFromUrlJob$1
  implements Runnable
{
  AbstractRetrieveTitleFromUrlJob$1(AbstractRetrieveTitleFromUrlJob paramAbstractRetrieveTitleFromUrlJob) {}
  
  public void run()
  {
    this$0.titleRetrieved(AbstractRetrieveTitleFromUrlJob.access$0(this$0));
  }
}

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

public enum TreeWalker$Direction
{
  UP,  DOWN;
}

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

import org.eclipse.jface.action.Action;
import org.eclipse.mylyn.tasks.core.ITaskAttachment;
import org.eclipse.swt.dnd.Clipboard;
import org.eclipse.swt.dnd.TextTransfer;
import org.eclipse.swt.dnd.Transfer;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;

class TasksUiMenus$1
  extends Action
{
  TasksUiMenus$1(String $anonymous0)
  {
    super($anonymous0);
  }
  
  public void run()
  {
    ITaskAttachment attachment = AttachmentUtil.getSelectedAttachment();
    if (attachment != null)
    {
      Clipboard clip = new Clipboard(PlatformUI.getWorkbench().getDisplay());
      clip.setContents(new Object[] { attachment.getUrl() }, 
        new Transfer[] { TextTransfer.getInstance() });
      clip.dispose();
    }
  }
  
  public boolean isEnabled()
  {
    ITaskAttachment attachment = AttachmentUtil.getSelectedAttachment();
    if (attachment != null) {
      return attachment.getUrl() != null;
    }
    return super.isEnabled();
  }
}

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

import java.util.Set;
import org.eclipse.jface.dialogs.IInputValidator;
import org.eclipse.mylyn.internal.tasks.core.AbstractTaskCategory;
import org.eclipse.mylyn.internal.tasks.core.TaskList;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;

class TasksUiInternal$2
  implements IInputValidator
{
  TasksUiInternal$2(String paramString) {}
  
  public String isValid(String newName)
  {
    if ((newName.trim().length() == 0) || (newName.equals(val$name))) {
      return "";
    }
    Set<AbstractTaskCategory> categories = TasksUiPlugin.getTaskList().getCategories();
    for (AbstractTaskCategory category : categories) {
      if (newName.equals(category.getSummary())) {
        return Messages.TasksUiInternal_Rename_Category_Name_already_exists_Error;
      }
    }
    return null;
  }
}

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

import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
import org.eclipse.mylyn.tasks.ui.TasksUiUtil;

class TasksUiInternal$3$1
  implements Runnable
{
  TasksUiInternal$3$1(TasksUiInternal.3 param3, AbstractTask paramAbstractTask) {}
  
  public void run()
  {
    TasksUiUtil.openTask(val$task);
  }
}

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

import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.mylyn.tasks.core.ITaskAttachment;

class AttachmentUtil$1
  implements IRunnableWithProgress
{
  AttachmentUtil$1(ITask paramITask, ITaskAttachment paramITaskAttachment) {}
  
  /* Error */
  public void run(org.eclipse.core.runtime.IProgressMonitor monitor)
    throws java.lang.reflect.InvocationTargetException, java.lang.InterruptedException
  {
    // Byte code:
    //   0: invokestatic 99	org/eclipse/mylyn/internal/tasks/ui/TasksUiPlugin:getContextStore	()Lorg/eclipse/mylyn/tasks/core/context/AbstractTaskContextStore;
    //   3: aload_0
    //   4: getfield 89	org/eclipse/mylyn/internal/tasks/ui/util/AttachmentUtil$1:val$task	Lorg/eclipse/mylyn/tasks/core/ITask;
    //   7: invokevirtual 102	org/eclipse/mylyn/tasks/core/context/AbstractTaskContextStore:getFileForContext	(Lorg/eclipse/mylyn/tasks/core/ITask;)Ljava/io/File;
    //   10: astore_2
    //   11: iconst_1
    //   12: istore_3
    //   13: new 40	java/io/BufferedOutputStream
    //   16: dup
    //   17: new 42	java/io/FileOutputStream
    //   20: dup
    //   21: aload_2
    //   22: invokespecial 93	java/io/FileOutputStream:<init>	(Ljava/io/File;)V
    //   25: invokespecial 91	java/io/BufferedOutputStream:<init>	(Ljava/io/OutputStream;)V
    //   28: astore 4
    //   30: aload_0
    //   31: getfield 90	org/eclipse/mylyn/internal/tasks/ui/util/AttachmentUtil$1:val$attachment	Lorg/eclipse/mylyn/tasks/core/ITaskAttachment;
    //   34: aload 4
    //   36: aload_1
    //   37: invokestatic 100	org/eclipse/mylyn/internal/tasks/ui/util/AttachmentUtil:downloadAttachment	(Lorg/eclipse/mylyn/tasks/core/ITaskAttachment;Ljava/io/OutputStream;Lorg/eclipse/core/runtime/IProgressMonitor;)V
    //   40: iconst_0
    //   41: istore_3
    //   42: goto +34 -> 76
    //   45: astore 5
    //   47: new 47	java/lang/reflect/InvocationTargetException
    //   50: dup
    //   51: aload 5
    //   53: invokespecial 97	java/lang/reflect/InvocationTargetException:<init>	(Ljava/lang/Throwable;)V
    //   56: athrow
    //   57: astore 6
    //   59: aload 4
    //   61: invokevirtual 94	java/io/OutputStream:close	()V
    //   64: iload_3
    //   65: ifeq +8 -> 73
    //   68: aload_2
    //   69: invokevirtual 92	java/io/File:delete	()Z
    //   72: pop
    //   73: aload 6
    //   75: athrow
    //   76: aload 4
    //   78: invokevirtual 94	java/io/OutputStream:close	()V
    //   81: iload_3
    //   82: ifeq +50 -> 132
    //   85: aload_2
    //   86: invokevirtual 92	java/io/File:delete	()Z
    //   89: pop
    //   90: goto +42 -> 132
    //   93: pop
    //   94: new 45	java/lang/InterruptedException
    //   97: dup
    //   98: invokespecial 95	java/lang/InterruptedException:<init>	()V
    //   101: athrow
    //   102: astore_3
    //   103: new 47	java/lang/reflect/InvocationTargetException
    //   106: dup
    //   107: new 48	org/eclipse/core/runtime/CoreException
    //   110: dup
    //   111: new 54	org/eclipse/mylyn/tasks/core/RepositoryStatus
    //   114: dup
    //   115: iconst_4
    //   116: ldc 2
    //   118: iconst_5
    //   119: ldc 1
    //   121: aload_3
    //   122: invokespecial 101	org/eclipse/mylyn/tasks/core/RepositoryStatus:<init>	(ILjava/lang/String;ILjava/lang/String;Ljava/lang/Throwable;)V
    //   125: invokespecial 98	org/eclipse/core/runtime/CoreException:<init>	(Lorg/eclipse/core/runtime/IStatus;)V
    //   128: invokespecial 97	java/lang/reflect/InvocationTargetException:<init>	(Ljava/lang/Throwable;)V
    //   131: athrow
    //   132: return
    // Line number table:
    //   Java source line #140	-> byte code offset #0
    //   Java source line #142	-> byte code offset #11
    //   Java source line #143	-> byte code offset #13
    //   Java source line #145	-> byte code offset #30
    //   Java source line #146	-> byte code offset #40
    //   Java source line #147	-> byte code offset #45
    //   Java source line #148	-> byte code offset #47
    //   Java source line #149	-> byte code offset #57
    //   Java source line #150	-> byte code offset #59
    //   Java source line #151	-> byte code offset #64
    //   Java source line #152	-> byte code offset #68
    //   Java source line #154	-> byte code offset #73
    //   Java source line #150	-> byte code offset #76
    //   Java source line #151	-> byte code offset #81
    //   Java source line #152	-> byte code offset #85
    //   Java source line #154	-> byte code offset #90
    //   Java source line #155	-> byte code offset #93
    //   Java source line #156	-> byte code offset #94
    //   Java source line #157	-> byte code offset #102
    //   Java source line #158	-> byte code offset #103
    //   Java source line #159	-> byte code offset #107
    //   Java source line #160	-> byte code offset #118
    //   Java source line #159	-> byte code offset #125
    //   Java source line #158	-> byte code offset #128
    //   Java source line #162	-> byte code offset #132
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	133	0	this	1
    //   0	133	1	monitor	org.eclipse.core.runtime.IProgressMonitor
    //   10	76	2	targetFile	java.io.File
    //   12	70	3	exceptionThrown	boolean
    //   102	20	3	e	java.io.IOException
    //   28	49	4	out	java.io.OutputStream
  
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