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

 {
          replacement = (TasksUiInternal.getTaskPrefix(task.getConnectorKind()) + defaultReplacement);
        } else {
          replacement = defaultReplacement;
        }
      }
      return replacement;
    }
    
    public String getAdditionalProposalInfo()
    {
      return null;
    }
    
    public IContextInformation getContextInformation()
    {
      return null;
    }
    
    public String getDisplayString()
    {
      return labelProvider.getText(task);
    }
    
    public Image getImage()
    {
      return labelProvider.getImage(task);
    }
    
    public Point getSelection(IDocument document)
    {
      return new Point(replacementOffset + getReplacement().length(), 0);
    }
    
    public TaskRepository getRepository()
    {
      return repository;
    }
    
    public ITask getTask()
    {
      return task;
    }
  }
  
  private class ProposalComputer
  {
    public static final String LABEL_SEPARATOR = " -------------------------------------------- ";
    private final Set<ITask> addedTasks = new HashSet();
    private boolean addSeparator;
    private final int offset;
    private final String prefix;
    private final List<ICompletionProposal> resultList = new ArrayList();
    
    public ProposalComputer(ITextViewer viewer, int offset)
    {
      this.offset = offset;
      prefix = extractPrefix(viewer, offset).toLowerCase();
    }
    
    private void addProposal(ITask task, String replacement, boolean includeTaskPrefix)
    {
      if (addSeparator)
      {
        if (!addedTasks.isEmpty()) {
          resultList.add(createSeparator());
        }
        addSeparator = false;
      }
      resultList.add(new RepositoryCompletionProcessor.TaskCompletionProposal(repository, task, labelProvider, replacement, includeTaskPrefix, 
        offset - prefix.length(), prefix.length()));
      
      addedTasks.add(task);
    }
    
    public void addSeparator()
    {
      addSeparator = true;
    }
    
    public void addTasks(List<AbstractTask> tasks)
    {
      for (AbstractTask task : tasks) {
        addTask(task);
      }
    }
    
    public void addTask(ITask task)
    {
      if (addedTasks.contains(task)) {
        return;
      }
      if ((getNeverIncludePrefix()) && (!task.getRepositoryUrl().equals(repository.getRepositoryUrl()))) {
        return;
      }
      String taskKey = task.getTaskKey();
      if (prefix.length() == 0) {
        addProposal(task, taskKey, !getNeverIncludePrefix());
      } else if ((taskKey != null) && (taskKey.startsWith(prefix))) {
        addProposal(task, taskKey, false);
      } else if (containsPrefix(task)) {
        addProposal(task, taskKey, !getNeverIncludePrefix());
      }
    }
    
    private boolean containsPrefix(ITask task)
    {
      String haystack = TasksUiInternal.getTaskPrefix(task.getConnectorKind()) + 
        " " + labelProvider.getText(task);
      String[] haystackTokens = haystack.split("\\s");
      String[] needles = prefix.trim().split("\\*");
      if ((haystackTokens.length == 0) || (needles.length == 0)) {
        return false;
      }
      String[] arrayOfString1;
      int j = (arrayOfString1 = needles).length;
      for (int i = 0; i < j; i++)
      {
        String needle = arrayOfString1[i];
        boolean matched = false;
        String[] arrayOfString2;
        int m = (arrayOfString2 = haystackTokens).length;
        for (int k = 0; k < m; k++)
        {
          String haystackToken = arrayOfString2[k];
          if (haystackToken.toLowerCase().startsWith(needle))
          {
            matched = true;
            break;
          }
        }
        if (!matched) {
          return false;
        }
      }
      return true;
    }
    
    private CompletionProposal createSeparator()
    {
      return new CompletionProposal("", offset, 0, 0, CommonImages.getImage(CommonImages.SEPARATOR_LIST), 
        " -------------------------------------------- ", null, null);
    }
    
    private String extractPrefix(ITextViewer viewer, int offset)
    {
      int i = offset;
      IDocument document = viewer.getDocument();
      if (i > document.getLength()) {
        return "";
      }
      try
      {
        do
        {
          char c = document.getChar(i - 1);
          if ((Character.isWhitespace(c)) || (c == '(') || (c == ':')) {
            break;
          }
          i--;
        } while (i > 0);
        if ((i == offset) && (repository != null))
        {
          String taskPrefix = TasksUiInternal.getTaskPrefix(repository.getConnectorKind());
          if (taskPrefix.length() > 1) {
            try
            {
              if (taskPrefix.equals(document.get(offset - taskPrefix.length(), taskPrefix.length()))) {
                return taskPrefix;
              }
            }
            catch (BadLocationException localBadLocationException1) {}
          }
        }
        return document.get(i, offset - i);
      }
      catch (BadLocationException localBadLocationException2) {}
      return "";
    }
    
    public void filterTasks(List<AbstractTask> tasks)
    {
      for (Iterator<AbstractTask> it = tasks.iterator(); it.hasNext();)
      {
        ITask task = (ITask)it.next();
        if (!select(task)) {
          it.remove();
        }
      }
    }
    
    private boolean select(ITask task)
    {
      return (!(task instanceof LocalTask)) && ((repository == null) || (task.getRepositoryUrl().equals(repository.getRepositoryUrl())));
    }
    
    public ICompletionProposal[] getResult()
    {
      return (ICompletionProposal[])resultList.toArray(new ICompletionProposal[resultList.size()]);
    }
  }
  
  private final TaskElementLabelProvider labelProvider = new TaskElementLabelProvider(false);
  private final TaskRepository repository;
  private boolean neverIncludePrefix;
  
  public RepositoryCompletionProcessor(TaskRepository taskRepository)
  {
    repository = taskRepository;
    neverIncludePrefix = false;
  }
  
  public boolean getNeverIncludePrefix()
  {
    return neverIncludePrefix;
  }
  
  public void setNeverIncludePrefix(boolean includePrefix)
  {
    neverIncludePrefix = includePrefix;
  }
  
  public ICompletionProposal[] computeCompletionProposals(ITextViewer viewer, int offset)
  {
    ITextSelection selection = (ITextSelection)viewer.getSelectionProvider().getSelection();
    if (selection.getOffset() == offset) {
      offset = selection.getOffset() + selection.getLength();
    }
    ProposalComputer proposalComputer = new ProposalComputer(viewer, offset);
    
    IWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
    if (window != null)
    {
      IWorkbenchPage page = window.getActivePage();
      if (page != null)
      {
        IEditorReference[] editorReferences = page.getEditorReferences();
        int count = 0;
        for (int i = editorReferences.length - 1; (i >= 0) && (count < 10); i--) {
          try
          {
            if ((editorReferences[i].getEditorInput() instanceof TaskEditorInput))
            {
              TaskEditorInput input = (TaskEditorInput)editorReferences[i].getEditorInput();
              ITask task = input.getTask();
              if ((task != null) && (!(task instanceof LocalTask)))
              {
                proposalComputer.addTask(task);
                count++;
              }
            }
          }
          catch (PartInitException localPartInitException) {}
        }
      }
    }
    TaskActivationHistory taskHistory = TasksUiPlugin.getTaskActivityManager().getTaskActivationHistory();
    List<AbstractTask> tasks = taskHistory.getPreviousTasks(TasksUiInternal.getContainersFromWorkingSet(TaskWorkingSetUpdater.getActiveWorkingSets(window)));
    int count = 0;
    for (int i = tasks.size() - 1; (i >= 0) && (count < 10); i--)
    {
      AbstractTask task = (AbstractTask)tasks.get(i);
      if (!(task instanceof LocalTask)) {
        proposalComputer.addTask(task);
      }
    }
    if (repository != null)
    {
      proposalComputer.addSeparator();
      
      TaskList taskList = TasksUiPlugin.getTaskList();
      tasks = new ArrayList(taskList.getAllTasks());
      proposalComputer.filterTasks(tasks);
      Collections.sort(tasks, new Comparator()
      {
        public int compare(AbstractTask o1, AbstractTask o2)
        {
          return labelProvider.getText(o1).compareTo(labelProvider.getText(o2));
        }
      });
      proposalComputer.addTasks(tasks);
    }
    return proposalComputer.getResult();
  }
  
  public IContextInformation[] computeContextInformation(ITextViewer viewer, int offset)
  {
    return null;
  }
  
  public char[] getCompletionProposalAutoActivationCharacters()
  {
    return null;
  }
  
  public char[] getContextInformationAutoActivationCharacters()
  {
    return null;
  }
  
  public IContextInformationValidator getContextInformationValidator()
  {
    return null;
  }
  
  public String getErrorMessage()
  {
    return null;
  }
}

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

import org.eclipse.swt.events.PaintEvent;
import org.eclipse.swt.events.PaintListener;
import org.eclipse.swt.graphics.GC;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.widgets.Canvas;

class TaskEditorCommentPart$CommentGroupViewer$2
  implements PaintListener
{
  TaskEditorCommentPart$CommentGroupViewer$2(TaskEditorCommentPart.CommentGroupViewer paramCommentGroupViewer, Canvas paramCanvas) {}
  
  public void paintControl(PaintEvent e)
  {
    gc.setForeground(val$separator.getForeground());
    gc.drawLine(0, 0, val$separator.getSize().x, 0);
  }
}

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

import org.eclipse.osgi.util.NLS;

public class Messages
  extends NLS
{
  private static final String BUNDLE_NAME = "org.eclipse.mylyn.internal.tasks.ui.editors.messages";
  public static String AbstractReplyToCommentAction_Reply;
  public static String AttachmentSizeFormatter_0_bytes;
  public static String AttachmentSizeFormatter_0_GB;
  public static String AttachmentSizeFormatter_0_KB;
  public static String AttachmentSizeFormatter_0_MB;
  public static String AttachmentSizeFormatter_1_byte;
  public static String AttachmentTableLabelProvider_File_;
  public static String AttachmentTableLabelProvider_Patch;
  public static String AttachmentTableLabelProvider_Task_Context;
  public static String AttachmentTableLabelProvider_Type_;
  public static String BrowserPreviewViewer_Error;
  public static String BrowserPreviewViewer_Formatting_Wiki_Text;
  public static String BrowserPreviewViewer_Loading_preview_;
  public static String BrowserPreviewViewer_The_repository_does_not_support_HTML_preview;
  public static String CheckboxMultiSelectAttributeEditor_Select_X;
  public static String CommentGroupStrategy_Current;
  public static String CommentGroupStrategy_Older;
  public static String CommentGroupStrategy_Recent;
  public static String PersonalPart_Personal_Planning;
  public static String PersonAttributeEditor_Insert_My_User_Id_Tooltip;
  public static String PlanningPageFactory_Private;
  public static String PlanningPart_Active_time_in_Product_Label;
  public static String PlanningPart_Active_time_Label;
  public static String PlanningPart_Default_Product;
  public static String PlanningPart_Later;
  public static String PlanningPart_Next_Week;
  public static String PlanningPart_Personal_Notes;
  public static String PlanningPart_Reset_Active_Time;
  public static String PlanningPart_Scheduled_for_X_Tooltip;
  public static String PlanningPart_This_Week;
  public static String PlanningPart_Today;
  public static String RichTextAttributeEditor_Viewer_Source;
  public static String TaskAttachmentDropListener_Note_that_only_the_first_file_dragged_will_be_attached;
  public static String TaskEditorActionPart_Actions;
  public static String TaskEditorActionPart_Add_to_Category;
  public static String TaskEditorActionPart_Attach_Context;
  public static String TaskEditorActionPart_Submit;
  public static String TaskEditorActionPart_Submit_to_X;
  public static String TaskEditorAttachmentPart_Attach_;
  public static String TaskEditorAttachmentPart_Attach__Screenshot;
  public static String TaskEditorAttachmentPart_Attachment_Section_Title_X;
  public static String TaskEditorAttachmentPart_Attachment_Section_Title_X_of_Y;
  public static String TaskEditorAttachmentPart_Attachments;
  public static String TaskEditorAttachmentPart_Created;
  public static String TaskEditorAttachmentPart_Creator;
  public static String TaskEditorAttachmentPart_Description;
  public static String TaskEditorAttachmentPart_Hide_Obsolete_Tooltip;
  public static String TaskEditorAttachmentPart_ID;
  public static String TaskEditorAttachmentPart_Name;
  public static String TaskEditorAttachmentPart_No_attachments;
  public static String TaskEditorAttachmentPart_Size;
  public static String TaskEditorAttributePart_Attributes;
  public static String TaskEditorAttributePart_Refresh_Attributes;
  public static String TaskEditorAttributePart_Update_Failed;
  public static String TaskEditorAttributePart_Updating_of_repository_configuration_failed;
  public static String TaskEditorCommentPart_0;
  public static String TaskEditorCommentPart_1;
  public static String TaskEditorCommentPart_Collapse_Comments;
  public static String TaskEditorCommentPart_Comments;
  public static String TaskEditorCommentPart_Expand_Comments;
  public static String TaskEditorDescriptionPart_Description;
  public static String TaskEditorDescriptionPart_Detector;
  public static String TaskEditorDescriptionPart_Duplicate_Detection_Failed;
  public static String TaskEditorDescriptionPart_Duplicate_Detection;
  public static String TaskEditorDescriptionPart_The_duplicate_detector_did_not_return_a_valid_query;
  public static String TaskEditorDescriptionPart_Search;
  public static String TaskEditorNewCommentPart_New_Comment;
  public static String TaskEditorOutlineNode_Attachments;
  public static String TaskEditorOutlineNode_Attributes;
  public static String TaskEditorOutlineNode_Comments;
  public static String TaskEditorOutlineNode_Description;
  public static String TaskEditorOutlineNode_New_Comment;
  public static String TaskEditorOutlineNode_Related_Tasks;
  public static String TaskEditorOutlineNode_Task_;
  public static String TaskEditorOutlineNode_TaskRelation_Label;
  public static String TaskEditorOutlineNode_unknown_Label;
  public static String TaskEditorPeoplePart_People;
  public static String TaskEditorPlanningPart_0_SECOUNDS;
  public static String TaskEditorPlanningPart_Add_Private_Notes_Tooltip;
  public static String TaskEditorPlanningPart_Confirm_Activity_Time_Deletion;
  public static String TaskEditorPlanningPart_Do_you_wish_to_reset_your_activity_time_on_this_task_;
  public static String TaskEditorPlanningPart_Due;
  public static String TaskEditorPlanningPart_Estimated;
  public static String TaskEditorPlanningPart_Scheduled;
  public static String TaskEditorPlanningPart_TaskEditorPlanningPart_tooltip;
  public static String TaskEditorPlanningPart_Time_working_on_this_task;
  public static String TaskEditorRichTextPart_Browser_Preview;
  public static String TaskEditorRichTextPart_Edit_Tooltip;
  public static String TaskEditorRichTextPart_Maximize;
  public static String TaskEditorSummaryPart_Summary;
  public static String TaskPlanningEditor_Attributes;
  public static String TaskPlanningEditor_Complete;
  public static String TaskPlanningEditor_Completed;
  public static String TaskPlanningEditor_Created;
  public static String TaskPlanningEditor_Incomplete;
  public static String TaskPlanningEditor_Planning;
  public static String TaskPlanningEditor_Retrieve_task_description_from_URL;
  public static String TaskPlanningEditor_Save;
  public static String TaskPlanningEditor_Status;
  public static String TaskPlanningEditor_URL;
  public static String AbstractTaskEditorPage_Comment_required;
  public static String AbstractTaskEditorPage_Could_not_save_task;
  public static String AbstractTaskEditorPage_Error_opening_task;
  public static String AbstractTaskEditorPage_Failed_to_read_task_data_;
  public static String AbstractTaskEditorPage_History;
  public static String AbstractTaskEditorPage_Open_failed;
  public static String AbstractTaskEditorPage_Open_with_Web_Browser;
  public static String AbstractTaskEditorPage_Save_failed;
  public static String AbstractTaskEditorPage_Submit_failed;
  public static String AbstractTaskEditorPage_Submit_failed_;
  public static String AbstractTaskEditorPage_Synchronize_to_retrieve_task_data;
  public static String AbstractTaskEditorPage_Synchronize_to_update_editor_contents;
  public static String AbstractTaskEditorPage_Add_task_to_tasklist;
  public static String AbstractTaskEditorPage_Task_has_incoming_changes;
  public static String AbstractTaskEditorPage_Title;
  public static String AbstractTaskEditorPage_Unable_to_submit_at_this_time;
  public static String AttributeEditorToolkit_Content_Assist_Available__X_;
  public static String AttributePart_Category_;
  public static String DoubleAttributeEditor_this_field_requires_double_value;
  public static String IntegerAttributeEditor_this_field_requires_integer_value;
  public static String SummaryPart_Section_Title;
  public static String TaskEditor_Edit_Task_Repository_ToolTip;
  public static String TaskEditor_Task;
  public static String TaskEditor_Task_added_to_the_Uncategorized_container;
  public static String TaskEditorExtensionSettingsContribution__default_;
  public static String TaskEditorExtensionSettingsContribution_Avatar_Button_Label;
  public static String TaskEditorExtensionSettingsContribution_Editor;
  public static String TaskEditorExtensionSettingsContribution_Plain_Text;
  public static String TaskEditorExtensionSettingsContribution_Rendering_Group_Label;
  public static String TaskEditorExtensionSettingsContribution_Select_the_capabilities_of_the_task_editor;
  public static String TaskHyperlinkPresenter_Not_In_Task_List;
  public static String TaskUrlHyperlink_Open_URL_in_Task_Editor;
  
  static {}
  
  public static void reloadMessages()
  {
    NLS.initializeMessages("org.eclipse.mylyn.internal.tasks.ui.editors.messages", Messages.class);
  }
}

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

import org.eclipse.mylyn.commons.ui.CommonImages;
import org.eclipse.swt.SWTException;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.internal.WorkbenchPlugin;

@Deprecated
public class EditorBusyIndicator
{
  public static final int DELAY = 90;
  private Animator animator;
  private final IBusyEditor editor;
  private Image[] images;
  private Image oldImage;
  
  private class Animator
    implements Runnable
  {
    int imageDataIndex = 0;
    private final Image[] images;
    private boolean stopped;
    
    public Animator(Image[] images)
    {
      this.images = images;
    }
    
    public void run()
    {
      if (stopped) {
        return;
      }
      try
      {
        Image image = images[imageDataIndex];
        imageDataIndex = ((imageDataIndex + 1) % images.length);
        if (EditorBusyIndicator.this.updateTitleImage(image)) {
          PlatformUI.getWorkbench().getDisplay().timerExec(90, this);
        }
      }
      catch (Exception e)
      {
        WorkbenchPlugin.log(e);
      }
    }
    
    public void stop()
    {
      stopped = true;
    }
  }
  
  public EditorBusyIndicator(IBusyEditor editor)
  {
    this.editor = editor;
  }
  
  public void start()
  {
    if (animator != null) {
      stop();
    }
    try
    {
      if (images == null)
      {
        images = CommonImages.getProgressImages();
        if (images == null) {
          return;
        }
      }
      oldImage = editor.getTitleImage();
      if (images.length > 1)
      {
        animator = new Animator(images);
        animator.run();
      }
    }
    catch (SWTException e)
    {
      WorkbenchPlugin.log(e);
    }
  }
  
  public void stop()
  {
    if (animator != null)
    {
      animator.stop();
      animator = null;
      
      updateTitleImage(oldImage);
      oldImage = null;
    }
  }
  
  private boolean updateTitleImage(Image image)
  {
    if (!PlatformUI.getWorkbench().isClosing())
    {
      if ((image != null) && (!image.isDisposed()))
      {
        editor.setTitleImage(image);
        return true;
      }
      if ((oldImage != null) && (!oldImage.isDisposed())) {
        editor.setTitleImage(oldImage);
      }
    }
    return false;
  }
}

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

import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.widgets.Menu;

class PriorityEditor$2
  implements DisposeListener
{
  PriorityEditor$2(PriorityEditor paramPriorityEditor) {}
  
  public void widgetDisposed(DisposeEvent e)
  {
    if (PriorityEditor.access$0(this$0) != null) {
      PriorityEditor.access$0(this$0).dispose();
    }
  }
}

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

import org.eclipse.jface.text.BadLocationException;
import org.eclipse.jface.text.IDocument;
import org.eclipse.jface.text.contentassist.ICompletionProposal;
import org.eclipse.jface.text.contentassist.IContextInformation;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.mylyn.internal.tasks.ui.actions.CopyTaskDetailsAction;
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.swt.graphics.Image;
import org.eclipse.swt.graphics.Point;

public class RepositoryCompletionProcessor$TaskCompletionProposal
  implements ICompletionProposal
{
  private final LabelProvider labelProvider;
  private final TaskRepository repository;
  private final ITask task;
  private final int replacementOffset;
  private final int replacementLength;
  private String replacement;
  private final String defaultReplacement;
  private final boolean includePrefix;
  
  public RepositoryCompletionProcessor$TaskCompletionProposal(TaskRepository repository, ITask task, LabelProvider labelProvider, String defaultReplacement, boolean includePrefix, int replacementOffset, int replacementLength)
  {
    this.labelProvider = labelProvider;
    this.repository = repository;
    this.task = task;
    this.defaultReplacement = defaultReplacement;
    this.includePrefix = includePrefix;
    this.replacementOffset = replacementOffset;
    this.replacementLength = replacementLength;
  }
  
  public void apply(IDocument document)
  {
    try
    {
      document.replace(replacementOffset, replacementLength, getReplacement());
    }
    catch (BadLocationException localBadLocationException) {}
  }
  
  public String getReplacement()
  {
    if (replacement == null) {
      if ((defaultReplacement == null) || (repository == null) || 
        (!repository.getRepositoryUrl().equals(task.getRepositoryUrl()))) {
        replacement = CopyTaskDetailsAction.getTextForTask(task);
      } else if (includePrefix) {
        replacement = (TasksUiInternal.getTaskPrefix(task.getConnectorKind()) + defaultReplacement);
      } else {
        replacement = defaultReplacement;
      }
    }
    return replacement;
  }
  
  public String getAdditionalProposalInfo()
  {
    return null;
  }
  
  public IContextInformation getContextInformation()
  {
    return null;
  }
  
  public String getDisplayString()
  {
    return labelProvider.getText(task);
  }
  
  public Image getImage()
  {
    return labelProvider.getImage(task);
  }
  
  public Point getSelection(IDocument document)
  {
    return new Point(replacementOffset + getReplacement().length(), 0);
  }
  
  public TaskRepository getRepository()
  {
    return repository;
  }
  
  public ITask getTask()
  {
    return task;
  }
}

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

import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.Viewer;

public class TaskEditorOutlineContentProvider
  implements ITreeContentProvider
{
  public void dispose() {}
  
  public Object[] getChildren(Object parentElement)
  {
    if ((parentElement instanceof TaskEditorOutlineNode))
    {
      Object[] children = ((TaskEditorOutlineNode)parentElement).getChildren();
      return children;
    }
    return new Object[0];
  }
  
  public Object[] getElements(Object inputElement)
  {
    if ((inputElement instanceof TaskEditorOutlineModel)) {
      return new Object[] { ((TaskEditorOutlineModel)inputElement).getRoot() };
    }
    return new Object[0];
  }
  
  public Object getParent(Object element)
  {
    if ((element instanceof TaskEditorOutlineNode)) {
      return ((TaskEditorOutlineNode)element).getParent();
    }
    return null;
  }
  
  public boolean hasChildren(Object element)
  {
    if ((element instanceof TaskEditorOutlineNode)) {
      return ((TaskEditorOutlineNode)element).getChildren().length > 0;
    }
    return false;
  }
  
  public void inputChanged(Viewer viewerChanged, Object oldInput, Object newInput) {}
}

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

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

class TaskEditorAttachmentPart$6
  extends Action
{
  TaskEditorAttachmentPart$6(TaskEditorAttachmentPart paramTaskEditorAttachmentPart, String $anonymous0, int $anonymous1)
  {
    super($anonymous0, $anonymous1);
  }
  
  public void run()
  {
    TasksUiPlugin.getDefault().getPreferenceStore().setValue("org.eclipse.mylyn.tasks.ui.editor.attachments.filter.deprecated", isChecked());
    this$0.filterDeprecated(isChecked());
  }
}

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

import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;

class TaskPlanningEditor$4$1
  implements Listener
{
  TaskPlanningEditor$4$1(TaskPlanningEditor.4 param4) {}
  
  public void handleEvent(Event e)
  {
    TaskPlanningEditor.4.access$0(this$1).doSave(new NullProgressMonitor());
  }
}

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

import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.mylyn.commons.ui.CommonImages;
import org.eclipse.mylyn.tasks.core.IRepositoryPerson;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
import org.eclipse.mylyn.tasks.core.data.TaskAttributeMapper;
import org.eclipse.mylyn.tasks.core.data.TaskDataModel;
import org.eclipse.swt.events.MouseEvent;
import org.eclipse.swt.events.MouseTrackAdapter;
import org.eclipse.swt.events.MouseTrackListener;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.fieldassist.ContentAssistCommandAdapter;
import org.eclipse.ui.forms.events.HyperlinkAdapter;
import org.eclipse.ui.forms.events.HyperlinkEvent;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.ImageHyperlink;

public class PersonAttributeEditor
  extends TextAttributeEditor
{
  private ContentAssistCommandAdapter contentAssistCommandAdapter = null;
  
  public PersonAttributeEditor(TaskDataModel manager, TaskAttribute taskAttribute)
  {
    super(manager, taskAttribute);
  }
  
  public Text getText()
  {
    return super.getText();
  }
  
  public void createControl(Composite parent, FormToolkit toolkit)
  {
    String userName = getModel().getTaskRepository().getUserName();
    if ((isReadOnly()) || (userName == null) || (userName.length() == 0))
    {
      super.createControl(parent, toolkit);
    }
    else
    {
      final Composite composite = new Composite(parent, 0);
      GridLayout parentLayout = new GridLayout(2, false);
      marginHeight = 0;
      marginWidth = 0;
      horizontalSpacing = 0;
      composite.setLayout(parentLayout);
      composite.setData("FormWidgetFactory.drawBorder", "treeBorder");
      
      super.createControl(composite, toolkit);
      getText().setData("FormWidgetFactory.drawBorder", Boolean.FALSE);
      GridDataFactory.fillDefaults().grab(true, false).applyTo(getText());
      
      final ImageHyperlink selfLink = new ImageHyperlink(composite, 524288);
      selfLink.setToolTipText(Messages.PersonAttributeEditor_Insert_My_User_Id_Tooltip);
      
      selfLink.setImage(CommonImages.getImage(CommonImages.PERSON_ME_SMALL));
      selfLink.setActiveImage(CommonImages.getImage(CommonImages.PERSON_ME_SMALL));
      selfLink.setHoverImage(CommonImages.getImage(CommonImages.PERSON_ME_SMALL));
      selfLink.addHyperlinkListener(new HyperlinkAdapter()
      {
        public void linkActivated(HyperlinkEvent e)
        {
          String userName = getModel().getTaskRepository().getUserName();
          if ((userName != null) && (userName.length() > 0))
          {
            getText().setText(userName);
            setValue(userName);
          }
        }
      });
      GridDataFactory.fillDefaults().align(1, 16777216).exclude(true).applyTo(selfLink);
      MouseTrackListener mouseListener = new MouseTrackAdapter()
      {
        int version = 0;
        
        public void mouseEnter(MouseEvent e)
        {
          selfLinkgetLayoutDataexclude = false;
          composite.layout();
          selfLink.redraw();
          version += 1;
        }
        
        public void mouseExit(MouseEvent e)
        {
          final int lastVersion = version;
          Display.getDefault().asyncExec(new Runnable()
          {
            public void run()
            {
              if ((version != lastVersion) || (val$selfLink.isDisposed())) {
                return;
              }
              val$selfLink.redraw();
              val$selfLink.getLayoutData()).exclude = true;
              val$composite.layout();
            }
          });
        }
      };
      composite.addMouseTrackListener(mouseListener);
      getText().addMouseTrackListener(mouseListener);
      selfLink.addMouseTrackListener(mouseListener);
      
      toolkit.paintBordersFor(composite);
      setControl(composite);
    }
  }
  
  public String getValue()
  {
    IRepositoryPerson repositoryPerson = getAttributeMapper().getRepositoryPerson(getTaskAttribute());
    if (repositoryPerson != null) {
      return isReadOnly() ? repositoryPerson.toString() : repositoryPerson.getPersonId();
    }
    return "";
  }
  
  public void setValue(String text)
  {
    IRepositoryPerson person = getAttributeMapper().getTaskRepository().createPerson(text);
    getAttributeMapper().setRepositoryPerson(getTaskAttribute(), person);
    attributeChanged();
  }
  
  protected void decorateIncoming(Color color)
  {
    if (getControl() != null) {
      getControl().setBackground(color);
    }
    if ((getText() != null) && (getText() != getControl())) {
      getText().setBackground(color);
    }
  }
  
  public ContentAssistCommandAdapter getContentAssistCommandAdapter()
  {
    return contentAssistCommandAdapter;
  }
  
  public void setContentAssistCommandAdapter(ContentAssistCommandAdapter contentAssistCommandAdapter)
  {
    this.contentAssistCommandAdapter = contentAssistCommandAdapter;
  }
}

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

import org.eclipse.swt.events.FocusEvent;
import org.eclipse.swt.events.FocusListener;

class RichTextEditor$4
  implements FocusListener
{
  RichTextEditor$4(RichTextEditor paramRichTextEditor) {}
  
  public void focusGained(FocusEvent e)
  {
    RichTextEditor.access$2(this$0);
  }
  
  public void focusLost(FocusEvent e)
  {
    RichTextEditor.access$3(this$0);
  }
}

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

import org.eclipse.mylyn.tasks.core.sync.TaskJob;
import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPage;
import org.eclipse.mylyn.tasks.ui.editors.TaskEditor;

class AbstractTaskEditorAttributeSection$3$1$1
  implements Runnable
{
  AbstractTaskEditorAttributeSection$3$1$1(AbstractTaskEditorAttributeSection.3.1 param1, TaskJob paramTaskJob) {}
  
  public void run()
  {
    AbstractTaskEditorAttributeSection.3.access$0(AbstractTaskEditorAttributeSection.3.1.access$0(this$2)).getTaskEditorPage().showEditorBusy(false);
    if (val$job.getStatus() != null) {
      AbstractTaskEditorAttributeSection.3.access$0(AbstractTaskEditorAttributeSection.3.1.access$0(this$2)).getTaskEditorPage().getTaskEditor().setStatus(
        Messages.TaskEditorAttributePart_Updating_of_repository_configuration_failed, 
        Messages.TaskEditorAttributePart_Update_Failed, val$job.getStatus());
    } else {
      AbstractTaskEditorAttributeSection.3.access$0(AbstractTaskEditorAttributeSection.3.1.access$0(this$2)).getTaskEditorPage().refresh();
    }
  }
}

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

import java.util.Comparator;
import org.eclipse.mylyn.tasks.core.TaskRepository;

public class TaskRepositoryComparator
  implements Comparator<TaskRepository>
{
  public int compare(TaskRepository t1, TaskRepository t2)
  {
    if ((t1.getRepositoryLabel() != null) && (t2.getRepositoryLabel() != null)) {
      return t1.getRepositoryLabel().compareTo(t2.getRepositoryLabel());
    }
    if ((t1.getRepositoryLabel() == null) && (t2.getRepositoryLabel() == null)) {
      return t1.getRepositoryUrl().compareTo(t2.getRepositoryUrl());
    }
    if (t1.getRepositoryLabel() == null) {
      return -1;
    }
    if (t2.getRepositoryLabel() == null) {
      return 1;
    }
    return 1;
  }
}

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

import java.util.Iterator;
import java.util.List;
import java.util.Set;
import java.util.WeakHashMap;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.mylyn.commons.notifications.ui.AbstractUiNotification;
import org.eclipse.mylyn.internal.tasks.ui.notifications.TaskListNotificationPopup;

class TaskListNotificationManager$1
  extends Job
{
  TaskListNotificationManager$1(TaskListNotificationManager paramTaskListNotificationManager, String $anonymous0)
  {
    super($anonymous0);
  }
  
  /* Error */
  protected org.eclipse.core.runtime.IStatus run(org.eclipse.core.runtime.IProgressMonitor monitor)
  {
    // Byte code:
    //   0: invokestatic 78	org/eclipse/core/runtime/Platform:isRunning	()Z
    //   3: ifeq +97 -> 100
    //   6: invokestatic 86	org/eclipse/ui/PlatformUI:getWorkbench	()Lorg/eclipse/ui/IWorkbench;
    //   9: ifnull +91 -> 100
    //   12: invokestatic 86	org/eclipse/ui/PlatformUI:getWorkbench	()Lorg/eclipse/ui/IWorkbench;
    //   15: invokeinterface 88 1 0
    //   20: ifnull +80 -> 100
    //   23: invokestatic 86	org/eclipse/ui/PlatformUI:getWorkbench	()Lorg/eclipse/ui/IWorkbench;
    //   26: invokeinterface 88 1 0
    //   31: invokevirtual 84	org/eclipse/swt/widgets/Display:isDisposed	()Z
    //   34: ifne +66 -> 100
    //   37: invokestatic 86	org/eclipse/ui/PlatformUI:getWorkbench	()Lorg/eclipse/ui/IWorkbench;
    //   40: invokeinterface 88 1 0
    //   45: new 42	org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager$1$1
    //   48: dup
    //   49: aload_0
    //   50: invokespecial 82	org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager$1$1:<init>	(Lorg/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager$1;)V
    //   53: invokevirtual 85	org/eclipse/swt/widgets/Display:asyncExec	(Ljava/lang/Runnable;)V
    //   56: goto +44 -> 100
    //   59: astore_2
    //   60: aload_0
    //   61: getfield 77	org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager$1:this$0	Lorg/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager;
    //   64: invokestatic 80	org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager:access$0	(Lorg/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager;)Lorg/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationPopup;
    //   67: ifnull +24 -> 91
    //   70: aload_0
    //   71: aload_0
    //   72: getfield 77	org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager$1:this$0	Lorg/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager;
    //   75: invokestatic 80	org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager:access$0	(Lorg/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager;)Lorg/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationPopup;
    //   78: invokevirtual 83	org/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationPopup:getDelayClose	()J
    //   81: ldc2_w 32
    //   84: ldiv
    //   85: invokevirtual 81	org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager$1:schedule	(J)V
    //   88: goto +10 -> 98
    //   91: aload_0
    //   92: ldc2_w 34
    //   95: invokevirtual 81	org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager$1:schedule	(J)V
    //   98: aload_2
    //   99: athrow
    //   100: aload_0
    //   101: getfield 77	org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager$1:this$0	Lorg/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager;
    //   104: invokestatic 80	org/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager:access$0	(Lorg/eclipse/mylyn/internal/tasks/ui/TaskListNotificationManager;)Lorg/eclipse/mylyn/internal/tasks/ui/notifications/TaskListNotificationPopup;
    //   107: ifnull +24 -> 131
    //   110: aload_0
    //   111: aload_0
    //   112: getfield 77	org/eclipse/my
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