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

of UncategorizedTaskContainer))) {
      return 1;
    }
    if ((!(o1 instanceof ITask)) && ((o2 instanceof ITask))) {
      return 1;
    }
    if (!(o1 instanceof ITask))
    {
      if (!(o2 instanceof ITask)) {
        return ((IRepositoryElement)o1).getSummary().compareToIgnoreCase(
          ((IRepositoryElement)o2).getSummary());
      }
      return -1;
    }
    if ((o1 instanceof ITaskContainer))
    {
      if (!(o2 instanceof ITask)) {
        return -1;
      }
      if ((o2 instanceof ITaskContainer))
      {
        IRepositoryElement element1 = (IRepositoryElement)o1;
        IRepositoryElement element2 = (IRepositoryElement)o2;
        
        AbstractTask task1 = null;
        AbstractTask task2 = null;
        if ((element1 instanceof ITask)) {
          task1 = (AbstractTask)element1;
        }
        if ((element2 instanceof ITask)) {
          task2 = (AbstractTask)element2;
        }
        if ((task1 == null) && (task2 == null)) {
          return comparePrioritiesAndKeys(element1, element2);
        }
        if (task1 == null) {
          return 1;
        }
        if (task2 == null) {
          return -1;
        }
        int complete = compareCompleted(task1, task2);
        if (complete != 0) {
          return complete;
        }
        int due = compareDueDates(task1, task2);
        if (due != 0) {
          return due;
        }
        int today = compareScheduledDate(task1, task2);
        if (today == 0) {
          return comparePrioritiesAndKeys(element1, element2);
        }
        return today;
      }
    }
    return 0;
  }
  
  private int compareDueDates(ITask task1, ITask task2)
  {
    if ((TasksUiPlugin.getTaskActivityManager().isOverdue(task1)) && 
      (!TasksUiPlugin.getTaskActivityManager().isOverdue(task2))) {
      return -1;
    }
    if ((!TasksUiPlugin.getTaskActivityManager().isOverdue(task1)) && 
      (TasksUiPlugin.getTaskActivityManager().isOverdue(task2))) {
      return 1;
    }
    return 0;
  }
  
  private int compareScheduledDate(AbstractTask task1, AbstractTask task2)
  {
    if ((isToday(task1)) && (!isToday(task2))) {
      return -1;
    }
    if ((!isToday(task1)) && (isToday(task2))) {
      return 1;
    }
    return 0;
  }
  
  private boolean isToday(AbstractTask task)
  {
    return (TasksUiPlugin.getTaskActivityManager().isPastReminder(task)) || (TasksUiPlugin.getTaskActivityManager().isScheduledForToday(task));
  }
  
  private int compareCompleted(ITask task1, ITask task2)
  {
    if ((task1.isCompleted()) && (!task2.isCompleted())) {
      return 1;
    }
    if ((!task1.isCompleted()) && (task2.isCompleted())) {
      return -1;
    }
    return 0;
  }
  
  private int comparePrioritiesAndKeys(IRepositoryElement element1, IRepositoryElement element2)
  {
    int priority = comparePriorities(element1, element2);
    if (priority != 0) {
      return priority;
    }
    int description = compareKeys(element1, element2);
    if (description != 0) {
      return description;
    }
    return 0;
  }
  
  private int compareKeys(IRepositoryElement element1, IRepositoryElement element2)
  {
    return taskKeyComparator.compare(TaskComparator.getSortableFromElement(element1), 
      TaskComparator.getSortableFromElement(element2));
  }
  
  private int comparePriorities(IRepositoryElement element1, IRepositoryElement element2)
  {
    if (((element1 instanceof AbstractTaskContainer)) && ((element2 instanceof AbstractTaskContainer))) {
      return ((AbstractTaskContainer)element1).getPriority().compareTo(
        ((AbstractTaskContainer)element2).getPriority());
    }
    return -1;
  }
}

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

import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;

class TaskScheduleContentProvider$RolloverCheck
  extends Job
{
  public TaskScheduleContentProvider$RolloverCheck(TaskScheduleContentProvider paramTaskScheduleContentProvider)
  {
    super("Calendar Rollover Job");
  }
  
  protected IStatus run(IProgressMonitor monitor)
  {
    TaskScheduleContentProvider.access$6(this$0);
    return Status.OK_STATUS;
  }
}

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

import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.mylyn.commons.workbench.WorkbenchUtil;

class TaskRepositoriesView$3
  implements IDoubleClickListener
{
  TaskRepositoriesView$3(TaskRepositoriesView paramTaskRepositoriesView) {}
  
  public void doubleClick(DoubleClickEvent event)
  {
    WorkbenchUtil.openProperties(this$0.getSite());
  }
}

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

import java.util.Arrays;
import java.util.List;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.viewers.ICellModifier;
import org.eclipse.mylyn.commons.core.StatusHandler;
import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
import org.eclipse.mylyn.internal.tasks.core.AbstractTaskCategory;
import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
import org.eclipse.mylyn.internal.tasks.core.TaskList;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
import org.eclipse.mylyn.tasks.core.IRepositoryElement;
import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
import org.eclipse.mylyn.tasks.core.ITaskActivityManager;
import org.eclipse.mylyn.tasks.ui.TasksUi;
import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.widgets.TreeItem;

class TaskListCellModifier
  implements ICellModifier
{
  private final TaskListView taskListView;
  private boolean disableActivateForParentTasks = false;
  
  TaskListCellModifier(TaskListView taskListView)
  {
    this.taskListView = taskListView;
    if (SWT.getPlatform().equals("gtk")) {
      disableActivateForParentTasks = true;
    }
  }
  
  public boolean canModify(Object element, String property)
  {
    return taskListView.isInRenameAction;
  }
  
  public Object getValue(Object element, String property)
  {
    try
    {
      int columnIndex = Arrays.asList(taskListView.columnNames).indexOf(property);
      if ((element instanceof IRepositoryElement))
      {
        IRepositoryElement taskListElement = (IRepositoryElement)element;
        switch (columnIndex)
        {
        case 0: 
          return taskListElement.getSummary();
        case 1: 
          return "";
        case 2: 
          return "";
        }
      }
    }
    catch (Exception e)
    {
      StatusHandler.log(new Status(4, "org.eclipse.mylyn.tasks.ui", e.getMessage(), e));
    }
    return "";
  }
  
  public void modify(Object element, String property, Object value)
  {
    if (((element instanceof TreeItem)) && (((TreeItem)element).isDisposed())) {
      return;
    }
    int columnIndex = Arrays.asList(taskListView.columnNames).indexOf(property);
    Object data = ((TreeItem)element).getData();
    if ((data instanceof AbstractTask))
    {
      AbstractTask task = (AbstractTask)data;
      switch (columnIndex)
      {
      case 0: 
        if (task == null) {
          break;
        }
        task.setSummary(((String)value).trim());
        TasksUiPlugin.getTaskList().notifyElementChanged(task);
        
        break;
      case 1: 
        break;
      case 2: 
        toggleTaskActivation((TreeItem)element, null);
      }
    }
    else if (((data instanceof AbstractTaskCategory)) || ((data instanceof IRepositoryQuery)))
    {
      AbstractTaskContainer container = (AbstractTaskContainer)data;
      switch (columnIndex)
      {
      case 0: 
        TasksUiPlugin.getTaskList().renameContainer(container, ((String)value).trim());
      case 1: 
        break;
      }
    }
    taskListView.refresh();
  }
  
  public void toggleTaskActivation(TreeItem element, MouseEvent event)
  {
    AbstractTask task = null;
    if ((element.getData() instanceof AbstractTask))
    {
      task = (AbstractTask)element.getData();
      if (disableActivateForParentTasks)
      {
        TreeItem parent = element.getParentItem();
        if ((parent != null) && 
          (((parent.getData() instanceof IRepositoryQuery)) || ((parent.getData() instanceof AbstractTaskCategory))) && 
          (element.getItemCount() > 0)) {
          return;
        }
      }
      if (task.isActive())
      {
        TasksUi.getTaskActivityManager().deactivateTask(task);
      }
      else
      {
        TasksUiInternal.activateTaskThroughCommand(task);
        if (((stateMask & 0x20000) != 0) || (button == 2)) {
          TasksUiUtil.openTask(task);
        }
      }
    }
  }
}

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

import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.swt.events.MouseAdapter;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;

class TaskListView$11
  extends MouseAdapter
{
  TaskListView$11(TaskListView paramTaskListView, int paramInt) {}
  
  public void mouseUp(MouseEvent event)
  {
    long currentTime = System.currentTimeMillis();
    if ((currentTime - TaskListView.access$15(this$0) < 150L) && (currentTime >= TaskListView.access$15(this$0))) {
      return;
    }
    if (button == 3) {
      return;
    }
    Object selectedNode = ((Tree)widget).getItem(new Point(x + 70, y));
    if ((selectedNode instanceof TreeItem))
    {
      Object selectedObject = ((TreeItem)selectedNode).getData();
      if (((selectedObject instanceof ITask)) && 
        (x > val$activationImageOffset) && (x < val$activationImageOffset + 13)) {
        TaskListView.access$16(this$0).toggleTaskActivation((TreeItem)selectedNode, event);
      }
    }
  }
}

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

import java.util.Calendar;
import java.util.Collection;
import java.util.HashSet;
import java.util.Set;
import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
import org.eclipse.mylyn.internal.tasks.core.DateRange;
import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer;
import org.eclipse.mylyn.internal.tasks.core.TaskActivityManager;
import org.eclipse.mylyn.internal.tasks.core.TaskActivityUtil;
import org.eclipse.mylyn.internal.tasks.core.TaskList;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.tasks.core.ITask;

public abstract class TaskScheduleContentProvider$StateTaskContainer
  extends ScheduledTaskContainer
{
  Calendar temp = TaskActivityUtil.getCalendar();
  
  public TaskScheduleContentProvider$StateTaskContainer(TaskScheduleContentProvider paramTaskScheduleContentProvider, DateRange range, String summary)
  {
    super(TaskScheduleContentProvider.access$2(paramTaskScheduleContentProvider), range, summary);
  }
  
  public Collection<ITask> getChildren()
  {
    Set<ITask> children = new HashSet();
    for (ITask task : TasksUiPlugin.getTaskList().getAllTasks()) {
      if ((select(task)) && (include(task))) {
        children.add(task);
      }
    }
    return children;
  }
  
  private boolean include(ITask task)
  {
    if (task.isCompleted()) {
      return true;
    }
    DateRange scheduledForDate = ((AbstractTask)task).getScheduledForDate();
    if (this$0.taskListView.isFocusedMode())
    {
      if (scheduledForDate != null)
      {
        if (TaskActivityUtil.isAfterCurrentWeek(scheduledForDate.getStartDate())) {
          return true;
        }
        return false;
      }
      if ((task.getDueDate() != null) && (TaskScheduleContentProvider.access$2(this$0).isOwnedByUser(task)))
      {
        temp.setTime(task.getDueDate());
        if (TaskActivityUtil.isAfterCurrentWeek(temp)) {
          return true;
        }
        return false;
      }
    }
    if (scheduledForDate == null)
    {
      if ((task.getDueDate() != null) && (!TaskScheduleContentProvider.access$2(this$0).isOwnedByUser(task))) {
        return true;
      }
      if (task.getDueDate() == null) {
        return true;
      }
    }
    return false;
  }
  
  protected abstract boolean select(ITask paramITask);
}

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

import org.eclipse.swt.events.ControlEvent;
import org.eclipse.swt.events.ControlListener;
import org.eclipse.swt.widgets.TreeColumn;

class TaskListView$18
  implements ControlListener
{
  TaskListView$18(TaskListView paramTaskListView, int[] paramArrayOfInt) {}
  
  public void controlResized(ControlEvent e)
  {
    for (int j = 0; j < val$columnWidths.length; j++) {
      if (TaskListView.access$19(this$0)[j].equals(e.getSource())) {
        val$columnWidths[j] = TaskListView.access$19(this$0)[j].getWidth();
      }
    }
  }
  
  public void controlMoved(ControlEvent e) {}
}

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

import java.util.Collection;
import org.eclipse.core.runtime.Status;
import org.eclipse.mylyn.commons.core.StatusHandler;
import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
import org.eclipse.mylyn.internal.tasks.core.LocalRepositoryConnector;
import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer;
import org.eclipse.mylyn.internal.tasks.core.TaskActivityManager;
import org.eclipse.mylyn.internal.tasks.core.TaskActivityUtil;
import org.eclipse.mylyn.internal.tasks.core.WeekDateRange;
import org.eclipse.mylyn.internal.tasks.ui.AbstractTaskListFilter;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
import org.eclipse.mylyn.tasks.core.ITaskContainer;

public class TaskListInterestFilter
  extends AbstractTaskListFilter
{
  public boolean select(Object parent, Object child)
  {
    try
    {
      if ((child instanceof ScheduledTaskContainer))
      {
        ScheduledTaskContainer dateRangeTaskContainer = (ScheduledTaskContainer)child;
        return isDateRangeInteresting(dateRangeTaskContainer);
      }
      if ((child instanceof ITask))
      {
        AbstractTask task = (AbstractTask)child;
        return isInteresting(parent, task);
      }
      if ((child instanceof ITaskContainer))
      {
        Collection<ITask> children = ((ITaskContainer)child).getChildren();
        if (children.size() == 0) {
          return false;
        }
        for (ITask task : children) {
          if (shouldAlwaysShow(child, (AbstractTask)task, 10)) {
            return true;
          }
        }
      }
    }
    catch (Throwable t)
    {
      StatusHandler.log(new Status(4, "org.eclipse.mylyn.tasks.ui", "Interest filter failed", t));
    }
    return false;
  }
  
  private boolean isDateRangeInteresting(ScheduledTaskContainer scheduleContainer)
  {
    if ((scheduleContainer instanceof TaskScheduleContentProvider.Unscheduled)) {
      return false;
    }
    if (((scheduleContainer instanceof TaskScheduleContentProvider.Incoming)) || 
      ((scheduleContainer instanceof TaskScheduleContentProvider.Outgoing))) {
      return hasChildren(scheduleContainer, scheduleContainer.getChildren());
    }
    if (TaskActivityUtil.getCurrentWeek().isCurrentWeekDay(scheduleContainer.getDateRange()))
    {
      if ((scheduleContainer.isPresent()) || (scheduleContainer.isFuture())) {
        return true;
      }
    }
    else if (scheduleContainer.isPresent()) {
      return true;
    }
    return false;
  }
  
  private boolean hasChildren(Object parent, Collection<ITask> children)
  {
    for (ITask task : children) {
      if (PresentationFilter.getInstance().select(parent, task)) {
        return true;
      }
    }
    return false;
  }
  
  protected boolean isInteresting(Object parent, AbstractTask task)
  {
    return shouldAlwaysShow(parent, task, 10);
  }
  
  public boolean shouldAlwaysShow(Object parent, AbstractTask task, int depth)
  {
    if (!PresentationFilter.getInstance().select(parent, task)) {
      return false;
    }
    if ((!task.isActive()) && (!TasksUiPlugin.getTaskActivityManager().isCompletedToday(task)) && 
      (!hasChanges(parent, task)) && 
      (!hasInterestingSubTasks(parent, task, depth))) {
      if ((task.isCompleted()) || ((!LocalRepositoryConnector.DEFAULT_SUMMARY.equals(task.getSummary())) && 
        (!shouldShowInFocusedWorkweekDateContainer(parent, task)) && 
        (!TasksUiPlugin.getTaskActivityManager().isOverdue(task)) && (!isInterestingForThisWeek(parent, 
        task)))) {
        return false;
      }
    }
    return 
    
      true;
  }
  
  private boolean hasInterestingSubTasks(Object parent, AbstractTask task, int depth)
  {
    if (depth > 0)
    {
      if (!TasksUiPlugin.getDefault().groupSubtasks(task)) {
        return false;
      }
      if ((task.getChildren() != null) && (task.getChildren().size() > 0)) {
        for (ITask subTask : task.getChildren()) {
          if (shouldAlwaysShow(parent, (AbstractTask)subTask, depth - 1)) {
            return true;
          }
        }
      }
    }
    return false;
  }
  
  private boolean shouldShowInFocusedWorkweekDateContainer(Object parent, ITask task)
  {
    if ((parent instanceof TaskScheduleContentProvider.Unscheduled)) {
      return false;
    }
    if ((parent instanceof TaskScheduleContentProvider.Incoming)) {
      return true;
    }
    if ((parent instanceof TaskScheduleContentProvider.Outgoing)) {
      return true;
    }
    if ((parent instanceof TaskScheduleContentProvider.Completed)) {
      return true;
    }
    if ((parent instanceof ScheduledTaskContainer)) {
      return isDateRangeInteresting((ScheduledTaskContainer)parent);
    }
    return false;
  }
  
  public boolean isInterestingForThisWeek(Object parent, AbstractTask task)
  {
    if ((parent instanceof ScheduledTaskContainer)) {
      return shouldShowInFocusedWorkweekDateContainer(parent, task);
    }
    return (TasksUiPlugin.getTaskActivityManager().isPastReminder(task)) || (TasksUiPlugin.getTaskActivityManager().isSheduledForPastWeek(task)) || (TasksUiPlugin.getTaskActivityManager().isScheduledForThisWeek(task)) || (TasksUiPlugin.getTaskActivityManager().isDueThisWeek(task)) || (TasksUiPlugin.getTaskActivityManager().isScheduledForToday(task));
  }
  
  public boolean hasChanges(Object parent, ITask task)
  {
    if (((parent instanceof ScheduledTaskContainer)) && (!(parent instanceof TaskScheduleContentProvider.Unscheduled)) && 
      (!shouldShowInFocusedWorkweekDateContainer(parent, task))) {
      return false;
    }
    return hasChangesHelper(parent, task);
  }
  
  private boolean hasChangesHelper(Object parent, ITask task)
  {
    if (task.getSynchronizationState().isOutgoing()) {
      return true;
    }
    if (TasksUiInternal.shouldShowIncoming(task)) {
      return true;
    }
    if ((task instanceof ITaskContainer)) {
      for (ITask child : ((ITaskContainer)task).getChildren()) {
        if ((PresentationFilter.getInstance().select(task, child)) && (hasChangesHelper(parent, child))) {
          return true;
        }
      }
    }
    return false;
  }
}

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

class TaskListView$24
  implements Runnable
{
  TaskListView$24(TaskListView paramTaskListView) {}
  
  public void run()
  {
    TaskListView.access$0(this$0).indicateActiveTaskWorkingSet();
  }
}

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

import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerSorter;
import org.eclipse.mylyn.internal.tasks.core.LocalRepositoryConnector;
import org.eclipse.mylyn.tasks.core.TaskRepository;

public class TaskRepositoriesSorter
  extends ViewerSorter
{
  public int compare(Viewer viewer, Object e1, Object e2)
  {
    if (((e1 instanceof TaskRepository)) && ((e2 instanceof TaskRepository)))
    {
      TaskRepository t1 = (TaskRepository)e1;
      TaskRepository t2 = (TaskRepository)e2;
      
      String label1 = t1.getRepositoryLabel();
      String label2 = t2.getRepositoryLabel();
      if (LocalRepositoryConnector.REPOSITORY_LABEL.equals(label1)) {
        return -1;
      }
      if (LocalRepositoryConnector.REPOSITORY_LABEL.equals(label2)) {
        return 1;
      }
      if (!t1.getConnectorKind().equals(t2.getConnectorKind())) {
        return t1.getConnectorKind().compareTo(t2.getConnectorKind());
      }
      if (label1 != null) {
        return label1.compareTo(label2);
      }
    }
    return super.compare(viewer, e1, e2);
  }
}

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

import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.ILabelProviderListener;
import org.eclipse.mylyn.commons.ui.CommonImages;
import org.eclipse.mylyn.internal.tasks.core.Category;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.internal.tasks.ui.actions.DisconnectRepositoryAction;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.ui.TasksUiImages;
import org.eclipse.swt.graphics.Image;

public class TaskRepositoryLabelProvider
  implements ILabelProvider
{
  public Image getColumnImage(Object obj, int index)
  {
    if (index == 0) {
      return getImage(obj);
    }
    return null;
  }
  
  public Image getImage(Object object)
  {
    if ((object instanceof Category)) {
      return CommonImages.getImage(TasksUiImages.CATEGORY);
    }
    if ((object instanceof AbstractRepositoryConnector))
    {
      AbstractRepositoryConnector repositoryConnector = (AbstractRepositoryConnector)object;
      Image image = TasksUiPlugin.getDefault().getBrandingIcon(repositoryConnector.getConnectorKind());
      if (image != null) {
        return image;
      }
      return CommonImages.getImage(TasksUiImages.REPOSITORY);
    }
    if ((object instanceof TaskRepository))
    {
      if (((TaskRepository)object).isOffline()) {
        return CommonImages.getImage(TasksUiImages.REPOSITORY_OFFLINE);
      }
      return CommonImages.getImage(TasksUiImages.REPOSITORY);
    }
    return null;
  }
  
  public String getText(Object object)
  {
    if ((object instanceof TaskRepository))
    {
      TaskRepository repository = (TaskRepository)object;
      StringBuilder label = new StringBuilder();
      label.append(repository.getRepositoryLabel());
      if (repository.isOffline()) {
        label.append(" [" + DisconnectRepositoryAction.LABEL + "]");
      }
      return label.toString();
    }
    if ((object instanceof AbstractRepositoryConnector)) {
      return ((AbstractRepositoryConnector)object).getLabel();
    }
    if ((object instanceof Category)) {
      return ((Category)object).getLabel();
    }
    return null;
  }
  
  public void addListener(ILabelProviderListener listener) {}
  
  public void dispose() {}
  
  public boolean isLabelProperty(Object element, String property)
  {
    return false;
  }
  
  public void removeListener(ILabelProviderListener listener) {}
}

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

import org.eclipse.jface.resource.ColorRegistry;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.mylyn.commons.ui.compatibility.CommonThemes;
import org.eclipse.ui.themes.ITheme;
import org.eclipse.ui.themes.IThemeManager;

class TaskListView$5
  implements IPropertyChangeListener
{
  TaskListView$5(TaskListView paramTaskListView) {}
  
  public void propertyChange(PropertyChangeEvent event)
  {
    if ((event.getProperty().equals("CHANGE_CURRENT_THEME")) || 
      (CommonThemes.isCommonTheme(event.getProperty())))
    {
      TaskListView.access$3(this$0).setCategoryBackgroundColor(TaskListView.access$4(this$0).getCurrentTheme()
        .getColorRegistry()
        .get("org.eclipse.mylyn.tasks.ui.colors.category.gradient.end"));
      this$0.getViewer().refresh();
    }
  }
}

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

import java.util.Arrays;
import java.util.HashSet;
import java.util.Iterator;
import java.util.Set;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.StructuredViewer;
import org.eclipse.jface.viewers.TreePath;
import org.eclipse.jface.viewers.TreeSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.mylyn.commons.core.StatusHandler;
import org.eclipse.mylyn.commons.workbench.DelayedRefreshJob;
import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
import org.eclipse.mylyn.internal.tasks.ui.util.TreeWalker;
import org.eclipse.mylyn.internal.tasks.ui.util.TreeWalker.TreeVisitor;
import org.eclipse.swt.SWTException;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;

final class TaskListView$TaskListRefreshJob
  extends DelayedRefreshJob
{
  private TaskListView$TaskListRefreshJob(TaskListView paramTaskListView, TreeViewer treeViewer, String name)
  {
    super(treeViewer, name);
  }
  
  protected void doRefresh(Object[] items)
  {
    TreePath selection = preserveSelection();
    if (items == null) {
      viewer.refresh(true);
    } else if (items.length > 0) {
      try
      {
        Object localObject1;
        Object item;
        if (this$0.isFocusedMode())
        {
          Set<Object> children = new HashSet(Arrays.asList(items));
          Set<AbstractTaskContainer> parents = new HashSet();
          Object[] arrayOfObject2;
          int j = (arrayOfObject2 = items).length;
          for (int i = 0; i < j; i++)
          {
            Object item = arrayOfObject2[i];
            if ((item instanceof AbstractTask)) {
              parents.addAll(((AbstractTask)item).getParentContainers());
            }
          }
          children.removeAll(parents);
          for (AbstractTaskContainer parent : parents)
          {
            viewer.refresh(parent, false);
            
            viewer.update(parent, null);
          }
          for (Object item : children) {
            viewer.refresh(item, true);
          }
          j = (arrayOfObject2 = items).length;
          for (localObject1 = 0; localObject1 < j; localObject1++)
          {
            item = arrayOfObject2[localObject1];
            updateExpansionState(item);
          }
        }
        else
        {
          Set<AbstractTaskContainer> parents = new HashSet();
          Object[] arrayOfObject1;
          localObject1 = (arrayOfObject1 = items).length;
          for (item = 0; item < localObject1; item++)
          {
            Object item = arrayOfObject1[item];
            if ((item instanceof AbstractTask)) {
              parents.addAll(((AbstractTask)item).getParentContainers());
            }
            viewer.refresh(item, true);
            updateExpansionState(item);
          }
          for (item = parents.iterator(); ((Iterator)item).hasNext();)
          {
            AbstractTaskContainer parent = (AbstractTaskContainer)((Iterator)item).next();
            
            viewer.update(parent, null);
          }
        }
      }
      catch (SWTException e)
      {
        StatusHandler.log(new Status(4, "org.eclipse.mylyn.tasks.ui", "Failed to refresh viewer: " + 
          viewer, e));
      }
    }
    TaskListView.access$10(this$0, false);
    restoreSelection(selection);
  }
  
  private TreePath preserveSelection()
  {
    if ((viewer instanceof TreeViewer))
    {
      TreeViewer treeViewer = (TreeViewer)viewer;
      
      TreeItem[] selection = treeViewer.getTree().getSelection();
      if (selection.length > 0)
      {
        TreeWalker treeWalker = new TreeWalker(treeViewer);
        treeWalker.walk(new TreeWalker.TreeVisitor()
        {
          public boolean visit(Object object)
          {
            return true;
          }
        }, selection[(selection.length - 1)]);
      }
    }
    return null;
  }
  
  private void restoreSelection(TreePath treePath)
  {
    if (treePath != null)
    {
      ISelection newSelection = viewer.getSelection();
      if ((newSelection == null) || (newSelection.isEmpty())) {
        viewer.setSelection(new TreeSelection(treePath), true);
      }
    }
  }
  
  protected void updateExpansionState(Object item)
  {
    if ((this$0.isFocusedMode()) && (TaskListView.access$11(this$0))) {
      this$0.getViewer().expandToLevel(item, 3);
    }
  }
}

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

import org.eclipse.mylyn.internal.tasks.ui.TaskScalingHyperlink;
import org.eclipse.mylyn.internal.tasks.ui.search.SearchUtil;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.forms.events.HyperlinkEvent;
import org.eclipse.ui.forms.events.IHyperlinkListener;

class TaskListFilteredTree$7
  implements IHyperlinkListener
{
  TaskListFilteredTree$7(TaskListFilteredTree paramTaskListFilteredTree, TaskScalingHyperlink paramTaskScalingHyperlink) {}
  
  public void linkActivated(HyperlinkEvent e)
  {
    SearchUtil.openSearchDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow());
  }
  
  public void linkEntered(HyperlinkEvent e)
  {
    val$searchLink.setUnderlined(true);
  }
  
  public void linkExited(HyperlinkEvent e)
  {
    val$searchLink.setUnderlined(false);
  }
}

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

import java.util.Set;
import org.eclipse.core.runtime.Platform;
import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
import org.eclipse.mylyn.internal.tasks.core.TaskContainerDelta;
import org.eclipse.mylyn.internal.tasks.ui.editors.TaskListChangeAdapter;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;

class TaskListFilteredTree$11
  extends TaskListChangeAdapter
{
  TaskListFilteredTree$11(TaskListFilteredTree paramTaskListFilteredTree) {}
  
  public void containersChanged(Set<TaskContainerDelta> containers)
  {
    for (TaskContainerDelta taskContainerDelta : containers) {
      if ((taskContainerDelta.getElement() instanceof ITask))
      {
        final AbstractTask changedTask = (AbstractTask)taskContainerDelta.getElement();
        if ((changedTask.isActive()) && 
          (Platform.isRunning()) && (PlatformUI.getWorkbench() != null)) {
          if (Display.getCurrent() == null)
          {
            if ((PlatformUI.getWorkbench().getDisplay() != null) && 
              (!PlatformUI.getWorkbench().getDisplay().isDisposed())) {
              PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable()
              {
                public void run()
                {
                  this$0.indicateActiveTask(changedTask);
                }
              });
            }
          }
          else {
            this$0.indicateActiveTask(changedTask);
          }
        }
      }
    }
  }
}

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

import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.mylyn.commons.workbench.GradientDrawer;
import org.eclipse.mylyn.internal.tasks.core.Category;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Widget;
import org.eclipse.ui.themes.IThemeManager;

class TaskRepositoriesView$4
  extends GradientDrawer
{
  TaskRepositoriesView$4(TaskRepositoriesView paramTaskRepositoriesView, IThemeManager $anonymous0, TreeViewer $anonymous1)
  {
    super($anonymous0, $anonymous1);
  }
  
  protected boolean shouldApplyGradient(Event event)
  {
    return item.getData() instanceof Category;
  }
}

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

public enum TaskListSorter$GroupBy
{
  NONE,  CATEGORY_QUERY,  CATEGORY_REPOSITORY;
  
  public String getLabel()
  {
    switch (this)
    {
    case CATEGORY_QUERY: 
      return Messages.TaskListSorter_No_Grouping;
    case CATEGORY_REPOSITORY: 
      return Messages.TaskListSorter_Catagory_and_Query;
    case NONE: 
      return Messages.TaskListSorter_Catagory_and_Repository;
    }
    return null;
  }
  
  public static GroupBy valueOfLabel(String label)
  {
    GroupBy[] arrayOfGroupBy;
    int j = (arrayOfGroupBy = values()).length;
    for (int i = 0; i < j; i++)
    {
      GroupBy value = arrayOfGroupBy[i];
      if (value.getLabel().equals(label)) {
        return value;
      }
    }
    return null;
  }
}

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

class TaskListSorter$SortElement
{
  private int weight;
  private final String[] values = new String[3];
  
  private TaskListSorter$SortElement(TaskListSorter paramTaskListSorter) {}
}

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

import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
import org.eclipse.mylyn.internal.tasks.core.AbstractTaskCategory;
import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
import org.eclipse.mylyn.internal.tasks.core.TaskTask;
import org.eclipse.mylyn.internal.tasks.ui.AbstractTaskListFilter;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.tasks.core.IAttributeContainer;
import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
import org.eclipse.mylyn.tasks.core.ITask;

public class PresentationFilter
  extends AbstractTaskListFilter
{
  private static PresentationFilter instance = new PresentationFilter();
  private boolean filterHiddenQueries;
  private boolean filterNonMatching;
  
  public static PresentationFilter getInstance()
  {
    return instance;
  }
  
  private PresentationFilter()
  {
    updateSettings();
  }
  
  public boolean isFilterHiddenQueries()
  {
    return filterHiddenQueries;
  }
  
  public boolean isFilterNonMatching()
  {
    return filterNonMatching;
  }
  
  public boolean select(Object element)
  {
    if ((element instanceof IRepositoryQuery))
    {
      if (!filterHiddenQueries) {
        return true;
      }
      return isQueryVisible(element);
    }
    if ((element instanceof TaskTask))
    {
      if (!filterNonMatching) {
        return true;
      }
      for (AbstractTaskContainer container : ((AbstractTask)element).getParentContainers())
      {
        if ((container instanceof AbstractTaskCategory)) {
          return true;
        }
        if (((container instanceof IRepositoryQuery)) && ((!filterHiddenQueries) || (isQueryVisible(container)))) {
          return true;
        }
      }
      return false;
    }
    return true;
  }
  
  public boolean select(Object parent, Object element)
  {
    return select(element);
  }
  
  public void setFilterHiddenQueries(boolean enabled)
  {
    filterHiddenQueries = enabled;
  }
  
  public void setFilterNonMatching(boolean filterSubtasks)
  {
    filterNonMatching = filterSubtasks;
  }
  
  public void updateSettings()
  {
    setFilterHiddenQueries(TasksUiPlugin.getDefault()
      .getPreferenceStore()
      .getBoolean("org.eclipse.mylyn.tasks.ui.filters.hidden"));
    setFilterNonMatching(TasksUiPlugin.getDefault()
      .getPreferenceStore()
      .getBoolean("org.eclipse.mylyn.tasks.ui.filters.nonmatching"));
  }
  
  private boolean isQueryVisible(Object element)
  {
    return !Boolean.parseBoolean(((IAttributeContainer)element).getAttribute("task.common.hidden"));
  }
  
  public boolean isInVisibleQuery(ITask task)
  {
    for (AbstractTaskContainer container : ((AbstractTask)task).getParentContainers())
    {
      if ((container instanceof AbstractTaskCategory)) {
        return true;
      }
      if (((container instanceof IRepositoryQuery)) && ((!filterHiddenQueries) || (isQueryVisible(container)))) {
        return true;
      }
    }
    return false;
  }
}

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

import org.eclipse.mylyn.internal.tasks.ui.actions.RenameAction;
import org.eclipse.mylyn.internal.tasks.ui.actions.TaskListViewActionGroup;
import org.eclipse.swt.SWT;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.events.KeyListener;
import org.eclipse.swt.widgets.Text;

class TaskListView$12
  implements KeyListener
{
  TaskListView$12(TaskListView paramTaskListView) {}
  
  public void keyPressed(KeyEvent e)
  {
    if ((keyCode == 16777227) && (stateMask == 0))
    {
      if (TaskListView.access$17(this$0).getRenameAction().isEnabled()) {
        TaskListView.access$17(this$0).getRenameAction().run();
      }
    }
    else if ((keyCode & 0x1000000) == 0) {
      if (keyCode == 27)
      {
        TaskListView.access$9(this$0).hide();
      }
      else if ((keyCode == 102) && (stateMask == SWT.MOD1))
      {
        TaskListView.access$0(this$0).getFilterControl().
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