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

buteEditor paramUserAttributeEditor) {}
  
  public void widgetDisposed(DisposeEvent e)
  {
    if (UserAttributeEditor.access$1(this$0) != null) {
      UserAttributeEditor.access$1(this$0).dispose();
    }
    if (UserAttributeEditor.access$2(this$0) != null) {
      UserAttributeEditor.access$2(this$0).removePropertyChangeListener(UserAttributeEditor.access$3(this$0));
    }
  }
}

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

import org.eclipse.swt.custom.CCombo;
import org.eclipse.swt.widgets.Event;
import org.eclipse.swt.widgets.Listener;

class EditorUtil$5
  implements Listener
{
  EditorUtil$5(CCombo paramCCombo) {}
  
  public void handleEvent(Event event)
  {
    if (count > 0) {
      EditorUtil.access$0(val$combo, event);
    } else if (count < 0) {
      EditorUtil.access$1(val$combo, event);
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.tasks.ui.editors.EditorUtil.5
 * 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.Document;
import org.eclipse.jface.text.source.SourceViewer;
import org.eclipse.mylyn.commons.workbench.editors.CommonTextSupport;
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.custom.StyledText;
import org.eclipse.swt.events.ModifyListener;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.widgets.FormToolkit;

public class LongTextAttributeEditor
  extends AbstractAttributeEditor
{
  private SourceViewer viewer;
  boolean ignoreNotification;
  boolean suppressRefresh;
  
  public LongTextAttributeEditor(TaskDataModel manager, TaskAttribute taskAttribute)
  {
    super(manager, taskAttribute);
    setLayoutHint(new LayoutHint(LayoutHint.RowSpan.MULTIPLE, LayoutHint.ColumnSpan.MULTIPLE));
  }
  
  public void createControl(Composite parent, FormToolkit toolkit)
  {
    int style = 8388674;
    if (!isReadOnly()) {
      style |= 0x200;
    }
    viewer = new SourceViewer(parent, null, style);
    RepositoryTextViewerConfiguration configuration = RichTextEditor.installHyperlinkPresenter(viewer, 
      getModel().getTaskRepository(), getModel().getTask(), RepositoryTextViewerConfiguration.Mode.DEFAULT);
    viewer.configure(configuration);
    viewer.setDocument(new Document(getValue()));
    final StyledText text = viewer.getTextWidget();
    text.setToolTipText(getDescription());
    toolkit.adapt(text, false, false);
    
    CommonTextSupport.setTextViewer(text, viewer);
    if (isReadOnly())
    {
      viewer.setEditable(false);
    }
    else
    {
      viewer.setEditable(true);
      text.setData("FormWidgetFactory.drawBorder", "treeBorder");
      text.addModifyListener(new ModifyListener()
      {
        /* Error */
        public void modifyText(org.eclipse.swt.events.ModifyEvent e)
        {
          // Byte code:
          //   0: aload_0
          //   1: getfield 45	org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor$1:this$0	Lorg/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor;
          //   4: iconst_1
          //   5: putfield 44	org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor:suppressRefresh	Z
          //   8: aload_0
          //   9: getfield 45	org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor$1:this$0	Lorg/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor;
          //   12: aload_0
          //   13: getfield 46	org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor$1:val$text	Lorg/eclipse/swt/custom/StyledText;
          //   16: invokevirtual 50	org/eclipse/swt/custom/StyledText:getText	()Ljava/lang/String;
          //   19: invokevirtual 49	org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor:setValue	(Ljava/lang/String;)V
          //   22: aload_0
          //   23: getfield 46	org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor$1:val$text	Lorg/eclipse/swt/custom/StyledText;
          //   26: invokestatic 48	org/eclipse/mylyn/commons/workbench/forms/CommonFormUtil:ensureVisible	(Lorg/eclipse/swt/widgets/Control;)V
          //   29: goto +14 -> 43
          //   32: astore_2
          //   33: aload_0
          //   34: getfield 45	org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor$1:this$0	Lorg/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor;
          //   37: iconst_0
          //   38: putfield 44	org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor:suppressRefresh	Z
          //   41: aload_2
          //   42: athrow
          //   43: aload_0
          //   44: getfield 45	org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor$1:this$0	Lorg/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor;
          //   47: iconst_0
          //   48: putfield 44	org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor:suppressRefresh	Z
          //   51: return
          // Line number table:
          //   Java source line #74	-> byte code offset #0
          //   Java source line #75	-> byte code offset #8
          //   Java source line #76	-> byte code offset #22
          //   Java source line #77	-> byte code offset #32
          //   Java source line #78	-> byte code offset #33
          //   Java source line #79	-> byte code offset #41
          //   Java source line #78	-> byte code offset #43
          //   Java source line #80	-> byte code offset #51
          // Local variable table:
          //   start	length	slot	name	signature
          //   0	52	0	this	1
          //   0	52	1	e	org.eclipse.swt.events.ModifyEvent
          //   32	10	2	localObject	Object
          // Exception table:
          //   from	to	target	type
          //   0	32	32	finally
        }
      });
    }
    setControl(text);
  }
  
  public String getValue()
  {
    return getAttributeMapper().getValue(getTaskAttribute());
  }
  
  public void setValue(String text)
  {
    getAttributeMapper().setValue(getTaskAttribute(), text);
    attributeChanged();
  }
  
  /* Error */
  public void refresh()
  {
    // Byte code:
    //   0: aload_0
    //   1: getfield 163	org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor:viewer	Lorg/eclipse/jface/text/source/SourceViewer;
    //   4: invokevirtual 172	org/eclipse/jface/text/source/SourceViewer:getTextWidget	()Lorg/eclipse/swt/custom/StyledText;
    //   7: ifnull +53 -> 60
    //   10: aload_0
    //   11: getfield 163	org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor:viewer	Lorg/eclipse/jface/text/source/SourceViewer;
    //   14: invokevirtual 172	org/eclipse/jface/text/source/SourceViewer:getTextWidget	()Lorg/eclipse/swt/custom/StyledText;
    //   17: invokevirtual 192	org/eclipse/swt/custom/StyledText:isDisposed	()Z
    //   20: ifne +40 -> 60
    //   23: aload_0
    //   24: iconst_1
    //   25: putfield 161	org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor:ignoreNotification	Z
    //   28: aload_0
    //   29: getfield 163	org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor:viewer	Lorg/eclipse/jface/text/source/SourceViewer;
    //   32: invokevirtual 169	org/eclipse/jface/text/source/SourceViewer:getDocument	()Lorg/eclipse/jface/text/IDocument;
    //   35: aload_0
    //   36: invokevirtual 178	org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor:getValue	()Ljava/lang/String;
    //   39: invokeinterface 197 2 0
    //   44: goto +11 -> 55
    //   47: astore_1
    //   48: aload_0
    //   49: iconst_0
    //   50: putfield 161	org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor:ignoreNotification	Z
    //   53: aload_1
    //   54: athrow
    //   55: aload_0
    //   56: iconst_0
    //   57: putfield 161	org/eclipse/mylyn/internal/tasks/ui/editors/LongTextAttributeEditor:ignoreNotification	Z
    //   60: return
    // Line number table:
    //   Java source line #98	-> byte code offset #0
    //   Java source line #100	-> byte code offset #23
    //   Java source line #101	-> byte code offset #28
    //   Java source line #102	-> byte code offset #47
    //   Java source line #103	-> byte code offset #48
    //   Java source line #104	-> byte code offset #53
    //   Java source line #103	-> byte code offset #55
    //   Java source line #106	-> byte code offset #60
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	61	0	this	LongTextAttributeEditor
    //   47	7	1	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   23	47	47	finally
  }
  
  public boolean shouldAutoRefresh()
  {
    return !suppressRefresh;
  }
}

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

class MultiSelectionAttributeEditor$1
  extends SelectionAdapter
{
  MultiSelectionAttributeEditor$1(MultiSelectionAttributeEditor paramMultiSelectionAttributeEditor) {}
  
  public void widgetSelected(SelectionEvent e)
  {
    Assert.isNotNull(MultiSelectionAttributeEditor.access$0(this$0));
    int[] indices = MultiSelectionAttributeEditor.access$1(this$0).getSelectionIndices();
    String[] selectedValues = new String[indices.length];
    for (i = 0; i < indices.length; i++)
    {
      int index = indices[i];
      Assert.isLegal((index >= 0) && (index <= MultiSelectionAttributeEditor.access$0(this$0).length - 1));
      selectedValues[i] = MultiSelectionAttributeEditor.access$0(this$0)[index];
    }
    try
    {
      this$0.suppressRefresh = true;
      this$0.setValues(selectedValues);
    }
    finally
    {
      this$0.suppressRefresh = false;
    }
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.tasks.ui.editors.MultiSelectionAttributeEditor.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.List;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.mylyn.commons.workbench.forms.CommonFormUtil;
import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPage;
import org.eclipse.mylyn.tasks.ui.editors.AttributeEditorToolkit;
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.layout.GridLayout;
import org.eclipse.swt.widgets.Canvas;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.ui.forms.FormColors;
import org.eclipse.ui.forms.events.ExpansionAdapter;
import org.eclipse.ui.forms.widgets.FormToolkit;
import org.eclipse.ui.forms.widgets.Section;

class TaskEditorCommentPart$CommentGroupViewer
{
  private final CommentGroupStrategy.CommentGroup commentGroup;
  private ArrayList<TaskEditorCommentPart.CommentViewer> commentViewers;
  private Section groupSection;
  private boolean renderedInSubSection;
  
  public TaskEditorCommentPart$CommentGroupViewer(TaskEditorCommentPart paramTaskEditorCommentPart, CommentGroupStrategy.CommentGroup commentGroup)
  {
    this.commentGroup = commentGroup;
  }
  
  private Composite createCommentViewers(Composite parent, FormToolkit toolkit)
  {
    List<TaskEditorCommentPart.CommentViewer> viewers = getCommentViewers();
    Composite composite = toolkit.createComposite(parent);
    
    GridLayout contentLayout = new GridLayout();
    marginHeight = 0;
    marginWidth = 0;
    composite.setLayout(contentLayout);
    for (TaskEditorCommentPart.CommentViewer commentViewer : viewers)
    {
      Control control = commentViewer.createControl(composite, toolkit);
      GridDataFactory.fillDefaults().grab(true, false).applyTo(control);
    }
    return composite;
  }
  
  private Control createControl(Composite parent, FormToolkit toolkit)
  {
    if (renderedInSubSection) {
      return createSection(parent, toolkit);
    }
    if (TaskEditorCommentPart.access$0(this$0).size() >= 12)
    {
      final Canvas separator = new Canvas(parent, 0)
      {
        public Point computeSize(int wHint, int hHint, boolean changed)
        {
          return new Point(wHint == -1 ? 1 : wHint, 1);
        }
      };
      separator.addPaintListener(new PaintListener()
      {
        public void paintControl(PaintEvent e)
        {
          gc.setForeground(separator.getForeground());
          gc.drawLine(0, 0, separatorgetSizex, 0);
        }
      });
      separator.setForeground(toolkit.getColors().getColor("org.eclipse.ui.forms.TB_BORDER"));
      GridDataFactory.fillDefaults().grab(true, false).indent(-12, 0).applyTo(separator);
    }
    return createCommentViewers(parent, toolkit);
  }
  
  private Section createSection(Composite parent, final FormToolkit toolkit)
  {
    int style = 514;
    
    groupSection = toolkit.createSection(parent, style);
    groupSection.clientVerticalSpacing = 0;
    if (commentGroup.hasIncoming()) {
      groupSection.setBackground(this$0.getTaskEditorPage().getAttributeEditorToolkit().getColorIncoming());
    }
    groupSection.setForeground(toolkit.getColors().getColor("org.eclipse.ui.forms.TITLE"));
    groupSection.setText(commentGroup.getGroupName() + Messages.TaskEditorCommentPart_0 + 
      commentGroup.getCommentAttributes().size() + Messages.TaskEditorCommentPart_1);
    if (groupSection.isExpanded())
    {
      Composite composite = createCommentViewers(groupSection, toolkit);
      groupSection.setClient(composite);
    }
    else
    {
      groupSection.addExpansionListener(new ExpansionAdapter()
      {
        /* Error */
        public void expansionStateChanged(org.eclipse.ui.forms.events.ExpansionEvent e)
        {
          // Byte code:
          //   0: aload_0
          //   1: getfield 82	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer$3:this$1	Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;
          //   4: invokestatic 86	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer:access$0	(Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;)Lorg/eclipse/mylyn/internal/tasks/ui/editors/CommentGroupStrategy$CommentGroup;
          //   7: invokevirtual 84	org/eclipse/mylyn/internal/tasks/ui/editors/CommentGroupStrategy$CommentGroup:hasIncoming	()Z
          //   10: ifeq +50 -> 60
          //   13: aload_1
          //   14: invokevirtual 95	org/eclipse/ui/forms/events/ExpansionEvent:getState	()Z
          //   17: ifeq +17 -> 34
          //   20: aload_0
          //   21: getfield 82	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer$3:this$1	Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;
          //   24: invokestatic 88	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer:access$1	(Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;)Lorg/eclipse/ui/forms/widgets/Section;
          //   27: aconst_null
          //   28: invokevirtual 96	org/eclipse/ui/forms/widgets/Section:setBackground	(Lorg/eclipse/swt/graphics/Color;)V
          //   31: goto +29 -> 60
          //   34: aload_0
          //   35: getfield 82	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer$3:this$1	Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;
          //   38: invokestatic 88	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer:access$1	(Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;)Lorg/eclipse/ui/forms/widgets/Section;
          //   41: aload_0
          //   42: getfield 82	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer$3:this$1	Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;
          //   45: invokestatic 87	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer:access$4	(Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;)Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart;
          //   48: invokevirtual 85	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart:getTaskEditorPage	()Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage;
          //   51: invokevirtual 92	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage:getAttributeEditorToolkit	()Lorg/eclipse/mylyn/tasks/ui/editors/AttributeEditorToolkit;
          //   54: invokevirtual 93	org/eclipse/mylyn/tasks/ui/editors/AttributeEditorToolkit:getColorIncoming	()Lorg/eclipse/swt/graphics/Color;
          //   57: invokevirtual 96	org/eclipse/ui/forms/widgets/Section:setBackground	(Lorg/eclipse/swt/graphics/Color;)V
          //   60: aload_0
          //   61: getfield 82	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer$3:this$1	Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;
          //   64: invokestatic 88	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer:access$1	(Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;)Lorg/eclipse/ui/forms/widgets/Section;
          //   67: invokevirtual 97	org/eclipse/ui/forms/widgets/Section:getClient	()Lorg/eclipse/swt/widgets/Control;
          //   70: ifnonnull +94 -> 164
          //   73: aload_0
          //   74: getfield 82	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer$3:this$1	Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;
          //   77: invokestatic 87	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer:access$4	(Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;)Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart;
          //   80: invokevirtual 85	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart:getTaskEditorPage	()Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage;
          //   83: iconst_0
          //   84: invokevirtual 91	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage:setReflow	(Z)V
          //   87: aload_0
          //   88: getfield 82	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer$3:this$1	Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;
          //   91: aload_0
          //   92: getfield 82	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer$3:this$1	Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;
          //   95: invokestatic 88	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer:access$1	(Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;)Lorg/eclipse/ui/forms/widgets/Section;
          //   98: aload_0
          //   99: getfield 83	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer$3:val$toolkit	Lorg/eclipse/ui/forms/widgets/FormToolkit;
          //   102: invokestatic 89	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer:access$2	(Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;Lorg/eclipse/swt/widgets/Composite;Lorg/eclipse/ui/forms/widgets/FormToolkit;)Lorg/eclipse/swt/widgets/Composite;
          //   105: astore_2
          //   106: aload_0
          //   107: getfield 82	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer$3:this$1	Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;
          //   110: invokestatic 88	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer:access$1	(Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;)Lorg/eclipse/ui/forms/widgets/Section;
          //   113: aload_2
          //   114: invokevirtual 98	org/eclipse/ui/forms/widgets/Section:setClient	(Lorg/eclipse/swt/widgets/Control;)V
          //   117: goto +20 -> 137
          //   120: astore_3
          //   121: aload_0
          //   122: getfield 82	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer$3:this$1	Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;
          //   125: invokestatic 87	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer:access$4	(Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;)Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart;
          //   128: invokevirtual 85	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart:getTaskEditorPage	()Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage;
          //   131: iconst_1
          //   132: invokevirtual 91	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage:setReflow	(Z)V
          //   135: aload_3
          //   136: athrow
          //   137: aload_0
          //   138: getfield 82	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer$3:this$1	Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;
          //   141: invokestatic 87	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer:access$4	(Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;)Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart;
          //   144: invokevirtual 85	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart:getTaskEditorPage	()Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage;
          //   147: iconst_1
          //   148: invokevirtual 91	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage:setReflow	(Z)V
          //   151: aload_0
          //   152: getfield 82	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer$3:this$1	Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;
          //   155: invokestatic 87	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer:access$4	(Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;)Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart;
          //   158: invokevirtual 85	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart:getTaskEditorPage	()Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage;
          //   161: invokevirtual 90	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage:reflow	()V
          //   164: return
          // Line number table:
          //   Java source line #152	-> byte code offset #0
          //   Java source line #153	-> byte code offset #13
          //   Java source line #154	-> byte code offset #20
          //   Java source line #158	-> byte code offset #34
          //   Java source line #159	-> byte code offset #54
          //   Java source line #158	-> byte code offset #57
          //   Java source line #162	-> byte code offset #60
          //   Java source line #164	-> byte code offset #73
          //   Java source line #165	-> byte code offset #87
          //   Java source line #166	-> byte code offset #106
          //   Java source line #167	-> byte code offset #120
          //   Java source line #168	-> byte code offset #121
          //   Java source line #169	-> byte code offset #135
          //   Java source line #168	-> byte code offset #137
          //   Java source line #170	-> byte code offset #151
          //   Java source line #172	-> byte code offset #164
          // Local variable table:
          //   start	length	slot	name	signature
          //   0	165	0	this	3
          //   0	165	1	e	org.eclipse.ui.forms.events.ExpansionEvent
          //   105	9	2	composite	Composite
          //   120	16	3	localObject	Object
          // Exception table:
          //   from	to	target	type
          //   73	120	120	finally
        }
      });
    }
    return groupSection;
  }
  
  public List<TaskEditorCommentPart.CommentViewer> getCommentViewers()
  {
    if (commentViewers != null) {
      return commentViewers;
    }
    commentViewers = new ArrayList(commentGroup.getCommentAttributes().size());
    for (TaskAttribute commentAttribute : commentGroup.getCommentAttributes())
    {
      TaskEditorCommentPart.CommentViewer commentViewer = new TaskEditorCommentPart.CommentViewer(this$0, commentAttribute);
      commentViewers.add(commentViewer);
    }
    return commentViewers;
  }
  
  public boolean isExpanded()
  {
    if (groupSection != null) {
      return groupSection.isExpanded();
    }
    if (commentViewers != null) {
      for (TaskEditorCommentPart.CommentViewer commentViewer : commentViewers) {
        if (commentViewer.isExpanded()) {
          return true;
        }
      }
    }
    return false;
  }
  
  public boolean isFullyExpanded()
  {
    if ((groupSection != null) && (!groupSection.isExpanded())) {
      return false;
    }
    if (commentViewers != null)
    {
      for (TaskEditorCommentPart.CommentViewer commentViewer : commentViewers) {
        if (!commentViewer.isExpanded()) {
          return false;
        }
      }
      return true;
    }
    return false;
  }
  
  public boolean isRenderedInSubSection()
  {
    return renderedInSubSection;
  }
  
  public void setExpanded(boolean expanded)
  {
    if ((groupSection != null) && (groupSection.isExpanded() != expanded)) {
      CommonFormUtil.setExpanded(groupSection, expanded);
    }
  }
  
  public void setFullyExpanded(boolean expanded)
  {
    if ((groupSection != null) && (groupSection.isExpanded() != expanded)) {
      CommonFormUtil.setExpanded(groupSection, expanded);
    }
    if (commentViewers != null) {
      for (TaskEditorCommentPart.CommentViewer commentViewer : commentViewers) {
        commentViewer.setExpanded(expanded);
      }
    }
  }
  
  public void setRenderedInSubSection(boolean renderedInSubSection)
  {
    this.renderedInSubSection = renderedInSubSection;
  }
}

/* Location:
 * Qualified Name:     org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorCommentPart.CommentGroupViewer
 * 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.Assert;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.Job;
import org.eclipse.core.runtime.jobs.JobChangeAdapter;
import org.eclipse.mylyn.commons.workbench.browser.BrowserUtil;
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
import org.eclipse.mylyn.tasks.core.RepositoryStatus;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.ui.editors.AbstractRenderingEngine;
import org.eclipse.swt.browser.Browser;
import org.eclipse.swt.browser.LocationAdapter;
import org.eclipse.swt.browser.LocationEvent;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Display;
import org.eclipse.ui.forms.widgets.FormToolkit;

public class BrowserPreviewViewer
{
  private Browser browser;
  private boolean ignoreLocationEvents;
  private final AbstractRenderingEngine renderingEngine;
  private final TaskRepository taskRepository;
  
  public BrowserPreviewViewer(TaskRepository taskRepository, AbstractRenderingEngine renderingEngine)
  {
    Assert.isNotNull(taskRepository);
    Assert.isNotNull(renderingEngine);
    this.taskRepository = taskRepository;
    this.renderingEngine = renderingEngine;
  }
  
  public void createControl(Composite parent, FormToolkit toolkit)
  {
    browser = new Browser(parent, 0);
    
    browser.addLocationListener(new LocationAdapter()
    {
      public void changing(LocationEvent event)
      {
        if (ignoreLocationEvents) {
          return;
        }
        if ((location != null) && (!location.startsWith("about")))
        {
          doit = false;
          BrowserUtil.openUrl(location);
        }
      }
    });
  }
  
  public Browser getControl()
  {
    return browser;
  }
  
  private void previewWiki(final Browser browser, String sourceText)
  {
    final Job job = new Job(sourceText)
    {
      private String htmlText;
      private IStatus jobStatus;
      private final String sourceText;
      
      public String getHtmlText()
      {
        return htmlText;
      }
      
      public IStatus getStatus()
      {
        return jobStatus;
      }
      
      protected IStatus run(IProgressMonitor monitor)
      {
        if (renderingEngine == null)
        {
          jobStatus = new RepositoryStatus(taskRepository, 1, "org.eclipse.mylyn.tasks.ui", 
            7, 
            Messages.BrowserPreviewViewer_The_repository_does_not_support_HTML_preview);
          return Status.OK_STATUS;
        }
        jobStatus = Status.OK_STATUS;
        try
        {
          htmlText = renderingEngine.renderAsHtml(taskRepository, sourceText, monitor);
        }
        catch (CoreException e)
        {
          jobStatus = e.getStatus();
        }
        return Status.OK_STATUS;
      }
    };
    job.addJobChangeListener(new JobChangeAdapter()
    {
      public void done(IJobChangeEvent event)
      {
        if (!browser.isDisposed()) {
          if (job.getStatus().isOK()) {
            browser.getDisplay().asyncExec(new Runnable()
            {
              public void run()
              {
                BrowserPreviewViewer.this.setText(val$browser, val$job.getHtmlText());
              }
            });
          } else {
            browser.getDisplay().asyncExec(new Runnable()
            {
              public void run()
              {
                TasksUiInternal.displayStatus(Messages.BrowserPreviewViewer_Error, val$job.getStatus());
              }
            });
          }
        }
        super.done(event);
      }
    });
    job.setUser(true);
    job.schedule();
  }
  
  /* Error */
  private void setText(Browser browser, String html)
  {
    // Byte code:
    //   0: aload_0
    //   1: iconst_1
    //   2: putfield 93	org/eclipse/mylyn/internal/tasks/ui/editors/BrowserPreviewViewer:ignoreLocationEvents	Z
    //   5: aload_1
    //   6: aload_2
    //   7: ifnull +7 -> 14
    //   10: aload_2
    //   11: goto +5 -> 16
    //   14: ldc 1
    //   16: invokevirtual 108	org/eclipse/swt/browser/Browser:setText	(Ljava/lang/String;)Z
    //   19: pop
    //   20: goto +11 -> 31
    //   23: astore_3
    //   24: aload_0
    //   25: iconst_0
    //   26: putfield 93	org/eclipse/mylyn/internal/tasks/ui/editors/BrowserPreviewViewer:ignoreLocationEvents	Z
    //   29: aload_3
    //   30: athrow
    //   31: aload_0
    //   32: iconst_0
    //   33: putfield 93	org/eclipse/mylyn/internal/tasks/ui/editors/BrowserPreviewViewer:ignoreLocationEvents	Z
    //   36: return
    // Line number table:
    //   Java source line #162	-> byte code offset #0
    //   Java source line #163	-> byte code offset #5
    //   Java source line #164	-> byte code offset #23
    //   Java source line #165	-> byte code offset #24
    //   Java source line #166	-> byte code offset #29
    //   Java source line #165	-> byte code offset #31
    //   Java source line #168	-> byte code offset #36
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	37	0	this	BrowserPreviewViewer
    //   0	37	1	browser	Browser
    //   0	37	2	html	String
    //   23	7	3	localObject	Object
    // Exception table:
    //   from	to	target	type
    //   0	23	23	finally
  }
  
  public void update(String value)
  {
    setText(browser, Messages.BrowserPreviewViewer_Loading_preview_);
    previewWiki(browser, value);
  }
}

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

import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.forms.events.ExpansionAdapter;
import org.eclipse.ui.forms.events.ExpansionEvent;

class AttributePart$3
  extends ExpansionAdapter
{
  AttributePart$3(AttributePart paramAttributePart, Composite paramComposite) {}
  
  public void expansionStateChanging(ExpansionEvent e)
  {
    val$textClient.setVisible(!e.getState());
  }
}

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

import org.eclipse.ui.forms.events.ExpansionAdapter;
import org.eclipse.ui.forms.widgets.FormToolkit;

class TaskEditorCommentPart$CommentGroupViewer$3
  extends ExpansionAdapter
{
  TaskEditorCommentPart$CommentGroupViewer$3(TaskEditorCommentPart.CommentGroupViewer paramCommentGroupViewer, FormToolkit paramFormToolkit) {}
  
  /* Error */
  public void expansionStateChanged(org.eclipse.ui.forms.events.ExpansionEvent e)
  {
    // Byte code:
    //   0: aload_0
    //   1: getfield 82	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer$3:this$1	Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;
    //   4: invokestatic 86	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer:access$0	(Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;)Lorg/eclipse/mylyn/internal/tasks/ui/editors/CommentGroupStrategy$CommentGroup;
    //   7: invokevirtual 84	org/eclipse/mylyn/internal/tasks/ui/editors/CommentGroupStrategy$CommentGroup:hasIncoming	()Z
    //   10: ifeq +50 -> 60
    //   13: aload_1
    //   14: invokevirtual 95	org/eclipse/ui/forms/events/ExpansionEvent:getState	()Z
    //   17: ifeq +17 -> 34
    //   20: aload_0
    //   21: getfield 82	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer$3:this$1	Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;
    //   24: invokestatic 88	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer:access$1	(Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;)Lorg/eclipse/ui/forms/widgets/Section;
    //   27: aconst_null
    //   28: invokevirtual 96	org/eclipse/ui/forms/widgets/Section:setBackground	(Lorg/eclipse/swt/graphics/Color;)V
    //   31: goto +29 -> 60
    //   34: aload_0
    //   35: getfield 82	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer$3:this$1	Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;
    //   38: invokestatic 88	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer:access$1	(Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;)Lorg/eclipse/ui/forms/widgets/Section;
    //   41: aload_0
    //   42: getfield 82	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer$3:this$1	Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;
    //   45: invokestatic 87	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer:access$4	(Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;)Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart;
    //   48: invokevirtual 85	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart:getTaskEditorPage	()Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage;
    //   51: invokevirtual 92	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage:getAttributeEditorToolkit	()Lorg/eclipse/mylyn/tasks/ui/editors/AttributeEditorToolkit;
    //   54: invokevirtual 93	org/eclipse/mylyn/tasks/ui/editors/AttributeEditorToolkit:getColorIncoming	()Lorg/eclipse/swt/graphics/Color;
    //   57: invokevirtual 96	org/eclipse/ui/forms/widgets/Section:setBackground	(Lorg/eclipse/swt/graphics/Color;)V
    //   60: aload_0
    //   61: getfield 82	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer$3:this$1	Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;
    //   64: invokestatic 88	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer:access$1	(Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;)Lorg/eclipse/ui/forms/widgets/Section;
    //   67: invokevirtual 97	org/eclipse/ui/forms/widgets/Section:getClient	()Lorg/eclipse/swt/widgets/Control;
    //   70: ifnonnull +94 -> 164
    //   73: aload_0
    //   74: getfield 82	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer$3:this$1	Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;
    //   77: invokestatic 87	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer:access$4	(Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;)Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart;
    //   80: invokevirtual 85	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart:getTaskEditorPage	()Lorg/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage;
    //   83: iconst_0
    //   84: invokevirtual 91	org/eclipse/mylyn/tasks/ui/editors/AbstractTaskEditorPage:setReflow	(Z)V
    //   87: aload_0
    //   88: getfield 82	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer$3:this$1	Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;
    //   91: aload_0
    //   92: getfield 82	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer$3:this$1	Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;
    //   95: invokestatic 88	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer:access$1	(Lorg/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer;)Lorg/eclipse/ui/forms/widgets/Section;
    //   98: aload_0
    //   99: getfield 83	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer$3:val$toolkit	Lorg/eclipse/ui/forms/widgets/FormToolkit;
    //   102: invokestatic 89	org/eclipse/mylyn/internal/tasks/ui/editors/TaskEditorCommentPart$CommentGroupViewer:access$2	(Lorg
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