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

nt[] arrayOfIConfigurationElement1;
      int m = (arrayOfIConfigurationElement1 = elements).length;
      for (int k = 0; k < m; k++)
      {
        IConfigurationElement element = arrayOfIConfigurationElement1[k];
        if (element.getName().equals("taskEditorExtension")) {
          readEditorExtension(element);
        } else if (element.getName().equals("repositoryAssociation")) {
          readEditorExtensionAssociation(element);
        }
      }
    }
  }
  
  private static void readEditorExtension(IConfigurationElement element)
  {
    try
    {
      String id = element.getAttribute("id");
      String name = element.getAttribute("name");
      AbstractTaskEditorExtension extension = (AbstractTaskEditorExtension)element.createExecutableExtension("class");
      TaskEditorExtensions.addTaskEditorExtension(element.getNamespaceIdentifier(), id, name, extension);
    }
    catch (Throwable e)
    {
      StatusHandler.log(new Status(4, "org.eclipse.mylyn.tasks.ui", "Could not load taskEditorExtension", 
        e));
    }
  }
  
  private static void readEditorExtensionAssociation(IConfigurationElement element)
  {
    try
    {
      String repository = element.getAttribute("connectorKind");
      String taskEditorExtension = element.getAttribute("taskEditorExtension");
      TaskEditorExtensions.addRepositoryAssociation(repository, taskEditorExtension);
    }
    catch (Exception e)
    {
      StatusHandler.log(new Status(4, "org.eclipse.mylyn.tasks.ui", 
        "Could not load repositoryAssociation", e));
    }
  }
}

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

class RichTextEditor$9
  implements DisposeListener
{
  RichTextEditor$9(RichTextEditor paramRichTextEditor, Control paramControl) {}
  
  public void widgetDisposed(DisposeEvent e)
  {
    val$control.setMenu(null);
  }
}

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

import com.ibm.icu.text.DecimalFormat;
import com.ibm.icu.text.NumberFormat;
import java.util.Locale;

public class AttachmentSizeFormatter
{
  public static final String UNKNOWN_SIZE = "-";
  private final DecimalFormat decimalFormat;
  
  public static final AttachmentSizeFormatter getInstance()
  {
    return new AttachmentSizeFormatter();
  }
  
  public AttachmentSizeFormatter()
  {
    this(Locale.getDefault());
  }
  
  public AttachmentSizeFormatter(Locale locale)
  {
    decimalFormat = ((DecimalFormat)NumberFormat.getInstance(locale));
  }
  
  public String format(String sizeInBytes)
  {
    if (sizeInBytes == null) {
      return "-";
    }
    try
    {
      return format(Long.parseLong(sizeInBytes));
    }
    catch (NumberFormatException localNumberFormatException) {}
    return "-";
  }
  
  public String format(long size)
  {
    if (size < 0L) {
      return "-";
    }
    if (size < 1024L)
    {
      if (size == 1L) {
        return Messages.AttachmentSizeFormatter_1_byte;
      }
      DecimalFormat fmt = new DecimalFormat(Messages.AttachmentSizeFormatter_0_bytes);
      return fmt.format(size);
    }
    if ((size >= 1024L) && (size <= 1048575L))
    {
      double formattedValue = size / 1024.0D;
      decimalFormat.applyPattern(Messages.AttachmentSizeFormatter_0_KB);
      return decimalFormat.format(formattedValue);
    }
    if ((size >= 1048576L) && (size <= 1073741823L))
    {
      double formattedValue = size / 1048576.0D;
      decimalFormat.applyPattern(Messages.AttachmentSizeFormatter_0_MB);
      return decimalFormat.format(formattedValue);
    }
    double formattedValue = size / 1.073741824E9D;
    decimalFormat.applyPattern(Messages.AttachmentSizeFormatter_0_GB);
    return decimalFormat.format(formattedValue);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.tasks.ui.editors.AttachmentSizeFormatter
 * 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.ISafeRunnable;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.mylyn.commons.core.StatusHandler;
import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPart;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.FormToolkit;

class AbstractTaskEditorSection$3
  implements ISafeRunnable
{
  AbstractTaskEditorSection$3(AbstractTaskEditorSection paramAbstractTaskEditorSection, AbstractTaskEditorPart paramAbstractTaskEditorPart, Composite paramComposite, FormToolkit paramFormToolkit) {}
  
  public void handleException(Throwable e)
  {
    StatusHandler.log(new Status(4, "org.eclipse.mylyn.tasks.ui", 
      "Error creating task editor part: \"" + val$part.getPartId() + "\"", e));
  }
  
  public void run()
    throws Exception
  {
    val$part.createControl(val$sectionClient, val$toolkit);
    if (val$part.getControl() != null) {
      GridDataFactory.fillDefaults().align(4, 128).grab(true, false).applyTo(val$part.getControl());
    }
  }
}

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

import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.eclipse.mylyn.tasks.core.ITaskComment;
import org.eclipse.mylyn.tasks.core.data.TaskAttribute;

public class CommentGroupStrategy$CommentGroup
{
  public static final String CURRENT = Messages.CommentGroupStrategy_Current;
  public static final String OLDER = Messages.CommentGroupStrategy_Older;
  public static final String RECENT = Messages.CommentGroupStrategy_Recent;
  private final List<ITaskComment> comments;
  private final String groupName;
  private final boolean incoming;
  
  public CommentGroupStrategy$CommentGroup(String groupName, List<ITaskComment> comments, boolean incoming)
  {
    this.groupName = groupName;
    this.comments = comments;
    this.incoming = incoming;
  }
  
  public List<TaskAttribute> getCommentAttributes()
  {
    List<TaskAttribute> commentAttributes = new ArrayList(comments.size());
    for (ITaskComment comment : comments) {
      commentAttributes.add(comment.getTaskAttribute());
    }
    return Collections.unmodifiableList(commentAttributes);
  }
  
  public List<ITaskComment> getComments()
  {
    return Collections.unmodifiableList(comments);
  }
  
  public String getGroupName()
  {
    return groupName;
  }
  
  public boolean hasIncoming()
  {
    return incoming;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.tasks.ui.editors.CommentGroupStrategy.CommentGroup
 * 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.ToolBarManager;

class TaskEditorPlanningPart$1
  extends PlanningPart
{
  TaskEditorPlanningPart$1(TaskEditorPlanningPart paramTaskEditorPlanningPart, int $anonymous0)
  {
    super($anonymous0);
  }
  
  protected void fillToolBar(ToolBarManager toolBarManager)
  {
    TaskEditorPlanningPart.NotesAction notesAction = new TaskEditorPlanningPart.NotesAction(this$0);
    notesAction.setEnabled(needsNotes());
    toolBarManager.add(notesAction);
    toolBarManager.add(TaskEditorPlanningPart.access$1(this$0));
  }
}

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

import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.action.ToolBarManager;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.internal.tasks.ui.search.SearchUtil;
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
import org.eclipse.mylyn.tasks.core.AbstractDuplicateDetector;
import org.eclipse.mylyn.tasks.core.IRepositoryQuery;
import org.eclipse.mylyn.tasks.core.ITaskComment;
import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
import org.eclipse.mylyn.tasks.core.data.TaskData;
import org.eclipse.mylyn.tasks.core.data.TaskDataModel;
import org.eclipse.mylyn.tasks.ui.TasksUiImages;
import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPage;
import org.eclipse.swt.custom.CCombo;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section;

public class TaskEditorDescriptionPart
  extends TaskEditorRichTextPart
{
  public TaskEditorDescriptionPart()
  {
    setPartName(Messages.TaskEditorDescriptionPart_Description);
  }
  
  private void addDuplicateDetection(Composite composite, FormToolkit toolkit)
  {
    List<AbstractDuplicateDetector> allCollectors = new ArrayList();
    if (getDuplicateSearchCollectorsList() != null) {
      allCollectors.addAll(getDuplicateSearchCollectorsList());
    }
    if (!allCollectors.isEmpty())
    {
      int style = 514;
      if (getTaskData().isNew()) {
        style |= 0x40;
      }
      Section duplicatesSection = toolkit.createSection(composite, style);
      duplicatesSection.setText(Messages.TaskEditorDescriptionPart_Duplicate_Detection);
      duplicatesSection.setLayout(new GridLayout());
      GridDataFactory.fillDefaults().indent(-1, 15).applyTo(duplicatesSection);
      Composite relatedBugsComposite = toolkit.createComposite(duplicatesSection);
      relatedBugsComposite.setLayout(new GridLayout(4, false));
      relatedBugsComposite.setLayoutData(new GridData(256));
      duplicatesSection.setClient(relatedBugsComposite);
      Label duplicateDetectorLabel = new Label(relatedBugsComposite, 16384);
      duplicateDetectorLabel.setText(Messages.TaskEditorDescriptionPart_Detector);
      
      final CCombo duplicateDetectorChooser = new CCombo(relatedBugsComposite, 8388616);
      toolkit.adapt(duplicateDetectorChooser, false, false);
      duplicateDetectorChooser.setData("FormWidgetFactory.drawBorder", "treeBorder");
      duplicateDetectorChooser.setFont(TEXT_FONT);
      duplicateDetectorChooser.setLayoutData(GridDataFactory.swtDefaults().hint(150, -1).create());
      
      Collections.sort(allCollectors, new Comparator()
      {
        public int compare(AbstractDuplicateDetector c1, AbstractDuplicateDetector c2)
        {
          return c1.getName().compareToIgnoreCase(c2.getName());
        }
      });
      for (AbstractDuplicateDetector detector : allCollectors) {
        duplicateDetectorChooser.add(detector.getName());
      }
      duplicateDetectorChooser.select(0);
      duplicateDetectorChooser.setEnabled(true);
      duplicateDetectorChooser.setData(allCollectors);
      if (allCollectors.size() > 0)
      {
        Button searchForDuplicates = toolkit.createButton(relatedBugsComposite, 
          Messages.TaskEditorDescriptionPart_Search, 0);
        GridData searchDuplicatesButtonData = new GridData(32);
        searchForDuplicates.setLayoutData(searchDuplicatesButtonData);
        searchForDuplicates.addListener(13, new Listener()
        {
          public void handleEvent(Event e)
          {
            String selectedDetector = duplicateDetectorChooser.getItem(duplicateDetectorChooser.getSelectionIndex());
            searchForDuplicates(selectedDetector);
          }
        });
      }
      toolkit.paintBordersFor(relatedBugsComposite);
    }
  }
  
  public void createControl(Composite parent, FormToolkit toolkit)
  {
    if (getAttribute() == null) {
      return;
    }
    super.createControl(parent, toolkit);
    if (SearchUtil.supportsTaskSearch()) {
      addDuplicateDetection(getComposite(), toolkit);
    }
    getEditor().enableAutoTogglePreview();
    if (!getTaskData().isNew()) {
      getEditor().showPreview();
    }
  }
  
  protected void fillToolBar(ToolBarManager toolBar)
  {
    if (!getTaskData().isNew())
    {
      AbstractReplyToCommentAction replyAction = new AbstractReplyToCommentAction(getTaskEditorPage(), null)
      {
        protected String getReplyText()
        {
          return getEditor().getValue();
        }
      };
      replyAction.setImageDescriptor(TasksUiImages.COMMENT_REPLY_SMALL);
      toolBar.add(replyAction);
    }
    super.fillToolBar(toolBar);
  }
  
  protected IRepositoryQuery getDuplicateQuery(String name)
    throws CoreException
  {
    String duplicateDetectorName = name.equals("default") ? "Stack Trace" : name;
    for (AbstractDuplicateDetector detector : getDuplicateSearchCollectorsList()) {
      if (detector.getName().equals(duplicateDetectorName)) {
        return detector.getDuplicatesQuery(getTaskEditorPage().getTaskRepository(), getTaskData());
      }
    }
    return null;
  }
  
  protected Set<AbstractDuplicateDetector> getDuplicateSearchCollectorsList()
  {
    Set<AbstractDuplicateDetector> duplicateDetectors = new HashSet();
    for (AbstractDuplicateDetector detector : TasksUiPlugin.getDefault().getDuplicateSearchCollectorsList()) {
      if (isValidDuplicateDetector(detector)) {
        duplicateDetectors.add(detector);
      }
    }
    return duplicateDetectors;
  }
  
  public void initialize(AbstractTaskEditorPage taskEditorPage)
  {
    super.initialize(taskEditorPage);
    setAttribute(getModel().getTaskData().getRoot().getMappedAttribute("task.common.description"));
  }
  
  private boolean isValidDuplicateDetector(AbstractDuplicateDetector detector)
  {
    if ((detector.getConnectorKind() == null) || (detector.getConnectorKind().equals(
      getTaskEditorPage().getConnectorKind()))) {
      if (detector.canQuery(getTaskData())) {
        return true;
      }
    }
    return 
    
      false;
  }
  
  public void searchForDuplicates(String duplicateDetectorName)
  {
    try
    {
      IRepositoryQuery duplicatesQuery = getDuplicateQuery(duplicateDetectorName);
      if (duplicatesQuery != null) {
        SearchUtil.runSearchQuery(TasksUiInternal.getTaskList(), getTaskEditorPage().getTaskRepository(), 
          duplicatesQuery);
      } else {
        TasksUiInternal.displayStatus(Messages.TaskEditorDescriptionPart_Duplicate_Detection_Failed, 
          new Status(4, "org.eclipse.mylyn.tasks.ui", 
          Messages.TaskEditorDescriptionPart_The_duplicate_detector_did_not_return_a_valid_query));
      }
    }
    catch (CoreException e)
    {
      TasksUiInternal.displayStatus(Messages.TaskEditorDescriptionPart_Duplicate_Detection_Failed, e.getStatus());
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorDescriptionPart
 * 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.workbench.browser.BrowserUtil;
import org.eclipse.swt.browser.LocationAdapter;
import org.eclipse.swt.browser.LocationEvent;

class BrowserPreviewViewer$1
  extends LocationAdapter
{
  BrowserPreviewViewer$1(BrowserPreviewViewer paramBrowserPreviewViewer) {}
  
  public void changing(LocationEvent event)
  {
    if (BrowserPreviewViewer.access$0(this$0)) {
      return;
    }
    if ((location != null) && (!location.startsWith("about")))
    {
      doit = false;
      BrowserUtil.openUrl(location);
    }
  }
}

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

import java.util.Calendar;
import java.util.Date;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.mylyn.commons.workbench.forms.DatePicker;
import org.eclipse.mylyn.internal.tasks.core.TaskActivityUtil;
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.mylyn.tasks.ui.editors.AbstractAttributeEditor;
import org.eclipse.mylyn.tasks.ui.editors.LayoutHint;
import org.eclipse.mylyn.tasks.ui.editors.LayoutHint.ColumnSpan;
import org.eclipse.mylyn.tasks.ui.editors.LayoutHint.RowSpan;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.forms.widgets.FormToolkit;

public class DateAttributeEditor
  extends AbstractAttributeEditor
{
  private DatePicker datePicker;
  private boolean showTime;
  private Text text;
  
  public DateAttributeEditor(TaskDataModel manager, TaskAttribute taskAttribute)
  {
    super(manager, taskAttribute);
    setLayoutHint(new LayoutHint(LayoutHint.RowSpan.SINGLE, LayoutHint.ColumnSpan.SINGLE));
  }
  
  public void createControl(Composite composite, FormToolkit toolkit)
  {
    if (isReadOnly())
    {
      text = new Text(composite, 8388616);
      text.setFont(EditorUtil.TEXT_FONT);
      toolkit.adapt(text, false, false);
      text.setData("FormWidgetFactory.drawBorder", Boolean.FALSE);
      text.setText(getTextValue());
      text.setToolTipText(getDescription());
      setControl(text);
    }
    else
    {
      datePicker = new DatePicker(composite, 8388608, getTextValue(), showTime, 0);
      datePicker.setFont(EditorUtil.TEXT_FONT);
      datePicker.setToolTipText(getDescription());
      if (!showTime) {
        datePicker.setDateFormat(EditorUtil.getDateFormat());
      } else {
        datePicker.setDateFormat(EditorUtil.getDateTimeFormat());
      }
      updateDatePicker();
      datePicker.addPickerSelectionListener(new SelectionAdapter()
      {
        public void widgetSelected(SelectionEvent e)
        {
          Calendar cal = datePicker.getDate();
          if (cal != null)
          {
            if (!showTime) {
              TaskActivityUtil.snapStartOfDay(cal);
            }
            Date value = cal.getTime();
            if (!value.equals(getValue())) {
              setValue(value);
            }
          }
          else
          {
            if (getValue() != null) {
              setValue(null);
            }
            datePicker.setDate(null);
          }
        }
      });
      GridDataFactory.fillDefaults().hint(120, -1).grab(false, false).applyTo(datePicker);
      datePicker.setData("FormWidgetFactory.drawBorder", "treeBorder");
      toolkit.adapt(datePicker, false, false);
      
      setControl(datePicker);
    }
  }
  
  private void updateDatePicker()
  {
    if (getValue() != null)
    {
      Calendar cal = Calendar.getInstance();
      cal.setTime(getValue());
      datePicker.setDate(cal);
    }
  }
  
  protected void decorateIncoming(Color color)
  {
    if (datePicker != null) {
      datePicker.setBackground(color);
    }
  }
  
  public boolean getShowTime()
  {
    return showTime;
  }
  
  private String getTextValue()
  {
    Date date = getValue();
    if (date != null)
    {
      if (getShowTime()) {
        return EditorUtil.formatDateTime(date);
      }
      return EditorUtil.formatDate(date);
    }
    return "";
  }
  
  public Date getValue()
  {
    return getAttributeMapper().getDateValue(getTaskAttribute());
  }
  
  public void setShowTime(boolean showTime)
  {
    this.showTime = showTime;
  }
  
  public void setValue(Date date)
  {
    getAttributeMapper().setDateValue(getTaskAttribute(), date);
    attributeChanged();
  }
  
  public void refresh()
  {
    if ((text != null) && (!text.isDisposed())) {
      text.setText(getTextValue());
    }
    if ((datePicker != null) && (!datePicker.isDisposed())) {
      updateDatePicker();
    }
  }
  
  public boolean shouldAutoRefresh()
  {
    return true;
  }
}

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

public enum RepositoryTextViewerConfiguration$Mode
{
  URL,  TASK,  TASK_RELATION,  DEFAULT;
}

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

import java.util.ArrayList;
import java.util.Collection;
import java.util.Collections;
import org.eclipse.core.runtime.IConfigurationElement;
import org.eclipse.core.runtime.IExtension;
import org.eclipse.core.runtime.IExtensionPoint;
import org.eclipse.core.runtime.IExtensionRegistry;
import org.eclipse.core.runtime.Platform;
import org.eclipse.core.runtime.Status;
import org.eclipse.mylyn.commons.core.StatusHandler;
import org.eclipse.mylyn.tasks.ui.editors.TaskEditorPartDescriptor;

public class TaskEditorContributionExtensionReader
{
  private static final String ATTR_ID = "id";
  public static final String EXTENSION_TASK_EDITOR_PAGE_CONTRIBUTION = "org.eclipse.mylyn.tasks.ui.taskEditorPageContribution";
  private static final String REPOSITORY_TASK_EDITOR_CONTRIBUTION = "repositoryPart";
  private static final String LOCAL_TASK_EDITOR_CONTRIBUTION = "localPart";
  private static Collection<TaskEditorPartDescriptor> repositoryEditorContributions;
  private static Collection<LocalTaskEditorContributionDescriptor> localEditorContributions;
  
  public static Collection<LocalTaskEditorContributionDescriptor> getLocalEditorContributions()
  {
    if (localEditorContributions == null) {
      initExtensions();
    }
    return Collections.unmodifiableCollection(localEditorContributions);
  }
  
  public static Collection<TaskEditorPartDescriptor> getRepositoryEditorContributions()
  {
    if (repositoryEditorContributions == null) {
      initExtensions();
    }
    return Collections.unmodifiableCollection(repositoryEditorContributions);
  }
  
  private static void initExtensions()
  {
    Collection<TaskEditorPartDescriptor> repositoryContributions = new ArrayList();
    Collection<LocalTaskEditorContributionDescriptor> localContributions = new ArrayList();
    
    IExtensionRegistry registry = Platform.getExtensionRegistry();
    
    IExtensionPoint editorExtensionPoint = registry.getExtensionPoint("org.eclipse.mylyn.tasks.ui.taskEditorPageContribution");
    IExtension[] editorExtensions = editorExtensionPoint.getExtensions();
    IExtension[] arrayOfIExtension1;
    int j = (arrayOfIExtension1 = editorExtensions).length;
    for (int i = 0; i < j; i++)
    {
      IExtension extension = arrayOfIExtension1[i];
      IConfigurationElement[] elements = extension.getConfigurationElements();
      IConfigurationElement[] arrayOfIConfigurationElement1;
      int m = (arrayOfIConfigurationElement1 = elements).length;
      for (int k = 0; k < m; k++)
      {
        IConfigurationElement element = arrayOfIConfigurationElement1[k];
        if (element.getName().equals("repositoryPart")) {
          readRepositoryEditorContributionExtension(element, repositoryContributions);
        } else if (element.getName().equals("localPart")) {
          readLocalEditorContributionExtension(element, localContributions);
        }
      }
    }
    repositoryEditorContributions = repositoryContributions;
    localEditorContributions = localContributions;
  }
  
  private static void readRepositoryEditorContributionExtension(IConfigurationElement element, Collection<TaskEditorPartDescriptor> contributions)
  {
    try
    {
      String id = element.getAttribute("id");
      TaskEditorExtensionPartDescriptor descriptor = new TaskEditorExtensionPartDescriptor(id, element);
      contributions.add(descriptor);
    }
    catch (Exception e)
    {
      StatusHandler.log(new Status(4, "org.eclipse.mylyn.tasks.ui", 
        "Unable to read repository editor contribution", e));
    }
  }
  
  private static void readLocalEditorContributionExtension(IConfigurationElement element, Collection<LocalTaskEditorContributionDescriptor> localContributions)
  {
    try
    {
      localContributions.add(new LocalTaskEditorContributionDescriptor(element));
    }
    catch (Exception e)
    {
      StatusHandler.log(new Status(4, "org.eclipse.mylyn.tasks.ui", 
        "Unable to read local editor contribution", e));
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorContributionExtensionReader
 * 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.ui.editors.AbstractTaskEditorPage;
import org.eclipse.ui.forms.events.ExpansionAdapter;
import org.eclipse.ui.forms.events.ExpansionEvent;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section;

class PlanningPart$5
  extends ExpansionAdapter
{
  PlanningPart$5(PlanningPart paramPlanningPart, FormToolkit paramFormToolkit, Section paramSection) {}
  
  public void expansionStateChanged(ExpansionEvent event)
  {
    if (PlanningPart.access$2(this$0) == null)
    {
      PlanningPart.access$3(this$0, val$toolkit, val$section);
      if ((PlanningPart.access$4(this$0) instanceof AbstractTaskEditorPage)) {
        ((AbstractTaskEditorPage)PlanningPart.access$4(this$0)).reflow();
      }
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.tasks.ui.editors.PlanningPart.5
 * 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.ui.editors.TaskEditor;
import org.eclipse.swt.widgets.Button;
import org.eclipse.ui.IPropertyListener;

class TaskPlanningEditor$1
  implements IPropertyListener
{
  TaskPlanningEditor$1(TaskPlanningEditor paramTaskPlanningEditor) {}
  
  public void propertyChanged(Object source, int propId)
  {
    if ((propId == 257) && (TaskPlanningEditor.access$1(this$0) != null)) {
      TaskPlanningEditor.access$1(this$0).setEnabled(this$0.getEditor().isDirty());
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.tasks.ui.editors.TaskPlanningEditor.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.action.Action;

class TaskEditorCommentPart$4
  extends Action
{
  TaskEditorCommentPart$4(TaskEditorCommentPart paramTaskEditorCommentPart, String $anonymous0)
  {
    super($anonymous0);
  }
  
  public void run()
  {
    TaskEditorCommentPart.access$11(this$0);
  }
}

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

class PlanningPart$1$1
  implements Runnable
{
  PlanningPart$1$1(PlanningPart.1 param1) {}
  
  public void run()
  {
    PlanningPart.1.access$0(this$1).refresh(false);
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.tasks.ui.editors.PlanningPart.1.1
 * 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.ITask;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorExtension;
import org.eclipse.ui.contexts.IContextService;

class RichTextAttributeEditor$1
  extends RichTextEditor
{
  RichTextAttributeEditor$1(RichTextAttributeEditor paramRichTextAttributeEditor, TaskRepository $anonymous0, int $anonymous1, IContextService $anonymous2, AbstractTaskEditorExtension $anonymous3, ITask $anonymous4)
  {
    super($anonymous0, $anonymous1, $anonymous2, $anonymous3, $anonymous4);
  }
  
  /* Error */
  public void valueChanged(String value)
  {
    // Byte code:
    //   0: aload_0
    //   1: getfield 41	org/eclipse/mylyn/internal/tasks/ui/editors/RichTextAttributeEditor$1:this$0	Lorg/eclipse/mylyn/internal/tasks/ui/editors/RichTextAttributeEditor;
    //   4: getfield 39	org/eclipse/mylyn/internal/tasks/ui/editors/RichTextAttributeEditor:ignoreNotification	Z
    //   7: ifne +41 -> 48
    //   10: aload_0
    //   11: getfield 41	org/eclipse/mylyn/internal/tasks/ui/editors/RichTextAttributeEditor$1:this$0	Lorg/eclipse/mylyn/internal/tasks/ui/editors/RichTextAttributeEditor;
    //   14: iconst_1
    //   15: putfield 40	org/eclipse/mylyn/internal/tasks/ui/editors/RichTextAttributeEditor:suppressRefresh	Z
    //   18: aload_0
    //   19: getfield 41	org/eclipse/mylyn/internal/tasks/ui/editors/RichTextAttributeEditor$1:this$0	Lorg/eclipse/mylyn/internal/tasks/ui/editors/RichTextAttributeEditor;
    //   22: aload_1
    //   23: invokevirtual 42	org/eclipse/mylyn/internal/tasks/ui/editors/RichTextAttributeEditor:setValue	(Ljava/lang/String;)V
    //   26: goto +14 -> 40
    //   29: astore_2
    //   30: aload_0
    //   31: getfield 41	org/eclipse/mylyn/internal/tasks/ui/editors/RichTextAttributeEditor$1:this$0	Lorg/eclipse/mylyn/internal/tasks/ui/editors/RichTextAttributeEditor;
    //   34: iconst_0
    //   35: putfield 40	org/eclipse/mylyn/internal/tasks/ui/editors/RichTextAttributeEditor:suppressRefresh	Z
    //   38: aload_2
    //   39: athrow
    //   40: aload_0
    //   41: getfield 41	org/eclipse/mylyn/internal/tasks/ui/editors/RichTextAttributeEditor$1:this$0	Lorg/eclipse/mylyn/internal/tasks/ui/editors/RichTextAttributeEditor;
    //   44: iconst_0
    //   45: putfield 40	org/eclipse/mylyn/internal/tasks/ui/editors/RichTextAttributeEditor:suppressRefresh	Z
    //   48: return
    // Line number table:
    //   Java source line #61	-> byte code offset #0
    //   Java source line #63	-> byte code offset #10
    //   Java source line #64	-> byte code offset #18
    //   Java source line #65	-> byte code offset #29
    //   Java source line #66	-> byte code offset #30
    //   Java source line #67	-> byte code offset #38
    //   Java source line #66	-> byte code offset #40
    //   Java source line #69	-> byte code offset #48
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	49	0	this	1
    //   0	49	1	value	String
    //   29	10	2	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   10	29	29	finally
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.tasks.ui.editors.RichTextAttributeEditor.1
 * 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.ITaskComment;
import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPage;

class TaskEditorDescriptionPart$3
  extends AbstractReplyToCommentAction
{
  TaskEditorDescriptionPart$3(TaskEditorDescriptionPart paramTaskEditorDescriptionPart, AbstractTaskEditorPage $anonymous0, ITaskComment $anonymous1)
  {
    super($anonymous0, $anonymous1);
  }
  
  protected String getReplyText()
  {
    return this$0.getEditor().getValue();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorDescriptionPart.3
 * 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.IConfigurationElement;
import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPart;
import org.eclipse.mylyn.tasks.ui.editors.TaskEditorPartDescriptor;

public class TaskEditorExtensionPartDescriptor
  extends TaskEditorPartDescriptor
{
  private static final String ATTR_CLASS = "class";
  private static final String ATTR_PATH = "path";
  private final IConfigurationElement element;
  
  public TaskEditorExtensionPartDescriptor(String id, IConfigurationElement element)
  {
    super(id);
    this.element = element;
    setPath(element.getAttribute("path"));
  }
  
  public AbstractTaskEditorPart createPart()
  {
    try
    {
      return (AbstractTaskEditorPart)element.createExecutableExtension("class");
    }
    catch (Exception e)
    {
      throw new RuntimeException(e);
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorExtensionPartDescriptor
 * 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.graphics.Font;

class EditorUtil$3
  implements DisposeListener
{
  EditorUtil$3(Font paramFont) {}
  
  public void widgetDisposed(DisposeEvent e)
  {
    val$textFont.dispose();
  }
}

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

import java.io.InputStream;
import org.eclipse.core.resources.IStorage;
import org.eclipse.core.runtime.Assert;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IPath;
import org.eclipse.core.runtime.NullProgressMonitor;
import org.eclipse.core.runtime.PlatformObject;
import org.eclipse.core.runtime.Status;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylyn.tasks.core.IRepositoryManager;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.mylyn.tasks.core.ITaskAttachment;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.core.data.AbstractTaskAttachmentHandler;
import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
import org.eclipse.mylyn.tasks.ui.TasksUi;

@Deprecated
public class TaskAttachmentStorage
  extends PlatformObject
  implements IStorage
{
  private static final String ATTACHMENT_DEFAULT_NAME = "attachment";
  private static final String CTYPE_ZIP = "zip";
  private static final String CTYPE_OCTET_STREAM = "octet-stream";
  private static final String CTYPE_TEXT = "text";
  private static final String CTYPE_HTML = "html";
  private final TaskRepository taskRepository;
  private final ITask task;
  private final TaskAttribute attachmentAttribute;
  private final String name;
  
  public TaskAttachmentStorage(TaskRepository taskRepository, ITask task, TaskAttribute attachmentAttribute, String name)
  {
    this.taskRepository = taskRepository;
    this.task = task;
    this.attachmentAttribute = attachmentAttribute;
    this.name = name;
  }
  
  public static IStorage create(ITaskAttachment attachment)
    throws CoreException
  {
    Assert.isNotNull(attachment);
    TaskAttribute taskAttribute = attachment.getTaskAttribute();
    if (taskAttribute == null) {
      throw new CoreException(new Status(4, "org.eclipse.mylyn.tasks.ui", "Failed to find attachment: " + 
        attachment.getUrl()));
    }
    return new TaskAttachmentStorage(attachment.getTaskRepository(), attachment.getTask(), taskAttribute, 
      getName(attachment));
  }
  
  private static String getName(ITaskAttachment attachment)
  {
    String name = attachment.getFileName();
    if ((name == null) || ("".equals(name)))
    {
      String ctype = attachment.getContentType();
      if (ctype.endsWith("html")) {
        name = "attachment.html";
      } else if (ctype.startsWith("text")) {
        name = "attachment.txt";
      } else if (ctype.endsWith("octet-stream")) {
        name = "attachment";
      } else if (ctype.endsWith("zip")) {
        name = "attachment.zip";
      } else {
        name = "attachment." + ctype.substring(ctype.indexOf("/") + 1);
      }
    }
    if (name.endsWith(".patch")) {
      name = name + ".txt";
    }
    return name;
  }
  
  public InputStream getContents()
    throws CoreException
  {
    AbstractRepositoryConnector connector = TasksUi.getRepositoryManager().getRepositoryConnector(
      taskRepository.getConnectorKind());
    AbstractTaskAttachmentHandler handler = connector.getTaskAttachmentHandler();
    return handler.getContent(taskRepository, task, attachmentAttribute, new NullProgressMonitor());
  }
  
  public IPath getFullPath()
  {
    return null;
  }
  
  public String getName()
  {
    return name;
  }
  
  public boolean isReadOnly()
  {
    return true;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.tasks.ui.editors.TaskAttachmentStorage
 * 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.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;

class SummaryPart$3
  extends SelectionAdapter
{
  SummaryPart$3(SummaryPart paramSummaryPart) {}
  
  public void widgetSelected(SelectionEvent e)
  {
    if (SummaryPart.access$2(this$0).getSelection())
    {
      SummaryPart.access$3(this$0).setSelection(false);
      this$0.markDirty(SummaryPart.access$3(this$0));
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.tasks.ui.editors.SummaryPart.3
 * 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.ui.editors.AbstractTaskEditorExtension;
import org.eclipse.ui.IPluginContribution;

public class TaskEditorExtensions$RegisteredTaskEditorExtension
  implements Comparable<RegisteredTaskEditorExtension>, IPluginContribution
{
  private final String id;
  private final String name;
  private final AbstractTaskEditorExtension extension;
  private String pluginId;
  
  private TaskEditorExtensions$RegisteredTaskEditorExtension(AbstractTaskEditorExtension extension, String id, String name)
  {
    this.extension = extension;
    this.id = id;
    this.name = name;
  }
  
  public String getId()
  {
    return id;
  }
  
  public String getName()
  {
    return name;
  }
  
  public AbstractTaskEditorExtension getExtension()
  {
    return extension;
  }
  
  public int compareTo(RegisteredTaskEditorExtension o)
  {
    if (o == this) {
      return 0;
    }
    int i = name.compareTo(name);
    if (i == 0) {
      i = id.compareTo(id);
    }
    return i;
  }
  
  public String getLocalId()
  {
    return id;
  }
  
  public String getPluginId()
  {
    return pluginId;
  }
  
  public void setPluginId(String pluginId)
  {
    this.pluginId = pluginId;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorExtensions.RegisteredTaskEditorExtension
 * 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.ITask;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorExtension;
import org.eclipse.ui.contexts.IContextService;

class AttributePart$1
  extends RichTextEditor
{
  AttributePart$1(AttributePart paramAttributePart, TaskRepository $anonymous0, int $anonymous1, IContextService $anonymous2, AbstractTaskEditorExtension $anonymous3, ITask $anonymous4)
  {
    super($anonymous0, $anonymous1, $anonymous2, $anonymous3, $anonymous4);
  }
  
  protected void valueChanged(String value)
  {
    AttributePart.access$0(this$0)
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