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

        {
                viewer.openAttachment(page, attachment);
              }
              catch (CoreException e)
              {
                TasksUiInternal.logAndDisplayStatus(
                  Messages.OpenTaskAttachmentHandler_failedToOpenViewer, e.getStatus());
              }
            }
          }
          catch (OperationCanceledException localOperationCanceledException) {}
        }
      }
    }
  }
  
  public boolean isDynamic()
  {
    return true;
  }
}

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

import org.eclipse.mylyn.internal.tasks.ui.util.TreeWalker.Direction;

public class GoToUnreadTaskHandler$GoToPreviousUnreadTaskHandler
  extends GoToUnreadTaskHandler
{
  public GoToUnreadTaskHandler$GoToPreviousUnreadTaskHandler()
  {
    setDirection(TreeWalker.Direction.UP);
  }
}

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

import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;

class ShowTasksConnectorDiscoveryWizardCommandHandler$1
  extends WizardDialog
{
  ShowTasksConnectorDiscoveryWizardCommandHandler$1(ShowTasksConnectorDiscoveryWizardCommandHandler paramShowTasksConnectorDiscoveryWizardCommandHandler, Shell $anonymous0, IWizard $anonymous1)
  {
    super($anonymous0, $anonymous1);
  }
  
  protected void createButtonsForButtonBar(Composite parent)
  {
    super.createButtonsForButtonBar(parent);
    getLayoutnumColumns += 1;
    final Button button = new Button(parent, 32);
    button.setSelection(TasksUiPlugin.getDefault()
      .getPreferenceStore()
      .getBoolean("org.eclipse.mylyn.tasks.ui.messages.enabled"));
    button.setText(Messages.ShowTasksConnectorDiscoveryWizardCommandHandler_Notify_when_updates_are_available_Text);
    button.setFont(JFaceResources.getDialogFont());
    button.addSelectionListener(new SelectionAdapter()
    {
      public void widgetSelected(SelectionEvent event)
      {
        TasksUiPlugin.getDefault().getPreferenceStore().setValue("org.eclipse.mylyn.tasks.ui.messages.enabled", 
          button.getSelection());
      }
    });
    button.moveAbove(null);
  }
}

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

import java.util.List;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.mylyn.internal.tasks.ui.ITaskAttachmentViewer;
import org.eclipse.mylyn.internal.tasks.ui.TaskAttachmentViewerManager;
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
import org.eclipse.mylyn.tasks.core.ITaskAttachment;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.MenuItem;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.PlatformUI;

class OpenTaskAttachmentWithMenu$RunAssociatedViewer
  extends SelectionAdapter
{
  private final ITaskAttachmentViewer viewer;
  private final List<ITaskAttachment> attachments;
  
  OpenTaskAttachmentWithMenu$RunAssociatedViewer(ITaskAttachmentViewer arg1, List<ITaskAttachment> handler)
  {
    this.attachments = attachments;
    viewer = handler;
  }
  
  public void widgetSelected(SelectionEvent event)
  {
    if (!((MenuItem)widget).getSelection()) {
      return;
    }
    IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    if (window != null)
    {
      IWorkbenchPage page = window.getActivePage();
      if (page != null) {
        try
        {
          for (ITaskAttachment attachment : attachments)
          {
            OpenTaskAttachmentWithMenu.access$0(this$0).savePreferredViewerID(attachment, viewer.getId());
            try
            {
              viewer.openAttachment(page, attachment);
            }
            catch (CoreException e)
            {
              TasksUiInternal.logAndDisplayStatus(
                Messages.OpenTaskAttachmentHandler_failedToOpenViewer, e.getStatus());
            }
          }
        }
        catch (OperationCanceledException localOperationCanceledException) {}
      }
    }
  }
}

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

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.mylyn.internal.tasks.ui.actions.OpenRepositoryTaskAction;

public class OpenRepositoryTaskHandler
  extends AbstractHandler
{
  public Object execute(ExecutionEvent event)
    throws ExecutionException
  {
    new OpenRepositoryTaskAction().run(null);
    return null;
  }
}

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

import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.mylyn.tasks.core.IRepositoryElement;

class RemoteTaskSelectionDialog$7
  extends LabelProvider
{
  RemoteTaskSelectionDialog$7(RemoteTaskSelectionDialog paramRemoteTaskSelectionDialog) {}
  
  public String getText(Object element)
  {
    if ((element instanceof IRepositoryElement)) {
      return ((IRepositoryElement)element).getSummary();
    }
    return super.getText(element);
  }
}

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

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.mylyn.internal.tasks.ui.actions.NewSubTaskAction;
import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
import org.eclipse.ui.IViewSite;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchSite;
import org.eclipse.ui.handlers.HandlerUtil;

public class NewSubTaskHandler
  extends AbstractHandler
{
  public Object execute(ExecutionEvent event)
    throws ExecutionException
  {
    IWorkbenchSite site = HandlerUtil.getActiveSite(event);
    if ((site instanceof IViewSite))
    {
      IViewSite viewSite = (IViewSite)site;
      IWorkbenchPart part = viewSite.getPart();
      if ((part instanceof TaskListView))
      {
        TaskListView taskListView = (TaskListView)part;
        NewSubTaskAction action = new NewSubTaskAction();
        action.selectionChanged(action, taskListView.getViewer().getSelection());
        if (action.isEnabled()) {
          action.run();
        }
        return null;
      }
    }
    return null;
  }
}

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

import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.viewers.TreePath;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
import org.eclipse.mylyn.internal.tasks.ui.util.TreeWalker;
import org.eclipse.mylyn.internal.tasks.ui.util.TreeWalker.Direction;
import org.eclipse.mylyn.internal.tasks.ui.util.TreeWalker.TreeVisitor;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;

public abstract class GoToUnreadTaskHandler
  extends AbstractTaskListViewHandler
{
  public static final String ID_NEXT = "org.eclipse.mylyn.tasklist.actions.goToNextUnread";
  public static final String ID_PREVIOUS = "org.eclipse.mylyn.tasklist.actions.goToPreviousUnread";
  private TreeWalker.Direction direction = TreeWalker.Direction.DOWN;
  
  public TreeWalker.Direction getDirection()
  {
    return direction;
  }
  
  private TreePath getUnreadItem(TreeViewer treeViewer, Tree tree)
  {
    TreeItem[] selection = tree.getSelection();
    TreeItem selectedItem = selection.length > 0 ? selection[0] : null;
    
    TreeWalker.TreeVisitor visitor = new TreeWalker.TreeVisitor()
    {
      public boolean visit(Object object)
      {
        if ((object instanceof ITask))
        {
          ITask task = (ITask)object;
          if (TasksUiInternal.shouldShowIncoming(task)) {
            return true;
          }
        }
        return false;
      }
    };
    TreeWalker treeWalker = new TreeWalker(treeViewer);
    treeWalker.setDirection(direction);
    treeWalker.setExpandNodes(true);
    return treeWalker.walk(visitor, selectedItem);
  }
  
  /* Error */
  protected void execute(ExecutionEvent event, org.eclipse.mylyn.internal.tasks.ui.views.TaskListView taskListView, org.eclipse.mylyn.tasks.core.IRepositoryElement item)
  {
    // Byte code:
    //   0: aload_2
    //   1: invokevirtual 125	org/eclipse/mylyn/internal/tasks/ui/views/TaskListView:getViewer	()Lorg/eclipse/jface/viewers/TreeViewer;
    //   4: astore 4
    //   6: aload 4
    //   8: invokevirtual 114	org/eclipse/jface/viewers/TreeViewer:getTree	()Lorg/eclipse/swt/widgets/Tree;
    //   11: astore 5
    //   13: aconst_null
    //   14: astore 6
    //   16: aload 5
    //   18: iconst_0
    //   19: invokevirtual 126	org/eclipse/swt/widgets/Tree:setRedraw	(Z)V
    //   22: aload_0
    //   23: aload 4
    //   25: aload 5
    //   27: invokespecial 118	org/eclipse/mylyn/internal/tasks/ui/commands/GoToUnreadTaskHandler:getUnreadItem	(Lorg/eclipse/jface/viewers/TreeViewer;Lorg/eclipse/swt/widgets/Tree;)Lorg/eclipse/jface/viewers/TreePath;
    //   30: astore 6
    //   32: goto +14 -> 46
    //   35: astore 7
    //   37: aload 5
    //   39: iconst_1
    //   40: invokevirtual 126	org/eclipse/swt/widgets/Tree:setRedraw	(Z)V
    //   43: aload 7
    //   45: athrow
    //   46: aload 5
    //   48: iconst_1
    //   49: invokevirtual 126	org/eclipse/swt/widgets/Tree:setRedraw	(Z)V
    //   52: aload 6
    //   54: ifnull +26 -> 80
    //   57: aload 4
    //   59: aload 6
    //   61: iconst_0
    //   62: invokevirtual 112	org/eclipse/jface/viewers/TreeViewer:expandToLevel	(Ljava/lang/Object;I)V
    //   65: aload 4
    //   67: new 51	org/eclipse/jface/viewers/TreeSelection
    //   70: dup
    //   71: aload 6
    //   73: invokespecial 111	org/eclipse/jface/viewers/TreeSelection:<init>	(Lorg/eclipse/jface/viewers/TreePath;)V
    //   76: iconst_1
    //   77: invokevirtual 113	org/eclipse/jface/viewers/TreeViewer:setSelection	(Lorg/eclipse/jface/viewers/ISelection;Z)V
    //   80: return
    // Line number table:
    //   Java source line #69	-> byte code offset #0
    //   Java source line #70	-> byte code offset #6
    //   Java source line #73	-> byte code offset #13
    //   Java source line #75	-> byte code offset #16
    //   Java source line #76	-> byte code offset #22
    //   Java source line #77	-> byte code offset #35
    //   Java source line #78	-> byte code offset #37
    //   Java source line #79	-> byte code offset #43
    //   Java source line #78	-> byte code offset #46
    //   Java source line #81	-> byte code offset #52
    //   Java source line #82	-> byte code offset #57
    //   Java source line #83	-> byte code offset #65
    //   Java source line #85	-> byte code offset #80
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	81	0	this	GoToUnreadTaskHandler
    //   0	81	1	event	ExecutionEvent
    //   0	81	2	taskListView	org.eclipse.mylyn.internal.tasks.ui.views.TaskListView
    //   0	81	3	item	org.eclipse.mylyn.tasks.core.IRepositoryElement
    //   4	62	4	treeViewer	TreeViewer
    //   11	36	5	tree	Tree
    //   14	58	6	treePath	TreePath
    //   35	9	7	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   16	35	35	finally
  }
  
  public void setDirection(TreeWalker.Direction direction)
  {
    this.direction = direction;
  }
  
  public static void execute(ExecutionEvent event, TreeWalker.Direction direction)
    throws ExecutionException
  {
    GoToUnreadTaskHandler handler = new GoToUnreadTaskHandler() {};
    handler.setDirection(direction);
    handler.execute(event);
  }
  
  public static class GoToNextUnreadTaskHandler
    extends GoToUnreadTaskHandler
  {
    public GoToNextUnreadTaskHandler()
    {
      setDirection(TreeWalker.Direction.DOWN);
    }
  }
  
  public static class GoToPreviousUnreadTaskHandler
    extends GoToUnreadTaskHandler
  {
    public GoToPreviousUnreadTaskHandler()
    {
      setDirection(TreeWalker.Direction.UP);
    }
  }
}

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

import java.util.Collections;
import java.util.Date;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.mylyn.commons.workbench.WorkbenchUtil;
import org.eclipse.mylyn.internal.tasks.core.TaskList;
import org.eclipse.mylyn.internal.tasks.core.data.TaskDataManager;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.internal.tasks.ui.actions.ClearOutgoingAction;
import org.eclipse.mylyn.internal.tasks.ui.editors.Messages;
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
import org.eclipse.mylyn.internal.tasks.ui.util.TreeWalker.Direction;
import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
import org.eclipse.mylyn.monitor.ui.IActivityContextManager;
import org.eclipse.mylyn.monitor.ui.MonitorUi;
import org.eclipse.mylyn.tasks.core.IRepositoryElement;
import org.eclipse.mylyn.tasks.core.ITask;

public abstract class MarkTaskHandler
  extends AbstractTaskHandler
{
  public static class ClearOutgoingHandler
    extends AbstractTaskHandler
  {
    protected void execute(ExecutionEvent event, ITask task)
      throws ExecutionException
    {
      ClearOutgoingAction action = new ClearOutgoingAction(Collections.singletonList(task));
      if (action.isEnabled()) {
        action.run();
      }
    }
  }
  
  public static class ClearActiveTimeHandler
    extends AbstractTaskHandler
  {
    protected void execute(ExecutionEvent event, ITask task)
      throws ExecutionException
    {
      if (MessageDialog.openConfirm(WorkbenchUtil.getShell(), 
        Messages.TaskEditorPlanningPart_Confirm_Activity_Time_Deletion, 
        Messages.TaskEditorPlanningPart_Do_you_wish_to_reset_your_activity_time_on_this_task_)) {
        MonitorUi.getActivityContextManager().removeActivityTime(task.getHandleIdentifier(), 0L, 
          System.currentTimeMillis());
      }
    }
  }
  
  public static class MarkTaskCompleteHandler
    extends AbstractTaskHandler
  {
    public static final String ID_COMMAND = "org.eclipse.mylyn.tasks.ui.command.markTaskComplete";
    
    protected void execute(ExecutionEvent event, ITask task)
      throws ExecutionException
    {
      if (TasksUiInternal.hasLocalCompletionState(task))
      {
        task.setCompletionDate(new Date());
        TasksUiPlugin.getTaskList().notifyElementChanged(task);
      }
    }
  }
  
  public static class MarkTaskIncompleteHandler
    extends AbstractTaskHandler
  {
    protected void execute(ExecutionEvent event, ITask task)
      throws ExecutionException
    {
      if (TasksUiInternal.hasLocalCompletionState(task))
      {
        task.setCompletionDate(null);
        TasksUiPlugin.getTaskList().notifyElementChanged(task);
      }
    }
  }
  
  public static class MarkTaskReadHandler
    extends AbstractTaskHandler
  {
    protected void execute(ExecutionEvent event, ITask task)
      throws ExecutionException
    {
      TasksUiPlugin.getTaskDataManager().setTaskRead(task, true);
    }
  }
  
  public static class MarkTaskUnreadHandler
    extends AbstractTaskHandler
  {
    protected void execute(ExecutionEvent event, ITask task)
      throws ExecutionException
    {
      TasksUiPlugin.getTaskDataManager().setTaskRead(task, false);
    }
  }
  
  public static class MarkTaskReadGoToNextUnreadTaskHandler
    extends AbstractTaskListViewHandler
  {
    protected void execute(ExecutionEvent event, TaskListView taskListView, IRepositoryElement item)
      throws ExecutionException
    {
      if ((item instanceof ITask))
      {
        ITask task = (ITask)item;
        TasksUiPlugin.getTaskDataManager().setTaskRead(task, true);
        GoToUnreadTaskHandler.execute(event, TreeWalker.Direction.DOWN);
      }
    }
  }
  
  public static class MarkTaskReadGoToPreviousUnreadTaskHandler
    extends AbstractTaskListViewHandler
  {
    protected void execute(ExecutionEvent event, TaskListView taskListView, IRepositoryElement item)
      throws ExecutionException
    {
      if ((item instanceof ITask))
      {
        ITask task = (ITask)item;
        TasksUiPlugin.getTaskDataManager().setTaskRead(task, true);
        GoToUnreadTaskHandler.execute(event, TreeWalker.Direction.UP);
      }
    }
  }
}

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

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.mylyn.internal.tasks.ui.actions.NewTaskAction;
import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
import org.eclipse.ui.IViewSite;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchSite;
import org.eclipse.ui.handlers.HandlerUtil;

public class NewLocalTaskHandler
  extends AbstractHandler
{
  public Object execute(ExecutionEvent event)
    throws ExecutionException
  {
    IWorkbenchSite site = HandlerUtil.getActiveSite(event);
    if ((site instanceof IViewSite))
    {
      IViewSite viewSite = (IViewSite)site;
      IWorkbenchPart part = viewSite.getPart();
      if ((part instanceof TaskListView))
      {
        TaskListView taskListView = (TaskListView)part;
        NewTaskAction action = new NewTaskAction();
        try
        {
          action.setInitializationData(null, null, "local");
        }
        catch (CoreException e)
        {
          throw new ExecutionException(Messages.NewLocalTaskHandler_Could_not_create_local_task, e);
        }
        action.selectionChanged(action, taskListView.getViewer().getSelection());
        if (action.isEnabled()) {
          action.run();
        }
      }
    }
    return null;
  }
}

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

import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerFilter;
import org.eclipse.mylyn.tasks.core.ITask;

class RemoteTaskSelectionDialog$1
  extends ViewerFilter
{
  RemoteTaskSelectionDialog$1(RemoteTaskSelectionDialog paramRemoteTaskSelectionDialog) {}
  
  public boolean select(Viewer viewer, Object parentElement, Object element)
  {
    if (RemoteTaskSelectionDialog.access$0(this$0) == null) {
      return false;
    }
    if (!(element instanceof ITask)) {
      return false;
    }
    ITask task = (ITask)element;
    String taskId = task.getTaskKey();
    String[] arrayOfString;
    int j = (arrayOfString = RemoteTaskSelectionDialog.access$0(this$0)).length;
    for (int i = 0; i < j; i++)
    {
      String id = arrayOfString[i];
      if (id.equals(taskId)) {
        return true;
      }
    }
    return false;
  }
}

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

import org.eclipse.jface.viewers.ComboViewer;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Control;

class RemoteTaskSelectionDialog$8
  extends SelectionAdapter
{
  RemoteTaskSelectionDialog$8(RemoteTaskSelectionDialog paramRemoteTaskSelectionDialog) {}
  
  public void widgetSelected(SelectionEvent e)
  {
    RemoteTaskSelectionDialog.access$7(this$0).getControl().setEnabled(RemoteTaskSelectionDialog.access$8(this$0).getSelection());
  }
}

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

import java.util.Collection;
import java.util.HashMap;
import java.util.Map;
import org.eclipse.core.commands.IParameterValues;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylyn.tasks.core.IRepositoryManager;
import org.eclipse.mylyn.tasks.ui.TasksUi;

public class TaskRepositoryParameterValues
  implements IParameterValues
{
  public Map<String, String> getParameterValues()
  {
    Collection<AbstractRepositoryConnector> connectors = TasksUi.getRepositoryManager().getRepositoryConnectors();
    Map<String, String> values = new HashMap();
    for (AbstractRepositoryConnector connector : connectors) {
      if (connector.canCreateRepository()) {
        values.put(connector.getLabel(), connector.getConnectorKind());
      }
    }
    return values;
  }
}

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

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.mylyn.commons.workbench.WorkbenchUtil;
import org.eclipse.mylyn.internal.discovery.ui.wizards.ConnectorDiscoveryWizard;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Shell;

public class ShowTasksConnectorDiscoveryWizardCommandHandler
  extends AbstractHandler
{
  private static final String ID_P2_INSTALL_UI = "org.eclipse.equinox.p2.ui.sdk/org.eclipse.equinox.p2.ui.sdk.install";
  
  public Object execute(ExecutionEvent event)
    throws ExecutionException
  {
    if (WorkbenchUtil.allowUseOf("org.eclipse.equinox.p2.ui.sdk/org.eclipse.equinox.p2.ui.sdk.install"))
    {
      ConnectorDiscoveryWizard wizard = new ConnectorDiscoveryWizard();
      WizardDialog dialog = new WizardDialog(WorkbenchUtil.getShell(), wizard)
      {
        protected void createButtonsForButtonBar(Composite parent)
        {
          super.createButtonsForButtonBar(parent);
          getLayoutnumColumns += 1;
          final Button button = new Button(parent, 32);
          button.setSelection(TasksUiPlugin.getDefault()
            .getPreferenceStore()
            .getBoolean("org.eclipse.mylyn.tasks.ui.messages.enabled"));
          button.setText(Messages.ShowTasksConnectorDiscoveryWizardCommandHandler_Notify_when_updates_are_available_Text);
          button.setFont(JFaceResources.getDialogFont());
          button.addSelectionListener(new SelectionAdapter()
          {
            public void widgetSelected(SelectionEvent event)
            {
              TasksUiPlugin.getDefault().getPreferenceStore().setValue("org.eclipse.mylyn.tasks.ui.messages.enabled", 
                button.getSelection());
            }
          });
          button.moveAbove(null);
        }
      };
      dialog.open();
    }
    else
    {
      MessageDialog.openWarning(WorkbenchUtil.getShell(), 
        Messages.ShowTasksConnectorDiscoveryWizardCommandHandler_Install_Connectors, 
        Messages.ShowTasksConnectorDiscoveryWizardCommandHandler_Unable_to_launch_connector_install);
    }
    return null;
  }
}

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

import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.mylyn.internal.tasks.ui.views.TaskListToolTip;
import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Tree;
import org.eclipse.swt.widgets.TreeItem;

public class TaskListToolTipHandler
  extends AbstractTaskListViewHandler
{
  protected void execute(ExecutionEvent event, TaskListView taskListView)
    throws ExecutionException
  {
    TaskListToolTip toolTip = taskListView.getToolTip();
    if (toolTip.isVisible())
    {
      toolTip.hide();
    }
    else
    {
      taskListView.getViewer().getControl().getBounds();
      Tree tree = taskListView.getViewer().getTree();
      TreeItem[] selection = tree.getSelection();
      if (selection.length > 0) {
        toolTip.show(new Point(0getBoundsx + 1, 0getBoundsy + 1));
      }
    }
  }
}

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

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.mylyn.internal.tasks.ui.actions.AddRepositoryAction;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.handlers.HandlerUtil;

public class AddTaskRepositoryHandler
  extends AbstractHandler
{
  public Object execute(ExecutionEvent event)
    throws ExecutionException
  {
    Shell shell = HandlerUtil.getActiveShell(event);
    if ((shell != null) && (!shell.isDisposed()))
    {
      String connectorKind = event.getParameter("connectorKind");
      return new AddRepositoryAction().showWizard(shell, connectorKind);
    }
    return null;
  }
  
  @Deprecated
  public static TaskRepository showWizard(Shell shell, String connectorKind)
  {
    return new AddRepositoryAction().showWizard(shell, connectorKind);
  }
}

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

import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;

class RemoteTaskSelectionDialog$2
  implements ModifyListener
{
  RemoteTaskSelectionDialog$2(RemoteTaskSelectionDialog paramRemoteTaskSelectionDialog) {}
  
  public void modifyText(ModifyEvent e)
  {
    RemoteTaskSelectionDialog.access$1(this$0);
    RemoteTaskSelectionDialog.access$2(this$0);
    RemoteTaskSelectionDialog.access$3(this$0).refresh(false);
  }
}

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

import org.eclipse.mylyn.internal.tasks.ui.util.TreeWalker.Direction;

public class GoToUnreadTaskHandler$GoToNextUnreadTaskHandler
  extends GoToUnreadTaskHandler
{
  public GoToUnreadTaskHandler$GoToNextUnreadTaskHandler()
  {
    setDirection(TreeWalker.Direction.DOWN);
  }
}

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

import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.swt.events.KeyAdapter;
import org.eclipse.swt.events.KeyEvent;
import org.eclipse.swt.widgets.Control;

class RemoteTaskSelectionDialog$9
  extends KeyAdapter
{
  RemoteTaskSelectionDialog$9(RemoteTaskSelectionDialog paramRemoteTaskSelectionDialog) {}
  
  public void keyPressed(KeyEvent e)
  {
    if (keyCode == 16777218) {
      RemoteTaskSelectionDialog.access$3(this$0).getControl().setFocus();
    }
  }
}

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

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.mylyn.internal.tasks.ui.actions.DeleteTaskRepositoryAction;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.ui.handlers.HandlerUtil;

public class DeleteTaskRepositoryHandler
  extends AbstractHandler
{
  public Object execute(ExecutionEvent event)
    throws ExecutionException
  {
    ISelection selection = HandlerUtil.getCurrentSelection(event);
    if ((selection instanceof IStructuredSelection))
    {
      Object item = ((IStructuredSelection)selection).getFirstElement();
      if ((item instanceof TaskRepository)) {
        DeleteTaskRepositoryAction.run((TaskRepository)item);
      }
    }
    return null;
  }
}

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

import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
import org.eclipse.mylyn.internal.tasks.ui.util.TreeWalker.TreeVisitor;
import org.eclipse.mylyn.tasks.core.ITask;

class GoToUnreadTaskHandler$1
  extends TreeWalker.TreeVisitor
{
  GoToUnreadTaskHandler$1(GoToUnreadTaskHandler paramGoToUnreadTaskHandler) {}
  
  public boolean visit(Object object)
  {
    if ((object instanceof ITask))
    {
      ITask task = (ITask)object;
      if (TasksUiInternal.shouldShowIncoming(task)) {
        return true;
      }
    }
    return false;
  }
}

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

import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.mylyn.internal.tasks.core.data.TaskDataManager;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.internal.tasks.ui.util.TreeWalker.Direction;
import org.eclipse.mylyn.internal.tasks.ui.views.TaskListView;
import org.eclipse.mylyn.tasks.core.IRepositoryElement;
import org.eclipse.mylyn.tasks.core.ITask;

public class MarkTaskHandler$MarkTaskReadGoToNextUnreadTaskHandler
  extends AbstractTaskListViewHandler
{
  protected void execute(ExecutionEvent event, TaskListView taskListView, IRepositoryElement item)
    throws ExecutionException
  {
    if ((item instanceof ITask))
    {
      ITask task = (ITask)item;
      TasksUiPlugin.getTaskDataManager().setTaskRead(task, true);
      GoToUnreadTaskHandler.execute(event, TreeWalker.Direction.DOWN);
    }
  }
}

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

import java.util.List;
import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.core.commands.IHandler;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.OperationCanceledException;
import org.eclipse.core.runtime.Status;
import org.eclipse.mylyn.internal.tasks.ui.ITaskAttachmentViewer;
import org.eclipse.mylyn.internal.tasks.ui.TaskAttachmentViewerManager;
import org.eclipse.mylyn.internal.tasks.ui.util.AttachmentUtil;
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
import org.eclipse.mylyn.tasks.core.ITaskAttachment;
import org.eclipse.ui.IWorkbenchPage;
import org.eclipse.ui.IWorkbenchWindow;
import org.eclipse.ui.handlers.HandlerUtil;

public class OpenTaskAttachmentHandler
  extends AbstractHandler
  implements IHandler
{
  public Object execute(ExecutionEvent event)
    throws ExecutionException
  {
    IWorkbenchWindow window = HandlerUtil.getActiveWorkbenchWindow(event);
    if (window != null)
    {
      IWorkbenchPage page = window.getActivePage();
      if (page != null)
      {
        List<ITaskAttachment> attachments = AttachmentUtil.getSelectedAttachments(event);
        try
        {
          openAttachments(page, attachments);
        }
        catch (OperationCanceledException localOperationCanceledException) {}
      }
    }
    return null;
  }
  
  public static void openAttachments(IWorkbenchPage page, List<ITaskAttachment> attachments)
  {
    TaskAttachmentViewerManager manager = new TaskAttachmentViewerManager();
    for (ITaskAttachment attachment : attachments)
    {
      ITaskAttachmentViewer viewer = manager.getPreferredViewer(attachment);
      if (viewer == null) {
        TasksUiInternal.logAndDisplayStatus(Messages.OpenTaskAttachmentHandler_failedToOpenViewer, new Status(
          2, "org.eclipse.mylyn.tasks.ui", 
          Messages.OpenTaskAttachmentHandler_noAttachmentViewerFound));
      } else {
        try
        {
          viewer.openAttachment(page, attachment);
        }
        catch (CoreException e)
        {
          TasksUiInternal.logAndDisplayStatus(Messages.OpenTaskAttachmentHandler_failedToOpenViewer, 
            e.getStatus());
        }
      }
    }
  }
}

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

import org.eclipse.osgi.util.NLS;

public class Messages
  extends NLS
{
  private static final String BUNDLE_NAME = "org.eclipse.mylyn.internal.tasks.ui.commands.messages";
  public static String NewLocalTaskHandler_Could_not_create_local_task;
  public static String OpenTaskAttachmentHandler_failedToOpenViewer;
  public static String OpenTaskAttachmentHandler_noAttachmentViewerFound;
  public static String RemoteTaskSelectionDialog_Add_;
  public static String RemoteTaskSelectionDialog_Add_to_Task_List_category;
  public static String RemoteTaskSelectionDialog_Enter_Key_ID__use_comma_for_multiple_;
  public static String RemoteTaskSelectionDialog_Enter_a_valid_task_ID;
  public static String RemoteTaskSelectionDialog_Matching_tasks;
  public static String RemoteTaskSelectionDialog_Select_a_task_or_repository;
  public static String RemoteTaskSelectionDialog_Select_a_task_repository;
  public static String ShowTasksConnectorDiscoveryWizardCommandHandler_Install_Connectors;
  public static String ShowTasksConnectorDiscoveryWizardCommandHandler_Notify_when_updates_are_available_Text;
  public static String ShowTasksConnectorDiscoveryWizardCommandHandler_Unable_to_launch_connector_install;
  
  static {}
  
  public static void reloadMessages()
  {
    NLS.initializeMessages("org.eclipse.mylyn.internal.tasks.ui.commands.messages", Messages.class);
  }
}

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

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPage;
import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.IWorkbenchPart;
import org.eclipse.ui.IWorkbenchSite;
import org.eclipse.ui.forms.editor.FormEditor;
import org.eclipse.ui.forms.editor.IFormPage;
import org.eclipse.ui.handlers.HandlerUtil;

public class SubmitTaskHandler
  extends AbstractHandler
{
  public Object execute(ExecutionEvent event)
    throws ExecutionException
  {
    IWorkbenchSite site = HandlerUtil.getActiveSite(event);
    if ((site instanceof IEditorSite))
    {
      IWorkbenchPart part = ((IEditorSite)site).getPart();
      if ((part instanceof FormEditor))
      {
        IFormPage page = ((FormEditor)part).getActivePageInstance();
        if ((page instanceof AbstractTaskEditorPage)) {
          ((AbstractTaskEditorPage)page).doSubmit();
        }
      }
    }
    return null;
  }
}

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

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

class RemoteTaskSelectionDialog$3
  implements ISelectionChangedListener
{
  RemoteTaskSelectionDialog$3(RemoteTaskSelectionDialog paramRemoteTaskSelectionDialog) {}
  
  public void selectionChanged(SelectionChangedEvent event)
  {
    RemoteTaskSelectionDialog.access$2(this$0);
  }
}

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

import java.lang.reflect.Field;
import java.util.Arrays;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import org.eclipse.core.internal.resources.Workspace;
import org.eclipse.core.resources.ResourcesPlugin;
import org.eclipse.core.runtime.IProgressMonitor;
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