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

16:46:55.636 INFO  jd.cli.Main - Decompiling org.eclipse.mylyn.tasks.ui_3.7.1.v20120425-0100.jar
package org.eclipse.mylyn.tasks.ui;

public enum TaskDropListener$Operation
{
  COPY,  LINK,  DROP_ON_TASK_EDITOR;
}

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

import java.lang.reflect.Method;
import java.util.Iterator;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.DocumentEvent;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.IRegion;
import org.eclipse.jface.text.ITextViewer;
import org.eclipse.jface.text.TextPresentation;
import org.eclipse.jface.text.hyperlink.IHyperlink;
import org.eclipse.jface.text.hyperlink.MultipleHyperlinkPresenter;
import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.mylyn.commons.core.StatusHandler;
import org.eclipse.mylyn.internal.tasks.core.TaskList;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.internal.tasks.ui.editors.Messages;
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.custom.StyleRange;
import org.eclipse.swt.custom.StyledText;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.RGB;

public final class TaskHyperlinkPresenter
  extends MultipleHyperlinkPresenter
{
  private IRegion activeRegion;
  private ITask currentTask;
  private TaskHyperlink currentTaskHyperlink;
  private ITextViewer textViewer;
  private String oldToolTip;
  private boolean restoreToolTip;
  private final MultipleHyperlinkPresenter delegate;
  private boolean errorLogged;
  
  public TaskHyperlinkPresenter(IPreferenceStore store)
  {
    super(store);
    delegate = new MultipleHyperlinkPresenter(store);
  }
  
  public TaskHyperlinkPresenter(RGB color)
  {
    super(color);
    delegate = new MultipleHyperlinkPresenter(color);
  }
  
  public void install(ITextViewer textViewer)
  {
    this.textViewer = textViewer;
    delegate.install(textViewer);
  }
  
  public void uninstall()
  {
    hideHyperlinks();
    textViewer = null;
    delegate.uninstall();
  }
  
  public void applyTextPresentation(TextPresentation textPresentation)
  {
    delegate.applyTextPresentation(textPresentation);
    if ((activeRegion != null) && (currentTask != null) && (currentTask.isCompleted()))
    {
      Iterator<StyleRange> styleRangeIterator = textPresentation.getAllStyleRangeIterator();
      while (styleRangeIterator.hasNext())
      {
        StyleRange styleRange = (StyleRange)styleRangeIterator.next();
        if ((activeRegion.getOffset() == start) && (activeRegion.getLength() == length))
        {
          strikeout = true;
          break;
        }
      }
    }
  }
  
  public void showHyperlinks(IHyperlink[] hyperlinks)
  {
    showHyperlinks(hyperlinks, false);
  }
  
  public void showHyperlinks(IHyperlink[] hyperlinks, boolean takesFocusWhenVisible)
  {
    activeRegion = null;
    if ((hyperlinks.length == 1) && ((hyperlinks[0] instanceof TaskHyperlink)))
    {
      TaskHyperlink hyperlink = (TaskHyperlink)hyperlinks[0];
      
      TaskList taskList = TasksUiPlugin.getTaskList();
      String repositoryUrl = hyperlink.getRepository().getRepositoryUrl();
      
      ITask task = taskList.getTask(repositoryUrl, hyperlink.getTaskId());
      if (task == null) {
        task = taskList.getTaskByKey(repositoryUrl, hyperlink.getTaskId());
      }
      if (!hyperlinks[0].equals(currentTaskHyperlink))
      {
        currentTaskHyperlink = ((TaskHyperlink)hyperlinks[0]);
        currentTask = task;
        activeRegion = hyperlink.getHyperlinkRegion();
        if ((textViewer != null) && (textViewer.getTextWidget() != null) && 
          (!textViewer.getTextWidget().isDisposed()))
        {
          oldToolTip = textViewer.getTextWidget().getToolTipText();
          restoreToolTip = true;
          if (task == null)
          {
            String taskLabel = TasksUiInternal.getTaskPrefix(hyperlink.getRepository().getConnectorKind());
            taskLabel = taskLabel + currentTaskHyperlink.getTaskId();
            textViewer.getTextWidget().setToolTipText(
              NLS.bind(Messages.TaskHyperlinkPresenter_Not_In_Task_List, taskLabel));
          }
          else if (task.getTaskKey() == null)
          {
            textViewer.getTextWidget().setToolTipText(task.getSummary());
          }
          else
          {
            textViewer.getTextWidget().setToolTipText(task.getTaskKey() + ": " + task.getSummary());
          }
        }
      }
    }
    try
    {
      Method method = MultipleHyperlinkPresenter.class.getDeclaredMethod("showHyperlinks", new Class[] {
        IHyperlink[].class, Boolean.TYPE });
      method.invoke(delegate, new Object[] { hyperlinks, Boolean.valueOf(takesFocusWhenVisible) });
    }
    catch (NoSuchMethodException localNoSuchMethodException)
    {
      delegate.showHyperlinks(hyperlinks);
    }
    catch (Exception e)
    {
      if (!errorLogged)
      {
        errorLogged = true;
        StatusHandler.log(new Status(4, "org.eclipse.mylyn.tasks.ui", 
          "Unexpected error while displaying hyperlink", e));
      }
    }
  }
  
  public void hideHyperlinks()
  {
    if (currentTaskHyperlink != null)
    {
      if ((restoreToolTip) && (textViewer != null) && (textViewer.getTextWidget() != null) && 
        (!textViewer.getTextWidget().isDisposed()))
      {
        textViewer.getTextWidget().setToolTipText(oldToolTip);
        restoreToolTip = false;
      }
      currentTaskHyperlink = null;
      currentTask = null;
    }
    delegate.hideHyperlinks();
  }
  
  public boolean canHideHyperlinks()
  {
    return delegate.canHideHyperlinks();
  }
  
  public boolean canShowMultipleHyperlinks()
  {
    return delegate.canShowMultipleHyperlinks();
  }
  
  public void documentAboutToBeChanged(DocumentEvent event)
  {
    delegate.documentAboutToBeChanged(event);
  }
  
  public void inputDocumentAboutToBeChanged(IDocument oldInput, IDocument newInput)
  {
    delegate.inputDocumentAboutToBeChanged(oldInput, newInput);
  }
  
  public void inputDocumentChanged(IDocument oldInput, IDocument newInput)
  {
    delegate.inputDocumentChanged(oldInput, newInput);
  }
  
  public void propertyChange(PropertyChangeEvent event)
  {
    delegate.propertyChange(event);
  }
  
  public void setColor(Color color)
  {
    delegate.setColor(color);
  }
}

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

import java.util.Collections;
import java.util.List;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.text.hyperlink.IHyperlink;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
import org.eclipse.mylyn.internal.tasks.ui.Messages;
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.ITask;
import org.eclipse.mylyn.tasks.core.ITaskComment;
import org.eclipse.mylyn.tasks.core.ITaskMapping;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.core.data.TaskAttachmentModel;
import org.eclipse.mylyn.tasks.ui.editors.TaskEditorInput;
import org.eclipse.mylyn.tasks.ui.wizards.ITaskRepositoryPage;
import org.eclipse.mylyn.tasks.ui.wizards.ITaskSearchPage;
import org.eclipse.mylyn.tasks.ui.wizards.TaskAttachmentPage;
import org.eclipse.ui.IEditorInput;

public abstract class AbstractRepositoryConnectorUi
{
  private static final String LABEL_TASK_DEFAULT = Messages.AbstractRepositoryConnectorUi_Task;
  private final boolean customNotificationHandling = false;
  
  public abstract String getConnectorKind();
  
  public abstract ITaskRepositoryPage getSettingsPage(TaskRepository paramTaskRepository);
  
  public abstract IWizard getQueryWizard(TaskRepository paramTaskRepository, IRepositoryQuery paramIRepositoryQuery);
  
  public abstract IWizard getNewTaskWizard(TaskRepository paramTaskRepository, ITaskMapping paramITaskMapping);
  
  public String getTaskEditorId(ITask repositoryTask)
  {
    return "org.eclipse.mylyn.tasks.ui.editors.task";
  }
  
  public IEditorInput getTaskEditorInput(TaskRepository repository, ITask task)
  {
    return new TaskEditorInput(repository, task);
  }
  
  public abstract boolean hasSearchPage();
  
  @Deprecated
  public List<ITask> getLegendItems()
  {
    return Collections.emptyList();
  }
  
  public List<LegendElement> getLegendElements()
  {
    return Collections.emptyList();
  }
  
  public String getTaskKindLabel(ITask task)
  {
    return LABEL_TASK_DEFAULT;
  }
  
  public ImageDescriptor getImageDescriptor(IRepositoryElement element)
  {
    if ((element instanceof RepositoryQuery)) {
      return ((RepositoryQuery)element).getAutoUpdate() ? TasksUiImages.QUERY : TasksUiImages.QUERY_OFFLINE;
    }
    if ((element instanceof ITask)) {
      return TasksUiImages.TASK;
    }
    return null;
  }
  
  public ImageDescriptor getTaskKindOverlay(ITask task)
  {
    return null;
  }
  
  public ImageDescriptor getTaskPriorityOverlay(ITask task)
  {
    return TasksUiInternal.getPriorityImage(task);
  }
  
  @Deprecated
  public IWizard getAddExistingTaskWizard(TaskRepository repository)
  {
    return null;
  }
  
  public ITaskSearchPage getSearchPage(TaskRepository repository, IStructuredSelection selection)
  {
    return null;
  }
  
  public String getAccountCreationUrl(TaskRepository taskRepository)
  {
    return null;
  }
  
  public String getAccountManagementUrl(TaskRepository taskRepository)
  {
    return null;
  }
  
  public String getTaskHistoryUrl(TaskRepository taskRepository, ITask task)
  {
    return null;
  }
  
  public String getReplyText(TaskRepository taskRepository, ITask task, ITaskComment taskComment, boolean includeTask)
  {
    return null;
  }
  
  @Deprecated
  public IHyperlink[] findHyperlinks(TaskRepository repository, String text, int index, int textOffset)
  {
    return null;
  }
  
  public boolean hasCustomNotifications()
  {
    return false;
  }
  
  public boolean hasStrictSubtaskHierarchy()
  {
    return false;
  }
  
  public IWizardPage getTaskAttachmentPage(TaskAttachmentModel model)
  {
    return new TaskAttachmentPage(model);
  }
  
  public IHyperlink[] findHyperlinks(TaskRepository repository, ITask task, String text, int index, int textOffset)
  {
    return findHyperlinks(repository, text, index, textOffset);
  }
}

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

import java.util.HashSet;
import java.util.Set;
import org.eclipse.core.runtime.Preferences;
import org.eclipse.jface.resource.ColorRegistry;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.IColorProvider;
import org.eclipse.jface.viewers.IFontProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.mylyn.commons.ui.CommonImages;
import org.eclipse.mylyn.commons.ui.compatibility.CommonFonts;
import org.eclipse.mylyn.internal.tasks.core.AbstractTask;
import org.eclipse.mylyn.internal.tasks.core.DayDateRange;
import org.eclipse.mylyn.internal.tasks.core.Person;
import org.eclipse.mylyn.internal.tasks.core.RepositoryQuery;
import org.eclipse.mylyn.internal.tasks.core.ScheduledTaskContainer;
import org.eclipse.mylyn.internal.tasks.core.TaskActivityManager;
import org.eclipse.mylyn.internal.tasks.core.TaskCategory;
import org.eclipse.mylyn.internal.tasks.core.TaskGroup;
import org.eclipse.mylyn.internal.tasks.core.UncategorizedTaskContainer;
import org.eclipse.mylyn.internal.tasks.core.UnmatchedTaskContainer;
import org.eclipse.mylyn.internal.tasks.core.UnsubmittedTaskContainer;
import org.eclipse.mylyn.internal.tasks.core.WeekDateRange;
import org.eclipse.mylyn.internal.tasks.ui.Messages;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.tasks.core.IRepositoryElement;
import org.eclipse.mylyn.tasks.core.IRepositoryManager;
import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.mylyn.tasks.core.ITaskActivityManager;
import org.eclipse.mylyn.tasks.core.ITaskContainer;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.Image;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.themes.ITheme;
import org.eclipse.ui.themes.IThemeManager;

public class TaskElementLabelProvider
  extends LabelProvider
  implements IColorProvider, IFontProvider
{
  private final IThemeManager themeManager = PlatformUI.getWorkbench().getThemeManager();
  private boolean wideImages = false;
  
  public TaskElementLabelProvider()
  {
    this(false);
  }
  
  public TaskElementLabelProvider(boolean wideImages)
  {
    this.wideImages = wideImages;
  }
  
  public Image getImage(Object element)
  {
    CompositeImageDescriptor compositeDescriptor = getImageDescriptor(element);
    if ((element instanceof ITask))
    {
      if (overlayKind == null) {
        overlayKind = CommonImages.OVERLAY_CLEAR;
      }
      return CommonImages.getCompositeTaskImage(icon, overlayKind, 
        wideImages);
    }
    if ((element instanceof ITaskContainer)) {
      return CommonImages.getCompositeTaskImage(icon, CommonImages.OVERLAY_CLEAR, wideImages);
    }
    return CommonImages.getCompositeTaskImage(icon, null, wideImages);
  }
  
  private CompositeImageDescriptor getImageDescriptor(Object object)
  {
    CompositeImageDescriptor compositeDescriptor = new CompositeImageDescriptor(null);
    if ((object instanceof UncategorizedTaskContainer))
    {
      icon = TasksUiImages.CATEGORY_UNCATEGORIZED;
      return compositeDescriptor;
    }
    if ((object instanceof UnsubmittedTaskContainer))
    {
      icon = TasksUiImages.CATEGORY_UNCATEGORIZED;
      return compositeDescriptor;
    }
    if ((object instanceof TaskCategory)) {
      icon = TasksUiImages.CATEGORY;
    } else if ((object instanceof TaskGroup)) {
      icon = CommonImages.GROUPING;
    }
    if ((object instanceof ITaskContainer))
    {
      IRepositoryElement element = (IRepositoryElement)object;
      
      AbstractRepositoryConnectorUi connectorUi = null;
      if ((element instanceof ITask))
      {
        ITask repositoryTask = (ITask)element;
        connectorUi = TasksUiPlugin.getConnectorUi(((ITask)element).getConnectorKind());
        if (connectorUi != null) {
          overlayKind = connectorUi.getTaskKindOverlay(repositoryTask);
        }
      }
      else if ((element instanceof IRepositoryQuery))
      {
        connectorUi = TasksUiPlugin.getConnectorUi(((IRepositoryQuery)element).getConnectorKind());
      }
      if (connectorUi != null)
      {
        icon = connectorUi.getImageDescriptor(element);
        return compositeDescriptor;
      }
      if ((element instanceof UnmatchedTaskContainer))
      {
        icon = TasksUiImages.QUERY_UNMATCHED;
      }
      else if ((element instanceof RepositoryQuery))
      {
        icon = (((RepositoryQuery)element).getAutoUpdate() ? 
          TasksUiImages.QUERY : 
          TasksUiImages.QUERY_OFFLINE);
      }
      else if ((element instanceof ITask))
      {
        icon = TasksUiImages.TASK;
      }
      else if ((element instanceof ScheduledTaskContainer))
      {
        ScheduledTaskContainer scheduledTaskContainer = (ScheduledTaskContainer)element;
        if ((scheduledTaskContainer.getDateRange() instanceof DayDateRange))
        {
          if (scheduledTaskContainer.isPresent()) {
            icon = CommonImages.SCHEDULE_DAY;
          } else {
            icon = CommonImages.SCHEDULE;
          }
        }
        else if ((scheduledTaskContainer.getDateRange() instanceof WeekDateRange)) {
          icon = CommonImages.SCHEDULE_WEEK;
        } else {
          icon = TasksUiImages.QUERY_UNMATCHED;
        }
      }
      else if ((element instanceof Person))
      {
        icon = CommonImages.PERSON;
        Person person = (Person)element;
        TaskRepository repository = TasksUi.getRepositoryManager().getRepository(person.getConnectorKind(), 
          person.getRepositoryUrl());
        if ((repository != null) && 
          (!repository.isAnonymous()) && 
          (repository.getUserName() != null) && (repository.getUserName().equalsIgnoreCase(
          element.getHandleIdentifier()))) {
          icon = CommonImages.PERSON_ME;
        }
      }
      return compositeDescriptor;
    }
    return compositeDescriptor;
  }
  
  public String getText(Object object)
  {
    if ((object instanceof ITask))
    {
      ITask task = (ITask)object;
      String summary = task.getSummary();
      if (summary == null) {
        summary = Messages.TaskElementLabelProvider__no_summary_available_;
      }
      String taskKey = task.getTaskKey();
      if (taskKey != null) {
        return taskKey + ": " + summary;
      }
      return summary;
    }
    if ((object instanceof IRepositoryElement))
    {
      IRepositoryElement element = (IRepositoryElement)object;
      return element.getSummary();
    }
    return super.getText(object);
  }
  
  public Color getForeground(Object object)
  {
    if ((object instanceof AbstractTask))
    {
      AbstractTask task = (AbstractTask)object;
      if (task != null)
      {
        if (TasksUiPlugin.getTaskActivityManager().isCompletedToday(task)) {
          return themeManager.getCurrentTheme().getColorRegistry().get("org.eclipse.mylyn.tasks.ui.colors.foreground.today.completed");
        }
        if (task.isCompleted()) {
          return themeManager.getCurrentTheme().getColorRegistry().get("org.eclipse.mylyn.tasks.ui.colors.foreground.completed");
        }
        if (TasksUi.getTaskActivityManager().isActive(task)) {
          return themeManager.getCurrentTheme().getColorRegistry().get("org.eclipse.mylyn.tasks.ui.colors.foreground.task.active");
        }
        if (TasksUiPlugin.getTaskActivityManager().isOverdue(task)) {
          return themeManager.getCurrentTheme().getColorRegistry().get("org.eclipse.mylyn.tasks.ui.colors.foreground.past.due");
        }
        if (TasksUiPlugin.getTaskActivityManager().isDueToday(task)) {
          return themeManager.getCurrentTheme().getColorRegistry().get("org.eclipse.mylyn.tasks.ui.colors.foreground.today.scheduled");
        }
        if ((task.getScheduledForDate() != null) && 
          (TasksUiPlugin.getTaskActivityManager().isPastReminder(task))) {
          return themeManager.getCurrentTheme().getColorRegistry().get("org.eclipse.mylyn.tasks.ui.colors.foreground.past.scheduled");
        }
        if (TasksUiPlugin.getTaskActivityManager().isOverdueForOther(task)) {
          return themeManager.getCurrentTheme().getColorRegistry().get("org.eclipse.mylyn.tasks.ui.colors.foreground.overdue.for.others");
        }
        if (TasksUiPlugin.getTaskActivityManager().isScheduledForToday(task)) {
          return themeManager.getCurrentTheme().getColorRegistry().get("org.eclipse.mylyn.tasks.ui.colors.foreground.today.scheduled");
        }
        if (TasksUiPlugin.getTaskActivityManager().isScheduledForThisWeek(task)) {
          return 
          
            themeManager.getCurrentTheme().getColorRegistry().get("org.eclipse.mylyn.tasks.ui.colors.foreground.thisweek.scheduled");
        }
      }
    }
    else if ((object instanceof ITaskContainer))
    {
      if ((object instanceof ScheduledTaskContainer)) {
        return null;
      }
      for (ITask child : ((ITaskContainer)object).getChildren())
      {
        if ((child.isActive()) || (
          ((child instanceof ITaskContainer)) && (showHasActiveChild((ITaskContainer)child)))) {
          return themeManager.getCurrentTheme().getColorRegistry().get("org.eclipse.mylyn.tasks.ui.colors.foreground.task.active");
        }
        if (TasksUiPlugin.getTaskActivityManager().isOverdue(child)) {
          return themeManager.getCurrentTheme().getColorRegistry().get("org.eclipse.mylyn.tasks.ui.colors.foreground.past.due");
        }
      }
    }
    return null;
  }
  
  public Color getBackground(Object element)
  {
    return null;
  }
  
  public Font getFont(Object element)
  {
    if (((element instanceof AbstractTask)) && 
      (((AbstractTask)element).isSynchronizing()))
    {
      if (((AbstractTask)element).isActive()) {
        return CommonFonts.BOLD_ITALIC;
      }
      return CommonFonts.ITALIC;
    }
    if (((element instanceof IRepositoryQuery)) && 
      (((RepositoryQuery)element).isSynchronizing())) {
      return CommonFonts.ITALIC;
    }
    if ((element instanceof ITaskContainer)) {
      for (ITask child : ((ITaskContainer)element).getChildren()) {
        if ((child.isActive()) || (((child instanceof ITaskContainer)) && (showHasActiveChild((ITaskContainer)child)))) {
          return CommonFonts.BOLD;
        }
      }
    }
    if ((element instanceof AbstractTask))
    {
      if (((AbstractTask)element).isActive()) {
        return CommonFonts.BOLD;
      }
      if (((AbstractTask)element).isCompleted())
      {
        if (CommonFonts.HAS_STRIKETHROUGH) {
          if (TasksUiPlugin.getDefault().getPluginPreferences().getBoolean("org.eclipse.mylyn.tasks.ui.strikethrough.for.completed")) {
            return CommonFonts.STRIKETHROUGH;
          }
        }
        return null;
      }
      for (ITask child : ((ITaskContainer)element).getChildren()) {
        if ((child.isActive()) || (((child instanceof ITaskContainer)) && (showHasActiveChild((ITaskContainer)child)))) {
          return CommonFonts.BOLD;
        }
      }
    }
    return null;
  }
  
  private boolean showHasActiveChild(ITaskContainer container)
  {
    if (!TasksUiPlugin.getDefault().groupSubtasks(container)) {
      return false;
    }
    return showHasActiveChildHelper(container, new HashSet());
  }
  
  private boolean showHasActiveChildHelper(ITaskContainer container, Set<IRepositoryElement> visitedContainers)
  {
    for (IRepositoryElement child : container.getChildren()) {
      if (!visitedContainers.contains(child))
      {
        visitedContainers.add(child);
        if (((child instanceof ITask)) && (((AbstractTask)child).isActive())) {
          return true;
        }
        if (((child instanceof ITaskContainer)) && 
          (showHasActiveChildHelper((ITaskContainer)child, visitedContainers))) {
          return true;
        }
      }
    }
    return false;
  }
  
  private class CompositeImageDescriptor
  {
    ImageDescriptor icon;
    ImageDescriptor overlayKind;
    
    private CompositeImageDescriptor() {}
  }
}

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

import org.eclipse.core.runtime.ISafeRunnable;
import org.eclipse.core.runtime.Status;
import org.eclipse.mylyn.commons.core.StatusHandler;
import org.eclipse.mylyn.internal.tasks.ui.editors.AbstractTaskEditorSection;
import org.eclipse.ui.forms.IManagedForm;

class AbstractTaskEditorPage$15
  implements ISafeRunnable
{
  AbstractTaskEditorPage$15(AbstractTaskEditorPage paramAbstractTaskEditorPage, TaskEditorPartDescriptor paramTaskEditorPartDescriptor, AbstractTaskEditorSection paramAbstractTaskEditorSection, String paramString) {}
  
  public void handleException(Throwable e)
  {
    StatusHandler.log(new Status(4, "org.eclipse.mylyn.tasks.ui", 
      "Error creating task editor part: \"" + val$descriptor.getId() + "\"", e));
  }
  
  public void run()
    throws Exception
  {
    AbstractTaskEditorPart part = val$descriptor.createPart();
    part.setPartId(val$descriptor.getId());
    this$0.getManagedForm().addPart(part);
    part.initialize(this$0);
    val$parentPart.addSubPart(val$subPath, part);
  }
}

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

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

class AbstractTaskEditorPage$21
  extends SafeRunnable
{
  AbstractTaskEditorPage$21(AbstractTaskEditorPage paramAbstractTaskEditorPage, ISelectionChangedListener paramISelectionChangedListener, SelectionChangedEvent paramSelectionChangedEvent) {}
  
  public void run()
  {
    val$l.selectionChanged(val$event);
  }
}

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

import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.ui.internal.forms.widgets.BusyIndicator;

class TaskEditor$5
  implements DisposeListener
{
  TaskEditor$5(TaskEditor paramTaskEditor) {}
  
  public void widgetDisposed(DisposeEvent e)
  {
    TaskEditor.access$4(this$0).setMenu(null);
    TaskEditor.access$5(this$0, null);
  }
}

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

import org.eclipse.core.runtime.Assert;

public abstract class TaskEditorPartDescriptor
{
  private final String id;
  private String path;
  
  public TaskEditorPartDescriptor(String id)
  {
    Assert.isNotNull(id);
    this.id = id;
    path = "comments";
  }
  
  public abstract AbstractTaskEditorPart createPart();
  
  public boolean equals(Object obj)
  {
    if (this == obj) {
      return true;
    }
    if (obj == null) {
      return false;
    }
    TaskEditorPartDescriptor other = (TaskEditorPartDescriptor)obj;
    return id.equals(id);
  }
  
  public String getId()
  {
    return id;
  }
  
  public String getPath()
  {
    return path;
  }
  
  public int hashCode()
  {
    int result = 1;
    result = 31 * result + id.hashCode();
    return result;
  }
  
  public TaskEditorPartDescriptor setPath(String path)
  {
    this.path = path;
    return this;
  }
}

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

import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.mylyn.internal.tasks.core.AbstractTaskContainer;
import org.eclipse.mylyn.internal.tasks.core.ITaskList;
import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorActionPart;
import org.eclipse.mylyn.internal.tasks.ui.util.AttachmentUtil;
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.mylyn.tasks.core.data.TaskData;
import org.eclipse.mylyn.tasks.core.data.TaskDataModel;
import org.eclipse.mylyn.tasks.core.sync.SubmitJob;
import org.eclipse.mylyn.tasks.core.sync.SubmitJobEvent;
import org.eclipse.mylyn.tasks.core.sync.SubmitJobListener;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;

class AbstractTaskEditorPage$SubmitTaskJobListener
  extends SubmitJobListener
{
  private final boolean attachContext;
  private final boolean expandLastComment;
  
  public AbstractTaskEditorPage$SubmitTaskJobListener(AbstractTaskEditorPage paramAbstractTaskEditorPage, boolean attachContext, boolean expandLastComment)
  {
    this.attachContext = attachContext;
    this.expandLastComment = expandLastComment;
  }
  
  public void done(SubmitJobEvent event)
  {
    final SubmitJob job = event.getJob();
    PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable()
    {
      private void addTask(ITask newTask)
      {
        AbstractTaskContainer parent = null;
        AbstractTaskEditorPart actionPart = this$0.getPart("org.eclipse.mylyn.tasks.ui.editors.parts.actions");
        if ((actionPart instanceof TaskEditorActionPart)) {
          parent = ((TaskEditorActionPart)actionPart).getCategory();
        }
        TasksUiInternal.getTaskList().addTask(newTask, parent);
      }
      
      /* Error */
      public void run()
      {
        // Byte code:
        //   0: aload_0
        //   1: getfield 120	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener$1:val$job	Lorg/eclipse/mylyn/tasks/core/sync/SubmitJob;
        //   4: invokevirtual 133	org/eclipse/mylyn/tasks/core/sync/SubmitJob:getStatus	()Lorg/eclipse/core/runtime/IStatus;
        //   7: ifnonnull +175 -> 182
        //   10: aload_0
        //   11: getfield 121	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener$1:this$1	Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener;
        //   14: invokestatic 147	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener:access$1	(Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener;)Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage;
        //   17: invokevirtual 140	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage:getTaskRepository	()Lorg/eclipse/mylyn/tasks/core/TaskRepository;
        //   20: invokestatic 131	org/eclipse/mylyn/internal/tasks/ui/util/TasksUiInternal:synchronizeRepositoryInBackground	(Lorg/eclipse/mylyn/tasks/core/TaskRepository;)V
        //   23: aload_0
        //   24: getfield 120	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener$1:val$job	Lorg/eclipse/mylyn/tasks/core/sync/SubmitJob;
        //   27: invokevirtual 134	org/eclipse/mylyn/tasks/core/sync/SubmitJob:getTask	()Lorg/eclipse/mylyn/tasks/core/ITask;
        //   30: aload_0
        //   31: getfield 121	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener$1:this$1	Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener;
        //   34: invokestatic 147	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener:access$1	(Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener;)Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage;
        //   37: invokevirtual 139	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage:getTask	()Lorg/eclipse/mylyn/tasks/core/ITask;
        //   40: invokevirtual 123	java/lang/Object:equals	(Ljava/lang/Object;)Z
        //   43: ifeq +16 -> 59
        //   46: aload_0
        //   47: getfield 121	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener$1:this$1	Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener;
        //   50: invokestatic 147	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener:access$1	(Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener;)Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage;
        //   53: invokevirtual 137	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage:refresh	()V
        //   56: goto +106 -> 162
        //   59: aload_0
        //   60: getfield 121	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener$1:this$1	Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener;
        //   63: invokestatic 147	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener:access$1	(Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener;)Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage;
        //   66: invokevirtual 139	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage:getTask	()Lorg/eclipse/mylyn/tasks/core/ITask;
        //   69: astore_1
        //   70: aload_0
        //   71: getfield 120	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener$1:val$job	Lorg/eclipse/mylyn/tasks/core/sync/SubmitJob;
        //   74: invokevirtual 134	org/eclipse/mylyn/tasks/core/sync/SubmitJob:getTask	()Lorg/eclipse/mylyn/tasks/core/ITask;
        //   77: astore_2
        //   78: aload_0
        //   79: aload_2
        //   80: invokespecial 148	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener$1:addTask	(Lorg/eclipse/mylyn/tasks/core/ITask;)V
        //   83: new 55	org/eclipse/mylyn/internal/tasks/ui/editors/TaskMigrator
        //   86: dup
        //   87: aload_1
        //   88: invokespecial 127	org/eclipse/mylyn/internal/tasks/ui/editors/TaskMigrator:<init>	(Lorg/eclipse/mylyn/tasks/core/ITask;)V
        //   91: astore_3
        //   92: aload_3
        //   93: iconst_1
        //   94: invokevirtual 125	org/eclipse/mylyn/internal/tasks/ui/editors/TaskMigrator:setDelete	(Z)V
        //   97: aload_3
        //   98: aload_0
        //   99: getfield 121	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener$1:this$1	Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener;
        //   102: invokestatic 147	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener:access$1	(Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener;)Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage;
        //   105: invokevirtual 142	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage:getTaskEditor	()Lorg/eclipse/mylyn/tasks/ui/editors/TaskEditor;
        //   108: invokevirtual 129	org/eclipse/mylyn/internal/tasks/ui/editors/TaskMigrator:setEditor	(Lorg/eclipse/mylyn/tasks/ui/editors/TaskEditor;)V
        //   111: aload_3
        //   112: aload_0
        //   113: getfield 121	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener$1:this$1	Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener;
        //   116: invokestatic 147	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener:access$1	(Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener;)Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage;
        //   119: invokestatic 143	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage:access$4	(Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage;)Lorg/eclipse/mylyn/tasks/core/AbstractRepositoryConnector;
        //   122: aload_0
        //   123: getfield 121	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener$1:this$1	Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener;
        //   126: invokestatic 147	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener:access$1	(Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener;)Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage;
        //   129: invokevirtual 140	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage:getTaskRepository	()Lorg/eclipse/mylyn/tasks/core/TaskRepository;
        //   132: aload_2
        //   133: aload_0
        //   134: getfield 121	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener$1:this$1	Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener;
        //   137: invokestatic 147	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener:access$1	(Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener;)Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage;
        //   140: invokestatic 144	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage:access$5	(Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage;)Lorg/eclipse/mylyn/tasks/core/data/TaskData;
        //   143: invokevirtual 132	org/eclipse/mylyn/tasks/core/AbstractRepositoryConnector:hasRepositoryDueDate	(Lorg/eclipse/mylyn/tasks/core/TaskRepository;Lorg/eclipse/mylyn/tasks/core/ITask;Lorg/eclipse/mylyn/tasks/core/data/TaskData;)Z
        //   146: ifeq +7 -> 153
        //   149: iconst_0
        //   150: goto +4 -> 154
        //   153: iconst_1
        //   154: invokevirtual 126	org/eclipse/mylyn/internal/tasks/ui/editors/TaskMigrator:setMigrateDueDate	(Z)V
        //   157: aload_3
        //   158: aload_2
        //   159: invokevirtual 128	org/eclipse/mylyn/internal/tasks/ui/editors/TaskMigrator:execute	(Lorg/eclipse/mylyn/tasks/core/ITask;)V
        //   162: aload_0
        //   163: getfield 121	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener$1:this$1	Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener;
        //   166: invokestatic 146	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener:access$0	(Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener;)Z
        //   169: ifeq +13 -> 182
        //   172: aload_0
        //   173: getfield 121	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener$1:this$1	Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener;
        //   176: invokestatic 147	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener:access$1	(Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener;)Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage;
        //   179: invokevirtual 136	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage:expandLastComment	()V
        //   182: aload_0
        //   183: getfield 121	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener$1:this$1	Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener;
        //   186: invokestatic 147	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener:access$1	(Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener;)Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage;
        //   189: new 59	org/eclipse/mylyn/tasks/core/sync/SubmitJobEvent
        //   192: dup
        //   193: aload_0
        //   194: getfield 120	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener$1:val$job	Lorg/eclipse/mylyn/tasks/core/sync/SubmitJob;
        //   197: invokespecial 135	org/eclipse/mylyn/tasks/core/sync/SubmitJobEvent:<init>	(Lorg/eclipse/mylyn/tasks/core/sync/SubmitJob;)V
        //   200: invokevirtual 141	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage:handleTaskSubmitted	(Lorg/eclipse/mylyn/tasks/core/sync/SubmitJobEvent;)V
        //   203: goto +19 -> 222
        //   206: astore 4
        //   208: aload_0
        //   209: getfield 121	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener$1:this$1	Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener;
        //   212: invokestatic 147	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener:access$1	(Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage$SubmitTaskJobListener;)Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage;
        //   215: icons
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-2017. Infinite Loop Ltd