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

(tipWidget);
        } else if ((bounds != null) && (contains(x, y))) {
          currentTipElement = getTaskListElement(tipWidget);
        }
      }
    }
    if (currentTipElement == null)
    {
      hide();
      return false;
    }
    return true;
  }
  
  private boolean contains(int x, int y)
  {
    if ((control instanceof Scrollable)) {
      return ((Scrollable)control).getClientArea().contains(x, y);
    }
    return control.getBounds().contains(x, y);
  }
  
  protected Composite createToolTipArea(Event event, Composite parent)
  {
    assert (currentTipElement != null);
    
    Composite composite = createToolTipContentAreaComposite(parent);
    
    addIconAndLabel(composite, getImage(currentTipElement), getTitleText(currentTipElement), true);
    
    String detailsText = getDetailsText(currentTipElement);
    if (detailsText != null) {
      addIconAndLabel(composite, null, detailsText);
    }
    String synchText = getSynchText(currentTipElement);
    if (synchText != null) {
      addIconAndLabel(composite, CommonImages.getImage(TasksUiImages.REPOSITORY_SYNCHRONIZE), synchText);
    }
    String activityText = getActivityText(currentTipElement);
    if (activityText != null) {
      addIconAndLabel(composite, CommonImages.getImage(CommonImages.CALENDAR), activityText);
    }
    String incommingText = getIncommingText(currentTipElement);
    if (incommingText != null)
    {
      Image image = CommonImages.getImage(CommonImages.OVERLAY_SYNC_INCOMMING);
      if ((currentTipElement instanceof ITask))
      {
        ITask task = (ITask)currentTipElement;
        if (task.getSynchronizationState() == ITask.SynchronizationState.INCOMING_NEW) {
          image = CommonImages.getImage(CommonImages.OVERLAY_SYNC_INCOMMING_NEW);
        } else if (task.getSynchronizationState() == ITask.SynchronizationState.OUTGOING_NEW) {
          image = CommonImages.getImage(CommonImages.OVERLAY_SYNC_OUTGOING_NEW);
        }
      }
      addIconAndLabel(composite, image, incommingText);
    }
    ProgressData progress = getProgressData(currentTipElement);
    if (progress != null)
    {
      addIconAndLabel(composite, null, text);
      
      Label label = new Label(composite, 0);
      GridData labelGridData = new GridData(4, 128, true, false);
      heightHint = 0;
      label.setLayoutData(labelGridData);
      
      Composite progressComposite = new Composite(composite, 0);
      GridLayout progressLayout = new GridLayout(1, false);
      marginWidth = 0;
      marginHeight = 0;
      progressComposite.setLayout(progressLayout);
      progressComposite.setLayoutData(new GridData(4, 128, true, false));
      
      WorkweekProgressBar taskProgressBar = new WorkweekProgressBar(progressComposite);
      taskProgressBar.setLayoutData(new GridData(4, 128, true, false));
      taskProgressBar.reset(completed, total);
    }
    String statusText = getStatusText(currentTipElement);
    if (statusText != null) {
      addIconAndLabel(composite, CommonImages.getImage(CommonImages.WARNING), statusText);
    }
    String helpText = getHelpText(currentTipElement);
    if (helpText != null) {
      addIconAndLabel(composite, CommonImages.getImage(CommonImages.QUESTION), helpText);
    }
    visible = true;
    
    return composite;
  }
  
  private String getHelpText(IRepositoryElement element)
  {
    if ((((element instanceof TaskCategory)) || ((element instanceof IRepositoryQuery))) && 
      (AbstractTaskListFilter.hasDescendantIncoming((ITaskContainer)element)))
    {
      TaskListView taskListView = TaskListView.getFromActivePerspective();
      if (taskListView != null) {
        if (!taskListView.isFocusedMode()) {
          if (TasksUiPlugin.getDefault().getPreferenceStore().getBoolean("org.eclipse.mylyn.tasks.ui.filters.complete"))
          {
            Object[] children = ((TaskListContentProvider)taskListView.getViewer().getContentProvider()).getChildren(element);
            boolean hasIncoming = false;
            Object[] arrayOfObject1;
            int j = (arrayOfObject1 = children).length;
            for (int i = 0; i < j; i++)
            {
              Object child = arrayOfObject1[i];
              if (((child instanceof ITask)) && 
                (TasksUiInternal.shouldShowIncoming((ITask)child)))
              {
                hasIncoming = true;
                break;
              }
            }
            if (!hasIncoming) {
              return Messages.TaskListToolTip_Some_incoming_elements_may_be_filtered;
            }
          }
        }
      }
    }
    if ((element instanceof UncategorizedTaskContainer)) {
      return Messages.TaskListToolTip_Automatic_container_for_all_local_tasks;
    }
    if ((element instanceof UnmatchedTaskContainer)) {
      return Messages.TaskListToolTip_Automatic_container_for_repository_tasks;
    }
    return null;
  }
  
  protected Composite createToolTipContentAreaComposite(Composite parent)
  {
    Composite composite = new Composite(parent, 0);
    GridLayout gridLayout = new GridLayout();
    numColumns = 2;
    marginWidth = 5;
    marginHeight = 2;
    composite.setLayout(gridLayout);
    composite.setBackground(composite.getDisplay().getSystemColor(29));
    return composite;
  }
  
  private String getSynchText(IRepositoryElement element)
  {
    if ((element instanceof IRepositoryQuery))
    {
      String syncStamp = ((RepositoryQuery)element).getLastSynchronizedTimeStamp();
      if (syncStamp != null) {
        return NLS.bind(Messages.TaskListToolTip_Synchronized, syncStamp);
      }
    }
    return null;
  }
  
  private String removeTrailingNewline(String text)
  {
    if (text.endsWith("\n")) {
      return text.substring(0, text.length() - 1);
    }
    return text;
  }
  
  protected void addIconAndLabel(Composite parent, Image image, String text)
  {
    addIconAndLabel(parent, image, text, false);
  }
  
  protected void addIconAndLabel(Composite parent, Image image, String text, boolean title)
  {
    Label imageLabel = new Label(parent, 0);
    imageLabel.setForeground(parent.getDisplay().getSystemColor(28));
    imageLabel.setBackground(parent.getDisplay().getSystemColor(29));
    imageLabel.setLayoutData(new GridData(34));
    imageLabel.setImage(image);
    
    Label textLabel = new Label(parent, 64);
    if (title) {
      textLabel.setFont(CommonFonts.BOLD);
    }
    textLabel.setForeground(titleColor);
    textLabel.setBackground(parent.getDisplay().getSystemColor(29));
    textLabel.setLayoutData(new GridData(772));
    text = removeTrailingNewline(text);
    textLabel.setText(CommonUiUtil.toLabel(text));
    int width = Math.min(computeSize-1-1x, 600);
    GridDataFactory.fillDefaults().align(4, 1).hint(width, -1).applyTo(textLabel);
  }
  
  private static class ProgressData
  {
    int completed;
    int total;
    String text;
    
    public ProgressData(int completed, int total, String text)
    {
      this.completed = completed;
      this.total = total;
      this.text = text;
    }
  }
  
  public boolean isVisible()
  {
    return visible;
  }
  
  public boolean isTriggeredByMouse()
  {
    return triggeredByMouse;
  }
  
  public void show(Point location)
  {
    triggeredByMouse = false;
    super.show(location);
  }
  
  public boolean isEnabled()
  {
    return enabled;
  }
  
  public void setEnabled(boolean enabled)
  {
    this.enabled = enabled;
  }
  
  public static abstract interface TaskListToolTipListener
  {
    public abstract void toolTipHidden(Event paramEvent);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.tasks.ui.views.TaskListToolTip
 * 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;

class TaskListView$3$1
  implements Runnable
{
  TaskListView$3$1(TaskListView.3 param3, ITask paramITask) {}
  
  public void run()
  {
    TaskListView.access$2(TaskListView.3.access$1(this$1));
    TaskListView.3.access$0(this$1, val$task);
    TaskListView.3.access$1(this$1).selectedAndFocusTask(val$task);
    TaskListView.access$0(TaskListView.3.access$1(this$1)).indicateActiveTask(val$task);
  }
}

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

import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;

class TaskRepositoriesView$5
  implements IMenuListener
{
  TaskRepositoriesView$5(TaskRepositoriesView paramTaskRepositoriesView) {}
  
  public void menuAboutToShow(IMenuManager manager)
  {
    TaskRepositoriesView.access$1(this$0, manager);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.tasks.ui.views.TaskRepositoriesView.5
 * 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.ITreeViewerListener;
import org.eclipse.jface.viewers.TreeExpansionEvent;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;

class TaskListView$13
  implements ITreeViewerListener
{
  TaskListView$13(TaskListView paramTaskListView) {}
  
  public void treeCollapsed(final TreeExpansionEvent event)
  {
    PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable()
    {
      public void run()
      {
        this$0.getViewer().refresh(event.getElement());
      }
    });
  }
  
  public void treeExpanded(final TreeExpansionEvent event)
  {
    PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable()
    {
      public void run()
      {
        this$0.getViewer().refresh(event.getElement());
      }
    });
  }
}

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

import org.eclipse.jface.action.Action;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel;

class PriorityDropDownAction$2
  extends Action
{
  PriorityDropDownAction$2(PriorityDropDownAction paramPriorityDropDownAction, String $anonymous0, int $anonymous1)
  {
    super($anonymous0, $anonymous1);
  }
  
  public void run()
  {
    TasksUiPlugin.getDefault().getPreferenceStore().setValue("org.eclipse.mylyn.tasks.ui.filters.priority", ITask.PriorityLevel.P2.toString());
    PriorityDropDownAction.access$0(this$0).displayPrioritiesAbove(TaskListView.PRIORITY_LEVELS[1]);
  }
}

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

import java.util.ArrayList;
import java.util.Calendar;
import java.util.Collection;
import java.util.Collections;
import java.util.Date;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
import org.eclipse.mylyn.internal.tasks.core.DateRange;
import org.eclipse.mylyn.internal.tasks.core.DayDateRange;
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.core.WeekDateRange;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.tasks.core.IRepositoryElement;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.mylyn.tasks.core.ITask.SynchronizationState;
import org.eclipse.mylyn.tasks.core.ITaskActivityListener;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;

public class TaskScheduleContentProvider
  extends TaskListContentProvider
  implements ITaskActivityListener
{
  private final TaskActivityManager taskActivityManager;
  private final Unscheduled unscheduled;
  private final Calendar END_OF_TIME;
  private final Calendar INCOMING_TIME;
  private final Calendar OUTGOING_TIME;
  private final Calendar COMPLETED_TIME;
  private Job rolloverJob;
  private final Incoming incoming;
  private final Outgoing outgoing;
  private final Completed completed;
  
  public TaskScheduleContentProvider(TaskListView taskListView)
  {
    super(taskListView);
    taskActivityManager = TasksUiPlugin.getTaskActivityManager();
    taskActivityManager.addActivityListener(this);
    END_OF_TIME = TaskActivityUtil.getCalendar();
    END_OF_TIME.add(1, 5000);
    END_OF_TIME.getTime();
    unscheduled = new Unscheduled();
    
    INCOMING_TIME = TaskActivityUtil.getCalendar();
    INCOMING_TIME.setTimeInMillis(END_OF_TIME.getTimeInMillis() - 1L);
    incoming = new Incoming();
    
    OUTGOING_TIME = TaskActivityUtil.getCalendar();
    
    OUTGOING_TIME.setTimeInMillis(END_OF_TIME.getTimeInMillis() - 2L);
    outgoing = new Outgoing();
    
    COMPLETED_TIME = TaskActivityUtil.getCalendar();
    COMPLETED_TIME.setTimeInMillis(END_OF_TIME.getTimeInMillis() + 2L);
    completed = new Completed();
  }
  
  public Object[] getElements(Object parent)
  {
    if ((parent != null) && (parent.equals(taskListView.getViewSite())))
    {
      Set<AbstractTaskContainer> containers = new HashSet();
      WeekDateRange week = TaskActivityUtil.getCurrentWeek();
      WeekDateRange nextWeek = TaskActivityUtil.getNextWeek();
      long delay;
      synchronized (this)
      {
        if (rolloverJob != null)
        {
          rolloverJob.cancel();
          rolloverJob = null;
        }
        delay = week.getToday().getEndDate().getTime().getTime() - new Date().getTime();
        rolloverJob = new RolloverCheck();
        rolloverJob.setSystem(true);
        rolloverJob.setPriority(20);
        rolloverJob.schedule(delay);
      }
      for (DateRange day : week.getRemainingDays()) {
        containers.add(new ScheduledTaskContainer(TasksUiPlugin.getTaskActivityManager(), day));
      }
      containers.add(new ScheduledTaskContainer(TasksUiPlugin.getTaskActivityManager(), week));
      for (DateRange day : nextWeek.getDaysOfWeek()) {
        containers.add(new ScheduledTaskContainer(TasksUiPlugin.getTaskActivityManager(), day));
      }
      ScheduledTaskContainer nextWeekContainer = new ScheduledTaskContainer(taskActivityManager, nextWeek);
      containers.add(nextWeekContainer);
      
      ScheduledTaskContainer twoWeeksContainer = new ScheduledTaskContainer(taskActivityManager, week.next()
        .next(), Messages.TaskScheduleContentProvider_Two_Weeks);
      containers.add(twoWeeksContainer);
      
      Calendar startDate = TaskActivityUtil.getCalendar();
      startDate.setTimeInMillis(twoWeeksContainer.getEnd().getTimeInMillis());
      TaskActivityUtil.snapNextDay(startDate);
      Calendar endDate = TaskActivityUtil.getCalendar();
      endDate.add(1, 4999);
      DateRange future = new DateRange(startDate, endDate);
      
      ScheduledTaskContainer futureContainer = new ScheduledTaskContainer(taskActivityManager, future, 
        Messages.TaskScheduleContentProvider_Future);
      containers.add(futureContainer);
      
      containers.add(outgoing);
      
      containers.add(incoming);
      
      containers.add(unscheduled);
      
      containers.add(completed);
      
      return applyFilter(containers).toArray();
    }
    return getChildren(parent);
  }
  
  public Object getParent(Object child)
  {
    return null;
  }
  
  public boolean hasChildren(Object parent)
  {
    return getChildren(parent).length > 0;
  }
  
  protected List<IRepositoryElement> getFilteredChildrenFor(Object parent)
  {
    if ((parent instanceof ITask)) {
      return Collections.emptyList();
    }
    if ((parent instanceof ScheduledTaskContainer))
    {
      Collection<ITask> children = ((ScheduledTaskContainer)parent).getChildren();
      List<IRepositoryElement> result = new ArrayList(children.size());
      for (ITask child : children) {
        if (!filter(parent, child)) {
          result.add(child);
        }
      }
      return result;
    }
    return super.getFilteredChildrenFor(parent);
  }
  
  private void refresh()
  {
    if ((Platform.isRunning()) && (PlatformUI.getWorkbench() != null) && (!PlatformUI.getWorkbench().isClosing())) {
      PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable()
      {
        public void run()
        {
          taskListView.refresh();
        }
      });
    }
  }
  
  public void dispose()
  {
    synchronized (this)
    {
      if (rolloverJob != null) {
        rolloverJob.cancel();
      }
    }
    taskActivityManager.removeActivityListener(this);
    super.dispose();
  }
  
  public void activityReset()
  {
    refresh();
  }
  
  public void elapsedTimeUpdated(ITask task, long newElapsedTime) {}
  
  private static boolean notScheduled(ITask task)
  {
    ITask.SynchronizationState state = task.getSynchronizationState();
    
    return (state == ITask.SynchronizationState.SYNCHRONIZED) || ((state == ITask.SynchronizationState.INCOMING) && (Boolean.parseBoolean(task.getAttribute("task.common.suppress.incoming"))));
  }
  
  public class Unscheduled
    extends TaskScheduleContentProvider.StateTaskContainer
  {
    public Unscheduled()
    {
      super(new DateRange(END_OF_TIME), Messages.TaskScheduleContentProvider_Unscheduled);
    }
    
    protected boolean select(ITask task)
    {
      return (!task.isCompleted()) && (TaskScheduleContentProvider.notScheduled(task));
    }
  }
  
  public abstract class StateTaskContainer
    extends ScheduledTaskContainer
  {
    Calendar temp = TaskActivityUtil.getCalendar();
    
    public StateTaskContainer(DateRange range, String summary)
    {
      super(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 (taskListView.isFocusedMode())
      {
        if (scheduledForDate != null)
        {
          if (TaskActivityUtil.isAfterCurrentWeek(scheduledForDate.getStartDate())) {
            return true;
          }
          return false;
        }
        if ((task.getDueDate() != null) && (taskActivityManager.isOwnedByUser(task)))
        {
          temp.setTime(task.getDueDate());
          if (TaskActivityUtil.isAfterCurrentWeek(temp)) {
            return true;
          }
          return false;
        }
      }
      if (scheduledForDate == null)
      {
        if ((task.getDueDate() != null) && (!taskActivityManager.isOwnedByUser(task))) {
          return true;
        }
        if (task.getDueDate() == null) {
          return true;
        }
      }
      return false;
    }
    
    protected abstract boolean select(ITask paramITask);
  }
  
  public class Incoming
    extends TaskScheduleContentProvider.StateTaskContainer
  {
    public Incoming()
    {
      super(new DateRange(INCOMING_TIME), Messages.TaskScheduleContentProvider_Incoming);
    }
    
    protected boolean select(ITask task)
    {
      ITask.SynchronizationState state = task.getSynchronizationState();
      
      return (state == ITask.SynchronizationState.INCOMING_NEW) || ((state == ITask.SynchronizationState.INCOMING) && (!Boolean.parseBoolean(task.getAttribute("task.common.suppress.incoming"))));
    }
  }
  
  public class Outgoing
    extends TaskScheduleContentProvider.StateTaskContainer
  {
    public Outgoing()
    {
      super(new DateRange(OUTGOING_TIME), Messages.TaskScheduleContentProvider_Outgoing);
    }
    
    public boolean select(ITask task)
    {
      ITask.SynchronizationState state = task.getSynchronizationState();
      
      return (state == ITask.SynchronizationState.OUTGOING) || (state == ITask.SynchronizationState.OUTGOING_NEW) || (state == ITask.SynchronizationState.CONFLICT);
    }
  }
  
  public class Completed
    extends TaskScheduleContentProvider.StateTaskContainer
  {
    public Completed()
    {
      super(new DateRange(COMPLETED_TIME), Messages.TaskScheduleContentProvider_Completed);
    }
    
    public boolean select(ITask task)
    {
      return (task.isCompleted()) && (TaskScheduleContentProvider.notScheduled(task));
    }
  }
  
  private class RolloverCheck
    extends Job
  {
    public RolloverCheck()
    {
      super();
    }
    
    protected IStatus run(IProgressMonitor monitor)
    {
      TaskScheduleContentProvider.this.refresh();
      return Status.OK_STATUS;
    }
  }
}

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

import org.eclipse.ui.part.IShowInTargetList;

class TaskListView$26
  implements IShowInTargetList
{
  TaskListView$26(TaskListView paramTaskListView) {}
  
  public String[] getShowInTargetIds()
  {
    return new String[] { "org.eclipse.team.ui.GenericHistoryView" };
  }
}

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

import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.IPartListener;
import org.eclipse.ui.IViewReference;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchPartSite;

class TaskListView$7
  implements IPartListener
{
  TaskListView$7(TaskListView paramTaskListView) {}
  
  private void jumpToEditor(IWorkbenchPart part)
  {
    if ((!TaskListView.access$7(this$0)) || (!(part instanceof IEditorPart))) {
      return;
    }
    TaskListView.access$8(this$0, (IEditorPart)part);
  }
  
  public void partActivated(IWorkbenchPart part)
  {
    if (part == this$0) {
      TaskListView.access$2(this$0);
    } else {
      jumpToEditor(part);
    }
  }
  
  public void partBroughtToTop(IWorkbenchPart part) {}
  
  public void partClosed(IWorkbenchPart part) {}
  
  public void partDeactivated(IWorkbenchPart part)
  {
    if (part == this$0)
    {
      IViewReference reference = this$0.getSite().getPage().findViewReference("org.eclipse.mylyn.tasks.ui.views.tasks");
      if ((reference != null) && (reference.isFastView())) {
        TaskListView.access$2(this$0);
      }
      TaskListView.access$9(this$0).hide();
    }
  }
  
  public void partOpened(IWorkbenchPart part) {}
}

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

import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.mylyn.internal.tasks.ui.actions.RepositoryElementActionGroup;

class TaskListFilteredTree$2
  implements IMenuListener
{
  TaskListFilteredTree$2(TaskListFilteredTree paramTaskListFilteredTree) {}
  
  public void menuAboutToShow(IMenuManager manager)
  {
    TaskListFilteredTree.access$4(this$0).fillContextMenu(manager);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.tasks.ui.views.TaskListFilteredTree.2
 * 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.mylyn.tasks.ui.TasksUiUtil;

class TaskListDropAdapter$1
  implements Runnable
{
  TaskListDropAdapter$1(TaskListDropAdapter paramTaskListDropAdapter, ITask paramITask) {}
  
  public void run()
  {
    TasksUiUtil.openTask(val$newTask);
  }
}

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

import org.eclipse.mylyn.commons.ui.CommonImages;
import org.eclipse.mylyn.internal.tasks.ui.actions.TaskWorkingSetAction;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.ui.forms.events.HyperlinkEvent;
import org.eclipse.ui.forms.events.IHyperlinkListener;
import org.eclipse.ui.forms.widgets.ImageHyperlink;

class TaskListFilteredTree$9
  implements IHyperlinkListener
{
  TaskListFilteredTree$9(TaskListFilteredTree paramTaskListFilteredTree, TaskWorkingSetAction paramTaskWorkingSetAction, ImageHyperlink paramImageHyperlink) {}
  
  public void linkActivated(HyperlinkEvent e)
  {
    val$workingSetAction.getMenu(val$workingSetButton).setVisible(true);
  }
  
  public void linkEntered(HyperlinkEvent e)
  {
    val$workingSetButton.setImage(CommonImages.getImage(CommonImages.TOOLBAR_ARROW_DOWN));
  }
  
  public void linkExited(HyperlinkEvent e)
  {
    val$workingSetButton.setImage(CommonImages.getImage(CommonImages.TOOLBAR_ARROW_RIGHT));
  }
}

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

import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IMenuListener;
import org.eclipse.jface.action.IMenuManager;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.action.Separator;
import org.eclipse.jface.viewers.DecoratingLabelProvider;
import org.eclipse.jface.viewers.DoubleClickEvent;
import org.eclipse.jface.viewers.IDoubleClickListener;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.mylyn.commons.workbench.GradientDrawer;
import org.eclipse.mylyn.commons.workbench.WorkbenchUtil;
import org.eclipse.mylyn.internal.tasks.core.Category;
import org.eclipse.mylyn.internal.tasks.core.IRepositoryModelListener;
import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryAdapter;
import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.internal.tasks.ui.actions.AddRepositoryAction;
import org.eclipse.mylyn.internal.tasks.ui.actions.DeleteTaskRepositoryAction;
import org.eclipse.mylyn.internal.tasks.ui.actions.DisconnectRepositoryAction;
import org.eclipse.mylyn.tasks.core.IRepositoryListener;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.ui.TasksUi;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Widget;
import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IDecoratorManager;
import org.eclipse.ui.IViewPart;
import org.eclipse.ui.IViewSite;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchPartSite;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.actions.ActionFactory;
import org.eclipse.ui.actions.BaseSelectionListenerAction;
import org.eclipse.ui.part.ViewPart;
import org.eclipse.ui.themes.IThemeManager;

public class TaskRepositoriesView
  extends ViewPart
{
  @Deprecated
  public static final String ID = "org.eclipse.mylyn.tasks.ui.views.repositories";
  private TreeViewer viewer;
  private final Action addRepositoryAction = new AddRepositoryAction();
  private BaseSelectionListenerAction deleteRepositoryAction;
  private BaseSelectionListenerAction resetConfigurationAction;
  private DisconnectRepositoryAction offlineAction;
  
  private void asyncExec(Runnable runnable)
  {
    if (Display.getCurrent() != null) {
      runnable.run();
    } else {
      Display.getDefault().asyncExec(runnable);
    }
  }
  
  private final IRepositoryModelListener MODEL_LISTENER = new IRepositoryModelListener()
  {
    public void loaded()
    {
      TaskRepositoriesView.this.asyncExec(new Runnable()
      {
        public void run()
        {
          refresh();
        }
      });
    }
  };
  private final IRepositoryListener REPOSITORY_LISTENER = new TaskRepositoryAdapter()
  {
    public void repositoryAdded(TaskRepository repository)
    {
      TaskRepositoriesView.this.asyncExec(new Runnable()
      {
        public void run()
        {
          refresh();
        }
      });
    }
    
    public void repositoryRemoved(TaskRepository repository)
    {
      TaskRepositoriesView.this.asyncExec(new Runnable()
      {
        public void run()
        {
          refresh();
        }
      });
    }
    
    public void repositorySettingsChanged(TaskRepository repository)
    {
      TaskRepositoriesView.this.asyncExec(new Runnable()
      {
        public void run()
        {
          refresh();
        }
      });
    }
  };
  private final TaskRepositoryManager manager;
  private TaskRepositoriesContentProvider contentProvider;
  
  public TaskRepositoriesView()
  {
    manager = ((TaskRepositoryManager)TasksUi.getRepositoryManager());
    manager.addListener(REPOSITORY_LISTENER);
    TasksUiPlugin.getDefault().addModelListener(MODEL_LISTENER);
  }
  
  public void dispose()
  {
    super.dispose();
    TasksUiPlugin.getRepositoryManager().removeListener(REPOSITORY_LISTENER);
    TasksUiPlugin.getDefault().removeModelListener(MODEL_LISTENER);
  }
  
  public static TaskRepositoriesView getFromActivePerspective()
  {
    if (PlatformUI.getWorkbench().getActiveWorkbenchWindow() != null)
    {
      IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
      if (activePage == null) {
        return null;
      }
      IViewPart view = activePage.findView("org.eclipse.mylyn.tasks.ui.views.repositories");
      if ((view instanceof TaskRepositoriesView)) {
        return (TaskRepositoriesView)view;
      }
    }
    return null;
  }
  
  public static TaskRepositoriesView openInActivePerspective()
  {
    try
    {
      return (TaskRepositoriesView)PlatformUI.getWorkbench()
        .getActiveWorkbenchWindow()
        .getActivePage()
        .showView("org.eclipse.mylyn.tasks.ui.views.repositories");
    }
    catch (Exception localException) {}
    return null;
  }
  
  public void createPartControl(Composite parent)
  {
    contentProvider = new TaskRepositoriesContentProvider();
    viewer = new TreeViewer(parent, 66306);
    viewer.setContentProvider(contentProvider);
    viewer.setUseHashlookup(true);
    ViewerFilter[] filters = { new EmptyCategoriesFilter(contentProvider) };
    viewer.setFilters(filters);
    viewer.setLabelProvider(new DecoratingLabelProvider(new TaskRepositoryLabelProvider(), 
      PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator()));
    
    viewer.setSorter(new TaskRepositoriesViewSorter());
    
    viewer.setInput(getViewSite());
    viewer.addDoubleClickListener(new IDoubleClickListener()
    {
      public void doubleClick(DoubleClickEvent event)
      {
        WorkbenchUtil.openProperties(getSite());
      }
    });
    IThemeManager themeManager = getSite().getWorkbenchWindow().getWorkbench().getThemeManager();
    new GradientDrawer(themeManager, getViewer());
    {
      protected boolean shouldApplyGradient(Event event)
      {
        return item.getData() instanceof Category;
      }
    };
    makeActions();
    hookContextMenu();
    hookGlobalActions();
    contributeToActionBars();
    getViewer().expandAll();
    getSite().setSelectionProvider(getViewer());
  }
  
  private void hookGlobalActions()
  {
    IActionBars bars = getViewSite().getActionBars();
    bars.setGlobalActionHandler(ActionFactory.DELETE.getId(), deleteRepositoryAction);
    bars.setGlobalActionHandler(ActionFactory.REFRESH.getId(), resetConfigurationAction);
  }
  
  private void makeActions()
  {
    deleteRepositoryAction = new DeleteTaskRepositoryAction();
    viewer.addSelectionChangedListener(deleteRepositoryAction);
    
    resetConfigurationAction = new UpdateRepositoryConfigurationAction();
    resetConfigurationAction.setActionDefinitionId("org.eclipse.ui.file.refresh");
    viewer.addSelectionChangedListener(resetConfigurationAction);
    
    offlineAction = new DisconnectRepositoryAction();
    viewer.addSelectionChangedListener(offlineAction);
  }
  
  private void hookContextMenu()
  {
    MenuManager menuMgr = new MenuManager("#PopupMenu");
    menuMgr.setRemoveAllWhenShown(true);
    menuMgr.addMenuListener(new IMenuListener()
    {
      public void menuAboutToShow(IMenuManager manager)
      {
        TaskRepositoriesView.this.fillContextMenu(manager);
      }
    });
    Menu menu = menuMgr.createContextMenu(viewer.getControl());
    viewer.getControl().setMenu(menu);
    getSite().registerContextMenu(menuMgr, viewer);
  }
  
  private void contributeToActionBars()
  {
    IActionBars bars = getViewSite().getActionBars();
    fillLocalPullDown(bars.getMenuManager());
    fillLocalToolBar(bars.getToolBarManager());
  }
  
  private void fillLocalPullDown(IMenuManager manager)
  {
    manager.add(addRepositoryAction);
  }
  
  private void fillContextMenu(IMenuManager manager)
  {
    manager.add(new Separator("new"));
    manager.add(addRepositoryAction);
    manager.add(new Separator("edit"));
    manager.add(deleteRepositoryAction);
    manager.add(resetConfigurationAction);
    manager.add(new Separator("operations"));
    manager.add(offlineAction);
    manager.add(new Separator("repository"));
    manager.add(new Separator("additions"));
    manager.add(new Separator());
    manager.add(new Separator("properties"));
  }
  
  private void fillLocalToolBar(IToolBarManager manager)
  {
    manager.add(addRepositoryAction);
  }
  
  public void setFocus()
  {
    viewer.getControl().setFocus();
  }
  
  public void refresh()
  {
    if ((viewer != null) && (!viewer.getControl().isDisposed()))
    {
      viewer.refresh();
      viewer.expandAll();
    }
  }
  
  public TreeViewer getViewer()
  {
    return viewer;
  }
}

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

import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.mylyn.commons.ui.SelectionProviderAdapter;
import org.eclipse.mylyn.internal.tasks.ui.TaskScalingHyperlink;
import org.eclipse.swt.events.MenuDetectEvent;
import org.eclipse.swt.events.MenuDetectListener;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Menu;

class TaskListFilteredTree$13
  implements MenuDetectListener
{
  TaskListFilteredTree$13(TaskListFilteredTree paramTaskListFilteredTree, Composite paramComposite) {}
  
  public void menuDetected(MenuDetectEvent e)
  {
    if ((TaskListFilteredTree.access$14(this$0) != null) && (TaskListFilteredTree.access$15(this$0) != null) && (!TaskListFilteredTree.access$15(this$0).isEmpty()))
    {
      TaskListFilteredTree.access$16(this$0).setFocus();
      
      TaskListFilteredTree.access$14(this$0).setSelection(TaskListFilteredTree.access$15(this$0));
      
      Menu activeTaskMenu = TaskListFilteredTree.access$5(this$0).createContextMenu(val$container);
      activeTaskMenu.setVisible(true);
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.tasks.ui.views.TaskListFilteredTree.13
 * 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;

class TaskListView$3$2
  implements Runnable
{
  TaskListView$3$2(TaskListView.3 param3, ITask paramITask) {}
  
  public void run()
  {
    TaskListView.3.access$0(this$1, val$task);
    TaskListView.access$2(TaskListView.3.access$1(this$1));
    TaskListView.access$0(TaskListView.3.access$1(this$1)).indicateNoActiveTask();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.tasks.ui.views.TaskListView.3.2
 * 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.ControlAdapter;
import org.eclipse.swt.events.ControlEvent;

class WorkweekProgressBar$1
  extends ControlAdapter
{
  WorkweekProgressBar$1(WorkweekProgressBar paramWorkweekProgressBar) {}
  
  public void controlResized(ControlEvent e)
  {
    WorkweekProgressBar.access$2(this$0, WorkweekProgressBar.access$1(this$0, WorkweekProgressBar.access$0(this$0)));
    this$0.redraw();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.tasks.ui.views.WorkweekProgressBar.1
 * 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.ImageDescriptor;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.mylyn.commons.ui.CommonImages;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylyn.tasks.core.IRepositoryManager;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.ui.TasksUi;
import org.eclipse.mylyn.tasks.ui.TasksUiImages;
import org.eclipse.swt.graphics.Image;

public class TaskDetailLabelProvider
  extends LabelProvider
  implements ILabelProvider
{
  public Image getImage(Object element)
  {
    if (!(element instanceof ITask)) {
      return super.getImage(element);
    }
    AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
      ((ITask)element).getConnectorKind());
    ImageDescriptor overlay = TasksUiPlugin.getDefault().getOverlayIcon(connector.getConnectorKind());
    if (overlay != null) {
      return CommonImages.getImageWithOverlay(TasksUiImages.REPOSITORY, overlay, false, false);
    }
    return CommonImages.getImage(TasksUiImages.REPOSITORY);
  }
  
  public String getText(Object element)
  {
    if (!(element instanceof ITask)) {
      return super.getText(element);
    }
    ITask task = (ITask)element;
    TaskRepository repository = TasksUi.getRepositoryManager().getRepository(task.getConnectorKind(), 
      task.getRepositoryUrl());
    return repository.getRepositoryLabel();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.tasks.ui.views.TaskDetailLabelProvider
 * 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.core.DateRange;
import org.eclipse.mylyn.tasks.core.ITask;

public class TaskScheduleContentProvider$Unscheduled
  extends TaskScheduleContentProvider.StateTaskContainer
{
  public TaskScheduleContentProvider$Unscheduled(TaskScheduleContentProvider paramTaskScheduleContentProvider)
  {
    super(paramTaskScheduleContentProvider, new DateRange(TaskScheduleContentProvider.access$0(paramTaskScheduleContentProvider)), Message
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