![]() |
![]() |
org.eclipse.mylyn.tasks.ui_3.7.1.v20120425-0100rlinkEvent e) { SearchUtil.openSearchDialog(PlatformUI.getWorkbench().getActiveWorkbenchWindow()); } }); GridDataFactory.fillDefaults().align(16777216, 1).applyTo(advancedSearchButton); } } /* Location: * Qualified Name: org.eclipse.mylyn.internal.tasks.ui.views.TaskListSearchHistoryPopupDialog * Java Class Version: 5 (49.0) * JD-Core Version: 0.7.1 */ package org.eclipse.mylyn.internal.tasks.ui.views; import org.eclipse.mylyn.internal.tasks.core.DateRange; import org.eclipse.mylyn.tasks.core.ITask; public class TaskScheduleContentProvider$Completed extends TaskScheduleContentProvider.StateTaskContainer { public TaskScheduleContentProvider$Completed(TaskScheduleContentProvider paramTaskScheduleContentProvider) { super(paramTaskScheduleContentProvider, new DateRange(TaskScheduleContentProvider.access$5(paramTaskScheduleContentProvider)), Messages.TaskScheduleContentProvider_Completed); } public boolean select(ITask task) { return (task.isCompleted()) && (TaskScheduleContentProvider.access$1(task)); } } /* Location: * Qualified Name: org.eclipse.mylyn.internal.tasks.ui.views.TaskScheduleContentProvider.Completed * Java Class Version: 5 (49.0) * JD-Core Version: 0.7.1 */ package org.eclipse.mylyn.internal.tasks.ui.views; import org.eclipse.jface.viewers.IOpenListener; import org.eclipse.jface.viewers.OpenEvent; import org.eclipse.mylyn.internal.tasks.ui.actions.OpenTaskListElementAction; import org.eclipse.mylyn.internal.tasks.ui.actions.TaskListViewActionGroup; class TaskListView$22 implements IOpenListener { TaskListView$22(TaskListView paramTaskListView) {} public void open(OpenEvent event) { TaskListView.access$17(this$0).getOpenAction().run(); } } /* Location: * Qualified Name: org.eclipse.mylyn.internal.tasks.ui.views.TaskListView.22 * Java Class Version: 5 (49.0) * JD-Core Version: 0.7.1 */ package org.eclipse.mylyn.internal.tasks.ui.views; import org.eclipse.jface.action.Action; import org.eclipse.jface.preference.IPreferenceStore; import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin; import org.eclipse.mylyn.tasks.core.ITask.PriorityLevel; class PriorityDropDownAction$5 extends Action { PriorityDropDownAction$5(PriorityDropDownAction paramPriorityDropDownAction, String $anonymous0, int $anonymous1) { super($anonymous0, $anonymous1); } public void run() { TasksUiPlugin.getDefault().getPreferenceStore().setValue("org.eclipse.mylyn.tasks.ui.filters.priority", ITask.PriorityLevel.P5.toString()); PriorityDropDownAction.access$0(this$0).displayPrioritiesAbove(TaskListView.PRIORITY_LEVELS[4]); } } /* Location: * Qualified Name: org.eclipse.mylyn.internal.tasks.ui.views.PriorityDropDownAction.5 * Java Class Version: 5 (49.0) * JD-Core Version: 0.7.1 */ package org.eclipse.mylyn.internal.tasks.ui.views; import org.eclipse.mylyn.commons.workbench.DelayedRefreshJob; import org.eclipse.mylyn.tasks.core.ITask; import org.eclipse.mylyn.tasks.core.TaskActivationAdapter; import org.eclipse.swt.widgets.Display; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.PlatformUI; class TaskListView$3 extends TaskActivationAdapter { TaskListView$3(TaskListView paramTaskListView) {} public void taskActivated(final ITask task) { if (task != null) { PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { public void run() { TaskListView.access$2(this$0); TaskListView.3.this.refresh(task); this$0.selectedAndFocusTask(task); TaskListView.access$0(this$0).indicateActiveTask(task); } }); } } public void taskDeactivated(final ITask task) { PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { public void run() { TaskListView.3.this.refresh(task); TaskListView.access$2(this$0); TaskListView.access$0(this$0).indicateNoActiveTask(); } }); } private void refresh(ITask task) { if (this$0.isScheduledPresentation()) { TaskListView.access$1(this$0).refresh(); } else { TaskListView.access$1(this$0).refreshElement(task); } } } /* Location: * Qualified Name: org.eclipse.mylyn.internal.tasks.ui.views.TaskListView.3 * Java Class Version: 5 (49.0) * JD-Core Version: 0.7.1 */ package org.eclipse.mylyn.internal.tasks.ui.views; import org.eclipse.jface.util.IPropertyChangeListener; import org.eclipse.jface.util.PropertyChangeEvent; class CustomTaskListDecorationDrawer$1 implements IPropertyChangeListener { CustomTaskListDecorationDrawer$1(CustomTaskListDecorationDrawer paramCustomTaskListDecorationDrawer) {} public void propertyChange(PropertyChangeEvent event) { if (event.getProperty().equals("org.eclipse.mylyn.tasks.ui.strikethrough.for.completed")) { if ((event.getNewValue() instanceof Boolean)) { CustomTaskListDecorationDrawer.access$0(this$0, ((Boolean)event.getNewValue()).booleanValue()); } } else if ((event.getProperty().equals("org.eclipse.mylyn.tasks.ui.overlays.incoming.tight")) && ((event.getNewValue() instanceof Boolean))) { CustomTaskListDecorationDrawer.access$1(this$0, ((Boolean)event.getNewValue()).booleanValue()); } } } /* Location: * Qualified Name: org.eclipse.mylyn.internal.tasks.ui.views.CustomTaskListDecorationDrawer.1 * Java Class Version: 5 (49.0) * JD-Core Version: 0.7.1 */ package org.eclipse.mylyn.internal.tasks.ui.views; import java.util.HashMap; import java.util.Map; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.ui.IPluginContribution; public abstract class AbstractTaskListPresentation implements IPluginContribution { private String pluginId; private final String id; private String name; private ImageDescriptor imageDescriptor; private boolean primary = false; private final Map<TaskListView, AbstractTaskListContentProvider> contentProviders = new HashMap(); public AbstractTaskListPresentation(String id) { this.id = id; } public AbstractTaskListContentProvider getContentProvider(TaskListView taskListView) { AbstractTaskListContentProvider contentProvider = (AbstractTaskListContentProvider)contentProviders.get(taskListView); if (contentProvider == null) { contentProvider = createContentProvider(taskListView); contentProviders.put(taskListView, contentProvider); } return contentProvider; } protected abstract AbstractTaskListContentProvider createContentProvider(TaskListView paramTaskListView); public ImageDescriptor getImageDescriptor() { return imageDescriptor; } public String getName() { return name; } public void setName(String name) { this.name = name; } public void setImageDescriptor(ImageDescriptor imageDescriptor) { this.imageDescriptor = imageDescriptor; } public boolean isPrimary() { return primary; } public void setPrimary(boolean primary) { this.primary = primary; } public String getId() { return id; } public final String getLocalId() { return getId(); } public final String getPluginId() { return pluginId; } public final void setPluginId(String pluginId) { this.pluginId = pluginId; } } /* Location: * Qualified Name: org.eclipse.mylyn.internal.tasks.ui.views.AbstractTaskListPresentation * Java Class Version: 5 (49.0) * JD-Core Version: 0.7.1 */ package org.eclipse.mylyn.internal.tasks.ui.views; import org.eclipse.jface.util.IPropertyChangeListener; import org.eclipse.jface.util.PropertyChangeEvent; class TaskListFilteredTree$5 implements IPropertyChangeListener { TaskListFilteredTree$5(TaskListFilteredTree paramTaskListFilteredTree) {} public void propertyChange(PropertyChangeEvent event) { String property = event.getProperty(); if (("workingSetContentChange".equals(property)) || ("workingSetRemove".equals(property))) { TaskListFilteredTree.access$7(this$0); } } } /* Location: * Qualified Name: org.eclipse.mylyn.internal.tasks.ui.views.TaskListFilteredTree.5 * Java Class Version: 5 (49.0) * JD-Core Version: 0.7.1 */ package org.eclipse.mylyn.internal.tasks.ui; import org.eclipse.jface.viewers.TableViewer; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; class TasksReminderDialog$2 extends SelectionAdapter { TasksReminderDialog$2(TasksReminderDialog paramTasksReminderDialog) {} public void widgetSelected(SelectionEvent e) { TasksReminderDialog.access$1(this$0).setSorter(new TasksReminderDialog.ReminderTaskSorter(2)); } } /* Location: * Qualified Name: org.eclipse.mylyn.internal.tasks.ui.TasksReminderDialog.2 * Java Class Version: 5 (49.0) * JD-Core Version: 0.7.1 */ package org.eclipse.mylyn.internal.tasks.ui; import org.eclipse.core.runtime.IAdapterFactory; import org.eclipse.mylyn.internal.tasks.core.TaskAttachment; import org.eclipse.ui.IActionFilter; public class TaskAttachmentAdapterFactory implements IAdapterFactory { private static final Class[] ADAPTER_TYPES = { IActionFilter.class }; public Class[] getAdapterList() { return ADAPTER_TYPES; } public Object getAdapter(Object adaptableObject, Class adapterType) { if ((adaptableObject instanceof TaskAttachment)) { new IActionFilter() { public boolean testAttribute(Object target, String name, String value) { TaskAttachment taskAttachment = (TaskAttachment)target; if ("connectorKind".equals(name)) { return value.equals(taskAttachment.getConnectorKind()); } if ("contentType".equals(name)) { return value.equals(taskAttachment.getContentType()); } if ("isDeprecated".equals(name)) { return Boolean.valueOf(value).booleanValue() == taskAttachment.isDeprecated(); } if ("isPatch".equals(name)) { return Boolean.valueOf(value).booleanValue() == taskAttachment.isPatch(); } return false; } }; } return null; } } /* Location: * Qualified Name: org.eclipse.mylyn.internal.tasks.ui.TaskAttachmentAdapterFactory * Java Class Version: 5 (49.0) * JD-Core Version: 0.7.1 */ package org.eclipse.mylyn.internal.tasks.ui; import java.util.Iterator; import java.util.List; import java.util.Set; import java.util.WeakHashMap; import org.eclipse.mylyn.commons.notifications.ui.AbstractUiNotification; import org.eclipse.mylyn.internal.tasks.ui.notifications.TaskListNotificationPopup; class TaskListNotificationManager$1$1 implements Runnable { TaskListNotificationManager$1$1(TaskListNotificationManager.1 param1) {} public void run() { TaskListNotificationManager.1.access$0(this$1).collectNotifications(); if ((TaskListNotificationManager.access$0(TaskListNotificationManager.1.access$0(this$1)) != null) && (TaskListNotificationManager.access$0(TaskListNotificationManager.1.access$0(this$1)).getReturnCode() == 1)) { List<AbstractUiNotification> notifications = TaskListNotificationManager.access$0(TaskListNotificationManager.1.access$0(this$1)).getNotifications(); for (AbstractUiNotification notification : notifications) { if (notification.getToken() != null) { TaskListNotificationManager.access$1(TaskListNotificationManager.1.access$0(this$1)).put(notification.getToken(), null); } } } for (Iterator<AbstractUiNotification> it = TaskListNotificationManager.access$2(TaskListNotificationManager.1.access$0(this$1)).iterator(); it.hasNext();) { AbstractUiNotification notification = (AbstractUiNotification)it.next(); if ((notification.getToken() != null) && (TaskListNotificationManager.access$1(TaskListNotificationManager.1.access$0(this$1)).containsKey(notification.getToken()))) { it.remove(); } } synchronized (TaskListNotificationManager.class) { if (TaskListNotificationManager.access$2(TaskListNotificationManager.1.access$0(this$1)).size() > 0) { TaskListNotificationManager.1.access$0(this$1).showPopup(); } } } } /* Location: * Qualified Name: org.eclipse.mylyn.internal.tasks.ui.TaskListNotificationManager.1.1 * Java Class Version: 5 (49.0) * JD-Core Version: 0.7.1 */ package org.eclipse.mylyn.internal.tasks.ui; import java.util.ArrayList; import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Set; import org.eclipse.core.runtime.IAdaptable; import org.eclipse.jface.action.Action; import org.eclipse.jface.action.ActionContributionItem; import org.eclipse.jface.action.IAction; import org.eclipse.jface.action.IContributionItem; import org.eclipse.jface.action.Separator; import org.eclipse.jface.resource.ImageDescriptor; import org.eclipse.mylyn.commons.ui.CommonUiUtil; import org.eclipse.mylyn.internal.tasks.core.AbstractTask; import org.eclipse.mylyn.internal.tasks.core.TaskActivationHistory; import org.eclipse.mylyn.internal.tasks.core.TaskActivityManager; import org.eclipse.mylyn.internal.tasks.ui.actions.ActivateTaskDialogAction; import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal; import org.eclipse.mylyn.internal.tasks.ui.workingsets.TaskWorkingSetUpdater; import org.eclipse.mylyn.tasks.core.ITask; import org.eclipse.mylyn.tasks.core.ITaskActivityManager; import org.eclipse.mylyn.tasks.core.ITaskContainer; import org.eclipse.mylyn.tasks.ui.TaskElementLabelProvider; import org.eclipse.mylyn.tasks.ui.TasksUi; import org.eclipse.mylyn.tasks.ui.TasksUiUtil; import org.eclipse.swt.graphics.Image; import org.eclipse.swt.widgets.Event; import org.eclipse.ui.IWorkbench; import org.eclipse.ui.IWorkingSet; import org.eclipse.ui.PlatformUI; import org.eclipse.ui.actions.CompoundContributionItem; public class TaskHistoryDropDown extends CompoundContributionItem { private static final int MAX_ITEMS_TO_DISPLAY = 16; private class ActivateDialogAction extends Action { private final ActivateTaskDialogAction dialogAction; public ActivateDialogAction(ActivateTaskDialogAction action) { dialogAction = action; dialogAction.init(PlatformUI.getWorkbench().getActiveWorkbenchWindow()); setText(Messages.TaskHistoryDropDown_Activate_Task_); setToolTipText(Messages.TaskHistoryDropDown_Activate_Task_); setEnabled(true); setChecked(false); setImageDescriptor(null); } public void run() { dialogAction.run(null); } } private class DeactivateTaskAction extends Action { public DeactivateTaskAction() { setText(Messages.TaskHistoryDropDown_Deactivate_Task); setToolTipText(Messages.TaskHistoryDropDown_Deactivate_Task); setEnabled(true); setChecked(false); setImageDescriptor(null); } public void run() { ITask active = TasksUi.getTaskActivityManager().getActiveTask(); if (active != null) { TasksUi.getTaskActivityManager().deactivateTask(active); } } } private class ActivateTaskAction extends Action { private static final int MAX_LABEL_LENGTH = 40; private final AbstractTask targetTask; public ActivateTaskAction(AbstractTask task) { targetTask = task; String taskDescription = task.getSummary(); if (taskDescription.length() > 40) { taskDescription = taskDescription.subSequence(0, 37) + "..."; } taskDescription = CommonUiUtil.toMenuLabel(taskDescription); setText(taskDescription); setEnabled(true); setToolTipText(task.getSummary()); Image image = labelProvider.getImage(task); setImageDescriptor(ImageDescriptor.createFromImage(image)); } public void run() { if (targetTask.isActive()) { return; } TasksUiInternal.activateTaskThroughCommand(targetTask); } public void runWithEvent(Event event) { run(); if ((stateMask & 0x20000) != 0) { TasksUiUtil.openTask(targetTask); } } } private final TaskElementLabelProvider labelProvider = new TaskElementLabelProvider(false); private boolean scopedToWorkingSet; private final TaskActivationHistory taskHistory; public TaskHistoryDropDown() { this(null); } public TaskHistoryDropDown(String id) { this(id, TasksUiPlugin.getTaskActivityManager().getTaskActivationHistory()); } public TaskHistoryDropDown(String id, TaskActivationHistory taskHistory) { super(id); this.taskHistory = taskHistory; } protected IContributionItem[] getContributionItems() { List<AbstractTask> tasks = new ArrayList(taskHistory.getPreviousTasks()); Set<IWorkingSet> sets = TaskWorkingSetUpdater.getActiveWorkingSets(PlatformUI.getWorkbench() .getActiveWorkbenchWindow()); if ((scopedToWorkingSet) && (!sets.isEmpty())) { Set<ITask> allWorkingSetTasks = new HashSet(); IAdaptable[] elements; int j; int i; for (Iterator localIterator = sets.iterator(); localIterator.hasNext(); i < j) { IWorkingSet workingSet = (IWorkingSet)localIterator.next(); elements = workingSet.getElements(); IAdaptable[] arrayOfIAdaptable1; j = (arrayOfIAdaptable1 = elements).length;i = 0; continue;IAdaptable adaptable = arrayOfIAdaptable1[i]; if ((adaptable instanceof ITaskContainer)) { allWorkingSetTasks.addAll(((ITaskContainer)adaptable).getChildren()); } i++; } List<AbstractTask> allScopedTasks = new ArrayList(tasks); for (ITask task : tasks) { if (!allWorkingSetTasks.contains(task)) { allScopedTasks.remove(task); } } tasks = allScopedTasks; } if (tasks.size() > 16) { tasks = tasks.subList(tasks.size() - 16, tasks.size()); } List<IContributionItem> items = new ArrayList(); for (int i = tasks.size() - 1; i >= 0; i--) { AbstractTask currTask = (AbstractTask)tasks.get(i); Action taskNavAction = new ActivateTaskAction(currTask); ActionContributionItem item = new ActionContributionItem(taskNavAction); if (currTask.isActive()) { taskNavAction.setChecked(true); } items.add(item); } if (items.size() > 0) { Separator separator = new Separator(); items.add(separator); } final ITask active = TasksUi.getTaskActivityManager().getActiveTask(); if (active != null) { Object deactivateAction = new DeactivateTaskAction(); ActionContributionItem item = new ActionContributionItem((IAction)deactivateAction); items.add(item); items.add(new ActionContributionItem(new Action(Messages.TaskHistoryDropDown_Open_Active_Task) { public void run() { TasksUiInternal.openTask(active, active.getTaskId()); } })); } else { Object activateDialogAction = new ActivateDialogAction(new ActivateTaskDialogAction()); ActionContributionItem item = new ActionContributionItem((IAction)activateDialogAction); items.add(item); } return (IContributionItem[])items.toArray(new IContributionItem[items.size()]); } public boolean isScopedToWorkingSet() { return scopedToWorkingSet; } public void setScopedToWorkingSet(boolean scopedToWorkingSet) { this.scopedToWorkingSet = scopedToWorkingSet; } } /* Location: * Qualified Name: org.eclipse.mylyn.internal.tasks.ui.TaskHistoryDropDown * Java Class Version: 5 (49.0) * JD-Core Version: 0.7.1 */ package org.eclipse.mylyn.internal.tasks.ui.editors; public class RichTextEditor$StateChangedEvent { public RichTextEditor.State state; } /* Location: * Qualified Name: org.eclipse.mylyn.internal.tasks.ui.editors.RichTextEditor.StateChangedEvent * Java Class Version: 5 (49.0) * JD-Core Version: 0.7.1 */ package org.eclipse.mylyn.internal.tasks.ui.editors; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.eclipse.mylyn.tasks.core.IRepositoryPerson; import org.eclipse.mylyn.tasks.core.ITaskComment; import org.eclipse.mylyn.tasks.core.data.TaskAttribute; public class CommentGroupStrategy { public static final int MAX_CURRENT = 12; public static final int MAX_RECENT = 20; public static class CommentGroup { public static final String CURRENT = Messages.CommentGroupStrategy_Current; public static final String OLDER = Messages.CommentGroupStrategy_Older; public static final String RECENT = Messages.CommentGroupStrategy_Recent; private final List<ITaskComment> comments; private final String groupName; private final boolean incoming; public CommentGroup(String groupName, List<ITaskComment> comments, boolean incoming) { this.groupName = groupName; this.comments = comments; this.incoming = incoming; } public List<TaskAttribute> getCommentAttributes() { List<TaskAttribute> commentAttributes = new ArrayList(comments.size()); for (ITaskComment comment : comments) { commentAttributes.add(comment.getTaskAttribute()); } return Collections.unmodifiableList(commentAttributes); } public List<ITaskComment> getComments() { return Collections.unmodifiableList(comments); } public String getGroupName() { return groupName; } public boolean hasIncoming() { return incoming; } } public List<CommentGroup> groupComments(List<ITaskComment> comments, String currentPersonId) { if (comments.size() == 0) { return Collections.emptyList(); } List<CommentGroup> commentGroups = new ArrayList(3); List<ITaskComment> current = new ArrayList(12); if (comments.size() > 12) { for (int i = comments.size() - 1; i >= 0; i--) { ITaskComment comment = (ITaskComment)comments.get(i); if (isCurrent(current, comment, currentPersonId)) { current.add(comment); } } Collections.reverse(current); } else { current = comments; } commentGroups.add(new CommentGroup(CommentGroup.CURRENT, current, hasIncomingChanges(current))); if (comments.size() > current.size()) { int recentToIndex = comments.size() - current.size(); int recentFromIndex = Math.max(recentToIndex - 20, 0); List<ITaskComment> recent = new ArrayList(comments.subList(recentFromIndex, recentToIndex)); if (recent.size() > 0) { commentGroups.add(new CommentGroup(CommentGroup.RECENT, recent, hasIncomingChanges(recent))); if (comments.size() > current.size() + recent.size()) { int olderToIndex = comments.size() - current.size() - recent.size(); List<ITaskComment> older = new ArrayList(comments.subList(0, olderToIndex)); commentGroups.add(new CommentGroup(CommentGroup.OLDER, older, hasIncomingChanges(older))); } } } Collections.reverse(commentGroups); return commentGroups; } protected boolean hasIncomingChanges(ITaskComment taskComment) { return false; } private boolean hasIncomingChanges(List<ITaskComment> comments) { for (ITaskComment comment : comments) { if (hasIncomingChanges(comment)) { return true; } } return false; } public boolean isCurrent(List<ITaskComment> current, ITaskComment comment, String currentPersonId) { if (current.size() >= 12) { return false; } if (hasIncomingChanges(comment)) { return true; } if (!current.isEmpty()) { ITaskComment lastComment = (ITaskComment)current.get(current.size() - 1); IRepositoryPerson lastPerson = lastComment.getAuthor(); if ((lastPerson != null) && (lastPerson.getPersonId().equals(currentPersonId))) { IRepositoryPerson person = comment.getAuthor(); if ((person != null) && (person.getPersonId().equals(currentPersonId)) && (lastComment.getText() != null) && (lastComment.getText().contains("mylyn/context/zip"))) { return true; } return false; } } return true; } } /* Location: * Qualified Name: org.eclipse.mylyn.internal.tasks.ui.editors.CommentGroupStrategy * Java Class Version: 5 (49.0) * JD-Core Version: 0.7.1 */ package org.eclipse.mylyn.internal.tasks.ui.editors; import java.util.ArrayList; import java.util.Collections; import java.util.List; import org.eclipse.jface.layout.GridDataFactory; import org.eclipse.jface.text.source.SourceViewer; import org.eclipse.mylyn.commons.ui.CommonImages; import org.eclipse.mylyn.internal.tasks.core.AbstractTask; import org.eclipse.mylyn.internal.tasks.core.AbstractTaskCategory; import org.eclipse.mylyn.internal.tasks.core.ITaskList; import org.eclipse.mylyn.internal.tasks.core.TaskCategory; import org.eclipse.mylyn.internal.tasks.core.TaskList; import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin; import org.eclipse.mylyn.internal.tasks.ui.util.AbstractRetrieveTitleFromUrlJob; import org.eclipse.mylyn.internal.tasks.ui.util.TaskContainerComparator; import org.eclipse.mylyn.internal.tasks.ui.util.TasksUiInternal; import org.eclipse.mylyn.tasks.core.ITask; import org.eclipse.mylyn.tasks.core.TaskRepository; import org.eclipse.mylyn.tasks.ui.TasksUiImages; import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorExtension; import org.eclipse.swt.custom.CCombo; import org.eclipse.swt.events.SelectionAdapter; import org.eclipse.swt.events.SelectionEvent; import org.eclipse.swt.layout.GridData; import org.eclipse.swt.layout.GridLayout; import org.eclipse.swt.layout.RowLayout; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Control; import org.eclipse.swt.widgets.Label; import org.eclipse.ui.contexts.IContextService; import org.eclipse.ui.forms.FormColors; import org.eclipse.ui.forms.IFormPart; import org.eclipse.ui.forms.IManagedForm; import org.eclipse.ui.forms.events.ExpansionAdapter; import org.eclipse.ui.forms.events.ExpansionEvent; import org.eclipse.ui.forms.events.HyperlinkAdapter; import org.eclipse.ui.forms.events.HyperlinkEvent; import org.eclipse.ui.forms.widgets.FormToolkit; import org.eclipse.ui.forms.widgets.ImageHyperlink; import org.eclipse.ui.forms.widgets.Section; public class AttributePart extends AbstractLocalEditorPart { private ImageHyperlink fetchUrlLink; private RichTextEditor urlEditor; private CCombo categoryChooser; protected AbstractTaskCategory category; private Label categoryLabel; private List<AbstractTaskCategory> categories; public AttributePart() { super(Messages.TaskPlanningEditor_Attributes); } public void commit(boolean onSave) { if (category != null) { TasksUiPlugin.getTaskList().addTask(getTask(), category); category = null; clearState(categoryChooser); } getTask().setUrl(urlEditor.getText()); clearState(urlEditor.getControl()); super.commit(onSave); } public Control createControl(Composite parent, FormToolkit toolkit) { int style = 258; if ((getTask().getUrl() != null) && (getTask().getUrl().length() > 0)) { style |= 0x40; } Section section = createSection(parent, toolkit, style); GridDataFactory.fillDefaults().grab(true, false).applyTo(section); section.setText(Messages.TaskPlanningEditor_Attributes); GridDataFactory.fillDefaults().grab(true, false).applyTo(section); createSectionClient(section, toolkit); setSection(toolkit, section); Composite composite = toolkit.createComposite(section); GridLayout layout = EditorUtil.createSectionClientLayout(); numColumns = 4; composite.setLayout(layout); Label label = toolkit.createLabel(composite, Messages.AttributePart_Category_); label.setForeground(toolkit.getColors().getColor("org.eclipse.ui.forms.TITLE")); createCategoryChooser(composite, toolkit); label = toolkit.createLabel(composite, Messages.TaskPlanningEditor_URL); label.setForeground(toolkit.getColors().getColor("org.eclipse.ui.forms.TITLE")); GridDataFactory.defaultsFor(label).indent(20, 0).applyTo(label); Composite urlComposite = toolkit.createComposite(composite); GridLayout urlLayout = new GridLayout(2, false); verticalSpacing = 0; marginWidth = 1; urlComposite.setLayout(urlLayout); GridDataFactory.fillDefaults() .grab(true, false) .hint(300, -1) .applyTo(urlComposite); urlEditor = new RichTextEditor(getRepository(), 8388612, null, null, getTask()) { protected void valueChanged(String value) { AttributePart.this.updateButtons(); markDirty(urlEditor.getControl()); } }; urlEditor.setMode(RepositoryTextViewerConfiguration.Mode.URL); urlEditor.createControl(urlComposite, toolkit); urlEditor.getControl().setLayoutData(new GridData(768)); urlEditor.getViewer().getControl().setMenu(parent.getMenu()); GridDataFactory.fillDefaults().grab(true, false).applyTo(urlEditor.getControl()); fetchUrlLink = toolkit.createImageHyperlink(urlComposite, 0); fetchUrlLink.setImage(CommonImages.getImage(TasksUiImages.TASK_RETRIEVE)); fetchUrlLink.setToolTipText(Messages.TaskPlanningEditor_Retrieve_task_description_from_URL); fetchUrlLink.addHyperlinkListener(new HyperlinkAdapter() { public void linkActivated(HyperlinkEvent e) { AttributePart.this.featchUrl(urlEditor.getText()); } }); toolkit.paintBordersFor(urlComposite); toolkit.paintBordersFor(composite); section.setClient(composite); return section; } private void createSectionClient(Section section, FormToolkit toolkit) { if (section.getTextClient() == null) { final Composite textClient = toolkit.createComposite(section); textClient.setBackground(null); RowLayout rowLayout = new RowLayout(); center = true; marginLeft = 20; marginTop = 1; marginBottom = 1; textClient.setLayout(rowLayout); Label label = toolkit.createLabel(textClient, Messages.AttributePart_Category_); label.setForeground(toolkit.getColors().getColor("org.eclipse.ui.forms.TITLE")); label.setBackground(null); categoryLabel = toolkit.createLabel(textClient, ""); categoryLabel.setForeground(toolkit.getColors().getColor("org.eclipse.ui.forms.TITLE")); categoryLabel.setBackground(null); toolkit.paintBordersFor(textClient); section.setTextClient(textClient); section.addExpansionListener(new ExpansionAdapter() { public void expansionStateChanging(ExpansionEvent e) { textClient.setVisible(!e.getState()); } }); textClient.setVisible(!section.isExpanded()); } } private void featchUrl(String url) { AbstractRetrieveTitleFromUrlJob job = new AbstractRetrieveTitleFromUrlJob(urlEditor.getText()) { protected void titleRetrieved(String pageTitle) { IFormPart[] parts = getManagedForm().getParts(); IFormPart[] arrayOfIFormPart1; int j = (arrayOfIFormPart1 = parts).length; for (int i = 0; i < j; i++) { IFormPart part = arrayOfIFormPart1[i]; if ((part instanceof SummaryPart)) { ((SummaryPart)part).setSummary(pageTitle); } } } }; job.schedule(); } private void updateButtons() { String value = urlEditor.getText(); fetchUrlLink.setEnabled((value.startsWith("http://")) || (value.startsWith("https://"))); } public void refresh(boolean discardChanges) { if (shouldRefresh(categoryChooser, discardChanges)) { ITaskList taskList = TasksUiInternal.getTaskList(); categories = new ArrayList(taskList.getCategories()); Collections.sort(categories, new TaskContainerComparator()); AbstractTaskCategory selectedCategory = this.category; if (selectedCategory == null) { selectedCategory = TaskCategory.getParentTaskCategory(getTask()); } categoryChooser.removeAll(); int selectedIndex = 0; for (int i = 0; i < categories.size(); i++) { AbstractTaskCategory category = (AbstractTaskCategory)categories.get(i); categoryChooser.add(category.getSummary()); if (category.equals(selectedCategory)) { selectedIndex = i; } } categoryChooser.select(selectedIndex); updateCategoryLabel(); } if (shouldRefresh(urlEditor.getControl(), discardChanges)) { String url = getTask().getUrl(); urlEditor.setText(url != null ? url : ""); } updateButtons(); } private void updateCategoryLabel() { if (category == null) { AbstractTaskCategory parentTaskCategory = TaskCategory.getParentTaskCategory(getTask()); categoryLabel.setText(parentTaskCategory != null ? parentTaskCategory.getSummary() : ""); } else { categoryLabel.setText(category.getSummary()); } if (!getSection().isExpanded()) { getSection().layout(true, true); } } private void createCategoryChooser(Composite buttonComposite, FormToolkit toolkit) { categoryChooser = new CCombo(buttonComposite, 8388616); categoryChooser.setData("FormWidgetFactory.drawBorder", "treeBorder"); toolkit.adapt(categoryChooser, false, false); categoryChooser.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { if (categoryChooser.getSelectionIndex() != -1) { category = ((AbstractTaskCategory)categories.get(categoryChooser.getSelectionIndex())); AttributePart.this.updateCategoryLabel(); markDirty(categoryChooser); } } }); } } /* Location: * Qualified Name: org.eclipse.mylyn.internal.tasks.ui.editors.AttributePart * 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.source.SourceViewer; import org.eclipse.swt.custom.StyledText; import org.eclipse.swt.events.FocusEvent; import org.eclipse.swt.events.FocusListener; import org.eclipse.ui.forms.FormColors; import org.eclipse.ui.forms.widgets.FormToolkit; class PlanningPart$7 implements FocusListener { PlanningPart$7(PlanningPart paramPlanningPart, FormToolkit paramFormToolkit) {} public void focusGained(FocusEvent e) { if (PlanningPart.access$5(this$0).getText().equals(PlanningPart.access$8())) { PlanningPart.access$5(this$0).setText(""); if (PlanningPart.access$5(this$0).getViewer() != null) { PlanningPart.access$5(this$0).getViewer().getTextWidget().setForeground(val$toolkit.getColors().getForeground()); } } } public void focusLost(FocusEvent e) {} } /* Location: * Qualified Name: org.eclipse.mylyn.internal.tasks.ui.editors.PlanningPart.7 * 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.Arrays; import java.util.List; import org.eclipse.core.runtime.ISafeRunnable; import org.eclipse.jface.text.ITextViewer; import org.eclipse.jface.text.hyperlink.IHyperlink; import org.eclipse.jface.util.SafeRunnable; import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin; import org.eclipse.mylyn.tasks.core.ITask; import org.eclipse.mylyn.tasks.core.TaskRepository; import org.eclipse.mylyn.tasks.ui.AbstractRepositoryConnectorUi; import org.eclipse.mylyn.tasks.ui.AbstractTaskHyperlinkDetector; public class TaskHyperlinkDetector extends AbstractTaskHyperlinkDetector { protected List<IHyperlink> detectHyperlinks(ITextViewer textViewer, String content, int index, int contentOffset) { List<IHyperlink> result = new ArrayList(); for (TaskRepository repository : getTaskRepositories(textViewer)) { IHyperlink[] links = detectHyperlinks(repository, content, index, contentOffset); if ((links != null) && (links.length > 0)) { result.addAll(Arrays.asList(links)); } } if (result.isEmpty()) { return null; } return result; } protected IHyperlink[] detectHyperlinks(final TaskRepository repository, final String content, final int index, final int contentOffset) { final AbstractRepositoryConnectorUi connectorUi = getConnectorUi(repository); if (connectorUi == null) { return null; } final IHyperlink[][] links = new IHyperlink[1][]; SafeRunnable.run(new ISafeRunnable() { public void handleException(Throwable exception) {} public void run() throws Exception { ITask task = (ITask)getAdapter(ITask.class); links[0] = connectorUi.findHyperlinks(repository, task, content, index, contentOffset); } }); return links[0]; } protected AbstractRepositoryConnectorUi getConnectorUi(TaskRepository repository) { return TasksUiPlugin.getConnectorUi(repository.getConnectorKind()); } } /* Location: * Qualified Name: org.eclipse.mylyn.internal.tasks.ui.editors.TaskHyperlinkDetector * Java Class Version: 5 (49.0) * JD-Core Version: 0.7.1 */ package org.eclipse.mylyn.internal.tasks.ui.editors; import org.eclipse.core.runtime.ISafeRunnable; import org.eclipse.core.runtime.Status; import org.eclipse.mylyn.commons.core.StatusHandler; import org.eclipse.swt.widgets.Composite; class TaskPlanningEditor$3 implements ISafeRunnable { TaskPlanningEditor$3(TaskPlanningEditor paramTaskPlanningEditor, LocalTaskEditorContributionDescriptor paramLocalTaskEditorContributionDescriptor, Composite paramComposite) {} public void handleException(Throwable e) { StatusHandler.log(new Status(4, "org.eclipse.mylyn.tasks.ui", "Error creating task editor contribution: \"" + val$descriptor.getId() + "\"", e)); } public void run() throws Exception { AbstractLocalEditorPart part = val$descriptor.createPart(); TaskPlanningEditor.access$3(this$0, val$editorComposite, part); } } /* Location: * Qualified Name: org.eclipse.mylyn.internal.tasks.ui.editors.TaskPlanningEditor.3 * Java Class Version: 5 (49.0) * JD-Core Version: 0.7.1 */ package org.eclipse.mylyn.internal.tasks.ui.editors; import org.eclipse.mylyn.tasks.core.data.TaskAttribute; import org.eclipse.mylyn.tasks.core.data.TaskData; import org.eclipse.mylyn.tasks.core.data.TaskDataModel; import org.eclipse.mylyn.tasks.ui.editors.AbstractTaskEditorPage; public class TaskEditorNewCommentPart extends TaskEditorRichTextPart { public TaskEditorNewCommentPart() { setPartName(Messages.TaskEditorNewCommentPart_New_Comment); setSectionStyle(320); setExpandVertically(true); } public void initialize(AbstractTaskEditorPage taskEditorPage) { super.initialize(taskEditorPage); setAttribute(getModel().getTaskData().getRoot().getMappedAttribute("task.common.comment.new")); } } /* Location: * Qualified Name: org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorNewCommentPart * Java Class Version: 5 (49.0) * JD-Core Version: 0.7.1 */ package org.eclipse.mylyn.internal.tasks.ui.editors; import org.eclipse.mylyn.commons.identity.core.IIdentity; import org.eclipse.swt.events.DisposeEvent; import org.eclipse.swt.events.DisposeListener; import org.eclipse.swt.graphics.Image; class UserAttributeEditor$2 implements DisposeListener { UserAttributeEditor$2(UserAttri 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
|