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

? 
      outgoingNewRepository : 
      taskEditorInput.getTaskRepository();
    ControlContribution repositoryLabelControl = new ControlContribution(Messages.AbstractTaskEditorPage_Title)
    {
      protected Control createControl(Composite parent)
      {
        FormToolkit toolkit = getHeaderForm().getToolkit();
        Composite composite = toolkit.createComposite(parent);
        RowLayout layout = new RowLayout();
        if (PlatformUiUtil.hasNarrowToolBar())
        {
          marginTop = 0;
          marginBottom = 0;
          center = true;
        }
        composite.setLayout(layout);
        composite.setBackground(null);
        String label = taskRepository.getRepositoryLabel();
        if (label.indexOf("//") != -1) {
          label = label.substring(taskRepository.getRepositoryUrl().indexOf("//") + 2);
        }
        ImageHyperlink link = new ImageHyperlink(composite, 0);
        link.setText(label);
        link.setFont(JFaceResources.getBannerFont());
        link.setForeground(toolkit.getColors().getColor("org.eclipse.ui.forms.TITLE"));
        link.setToolTipText(Messages.TaskEditor_Edit_Task_Repository_ToolTip);
        link.addHyperlinkListener(new HyperlinkAdapter()
        {
          public void linkActivated(HyperlinkEvent e)
          {
            TasksUiUtil.openEditRepositoryWizard(val$taskRepository);
          }
        });
        return composite;
      }
    };
    toolBarManager.add(repositoryLabelControl);
    
    toolBarManager.add(new GroupMarker("repository"));
    toolBarManager.add(new GroupMarker("new"));
    toolBarManager.add(new GroupMarker("open"));
    toolBarManager.add(new GroupMarker("additions"));
    
    openWithBrowserAction = new OpenWithBrowserAction();
    openWithBrowserAction.selectionChanged(new StructuredSelection(task));
    if (openWithBrowserAction.isEnabled())
    {
      openWithBrowserAction.setImageDescriptor(CommonImages.WEB);
      
      openWithBrowserAction.setToolTipText(Messages.AbstractTaskEditorPage_Open_with_Web_Browser);
      toolBarManager.appendToGroup("open", openWithBrowserAction);
    }
    else
    {
      openWithBrowserAction = null;
    }
    if (activateAction == null) {
      activateAction = new ToggleTaskActivationAction(task)
      {
        public void run()
        {
          TaskList taskList = TasksUiPlugin.getTaskList();
          if (taskList.getTask(task.getRepositoryUrl(), task.getTaskId()) == null) {
            setMessage(Messages.TaskEditor_Task_added_to_the_Uncategorized_container, 
              1);
          }
          super.run();
        }
      };
    }
    toolBarManager.add(new Separator("planning"));
    disposeScheduleAction();
    scheduleAction = new TaskEditorScheduleAction(task);
    toolBarManager.add(scheduleAction);
    
    toolBarManager.add(new GroupMarker("page"));
    IFormPage[] arrayOfIFormPage;
    int j = (arrayOfIFormPage = getPages()).length;
    for (int i = 0; i < j; i++)
    {
      IFormPage page = arrayOfIFormPage[i];
      if ((page instanceof TaskFormPage))
      {
        TaskFormPage taskEditorPage = (TaskFormPage)page;
        taskEditorPage.fillToolBar(toolBarManager);
      }
    }
    toolBarManager.add(new Separator("activation"));
    
    menuService = ((IMenuService)getSite().getService(IMenuService.class));
    if ((menuService != null) && ((toolBarManager instanceof ContributionManager)))
    {
      menuService.populateContributionManager((ContributionManager)toolBarManager, "toolbar:org.eclipse.mylyn.tasks.ui.editors.task.toolbar.header." + 
        taskRepository.getConnectorKind());
      menuService.populateContributionManager((ContributionManager)toolBarManager, "toolbar:org.eclipse.mylyn.tasks.ui.editors.task.toolbar.header");
    }
    toolBarManager.update(true);
    
    updateLeftHeaderToolBar();
    updateHeader();
  }
  
  private void disposeScheduleAction()
  {
    if (scheduleAction != null)
    {
      scheduleAction.dispose();
      scheduleAction = null;
    }
  }
  
  private void updateLeftHeaderToolBar()
  {
    leftToolBarManager.removeAll();
    
    leftToolBarManager.add(new Separator("activation"));
    leftToolBarManager.add(new Separator("additions"));
    
    leftToolBarManager.add(activateAction);
    
    menuService = ((IMenuService)getSite().getService(IMenuService.class));
    if ((menuService != null) && ((leftToolBarManager instanceof ContributionManager)))
    {
      TaskRepository outgoingNewRepository = TasksUiUtil.getOutgoingNewTaskRepository(task);
      TaskRepository taskRepository = outgoingNewRepository != null ? 
        outgoingNewRepository : 
        taskEditorInput.getTaskRepository();
      menuService.populateContributionManager(leftToolBarManager, "toolbar:org.eclipse.mylyn.tasks.ui.editors.task.toolbar.header.left." + 
        taskRepository.getConnectorKind());
    }
    leftToolBarManager.update(true);
    if (hasLeftToolBar())
    {
      Point size = leftToolBar.getSize();
      if ((x == 0) && (y == 0))
      {
        size = leftToolBar.computeSize(-1, -1, true);
        leftToolBar.setSize(size);
      }
    }
  }
  
  private void updateHeaderImage()
  {
    if (hasLeftToolBar()) {
      setHeaderImage(null);
    } else {
      getHeaderForm().getForm().setImage(getBrandingImage());
    }
  }
  
  private Image getBrandingImage()
  {
    TaskRepository outgoingNewRepository = TasksUiUtil.getOutgoingNewTaskRepository(task);
    String connectorKind;
    String connectorKind;
    if (outgoingNewRepository != null) {
      connectorKind = outgoingNewRepository.getConnectorKind();
    } else {
      connectorKind = task.getConnectorKind();
    }
    if ("local".equals(connectorKind)) {
      return CommonImages.getImage(TasksUiImages.TASK);
    }
    ImageDescriptor overlay = TasksUiPlugin.getDefault().getOverlayIcon(connectorKind);
    Image image = CommonImages.getImageWithOverlay(TasksUiImages.REPOSITORY, overlay, false, false);
    return image;
  }
  
  private boolean hasLeftToolBar()
  {
    return (leftToolBar != null) && (leftToolBarManager != null);
  }
  
  private void updateHeaderLabel()
  {
    TaskRepository outgoingNewRepository = TasksUiUtil.getOutgoingNewTaskRepository(task);
    TaskRepository taskRepository = outgoingNewRepository != null ? 
      outgoingNewRepository : 
      taskEditorInput.getTaskRepository();
    
    AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(taskRepository.getConnectorKind());
    String kindLabel = Messages.TaskEditor_Task;
    if (connectorUi != null) {
      kindLabel = connectorUi.getTaskKindLabel(task);
    }
    String idLabel = task.getTaskKey();
    if (idLabel != null) {
      kindLabel = kindLabel + " " + idLabel;
    }
    if ((hasLeftToolBar()) && (titleLabel != null))
    {
      titleLabel.setText(kindLabel);
      getHeaderForm().getForm().setText(null);
      setHeaderImage(null);
    }
    else
    {
      getHeaderForm().getForm().setText(kindLabel);
    }
  }
  
  @Deprecated
  public void updateTitle(String name)
  {
    updateHeader();
  }
  
  private void updateTitleImage()
  {
    if (task != null)
    {
      AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(task.getConnectorKind());
      if (connectorUi != null)
      {
        ImageDescriptor overlayDescriptor = connectorUi.getTaskKindOverlay(task);
        setTitleImage(CommonImages.getCompositeTaskImage(TasksUiImages.TASK, overlayDescriptor, false));
      }
      else
      {
        setTitleImage(CommonImages.getImage(TasksUiImages.TASK));
      }
    }
    else
    {
      setTitleImage(CommonImages.getImage(TasksUiImages.TASK));
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.tasks.ui.editors.TaskEditor
 * 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.mylyn.internal.tasks.ui.editors.Messages;
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
import org.eclipse.ui.forms.events.HyperlinkAdapter;
import org.eclipse.ui.forms.events.HyperlinkEvent;

class AbstractTaskEditorPage$16
  extends HyperlinkAdapter
{
  AbstractTaskEditorPage$16(AbstractTaskEditorPage paramAbstractTaskEditorPage, CoreException paramCoreException) {}
  
  public void linkActivated(HyperlinkEvent event)
  {
    TasksUiInternal.displayStatus(Messages.AbstractTaskEditorPage_Save_failed, 
      val$e.getStatus());
  }
}

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

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

class AbstractTaskEditorPage$22
  implements ISelectionChangedListener
{
  AbstractTaskEditorPage$22(AbstractTaskEditorPage paramAbstractTaskEditorPage) {}
  
  public void selectionChanged(SelectionChangedEvent event)
  {
    ISelection selection = event.getSelection();
    if ((selection instanceof StructuredSelection))
    {
      Object select = ((StructuredSelection)selection).getFirstElement();
      this$0.selectReveal(select);
      this$0.getEditor().setActivePage(this$0.getId());
    }
  }
}

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

import java.util.Comparator;

class TaskEditor$6
  implements Comparator<AbstractTaskEditorPageFactory>
{
  TaskEditor$6(TaskEditor paramTaskEditor) {}
  
  public int compare(AbstractTaskEditorPageFactory o1, AbstractTaskEditorPageFactory o2)
  {
    return o1.getPriority() - o2.getPriority();
  }
}

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

import org.eclipse.mylyn.internal.tasks.ui.editors.Messages;
import org.eclipse.ui.forms.events.HyperlinkAdapter;
import org.eclipse.ui.forms.events.HyperlinkEvent;

class AbstractTaskEditorPage$4
  implements Runnable
{
  AbstractTaskEditorPage$4(AbstractTaskEditorPage paramAbstractTaskEditorPage) {}
  
  public void run()
  {
    this$0.getTaskEditor().setMessage(
      Messages.AbstractTaskEditorPage_Synchronize_to_update_editor_contents, 
      1, new HyperlinkAdapter()
      {
        public void linkActivated(HyperlinkEvent e)
        {
          this$0.refresh();
        }
      });
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPage.4
 * 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;
import org.eclipse.core.runtime.PlatformObject;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.mylyn.internal.tasks.core.TaskList;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorInputFactory;
import org.eclipse.mylyn.tasks.core.IRepositoryManager;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.ui.TasksUi;
import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IMemento;
import org.eclipse.ui.IPersistableElement;

public class TaskEditorInput
  extends PlatformObject
  implements IEditorInput, IPersistableElement
{
  private static final int MAX_LABEL_LENGTH = 60;
  private final ITask task;
  private final TaskRepository taskRepository;
  private Object data;
  
  @Deprecated
  public TaskEditorInput(ITask task, boolean newTask)
  {
    this(TasksUi.getRepositoryManager().getRepository(task.getConnectorKind(), task.getRepositoryUrl()), task);
  }
  
  public TaskEditorInput(TaskRepository taskRepository, ITask task)
  {
    Assert.isNotNull(taskRepository);
    Assert.isNotNull(task);
    this.taskRepository = taskRepository;
    this.task = task;
  }
  
  public boolean equals(Object obj)
  {
    if (this == obj) {
      return true;
    }
    if (obj == null) {
      return false;
    }
    if (getClass() != obj.getClass()) {
      return false;
    }
    TaskEditorInput other = (TaskEditorInput)obj;
    return task.equals(task);
  }
  
  public boolean exists()
  {
    return task != null;
  }
  
  public Object getAdapter(Class adapter)
  {
    if (adapter == IEditorInput.class) {
      return this;
    }
    return super.getAdapter(adapter);
  }
  
  public String getFactoryId()
  {
    return "org.eclipse.mylyn.tasks.ui.elementFactories.task.editor";
  }
  
  public ImageDescriptor getImageDescriptor()
  {
    return null;
  }
  
  @Deprecated
  public String getLabel()
  {
    return getName();
  }
  
  public String getName()
  {
    String toolTipText = getToolTipText();
    if (toolTipText == null) {
      return null;
    }
    if (task != null)
    {
      String taskKey = task.getTaskKey();
      if (taskKey != null) {
        return truncate(taskKey + ": " + toolTipText);
      }
    }
    return truncate(toolTipText);
  }
  
  public IPersistableElement getPersistable()
  {
    if ((task != null) && (TasksUiPlugin.getTaskList().getTask(task.getHandleIdentifier()) != null)) {
      return this;
    }
    return null;
  }
  
  public ITask getTask()
  {
    return task;
  }
  
  public TaskRepository getTaskRepository()
  {
    return taskRepository;
  }
  
  public String getToolTipText()
  {
    return task.getSummary();
  }
  
  public int hashCode()
  {
    return task.getTaskId().hashCode();
  }
  
  @Deprecated
  public boolean isNewTask()
  {
    return false;
  }
  
  public void saveState(IMemento memento)
  {
    TaskEditorInputFactory.saveState(memento, this);
  }
  
  private String truncate(String description)
  {
    if ((description == null) || (description.length() <= 60)) {
      return description;
    }
    return description.substring(0, 60) + "...";
  }
  
  public Object getData()
  {
    return data;
  }
  
  public void setData(Object data)
  {
    this.data = data;
  }
}

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

import java.util.Map;
import org.eclipse.core.runtime.Assert;
import org.eclipse.jface.dialogs.IInputValidator;
import org.eclipse.jface.fieldassist.ComboContentAdapter;
import org.eclipse.jface.fieldassist.ControlDecoration;
import org.eclipse.jface.fieldassist.FieldDecoration;
import org.eclipse.jface.fieldassist.FieldDecorationRegistry;
import org.eclipse.jface.fieldassist.IContentProposalProvider;
import org.eclipse.jface.fieldassist.IControlContentAdapter;
import org.eclipse.jface.fieldassist.TextContentAdapter;
import org.eclipse.jface.resource.ColorRegistry;
import org.eclipse.jface.text.TextViewer;
import org.eclipse.jface.text.source.SourceViewer;
import org.eclipse.jface.viewers.ILabelProvider;
import org.eclipse.mylyn.commons.workbench.editors.CommonTextSupport;
import org.eclipse.mylyn.internal.tasks.ui.PersonProposalLabelProvider;
import org.eclipse.mylyn.internal.tasks.ui.PersonProposalProvider;
import org.eclipse.mylyn.internal.tasks.ui.editors.EditorUtil;
import org.eclipse.mylyn.internal.tasks.ui.editors.Messages;
import org.eclipse.mylyn.internal.tasks.ui.editors.PersonAttributeEditor;
import org.eclipse.mylyn.internal.tasks.ui.editors.RepositoryTextViewerConfiguration.Mode;
import org.eclipse.mylyn.internal.tasks.ui.editors.RichTextAttributeEditor;
import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
import org.eclipse.mylyn.tasks.core.data.TaskAttributeMapper;
import org.eclipse.mylyn.tasks.core.data.TaskAttributeMetaData;
import org.eclipse.mylyn.tasks.core.data.TaskData;
import org.eclipse.mylyn.tasks.core.data.TaskDataModel;
import org.eclipse.mylyn.tasks.core.data.TaskDataModelEvent;
import org.eclipse.mylyn.tasks.core.data.TaskDataModelEvent.EventKind;
import org.eclipse.mylyn.tasks.core.data.TaskDataModelListener;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.custom.CCombo;
import org.eclipse.swt.events.DisposeEvent;
import org.eclipse.swt.events.DisposeListener;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.fieldassist.ContentAssistCommandAdapter;
import org.eclipse.ui.handlers.IHandlerActivation;
import org.eclipse.ui.keys.IBindingService;
import org.eclipse.ui.themes.ITheme;
import org.eclipse.ui.themes.IThemeManager;

public class AttributeEditorToolkit
{
  private final Color colorIncoming;
  private Menu menu;
  private AbstractRenderingEngine renderingEngine;
  private final CommonTextSupport textSupport;
  @Deprecated
  public IHandlerActivation contentAssistHandlerActivation;
  
  AttributeEditorToolkit(CommonTextSupport textSupport)
  {
    this.textSupport = textSupport;
    IThemeManager themeManager = PlatformUI.getWorkbench().getThemeManager();
    colorIncoming = themeManager.getCurrentTheme().getColorRegistry().get("org.eclipse.mylyn.tasks.ui.colors.incoming.background");
  }
  
  public void adapt(AbstractAttributeEditor editor)
  {
    if (((editor.getControl() instanceof Text)) || ((editor.getControl() instanceof CCombo)) || 
      ((editor instanceof PersonAttributeEditor)))
    {
      Control control = (editor instanceof PersonAttributeEditor) ? 
        ((PersonAttributeEditor)editor).getText() : 
        editor.getControl();
      if (control == null) {
        control = editor.getControl();
      }
      if ((!editor.isReadOnly()) && (hasContentAssist(editor.getTaskAttribute())))
      {
        IContentProposalProvider contentProposalProvider = createContentProposalProvider(editor.getTaskAttribute());
        ILabelProvider labelPropsalProvider = createLabelProposalProvider(editor.getTaskAttribute());
        if ((contentProposalProvider != null) && (labelPropsalProvider != null))
        {
          ContentAssistCommandAdapter adapter = new ContentAssistCommandAdapter(control, 
            getContentAdapter(control), contentProposalProvider, 
            "org.eclipse.ui.edit.text.contentAssist.proposals", new char[0], true);
          adapter.setLabelProvider(labelPropsalProvider);
          adapter.setProposalAcceptanceStyle(2);
          if ((editor instanceof PersonAttributeEditor)) {
            ((PersonAttributeEditor)editor).setContentAssistCommandAdapter(adapter);
          }
        }
      }
    }
    else if ((editor instanceof RichTextAttributeEditor))
    {
      RichTextAttributeEditor richTextEditor = (RichTextAttributeEditor)editor;
      boolean spellCheck = hasSpellChecking(editor.getTaskAttribute());
      SourceViewer viewer = richTextEditor.getViewer();
      textSupport.install(viewer, spellCheck);
      if ((!editor.isReadOnly()) && (richTextEditor.getMode() == RepositoryTextViewerConfiguration.Mode.TASK_RELATION)) {
        installContentAssistControlDecoration(viewer.getControl());
      }
      installMenu(viewer.getControl());
    }
    else
    {
      TextViewer viewer = CommonTextSupport.getTextViewer(editor.getControl());
      if (viewer != null)
      {
        textSupport.install(viewer, false);
        installMenu(viewer.getControl());
      }
    }
    EditorUtil.setMarker(editor.getControl(), editor.getTaskAttribute().getId());
    
    editor.decorate(getColorIncoming());
  }
  
  private IControlContentAdapter getContentAdapter(Control control)
  {
    if ((control instanceof Combo)) {
      return new ComboContentAdapter();
    }
    if ((control instanceof Text)) {
      return new TextContentAdapter();
    }
    return null;
  }
  
  private void installMenu(final Control control)
  {
    if (menu != null)
    {
      control.setMenu(menu);
      control.addDisposeListener(new DisposeListener()
      {
        public void widgetDisposed(DisposeEvent e)
        {
          control.setMenu(null);
        }
      });
    }
  }
  
  private ControlDecoration installContentAssistControlDecoration(Control control)
  {
    ControlDecoration controlDecoration = new ControlDecoration(control, 16512);
    controlDecoration.setShowOnlyOnFocus(true);
    FieldDecoration contentProposalImage = FieldDecorationRegistry.getDefault().getFieldDecoration(
      "DEC_CONTENT_PROPOSAL");
    controlDecoration.setImage(contentProposalImage.getImage());
    IBindingService bindingService = (IBindingService)PlatformUI.getWorkbench().getService(IBindingService.class);
    controlDecoration.setDescriptionText(NLS.bind(Messages.AttributeEditorToolkit_Content_Assist_Available__X_, 
      bindingService.getBestActiveBindingFormattedFor("org.eclipse.ui.edit.text.contentAssist.proposals")));
    return controlDecoration;
  }
  
  private IContentProposalProvider createContentProposalProvider(TaskAttribute attribute)
  {
    Map<String, String> proposals = attribute.getTaskData().getAttributeMapper().getOptions(attribute);
    return new PersonProposalProvider(null, attribute.getTaskData(), proposals);
  }
  
  private ILabelProvider createLabelProposalProvider(TaskAttribute attribute)
  {
    return new PersonProposalLabelProvider();
  }
  
  void dispose() {}
  
  public Color getColorIncoming()
  {
    return colorIncoming;
  }
  
  Menu getMenu()
  {
    return menu;
  }
  
  public AbstractRenderingEngine getRenderingEngine(TaskAttribute attribute)
  {
    return renderingEngine;
  }
  
  private boolean hasContentAssist(TaskAttribute taskAttribute)
  {
    String type = taskAttribute.getMetaData().getType();
    if ("person".equals(type)) {
      return true;
    }
    if ("taskDepenedency".equals(type)) {
      return true;
    }
    return false;
  }
  
  boolean hasSpellChecking(TaskAttribute taskAttribute)
  {
    String type = taskAttribute.getMetaData().getType();
    if (("longRichText".equals(type)) || ("shortRichText".equals(type))) {
      return true;
    }
    return false;
  }
  
  void setMenu(Menu menu)
  {
    this.menu = menu;
  }
  
  public void setRenderingEngine(AbstractRenderingEngine renderingEngine)
  {
    this.renderingEngine = renderingEngine;
  }
  
  public static void createValidator(final AbstractAttributeEditor attributeEditor, Control control, final IInputValidator validator)
  {
    Assert.isNotNull(validator);
    Assert.isNotNull(control);
    Assert.isNotNull(attributeEditor);
    final ControlDecoration decoration = new ControlDecoration(control, 17408);
    decoration.setMarginWidth(2);
    FieldDecoration errorDecoration = FieldDecorationRegistry.getDefault().getFieldDecoration(
      "DEC_ERROR");
    decoration.setImage(errorDecoration.getImage());
    decoration.hide();
    final TaskDataModelListener validationListener = new TaskDataModelListener()
    {
      public void attributeChanged(TaskDataModelEvent event)
      {
        if (event.getTaskAttribute().equals(getTaskAttribute()))
        {
          String validationMessage = validator.isValid(getTaskAttribute().getValue());
          if (validationMessage == null)
          {
            decoration.hide();
          }
          else
          {
            decoration.setDescriptionText(validationMessage);
            decoration.show();
          }
        }
      }
    };
    attributeEditor.getModel().addModelListener(validationListener);
    control.addDisposeListener(new DisposeListener()
    {
      public void widgetDisposed(DisposeEvent e)
      {
        dispose();
        attributeEditor.getModel().removeModelListener(validationListener);
      }
    });
    validationListener.attributeChanged(new TaskDataModelEvent(attributeEditor.getModel(), TaskDataModelEvent.EventKind.CHANGED, 
      attributeEditor.getTaskAttribute()));
  }
}

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

import org.eclipse.core.runtime.IAdaptable;
import org.eclipse.jface.text.source.SourceViewer;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.swt.widgets.Composite;

public abstract class AbstractTaskEditorExtension
{
  public static final String INTERNAL_WIKI_LINK_PATTERN = "wikiLinkPattern";
  
  @Deprecated
  public abstract SourceViewer createViewer(TaskRepository paramTaskRepository, Composite paramComposite, int paramInt);
  
  public SourceViewer createViewer(TaskRepository taskRepository, Composite parent, int style, IAdaptable context)
  {
    return createViewer(taskRepository, parent, style);
  }
  
  @Deprecated
  public abstract SourceViewer createEditor(TaskRepository paramTaskRepository, Composite paramComposite, int paramInt);
  
  public abstract String getEditorContextId();
  
  public SourceViewer createEditor(TaskRepository taskRepository, Composite parent, int style, IAdaptable context)
  {
    return createEditor(taskRepository, parent, style);
  }
}

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

import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorCommentPart;

class AbstractTaskEditorPage$10
  extends TaskEditorPartDescriptor
{
  AbstractTaskEditorPage$10(AbstractTaskEditorPage paramAbstractTaskEditorPage, String $anonymous0)
  {
    super($anonymous0);
  }
  
  public AbstractTaskEditorPart createPart()
  {
    return new TaskEditorCommentPart();
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPage.10
 * 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.ITaskListRunnable;
import org.eclipse.mylyn.tasks.core.ITask;

class AbstractTaskEditorPage$17
  implements ITaskListRunnable
{
  AbstractTaskEditorPage$17(AbstractTaskEditorPage paramAbstractTaskEditorPage, String paramString) {}
  
  public void execute(IProgressMonitor monitor)
    throws CoreException
  {
    AbstractTaskEditorPage.access$6(this$0).setSummary(val$summary);
  }
}

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

import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;
import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.widgets.ScrolledForm;

final class AbstractTaskEditorPage$ParentResizeHandler
  implements Listener
{
  private int generation;
  
  private AbstractTaskEditorPage$ParentResizeHandler(AbstractTaskEditorPage paramAbstractTaskEditorPage) {}
  
  public void handleEvent(Event event)
  {
    generation += 1;
    
    Display.getCurrent().timerExec(300, new Runnable()
    {
      int scheduledGeneration = generation;
      
      public void run()
      {
        if (this$0.getManagedForm().getForm().isDisposed()) {
          return;
        }
        if (scheduledGeneration == generation) {
          this$0.getManagedForm().reflow(true);
        }
      }
    });
  }
}

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

import org.eclipse.core.runtime.IStatus;
import org.eclipse.mylyn.internal.tasks.ui.editors.Messages;
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
import org.eclipse.ui.forms.events.HyperlinkAdapter;
import org.eclipse.ui.forms.events.HyperlinkEvent;

class AbstractTaskEditorPage$23
  extends HyperlinkAdapter
{
  AbstractTaskEditorPage$23(AbstractTaskEditorPage paramAbstractTaskEditorPage, IStatus paramIStatus) {}
  
  public void linkActivated(HyperlinkEvent e)
  {
    TasksUiInternal.displayStatus(Messages.AbstractTaskEditorPage_Submit_failed, val$status);
  }
}

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

import org.eclipse.mylyn.commons.workbench.BusyAnimator.IBusyClient;
import org.eclipse.swt.graphics.Image;

class TaskEditor$7
  implements BusyAnimator.IBusyClient
{
  TaskEditor$7(TaskEditor paramTaskEditor) {}
  
  public Image getImage()
  {
    return this$0.getTitleImage();
  }
  
  public void setImage(Image image)
  {
    TaskEditor.access$6(this$0, image);
  }
}

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

class AttributeEditorToolkit$1
  implements DisposeListener
{
  AttributeEditorToolkit$1(AttributeEditorToolkit paramAttributeEditorToolkit, Control paramControl) {}
  
  public void widgetDisposed(DisposeEvent e)
  {
    val$control.setMenu(null);
  }
}

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

import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.ToolBarManager;
import org.eclipse.jface.resource.JFaceResources;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.mylyn.commons.ui.CommonImages;
import org.eclipse.mylyn.commons.workbench.forms.CommonFormUtil;
import org.eclipse.mylyn.internal.tasks.ui.editors.Messages;
import org.eclipse.mylyn.internal.tasks.ui.editors.RichTextAttributeEditor;
import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
import org.eclipse.mylyn.tasks.core.data.TaskAttributeMetaData;
import org.eclipse.mylyn.tasks.core.data.TaskData;
import org.eclipse.mylyn.tasks.core.data.TaskDataModel;
import org.eclipse.swt.graphics.Font;
import org.eclipse.swt.graphics.Rectangle;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.RowLayout;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.forms.AbstractFormPart;
import org.eclipse.ui.forms.IManagedForm;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.ScrolledForm;
import org.eclipse.ui.forms.widgets.Section;

public abstract class AbstractTaskEditorPart
  extends AbstractFormPart
{
  protected static final Font TEXT_FONT = ;
  private Control control;
  private String partName;
  private String partId;
  private AbstractTaskEditorPage taskEditorPage;
  private boolean expandVertically;
  private MaximizePartAction maximizePartAction;
  
  protected AbstractAttributeEditor createAttributeEditor(TaskAttribute attribute)
  {
    if (attribute == null) {
      return null;
    }
    String type = attribute.getMetaData().getType();
    if (type != null)
    {
      AttributeEditorFactory attributeEditorFactory = getTaskEditorPage().getAttributeEditorFactory();
      AbstractAttributeEditor editor = attributeEditorFactory.createEditor(type, attribute);
      if ((editor instanceof RichTextAttributeEditor))
      {
        boolean spellChecking = getTaskEditorPage().getAttributeEditorToolkit().hasSpellChecking(attribute);
        ((RichTextAttributeEditor)editor).setSpellCheckingEnabled(spellChecking);
      }
      return editor;
    }
    return null;
  }
  
  public abstract void createControl(Composite paramComposite, FormToolkit paramFormToolkit);
  
  protected Section createSection(Composite parent, FormToolkit toolkit, int style)
  {
    Section section = toolkit.createSection(parent, style);
    section.setText(getPartName());
    return section;
  }
  
  protected Section createSection(Composite parent, FormToolkit toolkit, boolean expandedState)
  {
    int style = 258;
    if (expandedState) {
      style |= 0x40;
    }
    return createSection(parent, toolkit, style);
  }
  
  protected void fillToolBar(ToolBarManager toolBarManager) {}
  
  public Control getControl()
  {
    return control;
  }
  
  public TaskDataModel getModel()
  {
    return getTaskEditorPage().getModel();
  }
  
  public String getPartId()
  {
    return partId;
  }
  
  public String getPartName()
  {
    return partName;
  }
  
  public TaskData getTaskData()
  {
    return getTaskEditorPage().getModel().getTaskData();
  }
  
  public AbstractTaskEditorPage getTaskEditorPage()
  {
    return taskEditorPage;
  }
  
  public void initialize(AbstractTaskEditorPage taskEditorPage)
  {
    this.taskEditorPage = taskEditorPage;
  }
  
  public void setControl(Control control)
  {
    this.control = control;
  }
  
  void setPartId(String partId)
  {
    this.partId = partId;
  }
  
  protected void setPartName(String partName)
  {
    this.partName = partName;
  }
  
  protected void setSection(FormToolkit toolkit, Section section)
  {
    if (section.getTextClient() == null)
    {
      ToolBarManager toolBarManager = new ToolBarManager(8388608);
      fillToolBar(toolBarManager);
      if (toolBarManager.getSize() > 0)
      {
        Composite toolbarComposite = toolkit.createComposite(section);
        toolbarComposite.setBackground(null);
        RowLayout rowLayout = new RowLayout();
        marginLeft = 0;
        marginRight = 0;
        marginTop = 0;
        marginBottom = 0;
        center = true;
        toolbarComposite.setLayout(rowLayout);
        
        toolBarManager.createControl(toolbarComposite);
        clientVerticalSpacing = 0;
        descriptionVerticalSpacing = 0;
        section.setTextClient(toolbarComposite);
      }
    }
    setControl(section);
  }
  
  protected boolean setSelection(ISelection selection)
  {
    return false;
  }
  
  public boolean getExpandVertically()
  {
    return expandVertically;
  }
  
  public void setExpandVertically(boolean expandVertically)
  {
    this.expandVertically = expandVertically;
  }
  
  protected Action getMaximizePartAction()
  {
    if (maximizePartAction == null) {
      maximizePartAction = new MaximizePartAction();
    }
    return maximizePartAction;
  }
  
  protected Control getLayoutControl()
  {
    return getControl();
  }
  
  private class MaximizePartAction
    extends Action
  {
    private static final String COMMAND_ID = "org.eclipse.mylyn.tasks.ui.command.maximizePart";
    private static final int SECTION_HEADER_HEIGHT = 50;
    private int originalHeight = -2;
    
    public MaximizePartAction()
    {
      super(2);
      setImageDescriptor(CommonImages.PART_MAXIMIZE);
      setToolTipText(Messages.TaskEditorRichTextPart_Maximize);
      setActionDefinitionId("org.eclipse.mylyn.tasks.ui.command.maximizePart");
      setChecked(false);
    }
    
    public void run()
    {
      if (((getControl() instanceof Section)) && (!((Section)getControl()).isExpanded())) {
        CommonFormUtil.setExpanded((Section)getControl(), true);
      }
      Control control = getLayoutControl();
      if ((control == null) || (!(control.getLayoutData() instanceof GridData))) {
        return;
      }
      GridData gd = (GridData)control.getLayoutData();
      if (originalHeight == -2) {
        originalHeight = heightHint;
      }
      int heightHint;
      int heightHint;
      if (isChecked()) {
        heightHint = getManagedForm().getForm().getClientArea().height - 50;
      } else {
        heightHint = originalHeight;
      }
      if (heightHint == heightHint) {
        return;
      }
      heightHint = heightHint;
      minimumHeight = heightHint;
      if (widthHint == -1) {
        widthHint = 300;
      }
      getTaskEditorPage().reflow();
      CommonFormUtil.ensureVisible(control);
    }
  }
}

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

import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorSummaryPart;

class AbstractTaskEditorPage$5
  extends TaskEditorPartDescriptor
{
  AbstractTaskEditorPage$5(AbstractTaskEditorPage paramAbstractTaskEditorPage, String $anonymous0)
  {
    super($anonymous0);
  }
  
  public AbstractTaskEditorPart createPart()
  {
    return new TaskEditorSummaryPart();
  }
}

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

import org.eclipse.ui.forms.events.HyperlinkAdapter;
import org.eclipse.ui.forms.events.HyperlinkEvent;

class AbstractTaskEditorPage$4$1
  extends HyperlinkAdapter
{
  AbstractTaskEditorPage$4$1(AbstractTaskEditorPage.4 param4) {}
  
  public void linkActivated(HyperlinkEvent e)
  {
    AbstractTaskEditorPage.4.access$0(this$1).refresh();
  }
}

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

import org.eclipse.ui.IActionBars;
import org.eclipse.ui.IEditorSite;
import org.eclipse.ui.internal.browser.IBrowserViewerContainer;

class BrowserFormPage$1
  implements IBrowserViewerContainer
{
  BrowserFormPage$1(BrowserFormPage paramBrowserFormPage) {}
  
  public boolean close()
  {
    return false;
  }
  
  public IActionBars getActionBars()
  {
    return this$0.getEditorSite().getActionBars();
  }
  
  public void openInExternalBrowser(String url) {}
}

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

import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorNewCommentPart;

class AbstractTaskEditorPage$11
  extends TaskEditorPartDescriptor
{
  AbstractTaskEditorPage$11(AbstractTaskEditorPage paramAbstractTaskEditorPage, String $anonymous0)
  {
    super($anonymous0);
  }
  
  public AbstractTaskEditorPart createPart()
  {
    return new TaskEditorNewCommentPart();
  }
}

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

import org.eclipse.jface.action.Action;
import org.eclipse.mylyn.tasks.ui.TasksUiUtil;

class AbstractTaskEditorPage$18
  extends Action
{
  AbstractTaskEditorPage$18(AbstractTaskEditorPage paramAbstractTaskEditorPage, String paramString) {}
  
  public void run()
  {
    TasksUiUtil.openUrl(val$historyUrl);
  }
}

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

import org.eclipse.mylyn.internal.tasks.ui.editors.RichTextAttributeEditor;
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;

class AttributeEditorFactory$1
  extends RichTextAttributeEditor
{
  AttributeEditorFactory$1(Att
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