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

rce line #287	-> byte code offset #176
    //   Java source line #288	-> byte code offset #183
    //   Java source line #287	-> byte code offset #187
    //   Java source line #290	-> byte code offset #193
    //   Java source line #285	-> byte code offset #196
    //   Java source line #286	-> byte code offset #203
    //   Java source line #287	-> byte code offset #205
    //   Java source line #288	-> byte code offset #212
    //   Java source line #287	-> byte code offset #216
    //   Java source line #290	-> byte code offset #222
    //   Java source line #291	-> byte code offset #225
    //   Java source line #292	-> byte code offset #226
    //   Java source line #293	-> byte code offset #235
    //   Java source line #294	-> byte code offset #237
    //   Java source line #295	-> byte code offset #243
    //   Java source line #294	-> byte code offset #246
    //   Java source line #296	-> byte code offset #252
    // Local variable table:
    //   start	length	slot	name	signature
    //   0	253	0	this	4
    //   0	253	1	monitor	org.eclipse.core.runtime.IProgressMonitor
    //   24	173	2	in	InputStream
    //   225	6	2	e	org.eclipse.core.runtime.CoreException
    //   42	70	3	content	StringBuilder
    //   155	6	3	e	java.io.IOException
    //   58	20	4	reader	java.io.BufferedReader
    //   63	2	5	line	String
    //   83	3	5	line	String
    //   165	29	6	localObject1	Object
    //   174	12	7	e	java.io.IOException
    //   203	12	7	e	java.io.IOException
    //   235	9	8	localObject2	Object
    // Exception table:
    //   from	to	target	type
    //   25	152	155	java/io/IOException
    //   25	165	165	finally
    //   167	171	174	java/io/IOException
    //   196	200	203	java/io/IOException
    //   0	222	225	org/eclipse/core/runtime/CoreException
    //   0	235	235	finally
  }
}

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

import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.mylyn.internal.tasks.ui.actions.AddRepositoryAction;
import org.eclipse.mylyn.tasks.core.IRepositoryManager;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.ui.TasksUi;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;

class SelectRepositoryPage$1
  extends SelectionAdapter
{
  SelectRepositoryPage$1(SelectRepositoryPage paramSelectRepositoryPage, AddRepositoryAction paramAddRepositoryAction) {}
  
  public void widgetSelected(SelectionEvent e)
  {
    TaskRepository taskRepository = val$action.showWizard();
    if (taskRepository != null)
    {
      SelectRepositoryPage.access$2(this$0, this$0.getTaskRepositories());
      SelectRepositoryPage.access$3(this$0).setInput(TasksUi.getRepositoryManager().getRepositoryConnectors());
      SelectRepositoryPage.access$3(this$0).setSelection(new StructuredSelection(taskRepository));
    }
  }
}

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

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.eclipse.core.commands.Command;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.viewers.DecoratingLabelProvider;
import org.eclipse.jface.viewers.IOpenListener;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.OpenEvent;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.StructuredSelection;
import org.eclipse.jface.viewers.TreePath;
import org.eclipse.jface.viewers.TreeSelection;
import org.eclipse.jface.viewers.TreeViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.IWizardContainer;
import org.eclipse.jface.wizard.IWizardNode;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.jface.wizard.WizardSelectionPage;
import org.eclipse.mylyn.commons.ui.CommonImages;
import org.eclipse.mylyn.commons.workbench.GradientDrawer;
import org.eclipse.mylyn.internal.tasks.core.Category;
import org.eclipse.mylyn.internal.tasks.core.ITaskRepositoryFilter;
import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.internal.tasks.ui.actions.AddRepositoryAction;
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
import org.eclipse.mylyn.internal.tasks.ui.views.TaskRepositoriesViewSorter;
import org.eclipse.mylyn.internal.tasks.ui.views.TaskRepositoryLabelProvider;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylyn.tasks.core.IRepositoryManager;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.ui.TasksUi;
import org.eclipse.mylyn.tasks.ui.TasksUiImages;
import org.eclipse.mylyn.tasks.ui.TasksUiUtil;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.graphics.Point;
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.Tree;
import org.eclipse.swt.widgets.Widget;
import org.eclipse.ui.IDecoratorManager;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.handlers.IHandlerService;
import org.eclipse.ui.themes.IThemeManager;

public abstract class SelectRepositoryPage
  extends WizardSelectionPage
{
  private TreeViewer viewer;
  protected MultiRepositoryAwareWizard wizard;
  private List<TaskRepository> repositories = new ArrayList();
  private final ITaskRepositoryFilter taskRepositoryFilter;
  
  class RepositoryContentProvider
    implements ITreeContentProvider
  {
    RepositoryContentProvider() {}
    
    public Object[] getChildren(Object parentElement)
    {
      return null;
    }
    
    public Object getParent(Object element)
    {
      return null;
    }
    
    public boolean hasChildren(Object element)
    {
      return false;
    }
    
    public Object[] getElements(Object inputElement)
    {
      return repositories.toArray();
    }
    
    public void dispose() {}
    
    public void inputChanged(Viewer viewer, Object oldInput, Object newInput) {}
  }
  
  public SelectRepositoryPage(ITaskRepositoryFilter taskRepositoryFilter)
  {
    super(Messages.SelectRepositoryPage_Select_a_repository);
    
    setTitle(Messages.SelectRepositoryPage_Select_a_repository);
    setDescription(Messages.SelectRepositoryPage_Add_new_repositories_using_the_X_view);
    
    this.taskRepositoryFilter = taskRepositoryFilter;
    repositories = getTaskRepositories();
  }
  
  public List<TaskRepository> getTaskRepositories()
  {
    List<TaskRepository> repositories = new ArrayList();
    TaskRepositoryManager repositoryManager = TasksUiPlugin.getRepositoryManager();
    Iterator localIterator2;
    for (Iterator localIterator1 = repositoryManager.getRepositoryConnectors().iterator(); localIterator1.hasNext(); localIterator2.hasNext())
    {
      AbstractRepositoryConnector connector = (AbstractRepositoryConnector)localIterator1.next();
      Set<TaskRepository> connectorRepositories = repositoryManager.getRepositories(connector.getConnectorKind());
      localIterator2 = connectorRepositories.iterator(); continue;TaskRepository repository = (TaskRepository)localIterator2.next();
      if (taskRepositoryFilter.accept(repository, connector)) {
        repositories.add(repository);
      }
    }
    return repositories;
  }
  
  public void createControl(Composite parent)
  {
    Composite container = new Composite(parent, 0);
    GridLayout layout = new GridLayout(1, true);
    container.setLayout(layout);
    
    Tree tree = createTableViewer(container);
    viewer.setSorter(new TaskRepositoriesViewSorter());
    
    GridData gridData = new GridData(1808);
    tree.setLayoutData(gridData);
    
    Composite buttonContainer = new Composite(container, 0);
    GridLayout buttonLayout = new GridLayout(2, false);
    buttonContainer.setLayout(buttonLayout);
    
    final AddRepositoryAction action = new AddRepositoryAction();
    action.setPromptToAddQuery(false);
    
    Button button = new Button(buttonContainer, 0);
    button.setLayoutData(new GridData(34));
    button.setImage(CommonImages.getImage(TasksUiImages.REPOSITORY_NEW));
    button.setText(AddRepositoryAction.TITLE);
    button.setEnabled(action.isEnabled());
    button.addSelectionListener(new SelectionAdapter()
    {
      public void widgetSelected(SelectionEvent e)
      {
        TaskRepository taskRepository = action.showWizard();
        if (taskRepository != null)
        {
          repositories = getTaskRepositories();
          viewer.setInput(TasksUi.getRepositoryManager().getRepositoryConnectors());
          viewer.setSelection(new StructuredSelection(taskRepository));
        }
      }
    });
    final Command discoveryWizardCommand = TasksUiInternal.getConfiguredDiscoveryWizardCommand();
    if ((discoveryWizardCommand != null) && (discoveryWizardCommand.isEnabled()))
    {
      Button discoveryButton = new Button(buttonContainer, 8);
      GridDataFactory.swtDefaults().align(1, 16777216).applyTo(discoveryButton);
      discoveryButton.setText(Messages.SelectRepositoryConnectorPage_activateDiscovery);
      discoveryButton.setImage(CommonImages.getImage(CommonImages.DISCOVERY));
      discoveryButton.addSelectionListener(new SelectionAdapter()
      {
        public void widgetSelected(SelectionEvent event)
        {
          IHandlerService handlerService = (IHandlerService)PlatformUI.getWorkbench().getService(
            IHandlerService.class);
          try
          {
            handlerService.executeCommand(discoveryWizardCommand.getId(), null);
          }
          catch (Exception e)
          {
            IStatus status = new Status(4, "org.eclipse.mylyn.tasks.ui", NLS.bind(
              Messages.SelectRepositoryConnectorPage_discoveryProblemMessage, 
              new Object[] { e.getMessage() }), e);
            TasksUiInternal.logAndDisplayStatus(
              Messages.SelectRepositoryConnectorPage_discoveryProblemTitle, status);
          }
        }
      });
    }
    Dialog.applyDialogFont(container);
    setControl(container);
  }
  
  protected Tree createTableViewer(Composite container)
  {
    viewer = new TreeViewer(container, 2820);
    
    viewer.setContentProvider(new RepositoryContentProvider());
    
    viewer.setLabelProvider(new DecoratingLabelProvider(new TaskRepositoryLabelProvider(), 
      PlatformUI.getWorkbench().getDecoratorManager().getLabelDecorator()));
    viewer.setInput(TasksUi.getRepositoryManager().getRepositoryConnectors());
    
    viewer.addSelectionChangedListener(new ISelectionChangedListener()
    {
      public void selectionChanged(SelectionChangedEvent event)
      {
        IStructuredSelection selection = (IStructuredSelection)event.getSelection();
        if ((selection.getFirstElement() instanceof TaskRepository))
        {
          setSelectedNode(new SelectRepositoryPage.CustomWizardNode(SelectRepositoryPage.this, (TaskRepository)selection.getFirstElement()));
          setPageComplete(true);
        }
        else
        {
          setSelectedNode(null);
          setPageComplete(false);
        }
      }
    });
    TaskRepository selectedRepository = TasksUiUtil.getSelectedRepository(null);
    if (selectedRepository != null)
    {
      Category category = ((TaskRepositoryManager)TasksUi.getRepositoryManager()).getCategory(selectedRepository);
      Object[] path = { category, selectedRepository };
      viewer.setSelection(new TreeSelection(new TreePath(path)));
    }
    else
    {
      TaskRepository localRepository = TasksUi.getRepositoryManager().getRepository(
        "local", "local");
      viewer.setSelection(new StructuredSelection(localRepository));
    }
    IThemeManager themeManager = PlatformUI.getWorkbench().getThemeManager();
    
    new GradientDrawer(themeManager, getViewer());
    {
      protected boolean shouldApplyGradient(Event event)
      {
        return item.getData() instanceof Category;
      }
    };
    viewer.addOpenListener(new IOpenListener()
    {
      public void open(OpenEvent event)
      {
        if (canFlipToNextPage()) {
          getContainer().showPage(getNextPage());
        } else if ((canFinish()) && 
          (getWizard().performFinish())) {
          ((WizardDialog)getContainer()).close();
        }
      }
    });
    viewer.expandAll();
    viewer.getTree().showSelection();
    viewer.getTree().setFocus();
    return viewer.getTree();
  }
  
  protected abstract IWizard createWizard(TaskRepository paramTaskRepository);
  
  public boolean canFlipToNextPage()
  {
    return (getSelectedNode() != null) && (getNextPage() != null);
  }
  
  public boolean canFinish()
  {
    return (getSelectedNode() != null) && (getNextPage() == null);
  }
  
  public boolean performFinish()
  {
    if ((getSelectedNode() == null) || (getNextPage() != null)) {
      return false;
    }
    return getSelectedNode().getWizard().performFinish();
  }
  
  private class CustomWizardNode
    implements IWizardNode
  {
    private final TaskRepository repository;
    private IWizard wizard;
    
    public CustomWizardNode(TaskRepository repository)
    {
      this.repository = repository;
    }
    
    public void dispose()
    {
      if (wizard != null) {
        wizard.dispose();
      }
    }
    
    public Point getExtent()
    {
      return new Point(-1, -1);
    }
    
    public IWizard getWizard()
    {
      if (wizard == null)
      {
        wizard = createWizard(repository);
        if (wizard != null) {
          wizard.setContainer(getContainer());
        }
      }
      return wizard;
    }
    
    public boolean isContentCreated()
    {
      return wizard != null;
    }
    
    public boolean equals(Object obj)
    {
      if (!(obj instanceof CustomWizardNode)) {
        return false;
      }
      CustomWizardNode that = (CustomWizardNode)obj;
      if (this == that) {
        return true;
      }
      return (repository.getConnectorKind().equals(repository.getConnectorKind())) && (repository.getRepositoryUrl().equals(repository.getRepositoryUrl()));
    }
    
    public int hashCode()
    {
      return 31 * repository.getRepositoryUrl().hashCode() + repository.getConnectorKind().hashCode();
    }
  }
  
  public TreeViewer getViewer()
  {
    return viewer;
  }
  
  public List<TaskRepository> getRepositories()
  {
    return repositories;
  }
}

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

import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.events.SelectionListener;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.Text;

class TaskDataImportWizardPage$1
  implements SelectionListener
{
  TaskDataImportWizardPage$1(TaskDataImportWizardPage paramTaskDataImportWizardPage) {}
  
  public void widgetSelected(SelectionEvent e)
  {
    TaskDataImportWizardPage.access$0(this$0).setEnabled(TaskDataImportWizardPage.access$1(this$0).getSelection());
    TaskDataImportWizardPage.access$2(this$0).setEnabled(TaskDataImportWizardPage.access$3(this$0).getSelection());
    TaskDataImportWizardPage.access$4(this$0).setEnabled(TaskDataImportWizardPage.access$1(this$0).getSelection());
    this$0.controlChanged();
  }
  
  public void widgetDefaultSelected(SelectionEvent e) {}
}

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

import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.IWizardNode;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.swt.graphics.Point;

class SelectRepositoryPage$CustomWizardNode
  implements IWizardNode
{
  private final TaskRepository repository;
  private IWizard wizard;
  
  public SelectRepositoryPage$CustomWizardNode(SelectRepositoryPage paramSelectRepositoryPage, TaskRepository repository)
  {
    this.repository = repository;
  }
  
  public void dispose()
  {
    if (wizard != null) {
      wizard.dispose();
    }
  }
  
  public Point getExtent()
  {
    return new Point(-1, -1);
  }
  
  public IWizard getWizard()
  {
    if (wizard == null)
    {
      wizard = this$0.createWizard(repository);
      if (wizard != null) {
        wizard.setContainer(SelectRepositoryPage.access$1(this$0));
      }
    }
    return wizard;
  }
  
  public boolean isContentCreated()
  {
    return wizard != null;
  }
  
  public boolean equals(Object obj)
  {
    if (!(obj instanceof CustomWizardNode)) {
      return false;
    }
    CustomWizardNode that = (CustomWizardNode)obj;
    if (this == that) {
      return true;
    }
    return (repository.getConnectorKind().equals(repository.getConnectorKind())) && (repository.getRepositoryUrl().equals(repository.getRepositoryUrl()));
  }
  
  public int hashCode()
  {
    return 31 * repository.getRepositoryUrl().hashCode() + repository.getConnectorKind().hashCode();
  }
}

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

import java.util.ArrayList;
import java.util.List;
import org.eclipse.core.commands.Command;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.layout.GridDataFactory;
import org.eclipse.jface.layout.GridLayoutFactory;
import org.eclipse.jface.viewers.IOpenListener;
import org.eclipse.jface.viewers.ISelectionChangedListener;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.viewers.OpenEvent;
import org.eclipse.jface.viewers.SelectionChangedEvent;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.wizard.IWizardContainer;
import org.eclipse.jface.wizard.WizardPage;
import org.eclipse.mylyn.commons.ui.CommonImages;
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
import org.eclipse.mylyn.internal.tasks.ui.views.TaskRepositoriesSorter;
import org.eclipse.mylyn.internal.tasks.ui.views.TaskRepositoryLabelProvider;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylyn.tasks.core.IRepositoryManager;
import org.eclipse.mylyn.tasks.ui.TasksUi;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Button;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.handlers.IHandlerService;

public class SelectRepositoryConnectorPage
  extends WizardPage
{
  private TableViewer viewer;
  private AbstractRepositoryConnector connector;
  
  static class RepositoryContentProvider
    implements IStructuredContentProvider
  {
    public void inputChanged(Viewer v, Object oldInput, Object newInput) {}
    
    public void dispose() {}
    
    public Object[] getElements(Object parent)
    {
      List<AbstractRepositoryConnector> userManagedRepositories = new ArrayList();
      for (AbstractRepositoryConnector connector : TasksUi.getRepositoryManager().getRepositoryConnectors()) {
        if ((connector.isUserManaged()) && (connector.canCreateRepository())) {
          userManagedRepositories.add(connector);
        }
      }
      return userManagedRepositories.toArray();
    }
  }
  
  public SelectRepositoryConnectorPage()
  {
    super(Messages.SelectRepositoryConnectorPage_Select_a_task_repository_type);
    setTitle(Messages.SelectRepositoryConnectorPage_Select_a_task_repository_type);
    setDescription(Messages.SelectRepositoryConnectorPage_You_can_connect_to_an_existing_account_using_one_of_the_installed_connectors);
  }
  
  public boolean canFlipToNextPage()
  {
    return connector != null;
  }
  
  public void createControl(Composite parent)
  {
    Composite container = new Composite(parent, 0);
    GridLayoutFactory.fillDefaults().numColumns(1).spacing(0, 3).applyTo(container);
    
    viewer = new TableViewer(container, 2820);
    viewer.setContentProvider(new RepositoryContentProvider());
    viewer.setSorter(new TaskRepositoriesSorter());
    viewer.setLabelProvider(new TaskRepositoryLabelProvider());
    viewer.setInput(TasksUi.getRepositoryManager().getRepositoryConnectors());
    viewer.addSelectionChangedListener(new ISelectionChangedListener()
    {
      public void selectionChanged(SelectionChangedEvent event)
      {
        IStructuredSelection selection = (IStructuredSelection)event.getSelection();
        if ((selection.getFirstElement() instanceof AbstractRepositoryConnector))
        {
          connector = ((AbstractRepositoryConnector)selection.getFirstElement());
          setPageComplete(true);
        }
      }
    });
    viewer.addOpenListener(new IOpenListener()
    {
      public void open(OpenEvent event)
      {
        getContainer().showPage(getNextPage());
      }
    });
    GridDataFactory.fillDefaults().grab(true, true).applyTo(viewer.getControl());
    
    final Command discoveryWizardCommand = TasksUiInternal.getConfiguredDiscoveryWizardCommand();
    if ((discoveryWizardCommand != null) && (discoveryWizardCommand.isEnabled()))
    {
      Button discoveryButton = new Button(container, 8);
      GridDataFactory.swtDefaults().align(1, 16777216).applyTo(discoveryButton);
      discoveryButton.setText(Messages.SelectRepositoryConnectorPage_activateDiscovery);
      discoveryButton.setImage(CommonImages.getImage(CommonImages.DISCOVERY));
      discoveryButton.addSelectionListener(new SelectionAdapter()
      {
        public void widgetSelected(SelectionEvent event)
        {
          IHandlerService handlerService = (IHandlerService)PlatformUI.getWorkbench().getService(
            IHandlerService.class);
          try
          {
            handlerService.executeCommand(discoveryWizardCommand.getId(), null);
          }
          catch (Exception e)
          {
            IStatus status = new Status(4, "org.eclipse.mylyn.tasks.ui", NLS.bind(
              Messages.SelectRepositoryConnectorPage_discoveryProblemMessage, 
              new Object[] { e.getMessage() }), e);
            TasksUiInternal.logAndDisplayStatus(
              Messages.SelectRepositoryConnectorPage_discoveryProblemTitle, status);
          }
        }
      });
    }
    Dialog.applyDialogFont(container);
    setControl(container);
  }
  
  public AbstractRepositoryConnector getConnector()
  {
    return connector;
  }
}

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

import java.util.ArrayList;
import java.util.List;
import org.eclipse.jface.viewers.IStructuredContentProvider;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylyn.tasks.core.IRepositoryManager;
import org.eclipse.mylyn.tasks.ui.TasksUi;

class SelectRepositoryConnectorPage$RepositoryContentProvider
  implements IStructuredContentProvider
{
  public void inputChanged(Viewer v, Object oldInput, Object newInput) {}
  
  public void dispose() {}
  
  public Object[] getElements(Object parent)
  {
    List<AbstractRepositoryConnector> userManagedRepositories = new ArrayList();
    for (AbstractRepositoryConnector connector : TasksUi.getRepositoryManager().getRepositoryConnectors()) {
      if ((connector.isUserManaged()) && (connector.canCreateRepository())) {
        userManagedRepositories.add(connector);
      }
    }
    return userManagedRepositories.toArray();
  }
}

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

import org.eclipse.core.runtime.CoreException;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;

class TaskDataImportWizard$FileCopyJob$1
  implements Runnable
{
  TaskDataImportWizard$FileCopyJob$1(TaskDataImportWizard.FileCopyJob paramFileCopyJob) {}
  
  public void run()
  {
    try
    {
      TasksUiPlugin.getDefault().reloadDataDirectory();
    }
    catch (CoreException e)
    {
      TasksUiInternal.displayStatus(Messages.TaskDataImportWizard_Import_Error, e.getStatus());
    }
  }
}

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

import org.eclipse.jface.wizard.IWizard;
import org.eclipse.mylyn.internal.tasks.core.ITaskRepositoryFilter;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.tasks.core.ITaskMapping;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;

public class NewTaskPage
  extends SelectRepositoryPage
{
  private final ITaskMapping taskSelection;
  
  public NewTaskPage(ITaskRepositoryFilter taskRepositoryFilter, ITaskMapping taskSelection)
  {
    super(taskRepositoryFilter);
    this.taskSelection = taskSelection;
  }
  
  protected IWizard createWizard(TaskRepository taskRepository)
  {
    AbstractRepositoryConnectorUi connectorUi = TasksUiPlugin.getConnectorUi(taskRepository.getConnectorKind());
    return connectorUi.getNewTaskWizard(taskRepository, taskSelection);
  }
}

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

import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.swt.widgets.Combo;

class AttachmentSourcePage$3
  extends SelectionAdapter
{
  AttachmentSourcePage$3(AttachmentSourcePage paramAttachmentSourcePage) {}
  
  public void widgetSelected(SelectionEvent e)
  {
    this$0.setSourceName(AttachmentSourcePage.access$6(this$0).getText());
    AttachmentSourcePage.access$4(this$0);
  }
}

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

import org.eclipse.core.runtime.jobs.IJobChangeEvent;
import org.eclipse.core.runtime.jobs.JobChangeAdapter;
import org.eclipse.jface.wizard.IWizardContainer;
import org.eclipse.mylyn.tasks.core.sync.SubmitJob;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;

class TaskAttachmentWizard$3
  extends JobChangeAdapter
{
  TaskAttachmentWizard$3(TaskAttachmentWizard paramTaskAttachmentWizard, SubmitJob paramSubmitJob) {}
  
  public void done(IJobChangeEvent event)
  {
    Display.getDefault().asyncExec(new Runnable()
    {
      public void run()
      {
        if (val$job.getStatus() != null) {
          this$0.getContainer().getShell().setVisible(true);
        }
        TaskAttachmentWizard.access$2(this$0, val$job);
        if (val$job.getStatus() == null) {
          this$0.getContainer().getShell().close();
        }
      }
    });
  }
}

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

import org.eclipse.core.commands.Command;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
import org.eclipse.osgi.util.NLS;
import org.eclipse.swt.events.SelectionAdapter;
import org.eclipse.swt.events.SelectionEvent;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.handlers.IHandlerService;

class SelectRepositoryPage$2
  extends SelectionAdapter
{
  SelectRepositoryPage$2(SelectRepositoryPage paramSelectRepositoryPage, Command paramCommand) {}
  
  public void widgetSelected(SelectionEvent event)
  {
    IHandlerService handlerService = (IHandlerService)PlatformUI.getWorkbench().getService(
      IHandlerService.class);
    try
    {
      handlerService.executeCommand(val$discoveryWizardCommand.getId(), null);
    }
    catch (Exception e)
    {
      IStatus status = new Status(4, "org.eclipse.mylyn.tasks.ui", NLS.bind(
        Messages.SelectRepositoryConnectorPage_discoveryProblemMessage, 
        new Object[] { e.getMessage() }), e);
      TasksUiInternal.logAndDisplayStatus(
        Messages.SelectRepositoryConnectorPage_discoveryProblemTitle, status);
    }
  }
}

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

import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;

class TaskDataImportWizardPage$2
  implements ModifyListener
{
  TaskDataImportWizardPage$2(TaskDataImportWizardPage paramTaskDataImportWizardPage) {}
  
  public void modifyText(ModifyEvent e)
  {
    this$0.controlChanged();
  }
}

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

import org.eclipse.jface.wizard.IWizard;
import org.eclipse.jface.wizard.WizardDialog;
import org.eclipse.mylyn.commons.workbench.WorkbenchUtil;

class NewRepositoryWizard$1
  implements Runnable
{
  NewRepositoryWizard$1(NewRepositoryWizard paramNewRepositoryWizard, IWizard paramIWizard) {}
  
  public void run()
  {
    WizardDialog queryDialog = new WizardDialog(WorkbenchUtil.getShell(), val$queryWizard);
    queryDialog.create();
    queryDialog.setBlockOnOpen(true);
    queryDialog.open();
  }
}

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

import org.eclipse.swt.events.ModifyEvent;
import org.eclipse.swt.events.ModifyListener;

class TaskDataExportWizardPage$1
  implements ModifyListener
{
  TaskDataExportWizardPage$1(TaskDataExportWizardPage paramTaskDataExportWizardPage) {}
  
  public void modifyText(ModifyEvent e)
  {
    this$0.controlChanged();
  }
}

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

import org.eclipse.jface.viewers.IStructuredSelection;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.mylyn.internal.tasks.ui.actions.NewCategoryAction;
import org.eclipse.ui.INewWizard;
import org.eclipse.ui.IWorkbench;

public class NewLocalCategoryWizard
  extends Wizard
  implements INewWizard
{
  public void init(IWorkbench workbench, IStructuredSelection selection)
  {
    setForcePreviousAndNextButtons(false);
  }
  
  public boolean canFinish()
  {
    return true;
  }
  
  public boolean performFinish()
  {
    new NewCategoryAction().run();
    return true;
  }
}

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

import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.InputStream;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.util.ArrayList;
import java.util.List;
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.JobChangeAdapter;
import org.eclipse.jface.dialogs.IDialogSettings;
import org.eclipse.jface.operation.IRunnableWithProgress;
import org.eclipse.jface.wizard.IWizardContainer;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.Wizard;
import org.eclipse.mylyn.commons.ui.CommonImages;
import org.eclipse.mylyn.commons.ui.wizard.ScreenshotCreationPage;
import org.eclipse.mylyn.internal.tasks.core.ITaskJobFactory;
import org.eclipse.mylyn.internal.tasks.core.TaskRepositoryManager;
import org.eclipse.mylyn.internal.tasks.core.sync.SubmitTaskAttachmentJob;
import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin;
import org.eclipse.mylyn.internal.tasks.ui.util.AttachmentUtil;
import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal;
import org.eclipse.mylyn.tasks.core.AbstractRepositoryConnector;
import org.eclipse.mylyn.tasks.core.ITask;
import org.eclipse.mylyn.tasks.core.TaskRepository;
import org.eclipse.mylyn.tasks.core.data.AbstractTaskAttachmentSource;
import org.eclipse.mylyn.tasks.core.data.TaskAttachmentModel;
import org.eclipse.mylyn.tasks.core.data.TaskAttribute;
import org.eclipse.mylyn.tasks.core.sync.SubmitJob;
import org.eclipse.mylyn.tasks.core.sync.SubmitJobEvent;
import org.eclipse.mylyn.tasks.core.sync.SubmitJobListener;
import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi;
import org.eclipse.mylyn.tasks.ui.TasksUiImages;
import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.swt.dnd.Clipboard;
import org.eclipse.swt.dnd.TextTransfer;
import org.eclipse.swt.dnd.Transfer;
import org.eclipse.swt.dnd.TransferData;
import org.eclipse.swt.graphics.ImageData;
import org.eclipse.swt.graphics.ImageLoader;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IWorkbench;
import org.eclipse.ui.PlatformUI;
import org.eclipse.ui.statushandlers.StatusManager;

public class TaskAttachmentWizard
  extends Wizard
{
  private static final String DIALOG_SETTINGS_KEY = "AttachmentWizard";
  private final AbstractRepositoryConnector connector;
  private IWizardPage editPage;
  
  static class ClipboardTaskAttachmentSource
    extends AbstractTaskAttachmentSource
  {
    private byte[] data;
    private static List<Transfer> transfers;
    private Object contents;
    
    public static boolean isSupportedType(Display display)
    {
      Clipboard clipboard = new Clipboard(display);
      TransferData[] types = clipboard.getAvailableTypes();
      TransferData[] arrayOfTransferData1;
      int j = (arrayOfTransferData1 = types).length;
      for (int i = 0; i < j; i++)
      {
        TransferData transferData = arrayOfTransferData1[i];
        List<Transfer> transfers = getTransfers();
        for (Transfer transfer : transfers) {
          if (transfer.isSupportedType(transferData)) {
            return true;
          }
        }
      }
      return false;
    }
    
    private static List<Transfer> getTransfers()
    {
      if (transfers != null) {
        return transfers;
      }
      transfers = new ArrayList();
      try
      {
        Class<?> clazz = Class.forName("org.eclipse.swt.dnd.ImageTransfer");
        Method method = clazz.getMethod("getInstance", new Class[0]);
        if (method != null) {
          transfers.add((Transfer)method.invoke(null, new Object[0]));
        }
      }
      catch (Exception localException) {}catch (LinkageError localLinkageError) {}
      transfers.add(TextTransfer.getInstance());
      return transfers;
    }
    
    public ClipboardTaskAttachmentSource()
    {
      BusyIndicator.showWhile(PlatformUI.getWorkbench().getDisplay(), new Runnable()
      {
        public void run()
        {
          Clipboard clipboard = new Clipboard(PlatformUI.getWorkbench().getDisplay());
          List<Transfer> transfers = TaskAttachmentWizard.ClipboardTaskAttachmentSource.access$0();
          for (Transfer transfer : transfers)
          {
            contents = clipboard.getContents(transfer);
            if (contents != null) {
              break;
            }
          }
          clipboard.dispose();
        }
      });
    }
    
    public InputStream createInputStream(IProgressMonitor monitor)
      throws CoreException
    {
      byte[] bytes = getData();
      if (bytes != null) {
        return new ByteArrayInputStream(data);
      }
      throw new CoreException(new Status(4, "org.eclipse.mylyn.tasks.ui", "Invalid content type."));
    }
    
    public String getContentType()
    {
      if ((contents instanceof String)) {
        return "text/plain";
      }
      if ((contents instanceof ImageData)) {
        return "image/png";
      }
      return "application/octet-stream";
    }
    
    public String getDescription()
    {
      return null;
    }
    
    public long getLength()
    {
      byte[] bytes = getData();
      return bytes != null ? bytes.length : -1;
    }
    
    private byte[] getData()
    {
      if (data == null) {
        if ((contents instanceof String))
        {
          data = ((String)contents).getBytes();
        }
        else if ((contents instanceof ImageData))
        {
          ImageLoader loader = new ImageLoader();
          data = new ImageData[] { (ImageData)contents };
          ByteArrayOutputStream out = new ByteArrayOutputStream();
          loader.save(out, 5);
          data = out.toByteArray();
        }
      }
      return data;
    }
    
    public String getName()
    {
      if ((contents instanceof String)) {
        return "clipboard.txt";
      }
      if ((contents instanceof ImageData)) {
        return "clipboard.png";
      }
      return "";
    }
    
    public boolean isLocal()
    {
      return true;
    }
  }
  
  static class ImageSource
    extends AbstractTaskAttachmentSource
  {
    private File file;
    private final ScreenshotCreationPage page;
    
    public ImageSource(ScreenshotCreationPage page)
    {
      this.page = page;
    }
    
    /* Error */
    public InputStream createInputStream(IProgressMonitor monitor)
      throws CoreException
    {
      // Byte code:
      //   0: aload_0
      //   1: getfield 113	org/eclipse/mylyn/internal/tasks/ui/wizards/TaskAttachmentWizard$ImageSource:file	Ljava/io/File;
      //   4: ifnull +13 -> 17
      //   7: aload_0
      //   8: getfield 114	org/eclipse/
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