diff options
author | Frank Becker | 2011-09-02 18:24:47 +0000 |
---|---|---|
committer | Frank Becker | 2011-09-02 18:24:47 +0000 |
commit | 035d2db70818b997d109059f0ff6fca1487b44de (patch) | |
tree | 7211b35da8938499840e92969a338cccf6f87792 /org.eclipse.mylyn.bugzilla.ui/src | |
parent | 218ff6409520a1e0f1101e7b2e0511fac4b4214e (diff) | |
download | org.eclipse.mylyn.tasks-035d2db70818b997d109059f0ff6fca1487b44de.tar.gz org.eclipse.mylyn.tasks-035d2db70818b997d109059f0ff6fca1487b44de.tar.xz org.eclipse.mylyn.tasks-035d2db70818b997d109059f0ff6fca1487b44de.zip |
Revert "ASSIGNED - bug 305169: Use different color for attachments marked with iplog flag https://bugs.eclipse.org/bugs/show_bug.cgi?id=305169"
This reverts commit 218ff6409520a1e0f1101e7b2e0511fac4b4214e.
Diffstat (limited to 'org.eclipse.mylyn.bugzilla.ui/src')
3 files changed, 1 insertions, 110 deletions
diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/AttachmentColumnFlags.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/AttachmentColumnFlags.java deleted file mode 100644 index 1635a0c1a..000000000 --- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/AttachmentColumnFlags.java +++ /dev/null @@ -1,64 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Frank Becker and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Frank Becker - initial API and implementation - *******************************************************************************/ - -package org.eclipse.mylyn.internal.bugzilla.ui.editor; - -import org.eclipse.core.runtime.Assert; -import org.eclipse.jface.viewers.TableViewer; -import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttribute; -import org.eclipse.mylyn.internal.tasks.ui.editors.AttachmentColumnDefinition; -import org.eclipse.mylyn.tasks.core.ITaskAttachment; -import org.eclipse.mylyn.tasks.core.data.TaskAttribute; -import org.eclipse.swt.SWT; - -public class AttachmentColumnFlags extends AttachmentColumnDefinition { - public AttachmentColumnFlags(int index) { - super(index, 100, "Flag", SWT.LEFT, false, SWT.NONE); - } - - @Override - public String getColumnText(ITaskAttachment attachment, int columnIndex) { - Assert.isTrue(columnIndex == getIndex()); - return getAttachmentFlags(attachment); - } - - @Override - public int compare(TableViewer viewer, ITaskAttachment attachment1, ITaskAttachment attachment2, int columnIndex) { - Assert.isTrue(columnIndex == getIndex()); - String key1 = getAttachmentFlags(attachment1); - String key2 = getAttachmentFlags(attachment2); - return compare(key1, key2); - } - - static String getAttachmentFlags(ITaskAttachment attachment) { - TaskAttribute attribute = attachment.getTaskAttribute(); - String result = ""; //$NON-NLS-1$ - for (TaskAttribute attachmentAttribute : attribute.getAttributes().values()) { - String atribID = attachmentAttribute.getId(); - if (!atribID.startsWith(BugzillaAttribute.KIND_FLAG)) { - continue; - } - TaskAttribute state = attachmentAttribute.getAttribute("state"); //$NON-NLS-1$ - if (state != null) { - if (" ".equals(state.getValue())) { //$NON-NLS-1$ - continue; - } - if (!"".equals(result)) { //$NON-NLS-1$ - result += ", "; //$NON-NLS-1$ - } - result += state.getMetaData().getLabel() + state.getValue(); - } - } - - return result; - } - -} diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorAttachmentPart.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorAttachmentPart.java deleted file mode 100644 index 82f251b34..000000000 --- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorAttachmentPart.java +++ /dev/null @@ -1,30 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2011 Frank Becker and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * Frank Becker - initial API and implementation - *******************************************************************************/ - -package org.eclipse.mylyn.internal.bugzilla.ui.editor; - -import org.eclipse.mylyn.internal.tasks.ui.editors.AttachmentColumnCreated; -import org.eclipse.mylyn.internal.tasks.ui.editors.AttachmentColumnCreator; -import org.eclipse.mylyn.internal.tasks.ui.editors.AttachmentColumnDefinition; -import org.eclipse.mylyn.internal.tasks.ui.editors.AttachmentColumnDescription; -import org.eclipse.mylyn.internal.tasks.ui.editors.AttachmentColumnID; -import org.eclipse.mylyn.internal.tasks.ui.editors.AttachmentColumnName; -import org.eclipse.mylyn.internal.tasks.ui.editors.AttachmentColumnSize; -import org.eclipse.mylyn.internal.tasks.ui.editors.TaskEditorAttachmentPart; - -public class BugzillaTaskEditorAttachmentPart extends TaskEditorAttachmentPart { - @Override - public AttachmentColumnDefinition[] getColumnDefinitions() { - return new AttachmentColumnDefinition[] { new AttachmentColumnName(0), new AttachmentColumnDescription(1), - new AttachmentColumnSize(2), new AttachmentColumnCreator(3), new AttachmentColumnCreated(4), - new AttachmentColumnID(5), new AttachmentColumnFlags(6) }; - } -} diff --git a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java index 4e3d8e008..5ac2e55e2 100644 --- a/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java +++ b/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java @@ -99,7 +99,6 @@ public class BugzillaTaskEditorPage extends AbstractTaskEditorPage { Set<TaskEditorPartDescriptor> descriptors = super.createPartDescriptors(); boolean hasPartComments = false; boolean hasPartNewComment = false; - boolean hasPartAttachments = false; // remove unnecessary default editor parts for (TaskEditorPartDescriptor taskEditorPartDescriptor : descriptors) { if (taskEditorPartDescriptor.getId().equals(ID_PART_PEOPLE)) { @@ -121,13 +120,6 @@ public class BugzillaTaskEditorPage extends AbstractTaskEditorPage { break; } } - for (TaskEditorPartDescriptor taskEditorPartDescriptor : descriptors) { - if (taskEditorPartDescriptor.getId().equals(ID_PART_ATTACHMENTS)) { - descriptors.remove(taskEditorPartDescriptor); - hasPartAttachments = true; - break; - } - } // Add Bugzilla Planning part try { @@ -165,14 +157,7 @@ public class BugzillaTaskEditorPage extends AbstractTaskEditorPage { return new BugzillaTaskEditorCommentPart(); } }.setPath(PATH_COMMENTS)); - } - if (hasPartAttachments) { - descriptors.add(new TaskEditorPartDescriptor(ID_PART_ATTACHMENTS) { - @Override - public AbstractTaskEditorPart createPart() { - return new BugzillaTaskEditorAttachmentPart(); - } - }.setPath(PATH_ATTACHMENTS)); + } } catch (CoreException e) { // ignore |