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

lyn/internal/tasks/ui/TaskListNotificationManager$1:this$0	Lorg/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager;
    //   115: invokestatic 80	org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager:access$0	(Lorg/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager;)Lorg/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationPopup;
    //   118: invokevirtual 83	org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationPopup:getDelayClose	()J
    //   121: ldc2_w 32
    //   124: ldiv
    //   125: invokevirtual 81	org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager$1:schedule	(J)V
    //   128: goto +10 -> 138
    //   131: aload_0
    //   132: ldc2_w 34
    //   135: invokevirtual 81	org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager$1:schedule	(J)V
    //   138: aload_1
    //   139: invokeinterface 87 1 0
    //   144: ifeq +7 -> 151
    //   147: getstatic 75	org/eclipse/core/runtime/Status:CANCEL_STATUS	Lorg/eclipse/core/runtime/IStatus;
    //   150: areturn
    //   151: getstatic 76	org/eclipse/core/runtime/Status:OK_STATUS	Lorg/eclipse/core/runtime/IStatus;
    //   154: areturn
    // Line number table:
    //   Java source line #61	-> byte code offset #0
    //   Java source line #62	-> byte code offset #12
    //   Java source line #63	-> byte code offset #23
    //   Java source line #64	-> byte code offset #37
    //   Java source line #95	-> byte code offset #59
    //   Java source line #96	-> byte code offset #60
    //   Java source line #97	-> byte code offset #70
    //   Java source line #99	-> byte code offset #91
    //   Java source line #101	-> byte code offset #98
    //   Java source line #96	-> byte code offset #100
    //   Java source line #97	-> byte code offset #110
    //   Java source line #99	-> byte code offset #131
    //   Java source line #103	-> byte code offset #138
    //   Java source line #104	-> byte code offset #147
    //   Java source line #107	-> byte code offset #151
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	155	0	this	1
    //   0	155	1	monitor	org.eclipse.core.runtime.IProgressMonitor
    //   59	40	2	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   0	59	59	finally
  }
}

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

import java.util.ArrayList;
import java.util.Collections;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.WeakHashMap;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.mylyn.commons.notifications.ui.AbstractUiNotification;
import org.eclipse.mylyn.internal.tasks.ui.notifications.TaskListNotificationPopup;
import org.eclipse.mylyn.internal.tasks.ui.notifications.TaskListNotifier;
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;

public class TaskListNotificationManager
  implements IPropertyChangeListener
{
  private static final long DELAY_OPEN = 5000L;
  private static final boolean runSystem = true;
  private TaskListNotificationPopup popup;
  private final Set<AbstractUiNotification> notifications = new HashSet();
  private final Set<AbstractUiNotification> currentlyNotifying = Collections.synchronizedSet(notifications);
  private final List<ITaskListNotificationProvider> notificationProviders = new ArrayList();
  private final WeakHashMap<Object, Object> cancelledTokens = new WeakHashMap();
  private final Job openJob = new Job(Messages.TaskListNotificationManager_Open_Notification_Job)
  {
    /* Error */
    protected org.eclipse.core.runtime.IStatus run(org.eclipse.core.runtime.IProgressMonitor monitor)
    {
      // Byte code:
      //   0: invokestatic 78	org/eclipse/core/runtime/Platform:isRunning	()Z
      //   3: ifeq +97 -> 100
      //   6: invokestatic 86	org/eclipse/ui/PlatformUI:getWorkbench	()Lorg/eclipse/ui/IWorkbench;
      //   9: ifnull +91 -> 100
      //   12: invokestatic 86	org/eclipse/ui/PlatformUI:getWorkbench	()Lorg/eclipse/ui/IWorkbench;
      //   15: invokeinterface 88 1 0
      //   20: ifnull +80 -> 100
      //   23: invokestatic 86	org/eclipse/ui/PlatformUI:getWorkbench	()Lorg/eclipse/ui/IWorkbench;
      //   26: invokeinterface 88 1 0
      //   31: invokevirtual 84	org/eclipse/swt/widgets/Display:isDisposed	()Z
      //   34: ifne +66 -> 100
      //   37: invokestatic 86	org/eclipse/ui/PlatformUI:getWorkbench	()Lorg/eclipse/ui/IWorkbench;
      //   40: invokeinterface 88 1 0
      //   45: new 42	org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager$1$1
      //   48: dup
      //   49: aload_0
      //   50: invokespecial 82	org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager$1$1:<init>	(Lorg/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager$1;)V
      //   53: invokevirtual 85	org/eclipse/swt/widgets/Display:asyncExec	(Ljava/lang/Runnable;)V
      //   56: goto +44 -> 100
      //   59: astore_2
      //   60: aload_0
      //   61: getfield 77	org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager$1:this$0	Lorg/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager;
      //   64: invokestatic 80	org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager:access$0	(Lorg/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager;)Lorg/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationPopup;
      //   67: ifnull +24 -> 91
      //   70: aload_0
      //   71: aload_0
      //   72: getfield 77	org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager$1:this$0	Lorg/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager;
      //   75: invokestatic 80	org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager:access$0	(Lorg/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager;)Lorg/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationPopup;
      //   78: invokevirtual 83	org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationPopup:getDelayClose	()J
      //   81: ldc2_w 32
      //   84: ldiv
      //   85: invokevirtual 81	org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager$1:schedule	(J)V
      //   88: goto +10 -> 98
      //   91: aload_0
      //   92: ldc2_w 34
      //   95: invokevirtual 81	org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager$1:schedule	(J)V
      //   98: aload_2
      //   99: athrow
      //   100: aload_0
      //   101: getfield 77	org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager$1:this$0	Lorg/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager;
      //   104: invokestatic 80	org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager:access$0	(Lorg/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager;)Lorg/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationPopup;
      //   107: ifnull +24 -> 131
      //   110: aload_0
      //   111: aload_0
      //   112: getfield 77	org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager$1:this$0	Lorg/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager;
      //   115: invokestatic 80	org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager:access$0	(Lorg/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager;)Lorg/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationPopup;
      //   118: invokevirtual 83	org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationPopup:getDelayClose	()J
      //   121: ldc2_w 32
      //   124: ldiv
      //   125: invokevirtual 81	org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager$1:schedule	(J)V
      //   128: goto +10 -> 138
      //   131: aload_0
      //   132: ldc2_w 34
      //   135: invokevirtual 81	org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager$1:schedule	(J)V
      //   138: aload_1
      //   139: invokeinterface 87 1 0
      //   144: ifeq +7 -> 151
      //   147: getstatic 75	org/eclipse/core/runtime/Status:CANCEL_STATUS	Lorg/eclipse/core/runtime/IStatus;
      //   150: areturn
      //   151: getstatic 76	org/eclipse/core/runtime/Status:OK_STATUS	Lorg/eclipse/core/runtime/IStatus;
      //   154: areturn
      // Line number table:
      //   Java source line #61	-> byte code offset #0
      //   Java source line #62	-> byte code offset #12
      //   Java source line #63	-> byte code offset #23
      //   Java source line #64	-> byte code offset #37
      //   Java source line #95	-> byte code offset #59
      //   Java source line #96	-> byte code offset #60
      //   Java source line #97	-> byte code offset #70
      //   Java source line #99	-> byte code offset #91
      //   Java source line #101	-> byte code offset #98
      //   Java source line #96	-> byte code offset #100
      //   Java source line #97	-> byte code offset #110
      //   Java source line #99	-> byte code offset #131
      //   Java source line #103	-> byte code offset #138
      //   Java source line #104	-> byte code offset #147
      //   Java source line #107	-> byte code offset #151
      // Local variable table:
      //   start	length	slot	name	signature
      //   0	155	0	this	1
      //   0	155	1	monitor	org.eclipse.core.runtime.IProgressMonitor
      //   59	40	2	localObject	Object
      // Exception table:
      //   from	to	target	type
      //   0	59	59	finally
    }
  };
  
  public void showPopup()
  {
    if (popup != null) {
      popup.close();
    }
    Shell shell = new Shell(PlatformUI.getWorkbench().getDisplay());
    popup = new TaskListNotificationPopup(shell);
    popup.setFadingEnabled(TasksUiInternal.isAnimationsEnabled());
    List<AbstractUiNotification> toDisplay = new ArrayList(currentlyNotifying);
    Collections.sort(toDisplay);
    popup.setContents(toDisplay);
    cleanNotified();
    popup.setBlockOnOpen(false);
    popup.open();
  }
  
  private void cleanNotified()
  {
    currentlyNotifying.clear();
  }
  
  public void collectNotifications()
  {
    for (ITaskListNotificationProvider provider : notificationProviders) {
      currentlyNotifying.addAll(provider.getNotifications());
    }
  }
  
  public void startNotification(long initialStartupTime)
  {
    if (TasksUiPlugin.getDefault().getPreferenceStore().getBoolean("org.eclipse.mylyn.tasks.ui.notifications.enabled"))
    {
      if (!openJob.cancel()) {
        try
        {
          openJob.join();
        }
        catch (InterruptedException localInterruptedException) {}
      }
      openJob.setSystem(true);
      openJob.schedule(initialStartupTime);
      for (ITaskListNotificationProvider provider : notificationProviders) {
        if ((provider instanceof TaskListNotifier)) {
          ((TaskListNotifier)provider).setEnabled(true);
        }
      }
    }
  }
  
  public void stopNotification()
  {
    for (ITaskListNotificationProvider provider : notificationProviders) {
      if ((provider instanceof TaskListNotifier)) {
        ((TaskListNotifier)provider).setEnabled(false);
      }
    }
    openJob.cancel();
  }
  
  public void addNotificationProvider(ITaskListNotificationProvider notification_provider)
  {
    notificationProviders.add(notification_provider);
  }
  
  public void removeNotificationProvider(ITaskListNotificationProvider notification_provider)
  {
    notificationProviders.remove(notification_provider);
  }
  
  /* Error */
  public Set<AbstractUiNotification> getNotifications()
  {
    // Byte code:
    //   0: ldc 2
    //   2: dup
    //   3: astore_1
    //   4: monitorenter
    //   5: aload_0
    //   6: getfield 209	org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager:currentlyNotifying	Ljava/util/Set;
    //   9: aload_1
    //   10: monitorexit
    //   11: areturn
    //   12: aload_1
    //   13: monitorexit
    //   14: athrow
    // Line number table:
    //   Java source line #190	-> byte code offset #0
    //   Java source line #191	-> byte code offset #5
    //   Java source line #190	-> byte code offset #12
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	15	0	this	TaskListNotificationManager
    //   3	10	1	Ljava/lang/Object;	Object
    // Exception table:
    //   from	to	target	type
    //   5	11	12	finally
    //   12	14	12	finally
  }
  
  public void propertyChange(PropertyChangeEvent event)
  {
    if (event.getProperty().equals("org.eclipse.mylyn.tasks.ui.notifications.enabled"))
    {
      Object newValue = event.getNewValue();
      if (!(newValue instanceof Boolean)) {
        startNotification(0L);
      } else if (((Boolean)newValue).booleanValue()) {
        startNotification(0L);
      } else {
        stopNotification();
      }
    }
  }
}

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

public enum TasksUiPlugin$TaskListSaveMode
{
  ONE_HOUR,  THREE_HOURS,  DAY;
  
  public String toString()
  {
    switch (this)
    {
    case DAY: 
      return "1 hour";
    case ONE_HOUR: 
      return "3 hours";
    case THREE_HOURS: 
      return "1 day";
    }
    return "3 hours";
  }
  
  public static TaskListSaveMode fromString(String string)
  {
    if (string == null) {
      return null;
    }
    if (string.equals("1 hour")) {
      return ONE_HOUR;
    }
    if (string.equals("3 hours")) {
      return THREE_HOURS;
    }
    if (string.equals("1 day")) {
      return DAY;
    }
    return null;
  }
  
  public static long fromStringToLong(String string)
  {
    long hour = 3600000L;
    switch (fromString(string))
    {
    case DAY: 
      return hour;
    case ONE_HOUR: 
      return hour * 3L;
    case THREE_HOURS: 
      return hour * 24L;
    }
    return hour * 3L;
  }
}

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

import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;

class TaskTrimWidget$3
  implements IPropertyChangeListener
{
  TaskTrimWidget$3(TaskTrimWidget paramTaskTrimWidget) {}
  
  public void propertyChange(PropertyChangeEvent event)
  {
    String property = event.getProperty();
    if (property.equals("org.eclipse.mylyn.tasks.ui.show.trim"))
    {
      Object newValue = event.getNewValue();
      Boolean isVisible = Boolean.valueOf(false);
      if ((newValue instanceof Boolean)) {
        isVisible = (Boolean)newValue;
      } else if ((newValue instanceof String)) {
        isVisible = Boolean.valueOf(Boolean.parseBoolean((String)newValue));
      }
      TaskTrimWidget.access$2(this$0, isVisible.booleanValue());
    }
  }
}

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

import org.eclipse.core.runtime.Status;
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;

class TaskListBackupManager$2
  implements Runnable
{
  TaskListBackupManager$2(TaskListBackupManager paramTaskListBackupManager, Status paramStatus) {}
  
  public void run()
  {
    TasksUiInternal.logAndDisplayStatus(
      Messages.TaskListBackupManager_Scheduled_task_data_backup, val$status);
  }
}

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

import org.eclipse.mylyn.internal.tasks.core.TaskAttachment;
import org.eclipse.ui.IActionFilter;

class TaskAttachmentAdapterFactory$1
  implements IActionFilter
{
  TaskAttachmentAdapterFactory$1(TaskAttachmentAdapterFactory paramTaskAttachmentAdapterFactory) {}
  
  public boolean testAttribute(Object target, String name, String value)
  {
    TaskAttachment taskAttachment = (TaskAttachment)target;
    if ("connectorKind".equals(name)) {
      return value.equals(taskAttachment.getConnectorKind());
    }
    if ("contentType".equals(name)) {
      return value.equals(taskAttachment.getContentType());
    }
    if ("isDeprecated".equals(name)) {
      return Boolean.valueOf(value).booleanValue() == taskAttachment.isDeprecated();
    }
    if ("isPatch".equals(name)) {
      return Boolean.valueOf(value).booleanValue() == taskAttachment.isPatch();
    }
    return false;
  }
}

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

import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Shell;

public class ComboSelectionDialog
  extends Dialog
{
  private String fSelection = null;
  private final String fShellTitle;
  private final String fLabelText;
  private final String[] fAllowedStrings;
  private final int fInitialSelectionIndex;
  private int fSelectedIndex = -1;
  
  public ComboSelectionDialog(Shell parentShell, String shellTitle, String labelText, String[] comboStrings, int initialSelectionIndex)
  {
    super(parentShell);
    fShellTitle = shellTitle;
    fLabelText = labelText;
    fAllowedStrings = comboStrings;
    fInitialSelectionIndex = initialSelectionIndex;
  }
  
  public String getSelectedString()
  {
    return fSelection;
  }
  
  protected Control createDialogArea(Composite parent)
  {
    getShell().setText(fShellTitle);
    
    Composite composite = (Composite)super.createDialogArea(parent);
    Composite innerComposite = new Composite(composite, 0);
    innerComposite.setLayoutData(new GridData());
    GridLayout gl = new GridLayout();
    numColumns = 2;
    innerComposite.setLayout(gl);
    
    Label label = new Label(innerComposite, 0);
    label.setText(fLabelText);
    label.setLayoutData(new GridData());
    
    final Combo combo = new Combo(innerComposite, 8);
    String[] arrayOfString;
    int j = (arrayOfString = fAllowedStrings).length;
    for (int i = 0; i < j; i++)
    {
      String allowedString = arrayOfString[i];
      combo.add(allowedString);
    }
    combo.select(fInitialSelectionIndex);
    fSelection = combo.getItem(combo.getSelectionIndex());
    GridData gd = new GridData();
    widthHint = convertWidthInCharsToPixels(getMaxStringLength());
    combo.setLayoutData(gd);
    combo.addSelectionListener(new SelectionAdapter()
    {
      public void widgetSelected(SelectionEvent e)
      {
        fSelection = combo.getItem(combo.getSelectionIndex());
        fSelectedIndex = combo.getSelectionIndex();
      }
    });
    applyDialogFont(composite);
    return composite;
  }
  
  public int getSelectedIndex()
  {
    return fSelectedIndex;
  }
  
  private int getMaxStringLength()
  {
    int max = 0;
    String[] arrayOfString;
    int j = (arrayOfString = fAllowedStrings).length;
    for (int i = 0; i < j; i++)
    {
      String allowedString = arrayOfString[i];
      max = Math.max(max, allowedString.length());
    }
    return max;
  }
}

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

import java.util.Collection;
import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
import org.eclipse.mylyn.internal.tasks.ui.views.PresentationFilter;
import org.eclipse.mylyn.tasks.core.ITask;

public class TaskCompletionFilter
  extends AbstractTaskListFilter
{
  public boolean select(Object parent, Object element)
  {
    if ((element instanceof AbstractTask))
    {
      AbstractTask task = (AbstractTask)element;
      if (task.isCompleted())
      {
        Collection<ITask> children = task.getChildren();
        for (ITask child : children) {
          if ((PresentationFilter.getInstance().select(element)) && (select(element, child))) {
            return true;
          }
        }
        return false;
      }
    }
    return true;
  }
}

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

import org.eclipse.mylyn.commons.ui.compatibility.CommonColors;
import org.eclipse.mylyn.commons.workbench.forms.ScalingHyperlink;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.swt.widgets.Composite;

public class TaskScalingHyperlink
  extends ScalingHyperlink
{
  private ITask task;
  
  public TaskScalingHyperlink(Composite parent, int style)
  {
    super(parent, style);
    setForeground(CommonColors.HYPERLINK_WIDGET);
    addMouseTrackListener(MOUSE_TRACK_LISTENER);
  }
  
  public ITask getTask()
  {
    return task;
  }
  
  public void setTask(ITask task)
  {
    this.task = task;
    if (task != null)
    {
      if ((getStyle() & 0x8000) != 0)
      {
        setText(task.getTaskKey());
        setToolTipText(task.getTaskKey() + ": " + task.getSummary());
        setStrikeThrough(task.isCompleted());
      }
      else
      {
        setText(task.getSummary());
        setToolTipText("");
        setStrikeThrough(false);
      }
    }
    else
    {
      setText("");
      setToolTipText("");
      setStrikeThrough(false);
    }
    setUnderlined(false);
  }
}

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

import java.util.Set;
import org.eclipse.mylyn.commons.notifications.ui.AbstractUiNotification;

public abstract interface ITaskListNotificationProvider
{
  public abstract Set<AbstractUiNotification> getNotifications();
}

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

import org.eclipse.core.resources.ISaveContext;
import org.eclipse.core.resources.ISaveParticipant;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.mylyn.internal.tasks.core.externalization.ExternalizationManager;

class TasksUiPlugin$5
  implements ISaveParticipant
{
  TasksUiPlugin$5(TasksUiPlugin paramTasksUiPlugin) {}
  
  public void doneSaving(ISaveContext context) {}
  
  public void prepareToSave(ISaveContext context)
    throws CoreException
  {}
  
  public void rollback(ISaveContext context) {}
  
  public void saving(ISaveContext context)
    throws CoreException
  {
    if (context.getKind() == 1) {
      TasksUiPlugin.access$3().stop();
    }
  }
}

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

import java.util.ArrayList;
import java.util.List;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.mylyn.internal.tasks.ui.util.AttachmentUtil;
import org.eclipse.mylyn.tasks.core.ITaskAttachment;
import org.eclipse.ui.IEditorDescriptor;
import org.eclipse.ui.IEditorRegistry;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;

public class TaskAttachmentViewerManager
{
  public ITaskAttachmentViewer getBrowserViewer(ITaskAttachment attachment)
  {
    if ((attachment.getUrl() != null) && (attachment.getUrl().trim().length() > 0)) {
      return new TaskAttachmentBrowserViewer();
    }
    return null;
  }
  
  public List<ITaskAttachmentViewer> getWorkbenchViewers(ITaskAttachment attachment)
  {
    List<ITaskAttachmentViewer> result = new ArrayList();
    IEditorRegistry registry = PlatformUI.getWorkbench().getEditorRegistry();
    
    IEditorDescriptor defaultEditor = registry.getDefaultEditor(AttachmentUtil.getAttachmentFilename(attachment));
    if (defaultEditor != null) {
      result.add(new TaskAttachmentEditorViewer(defaultEditor));
    }
    IEditorDescriptor defaultTextEditor = registry.findEditor("org.eclipse.ui.DefaultTextEditor");
    if ((defaultTextEditor != null) && (
      (defaultEditor == null) || (!defaultTextEditor.getId().equals(defaultEditor.getId())))) {
      result.add(new TaskAttachmentEditorViewer(defaultTextEditor));
    }
    IEditorDescriptor[] descriptors = registry.getEditors(AttachmentUtil.getAttachmentFilename(attachment));
    IEditorDescriptor[] arrayOfIEditorDescriptor1;
    int j = (arrayOfIEditorDescriptor1 = descriptors).length;
    for (int i = 0; i < j; i++)
    {
      IEditorDescriptor ied = arrayOfIEditorDescriptor1[i];
      if ((defaultEditor == null) || (!ied.getId().equals(defaultEditor.getId()))) {
        result.add(new TaskAttachmentEditorViewer(ied));
      }
    }
    return result;
  }
  
  public List<ITaskAttachmentViewer> getSystemViewers(ITaskAttachment attachment)
  {
    List<ITaskAttachmentViewer> result = new ArrayList();
    IEditorRegistry registry = PlatformUI.getWorkbench().getEditorRegistry();
    
    IEditorDescriptor extern = registry.findEditor("org.eclipse.ui.systemExternalEditor");
    result.add(new TaskAttachmentEditorViewer(extern));
    if (registry.isSystemInPlaceEditorAvailable(AttachmentUtil.getAttachmentFilename(attachment)))
    {
      IEditorDescriptor inplace = registry.findEditor("org.eclipse.ui.systemInPlaceEditor");
      result.add(new TaskAttachmentEditorViewer(inplace));
    }
    return result;
  }
  
  public List<ITaskAttachmentViewer> getTaskAttachmentViewers(ITaskAttachment attachment)
  {
    List<ITaskAttachmentViewer> result = new ArrayList();
    ITaskAttachmentViewer browserViewer = getBrowserViewer(attachment);
    if (browserViewer != null) {
      result.add(browserViewer);
    }
    result.addAll(getWorkbenchViewers(attachment));
    result.addAll(getSystemViewers(attachment));
    return result;
  }
  
  public ITaskAttachmentViewer getPreferredViewer(ITaskAttachment attachment)
  {
    List<ITaskAttachmentViewer> viewers = getTaskAttachmentViewers(attachment);
    
    String preferred = getPreferredViewerID(attachment);
    if (preferred != null) {
      for (int i = 0; i < viewers.size(); i++) {
        if (preferred.equals(((ITaskAttachmentViewer)viewers.get(i)).getId())) {
          return (ITaskAttachmentViewer)viewers.get(i);
        }
      }
    }
    if (viewers.isEmpty()) {
      return null;
    }
    return (ITaskAttachmentViewer)viewers.get(0);
  }
  
  public String getPreferredViewerID(ITaskAttachment attachment)
  {
    String ext = getExtension(attachment);
    if (ext == null) {
      return null;
    }
    return getPreferencesStore().getString(
      "org.eclipse.mylyn.tasks.ui.attachments.preferredViewerID_" + ext);
  }
  
  private IPreferenceStore getPreferencesStore()
  {
    return TasksUiPlugin.getDefault().getPreferenceStore();
  }
  
  public void savePreferredViewerID(ITaskAttachment attachment, String handlerID)
  {
    String ext = getExtension(attachment);
    if (ext == null) {
      return;
    }
    getPreferencesStore().putValue(
      "org.eclipse.mylyn.tasks.ui.attachments.preferredViewerID_" + ext, handlerID);
  }
  
  private String getExtension(ITaskAttachment attachment)
  {
    if (attachment == null) {
      return null;
    }
    String fname = AttachmentUtil.getAttachmentFilename(attachment);
    int dot = fname.lastIndexOf('.');
    if (dot < 0) {
      return null;
    }
    return fname.substring(dot + 1);
  }
}

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

import org.eclipse.mylyn.internal.tasks.core.UncategorizedTaskContainer;
import org.eclipse.mylyn.internal.tasks.core.UnmatchedTaskContainer;
import org.eclipse.mylyn.internal.tasks.core.UnsubmittedTaskContainer;

public class TaskArchiveFilter
  extends AbstractTaskListFilter
{
  public boolean select(Object parent, Object element)
  {
    if ((element instanceof UnmatchedTaskContainer))
    {
      if (((UnmatchedTaskContainer)element).isEmpty()) {
        return false;
      }
    }
    else if ((element instanceof UnsubmittedTaskContainer))
    {
      if (((UnsubmittedTaskContainer)element).isEmpty()) {
        return false;
      }
    }
    else if (((element instanceof UncategorizedTaskContainer)) && 
      (((UncategorizedTaskContainer)element).isEmpty())) {
      return false;
    }
    return true;
  }
}

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

import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;

class TasksReminderDialog$3
  extends SelectionAdapter
{
  TasksReminderDialog$3(TasksReminderDialog paramTasksReminderDialog) {}
  
  public void widgetSelected(SelectionEvent e)
  {
    TasksReminderDialog.access$1(this$0).setSorter(new TasksReminderDialog.ReminderTaskSorter(3));
  }
}

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

import org.eclipse.mylyn.tasks.core.ITask;

class TaskTrimWidget$2$1
  implements Runnable
{
  TaskTrimWidget$2$1(TaskTrimWidget.2 param2) {}
  
  public void run()
  {
    if ((TaskTrimWidget.access$1(TaskTrimWidget.2.access$0(this$1)) != null) && (TaskTrimWidget.access$1(TaskTrimWidget.2.access$0(this$1)).isActive())) {
      TaskTrimWidget.2.access$0(this$1).indicateActiveTask();
    }
  }
}

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

import java.text.MessageFormat;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.mylyn.commons.workbench.WorkbenchUtil;
import org.eclipse.mylyn.internal.tasks.ui.util.AttachmentUtil;
import org.eclipse.mylyn.tasks.core.ITaskAttachment;
import org.eclipse.ui.IEditorDescriptor;
import org.eclipse.ui.IWorkbenchPage;

public class TaskAttachmentEditorViewer
  implements ITaskAttachmentViewer
{
  private final IEditorDescriptor descriptor;
  
  TaskAttachmentEditorViewer(IEditorDescriptor descriptor)
  {
    this.descriptor = descriptor;
  }
  
  public String getId()
  {
    return descriptor.getId();
  }
  
  public String getLabel()
  {
    return descriptor.getLabel();
  }
  
  public void openAttachment(IWorkbenchPage page, ITaskAttachment attachment)
    throws CoreException
  {
    DownloadAndOpenTaskAttachmentJob job = new DownloadAndOpenTaskAttachmentJob(
      MessageFormat.format(Messages.TaskAttachmentEditorViewer_openingAttachment, new Object[] {
      AttachmentUtil.getAttachmentFilename(attachment) }), attachment, page, descriptor.getId());
    WorkbenchUtil.busyCursorWhile(job);
  }
}

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

import org.eclipse.jface.action.Action;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.mylyn.tasks.core.ITaskActivityManager;
import org.eclipse.mylyn.tasks.ui.TasksUi;

class TaskHistoryDropDown$DeactivateTaskAction
  extends Action
{
  public TaskHistoryDropDown$DeactivateTaskAction(TaskHistoryDropDown paramTaskHistoryDropDown)
  {
    setText(Messages.TaskHistoryDropDown_Deactivate_Task);
    setToolTipText(Messages.TaskHistoryDropDown_Deactivate_Task);
    setEnabled(true);
    setChecked(false);
    setImageDescriptor(null);
  }
  
  public void run()
  {
    ITask active = TasksUi.getTaskActivityManager().getActiveTask();
    if (active != null) {
      TasksUi.getTaskActivityManager().deactivateTask(active);
    }
  }
}

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

import org.eclipse.mylyn.commons.net.AuthenticationCredentials;
import org.eclipse.mylyn.commons.net.AuthenticationType;
import org.eclipse.mylyn.commons.workbench.WorkbenchUtil;
import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryDelta;
import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryDelta.Type;
import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
import org.eclipse.mylyn.internal.tasks.ui.dialogs.TaskRepositoryCredentialsDialog;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.swt.widgets.Shell;

class TaskRepositoryLocationUi$PasswordRunner
  implements Runnable
{
  private final AuthenticationType authType;
  private boolean changed;
  private final String message;
  private boolean canceled;
  
  public TaskRepositoryLocationUi$PasswordRunner(TaskRepositoryLocationUi paramTaskRepositoryLocationUi, AuthenticationType credentialType, String message)
  {
    authType = credentialType;
    this.message = message;
  }
  
  public boolean isChanged()
  {
    return changed;
  }
  
  public boolean isCanceled()
  {
    return canceled;
  }
  
  public void run()
  {
    Shell shell = WorkbenchUtil.getShell();
    if ((shell != null) && (!shell.isDisposed()))
    {
      TaskRepositoryCredentialsDialog dialog = TaskRepositoryCredentialsDialog.createDialog(shell);
      initializeDialog(dialog);
      int resultCode = dialog.open();
      if (resultCode == 0)
      {
        apply(dialog);
        changed = true;
      }
      else if (resultCode == 1000)
      {
        changed = true;
      }
      else
      {
        canceled = true;
      }
    }
  }
  
  private void initializeDialog(TaskRepositoryCredentialsDialog dialog)
  {
    dialog.setTaskRepository(TaskRepositoryLocationUi.access$0(this$0));
    dialog.setFileDialog(AuthenticationType.CERTIFICATE.equals(authType));
    AuthenticationCredentials credentials = TaskRepositoryLocationUi.access$0(this$0).getCredentials(authType);
    if (credentials != null)
    {
      dialog.setUsername(credentials.getUserName());
      dialog.setPassword(credentials.getPassword());
    }
    if (message != null) {
      dialog.setMessage(message);
    } else {
      dialog.setMessage(getDefaultMessage());
    }
  }
  
  private String getDefaultMessage()
  {
    if (AuthenticationType.REPOSITORY.equals(authType)) {
      return Messages.TaskRepositoryLocationUi_Enter_repository_password;
    }
    if (AuthenticationType.CERTIFICATE.equals(authType)) {
      return Messages.TaskRepositoryLocationUi_Enter_CLIENTCERTIFICATE_password;
    }
    if (AuthenticationType.HTTP.equals(authType)) {
      return Messages.TaskRepositoryLocationUi_Enter_HTTP_password;
    }
    if (AuthenticationType.PROXY.equals(authType)) {
      return Messages.TaskRepositoryLocationUi_Enter_proxy_password;
    }
    return null;
  }
  
  private void apply(TaskRepositoryCredentialsDialog dialog)
  {
    AuthenticationCredentials credentials = new AuthenticationCredentials(dialog.getUserName(), 
      dialog.getPassword());
    TaskRepositoryLocationUi.access$0(this$0).setCredentials(authType, credentials, dialog.getSavePassword());
    TasksUiPlugin.getRepositoryManager().notifyRepositorySettingsChanged(TaskRepositoryLocationUi.access$0(this$0), 
      new TaskRepositoryDelta(TaskRepositoryDelta.Type.CREDENTIALS, authType));
  }
}

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

import java.util.ArrayList;
import java.util.List;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;
import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IEditorReference;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.PartInitException;

public class TaskEditorBloatMonitor
{
  private static final int MAX_EDITORS = 12;
  
  public static void editorOpened(IEditorPart editorPartOpened)
  {
    IWorkbenchPage page = editorPartOpened.getSite().getPage();
    List<IEditorReference> toClose = new ArrayList();
    int totalTaskEditors = 0;
    IEditorReference[] arrayOfIEditorReference;
    int j = (arrayOfIEditorReference = page.getEditorReferences()).length;
    for (int i = 0; i < j; i++)
    {
      IEditorReference editorReference = arrayOfIEditorReference[i];
      if ("org.eclipse.mylyn.tasks.ui.editors.task".equals(editorReference.getId())) {
        totalTaskEditors++;
      }
    }
    if (totalTaskEditors > 12)
    {
      j = (arrayOfIEditorReference = page.getEditorReferences()).length;
      for (i = 0; i < j;)
      {
        IEditorReference editorReference = arrayOfIEditorReference[i];
        try
        {
          if ((editorPartOpened != editorReference.getPart(false)) && 
            ("org.eclipse.mylyn.tasks.ui.editors.task".equals(editorReference.getId())))
          {
            TaskEditorInput taskEditorInput = (TaskEditorInput)editorReference.getEditorInput();
            TaskEditor taskEditor = (TaskEditor)editorReference.getEditor(false);
            if (taskEditor == null) {
              toClose.add(editorReference);
            } else if ((!taskEditor.equals(editorPartOpened)) && (!taskEditor.isDirty()) && 
              (taskEditorInput.getTask() != null) && 
              (taskEditorInput.getTask().getSynchronizationState().isSynchronized())) {
              toClose.add(editorReference);
            }
          }
          if (totalTaskEditors - toClose.size() <= 12) {
            break;
          }
          i++;
        }
        catch (PartInitException localPartInitException) {}
      }
    }
    if (toClose.size() > 0) {
      page.closeEditors((IEditorReference[])toClose.toArray(new IEditorReference[toClose.size()]), true);
    }
  }
}

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

import com.ibm.icu.text.DateFormat;
import java.util.Date;
import java.util.List;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerSorter;
import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
import org.eclipse.mylyn.internal.tasks.core.DateRange;
import org.eclipse
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