Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 158395 Details for
Bug 272207
Include iplog flag for patches on bugzilla task editor
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
commited patch
patch272207_V2.txt (text/plain), 83.18 KB, created by
Frank Becker
on 2010-02-07 14:58:03 EST
(
hide
)
Description:
commited patch
Filename:
MIME Type:
Creator:
Frank Becker
Created:
2010-02-07 14:58:03 EST
Size:
83.18 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.bugzilla.ui >Index: META-INF/MANIFEST.MF >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.bugzilla.ui/META-INF/MANIFEST.MF,v >retrieving revision 1.365 >diff -u -r1.365 MANIFEST.MF >--- META-INF/MANIFEST.MF 3 Feb 2010 17:15:11 -0000 1.365 >+++ META-INF/MANIFEST.MF 7 Feb 2010 19:47:56 -0000 >@@ -22,7 +22,6 @@ > Bundle-ActivationPolicy: lazy > Export-Package: org.eclipse.mylyn.internal.bugzilla.ui;x-internal:=true, > org.eclipse.mylyn.internal.bugzilla.ui.action;x-internal:=true, >- org.eclipse.mylyn.internal.bugzilla.ui.dialogs;x-internal:=true, > org.eclipse.mylyn.internal.bugzilla.ui.editor;x-internal:=true, > org.eclipse.mylyn.internal.bugzilla.ui.search;x-internal:=true, > org.eclipse.mylyn.internal.bugzilla.ui.tasklist;x-internal:=true, >Index: src/org/eclipse/mylyn/internal/bugzilla/ui/action/BugzillaAttachmentUpdateAction.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/action/BugzillaAttachmentUpdateAction.java,v >retrieving revision 1.1 >diff -u -r1.1 BugzillaAttachmentUpdateAction.java >--- src/org/eclipse/mylyn/internal/bugzilla/ui/action/BugzillaAttachmentUpdateAction.java 24 Jan 2010 14:30:08 -0000 1.1 >+++ src/org/eclipse/mylyn/internal/bugzilla/ui/action/BugzillaAttachmentUpdateAction.java 7 Feb 2010 19:47:56 -0000 >@@ -13,19 +13,16 @@ > > import java.util.List; > >-import org.eclipse.core.runtime.jobs.IJobChangeEvent; >-import org.eclipse.core.runtime.jobs.JobChangeAdapter; > import org.eclipse.jface.action.IAction; >-import org.eclipse.jface.dialogs.IMessageProvider; > import org.eclipse.jface.viewers.ISelection; > import org.eclipse.jface.viewers.IStructuredSelection; >-import org.eclipse.jface.window.Window; > import org.eclipse.mylyn.internal.bugzilla.core.IBugzillaConstants; >-import org.eclipse.mylyn.internal.bugzilla.ui.dialogs.BugzillaAttachmentDialog; > import org.eclipse.mylyn.internal.bugzilla.ui.editor.BugzillaTaskEditorPage; > import org.eclipse.mylyn.internal.bugzilla.ui.editor.FlagAttributeEditor; >+import org.eclipse.mylyn.internal.bugzilla.ui.wizard.BugzillaAttachmentWizard; > import org.eclipse.mylyn.internal.tasks.core.TaskTask; > import org.eclipse.mylyn.internal.tasks.ui.TasksUiPlugin; >+import org.eclipse.mylyn.internal.tasks.ui.wizards.NewAttachmentWizardDialog; > import org.eclipse.mylyn.tasks.core.ITask; > import org.eclipse.mylyn.tasks.core.ITaskAttachment; > import org.eclipse.mylyn.tasks.core.TaskRepository; >@@ -34,6 +31,8 @@ > import org.eclipse.mylyn.tasks.core.data.TaskAttributeMetaData; > import org.eclipse.mylyn.tasks.core.data.TaskData; > import org.eclipse.mylyn.tasks.core.data.TaskDataModel; >+import org.eclipse.mylyn.tasks.core.data.TaskDataModelEvent; >+import org.eclipse.mylyn.tasks.core.data.TaskDataModelListener; > import org.eclipse.mylyn.tasks.ui.TasksUi; > import org.eclipse.mylyn.tasks.ui.editors.AbstractAttributeEditor; > import org.eclipse.mylyn.tasks.ui.editors.AttributeEditorFactory; >@@ -128,40 +127,23 @@ > }; > > TaskAttribute target = workingCopy.getLocalData().getRoot(); >- BugzillaAttachmentDialog dialog = new BugzillaAttachmentDialog(shell, model, factory, target, false); >- if (dialog.open() == Window.OK) { >- TaskAttribute attachmentAttribute = attachment.getTaskAttribute(); >- for (TaskAttribute child : target.getAttributes().values()) { >- attachmentAttribute.deepAddCopy(child); >+ target.setValue(target0.getValue()); >+ >+ final BugzillaAttachmentWizard attachmentWizard = new BugzillaAttachmentWizard(shell, factory, target, >+ taskEditor, attachment); >+ final NewAttachmentWizardDialog dialog = new NewAttachmentWizardDialog(shell, attachmentWizard, false); >+ model.addModelListener(new TaskDataModelListener() { >+ >+ @Override >+ public void attributeChanged(TaskDataModelEvent event) { >+ attachmentWizard.setChanged(true); >+ dialog.updateButtons(); > } >- final ChangeAttachmentJob job = new ChangeAttachmentJob(attachment, taskEditor); >- job.setUser(true); >- job.addJobChangeListener(new JobChangeAdapter() { >- >- @Override >- public void done(IJobChangeEvent event) { >- IFormPage formPage = taskEditor.getActivePageInstance(); >- if (formPage instanceof BugzillaTaskEditorPage) { >- final BugzillaTaskEditorPage bugzillaPage = (BugzillaTaskEditorPage) formPage; >- if (job.getError() != null) { >- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { >- public void run() { >- bugzillaPage.getTaskEditor().setMessage(job.getError().getMessage(), >- IMessageProvider.ERROR); >- } >- }); >- } else { >- PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { >- public void run() { >- bugzillaPage.refreshFormContent(); >- } >- }); >- } >- } >- } >- }); >- job.schedule(); >- } >+ }); >+ >+ dialog.setBlockOnOpen(false); >+ dialog.create(); >+ dialog.open(); > } > } > } >Index: src/org/eclipse/mylyn/internal/bugzilla/ui/action/ChangeAttachmentJob.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/action/ChangeAttachmentJob.java,v >retrieving revision 1.1 >diff -u -r1.1 ChangeAttachmentJob.java >--- src/org/eclipse/mylyn/internal/bugzilla/ui/action/ChangeAttachmentJob.java 24 Jan 2010 14:30:08 -0000 1.1 >+++ src/org/eclipse/mylyn/internal/bugzilla/ui/action/ChangeAttachmentJob.java 7 Feb 2010 19:47:56 -0000 >@@ -60,7 +60,7 @@ > } > > @Override >- protected IStatus run(IProgressMonitor monitor) { >+ public IStatus run(IProgressMonitor monitor) { > final ITask task; > task = editor.getTaskEditorInput().getTask(); > >Index: src/org/eclipse/mylyn/internal/bugzilla/ui/dialogs/BugzillaAttachmentDialog.java >=================================================================== >RCS file: src/org/eclipse/mylyn/internal/bugzilla/ui/dialogs/BugzillaAttachmentDialog.java >diff -N src/org/eclipse/mylyn/internal/bugzilla/ui/dialogs/BugzillaAttachmentDialog.java >--- src/org/eclipse/mylyn/internal/bugzilla/ui/dialogs/BugzillaAttachmentDialog.java 24 Jan 2010 14:30:07 -0000 1.1 >+++ /dev/null 1 Jan 1970 00:00:00 -0000 >@@ -1,289 +0,0 @@ >-/******************************************************************************* >- * Copyright (c) 2009 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.dialogs; >- >-import org.eclipse.jface.dialogs.Dialog; >-import org.eclipse.jface.layout.GridDataFactory; >-import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttribute; >-import org.eclipse.mylyn.internal.bugzilla.ui.tasklist.Messages; >-import org.eclipse.mylyn.tasks.core.data.TaskAttribute; >-import org.eclipse.mylyn.tasks.core.data.TaskDataModel; >-import org.eclipse.mylyn.tasks.core.data.TaskDataModelEvent; >-import org.eclipse.mylyn.tasks.core.data.TaskDataModelListener; >-import org.eclipse.mylyn.tasks.ui.editors.AbstractAttributeEditor; >-import org.eclipse.mylyn.tasks.ui.editors.AttributeEditorFactory; >-import org.eclipse.swt.SWT; >-import org.eclipse.swt.layout.GridData; >-import org.eclipse.swt.layout.GridLayout; >-import org.eclipse.swt.widgets.Composite; >-import org.eclipse.swt.widgets.Control; >-import org.eclipse.swt.widgets.Display; >-import org.eclipse.swt.widgets.Label; >-import org.eclipse.swt.widgets.Shell; >-import org.eclipse.ui.dialogs.SelectionDialog; >-import org.eclipse.ui.forms.events.ExpansionAdapter; >-import org.eclipse.ui.forms.events.ExpansionEvent; >-import org.eclipse.ui.forms.widgets.ExpandableComposite; >-import org.eclipse.ui.forms.widgets.FormToolkit; >- >-/** >- * @author Frank Becker >- */ >-public class BugzillaAttachmentDialog extends SelectionDialog { >- >- private final FormToolkit toolkit; >- >- private Composite scrollComposite; >- >- private ExpandableComposite flagExpandComposite = null; >- >- private final TaskAttribute attachment; >- >- private final Shell parentShell; >- >- private final boolean readOnly; >- >- private final AttributeEditorFactory attributeEditorFactory; >- >- private static final int LABEL_WIDTH = 120; >- >- private static final int COLUMN_GAP = 5; >- >- private static final int MULTI_ROW_HEIGHT = 55; >- >- private static final int COLUMN_WIDTH = 200; >- >- private static final int MULTI_COLUMN_WIDTH = COLUMN_WIDTH + 5 + COLUMN_GAP + LABEL_WIDTH + 5 + COLUMN_WIDTH; >- >- private AbstractAttributeEditor commentEditor; >- >- private final TaskDataModel model; >- >- private boolean changed = false; >- >- public BugzillaAttachmentDialog(Shell parentShell, TaskDataModel model, AttributeEditorFactory factory, >- TaskAttribute attachment, boolean readonly) { >- super(parentShell); >- this.attachment = attachment; >- this.parentShell = parentShell; >- this.readOnly = readonly; >- attributeEditorFactory = factory; >- this.model = model; >- model.addModelListener(new TaskDataModelListener() { >- >- @Override >- public void attributeChanged(TaskDataModelEvent event) { >- if (!changed) { >- changed = true; >- getOkButton().setEnabled(changed); >- >- } >- } >- >- }); >- toolkit = new FormToolkit(Display.getCurrent()); >- this.setTitle(readonly ? Messages.BugzillaAttachmentDialog_DetailTitle >- : Messages.BugzillaAttachmentDialog_DetailTitle); >- } >- >- @Override >- protected Control createDialogArea(Composite parent) { >- int currentColumn = 1; >- int columnCount = 4; >- Composite composite = (Composite) super.createDialogArea(parent); >- >- initializeDialogUnits(composite); >- >- Composite attributeArea = new Composite(composite, SWT.FLAT); >- GridLayout layout = new GridLayout(4, false); >- attributeArea.setLayout(layout); >- createAttributeEditors(currentColumn, columnCount, attributeArea); >- createCommentEditor(currentColumn, columnCount, attributeArea); >- Composite advancedComposite = createFlagSection(attributeArea); >- createFlagEditors(columnCount, advancedComposite); >- createAttributeEditor(attachment.getMappedAttribute(TaskAttribute.ATTACHMENT_URL), currentColumn, columnCount, >- advancedComposite); >- Dialog.applyDialogFont(composite); >- return composite; >- } >- >- private void createAttributeEditor(TaskAttribute attribute, int currentColumn, int columnCount, >- Composite attributeArea) { >- String type = attribute.getMetaData().getType(); >- if (type != null) { >- AbstractAttributeEditor editor = attributeEditorFactory.createEditor(type, attribute); >- if (attribute.getId().equals(BugzillaAttribute.TOKEN.getKey()) >- || attribute.getId().equals("size") || attribute.getId().equals(TaskAttribute.ATTACHMENT_URL)) { //$NON-NLS-1$ >- editor.setReadOnly(true); >- } else { >- editor.setReadOnly(readOnly); >- } >- if (editor.hasLabel()) { >- editor.createLabelControl(attributeArea, toolkit); >- Label label = editor.getLabelControl(); >- label.setBackground(attributeArea.getBackground()); >- String labelString = editor.getLabel(); >- if (labelString != null && !labelString.equals("")) { //$NON-NLS-1$ >- GridData gd = GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).hint(LABEL_WIDTH, >- SWT.DEFAULT).create(); >- if (currentColumn > 1) { >- gd.horizontalIndent = COLUMN_GAP; >- gd.widthHint = LABEL_WIDTH + COLUMN_GAP; >- } >- label.setLayoutData(gd); >- currentColumn++; >- } >- } >- editor.createControl(attributeArea, toolkit); >- GridData gd = new GridData(SWT.FILL, SWT.CENTER, false, false); >- if (type.equals(TaskAttribute.TYPE_BOOLEAN) || type.equals(TaskAttribute.TYPE_SHORT_TEXT) >- || type.equals(TaskAttribute.TYPE_URL)) { >- gd.horizontalSpan = 3; >- } else { >- gd.horizontalSpan = 1; >- } >- editor.getControl().setLayoutData(gd); >- editor.getControl().setBackground(parentShell.getBackground()); >- currentColumn += gd.horizontalSpan; >- currentColumn %= columnCount; >- } >- } >- >- private void createAttributeEditors(int currentColumn, int columnCount, Composite attributeArea) { >- createAttributeEditor(attachment.getMappedAttribute(TaskAttribute.ATTACHMENT_DESCRIPTION), currentColumn, >- columnCount, attributeArea); >- createAttributeEditor(attachment.getMappedAttribute(TaskAttribute.ATTACHMENT_FILENAME), currentColumn, >- columnCount, attributeArea); >- createAttributeEditor(attachment.getMappedAttribute(TaskAttribute.ATTACHMENT_SIZE), currentColumn, columnCount, >- attributeArea); >- createAttributeEditor(attachment.getMappedAttribute(TaskAttribute.ATTACHMENT_CONTENT_TYPE), currentColumn, >- columnCount, attributeArea); >- createAttributeEditor(attachment.getMappedAttribute(TaskAttribute.ATTACHMENT_IS_PATCH), currentColumn, >- columnCount, attributeArea); >- createAttributeEditor(attachment.getMappedAttribute(TaskAttribute.ATTACHMENT_IS_DEPRECATED), currentColumn, >- columnCount, attributeArea); >- } >- >- private void createFlagEditors(int columnCount, Composite advancedComposite) { >- int currentFlagColumn = 1; >- >- for (TaskAttribute attribute : attachment.getAttributes().values()) { >- if (!attribute.getId().startsWith("task.common.kind.flag")) { //$NON-NLS-1$ >- continue; >- } >- String type = attribute.getMetaData().getType(); >- if (type != null) { >- AbstractAttributeEditor editor = attributeEditorFactory.createEditor(type, attribute); >- editor.setReadOnly(readOnly); >- >- if (editor.hasLabel()) { >- editor.createLabelControl(advancedComposite, toolkit); >- Label label = editor.getLabelControl(); >- label.setBackground(advancedComposite.getBackground()); >- GridData gd = GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).hint(LABEL_WIDTH, >- SWT.DEFAULT).create(); >- if (currentFlagColumn > 1) { >- gd.horizontalIndent = COLUMN_GAP; >- gd.widthHint = LABEL_WIDTH + COLUMN_GAP; >- } >- label.setLayoutData(gd); >- currentFlagColumn++; >- } >- editor.createControl(advancedComposite, toolkit); >- GridData gd = new GridData(SWT.FILL, SWT.CENTER, false, false); >- gd.widthHint = 150;//COLUMN_WIDTH; >- gd.horizontalSpan = 3; >- editor.getControl().setLayoutData(gd); >- currentFlagColumn += gd.horizontalSpan; >- currentFlagColumn %= columnCount; >- editor.getControl().setBackground(parentShell.getBackground()); >- } >- } >- } >- >- private void createCommentEditor(int currentColumn, int columnCount, Composite attributeArea) { >- TaskAttribute commentAttribute = attachment.getAttribute("comment"); //$NON-NLS-1$ >- if (commentAttribute == null || readOnly) { >- return; >- } >- String type = commentAttribute.getMetaData().getType(); >- if (type != null) { >- commentEditor = attributeEditorFactory.createEditor(type, commentAttribute); >- String labelString = commentEditor.getLabel(); >- if (commentEditor.hasLabel()) { >- commentEditor.createLabelControl(attributeArea, toolkit); >- if (!labelString.equals("")) { //$NON-NLS-1$ >- Label label = commentEditor.getLabelControl(); >- label.setBackground(attributeArea.getBackground()); >- GridData gd = GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.TOP).hint(LABEL_WIDTH, >- SWT.DEFAULT).create(); >- if (currentColumn > 1) { >- gd.horizontalIndent = COLUMN_GAP; >- gd.widthHint = LABEL_WIDTH + COLUMN_GAP; >- } >- label.setLayoutData(gd); >- } >- } >- commentEditor.createControl(attributeArea, toolkit); >- commentEditor.getControl().setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER); >- GridData gd = new GridData(SWT.FILL, SWT.CENTER, false, false); >- gd.heightHint = MULTI_ROW_HEIGHT; >- gd.widthHint = MULTI_COLUMN_WIDTH; >- gd.horizontalSpan = 2;//columnCount - currentColumn + 1; >- commentEditor.getControl().setLayoutData(gd); >- toolkit.paintBordersFor(attributeArea); >- } >- } >- >- private Composite createFlagSection(Composite container) { >- flagExpandComposite = toolkit.createExpandableComposite(container, ExpandableComposite.COMPACT >- | ExpandableComposite.TWISTIE | ExpandableComposite.TITLE_BAR); >- flagExpandComposite.setFont(container.getFont()); >- flagExpandComposite.setBackground(container.getBackground()); >- flagExpandComposite.setText(Messages.BugzillaTaskAttachmentPage_Advanced); >- GridLayout gLayout = new GridLayout(4, false); >- gLayout.horizontalSpacing = 0; >- gLayout.marginWidth = 0; >- flagExpandComposite.setLayout(new GridLayout(4, false)); >- GridData g = new GridData(GridData.FILL_HORIZONTAL); >- g.horizontalSpan = 4; >- flagExpandComposite.setLayoutData(g); >- flagExpandComposite.addExpansionListener(new ExpansionAdapter() { >- @Override >- public void expansionStateChanged(ExpansionEvent e) { >- parentShell.getDisplay().getActiveShell().pack(); >- } >- }); >- >- scrollComposite = new Composite(flagExpandComposite, SWT.NONE); >- GridLayout gLayout2 = new GridLayout(4, false); >- gLayout2.horizontalSpacing = 0; >- scrollComposite.setLayout(gLayout2); >- flagExpandComposite.setClient(scrollComposite); >- return scrollComposite; >- } >- >- @Override >- protected void okPressed() { >- commentEditor.getControl().forceFocus(); >- super.okPressed(); >- } >- >- @Override >- protected Control createButtonBar(Composite parent) { >- Control control = super.createButtonBar(parent); >- getOkButton().setText(Messages.BugzillaAttachmentDialog_OK_ButtonText); >- getOkButton().setEnabled(changed); >- return control; >- } >- >-} >\ No newline at end of file >Index: src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java,v >retrieving revision 1.43 >diff -u -r1.43 BugzillaTaskEditorPage.java >--- src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java 24 Jan 2010 14:30:07 -0000 1.43 >+++ src/org/eclipse/mylyn/internal/bugzilla/ui/editor/BugzillaTaskEditorPage.java 7 Feb 2010 19:47:56 -0000 >@@ -139,7 +139,7 @@ > } else if (IBugzillaConstants.EDITOR_TYPE_VOTES.equals(type)) { > editor = new BugzillaVotesEditor(getModel(), taskAttribute); > } else if (IBugzillaConstants.EDITOR_TYPE_FLAG.equals(type)) { >- editor = new FlagAttributeEditor(getModel(), taskAttribute, 78); >+ editor = new FlagAttributeEditor(getModel(), taskAttribute, 105); > } else { > editor = super.createEditor(type, taskAttribute); > if (TaskAttribute.TYPE_BOOLEAN.equals(type)) { >Index: src/org/eclipse/mylyn/internal/bugzilla/ui/editor/FlagAttributeEditor.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/editor/FlagAttributeEditor.java,v >retrieving revision 1.8 >diff -u -r1.8 FlagAttributeEditor.java >--- src/org/eclipse/mylyn/internal/bugzilla/ui/editor/FlagAttributeEditor.java 24 Jan 2010 14:30:07 -0000 1.8 >+++ src/org/eclipse/mylyn/internal/bugzilla/ui/editor/FlagAttributeEditor.java 7 Feb 2010 19:47:58 -0000 >@@ -20,6 +20,10 @@ > import org.eclipse.mylyn.tasks.ui.editors.LayoutHint.RowSpan; > import org.eclipse.swt.SWT; > import org.eclipse.swt.custom.CCombo; >+import org.eclipse.swt.events.KeyEvent; >+import org.eclipse.swt.events.KeyListener; >+import org.eclipse.swt.events.ModifyEvent; >+import org.eclipse.swt.events.ModifyListener; > import org.eclipse.swt.events.SelectionAdapter; > import org.eclipse.swt.events.SelectionEvent; > import org.eclipse.swt.layout.GridData; >@@ -53,7 +57,7 @@ > @Override > public void createControl(Composite parent, FormToolkit toolkit) { > final Composite composite = toolkit.createComposite(parent); >- GridLayout layout = new GridLayout(3, false); >+ GridLayout layout = new GridLayout(2, false); > layout.marginWidth = 1; > composite.setLayout(layout); > if (isReadOnly()) { >@@ -117,9 +121,31 @@ > if (requestee != null && !requestee.getMetaData().isReadOnly()) { > requesteeText = toolkit.createText(composite, requestee.getValue()); > requesteeText.setEnabled("?".equals(getValueLabel())); //$NON-NLS-1$ >- GridData requesteeData = new GridData(GridData.HORIZONTAL_ALIGN_FILL); >+ GridData requesteeData = new GridData(SWT.FILL, SWT.CENTER, false, false); > requesteeData.widthHint = requesteeTextHint; > requesteeText.setLayoutData(requesteeData); >+ requesteeText.setFont(EditorUtil.TEXT_FONT); >+ requesteeText.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TREE_BORDER); >+ >+ requesteeText.addKeyListener(new KeyListener() { >+ >+ public void keyReleased(KeyEvent e) { >+ // ignore >+ setRequestee(requesteeText.getText()); >+ >+ } >+ >+ public void keyPressed(KeyEvent e) { >+ } >+ }); >+ requesteeText.addModifyListener(new ModifyListener() { >+ >+ public void modifyText(ModifyEvent e) { >+ setRequestee(requesteeText.getText()); >+ } >+ }); >+ toolkit.adapt(requesteeText, false, false); >+ > } > } > toolkit.paintBordersFor(composite); >@@ -127,12 +153,10 @@ > } > > public String getValue() { >-// return getAttributeMapper().getValue(getTaskAttribute()); > return getAttributeMapper().getValue(getAttributeMapper().getAssoctiatedAttribute(getTaskAttribute())); > } > > public String getValueLabel() { >-// return getAttributeMapper().getValueLabel(getTaskAttribute()); > return getAttributeMapper().getValueLabel(getAttributeMapper().getAssoctiatedAttribute(getTaskAttribute())); > } > >@@ -153,8 +177,10 @@ > TaskAttribute requestee = getTaskAttribute().getAttribute("requestee"); //$NON-NLS-1$ > if (requestee != null) { > if (!requestee.getValue().equals(value)) { >- getAttributeMapper().setValue(requestee, value); >- attributeChanged(); >+ if (!requestee.getValue().equals(value)) { >+ getAttributeMapper().setValue(requestee, value); >+ attributeChanged(); >+ } > } > } > } >Index: src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java,v >retrieving revision 1.131 >diff -u -r1.131 BugzillaSearchPage.java >--- src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java 15 Nov 2009 00:38:05 -0000 1.131 >+++ src/org/eclipse/mylyn/internal/bugzilla/ui/search/BugzillaSearchPage.java 7 Feb 2010 19:48:01 -0000 >@@ -75,6 +75,10 @@ > import org.eclipse.swt.widgets.Text; > import org.eclipse.ui.PlatformUI; > import org.eclipse.ui.fieldassist.ContentAssistCommandAdapter; >+import org.eclipse.ui.forms.events.ExpansionAdapter; >+import org.eclipse.ui.forms.events.ExpansionEvent; >+import org.eclipse.ui.forms.widgets.ExpandableComposite; >+import org.eclipse.ui.forms.widgets.FormToolkit; > import org.eclipse.ui.progress.IProgressService; > import org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds; > >@@ -258,6 +262,10 @@ > > private RepositoryConfiguration repositoryConfiguration; > >+ private final FormToolkit toolkit; >+ >+ private ExpandableComposite advancedExpandComposite; >+ > private final SelectionAdapter updateActionSelectionAdapter = new SelectionAdapter() { > @Override > public void widgetSelected(SelectionEvent e) { >@@ -300,44 +308,19 @@ > > public BugzillaSearchPage(TaskRepository repository) { > super(Messages.BugzillaSearchPage_Bugzilla_Query, repository); >- // setTitle(TITLE); >- // setDescription(DESCRIPTION); >- // setImageDescriptor(TaskListImages.BANNER_REPOSITORY); >- // setPageComplete(false); >-// try { >-// repositoryConfiguration = BugzillaCorePlugin.getRepositoryConfiguration(repository, false); >-// } catch (final CoreException e) { >-// PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { >-// public void run() { >-// MessageDialog.openError(Display.getDefault().getActiveShell(), "Bugzilla Search Page", >-// "Unable to get configuration. Ensure proper repository configuration in " >-// + TasksUiPlugin.LABEL_VIEW_REPOSITORIES + ".\n\n"); >-// } >-// }); >-// } >+ >+ toolkit = new FormToolkit(Display.getCurrent()); > } > > public BugzillaSearchPage(TaskRepository repository, IRepositoryQuery origQuery) { > super(Messages.BugzillaSearchPage_Bugzilla_Query, repository, origQuery); > originalQuery = origQuery; > setDescription(Messages.BugzillaSearchPage_Select_the_Bugzilla_query_parameters); >- // setTitle(TITLE); >- // setDescription(DESCRIPTION); >- // setPageComplete(false); >-// try { >-// repositoryConfiguration = BugzillaCorePlugin.getRepositoryConfiguration(repository, false); >-// } catch (final CoreException e) { >-// PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { >-// public void run() { >-// MessageDialog.openError(Display.getDefault().getActiveShell(), "Bugzilla Search Page", >-// "Unable to get configuration. Ensure proper repository configuration in " >-// + TasksUiPlugin.LABEL_VIEW_REPOSITORIES + ".\n\n"); >-// } >-// }); >-// } >+ toolkit = new FormToolkit(Display.getCurrent()); > } > > public void createControl(Composite parent) { >+ initializeDialogUnits(parent); > readConfiguration(); > > Composite control = new Composite(parent, SWT.NONE); >@@ -345,86 +328,125 @@ > layout.marginHeight = 0; > control.setLayout(layout); > control.setLayoutData(new GridData(GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL)); >- >-// if (scontainer == null) { >- // Not presenting in search pane so want query title >-// super.createControl(control); >-// Label lblName = new Label(control, SWT.NONE); >-// final GridData gridData = new GridData(); >-// lblName.setLayoutData(gridData); >-// lblName.setText("Query Title:"); >-// >-// title = new Text(control, SWT.BORDER); >-// title.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1)); >-// title.addModifyListener(new ModifyListener() { >-// public void modifyText(ModifyEvent e) { >-// setPageComplete(isPageComplete()); >-// } >-// }); >-// } >- >- // else { >- // // if (repository == null) { >- // // search pane so add repository selection >- // createRepositoryGroup(control); >- // } > createOptionsGroup(control); >- createSearchGroup(control); >- >- // createSaveQuery(control); >- // createMaxHits(control); >- // input = new SavedQueryFile(BugzillaPlugin.getDefault().getStateLocation().toString(), "/queries"); >- // createUpdate(control); >- // if (originalQuery != null) { >- // try { >- // updateDefaults(originalQuery.getQueryUrl(), String.valueOf(originalQuery.getMaxHits())); >- // } catch (UnsupportedEncodingException e) { >- // // ignore >- // } >- // } >+ createButtons(control); > Dialog.applyDialogFont(control); > setControl(control); > PlatformUI.getWorkbench().getHelpSystem().setHelp(control, BugzillaUiPlugin.SEARCH_PAGE_CONTEXT); > restoreBounds(); > } > >- protected void createOptionsGroup(Composite control) { >- GridLayout sashFormLayout = new GridLayout(); >- sashFormLayout.numColumns = 4; >- sashFormLayout.marginHeight = 5; >- sashFormLayout.marginWidth = 5; >- sashFormLayout.horizontalSpacing = 5; >+ private void createButtons(Composite control) { >+ Composite buttonComposite = new Composite(control, SWT.NONE); >+ buttonComposite.setLayout(new GridLayout(2, false)); >+ GridData g = new GridData(GridData.FILL_HORIZONTAL); >+ g.widthHint = 500; >+ g.heightHint = 200; >+ Button clearButton = new Button(buttonComposite, SWT.PUSH); >+ clearButton.setText(Messages.BugzillaSearchPage_ClearFields); >+ clearButton.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false)); >+ clearButton.addSelectionListener(new SelectionAdapter() { >+ @Override >+ public void widgetSelected(SelectionEvent e) { >+ product.deselectAll(); >+ component.deselectAll(); >+ version.deselectAll(); >+ target.deselectAll(); >+ status.deselectAll(); >+ resolution.deselectAll(); >+ severity.deselectAll(); >+ priority.deselectAll(); >+ hardware.deselectAll(); >+ os.deselectAll(); >+ summaryOperation.deselectAll(); >+ commentOperation.deselectAll(); >+ emailOperation.deselectAll(); >+ >+ for (Button emailButton : emailButtons) { >+ emailButton.setSelection(false); >+ } >+ summaryPattern.setText(""); //$NON-NLS-1$ >+ commentPattern.setText(""); //$NON-NLS-1$ >+ emailPattern.setText(""); //$NON-NLS-1$ >+ emailOperation2.deselectAll(); >+ for (Button element : emailButtons2) { >+ element.setSelection(false); >+ } >+ emailPattern2.setText(""); //$NON-NLS-1$ >+ keywords.setText(""); //$NON-NLS-1$ >+ keywordsOperation.deselectAll(); >+ daysText.setText(""); //$NON-NLS-1$ >+ } >+ }); > >- final Composite composite = new Composite(control, SWT.NONE); >- composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); >- final GridLayout gridLayout = new GridLayout(); >- gridLayout.marginBottom = 8; >- gridLayout.marginHeight = 0; >- gridLayout.marginWidth = 0; >- gridLayout.numColumns = 4; >- composite.setLayout(gridLayout); >+ Button updateButton = new Button(buttonComposite, SWT.PUSH); >+ updateButton.setText(Messages.BugzillaSearchPage_Update_Attributes_from_Repository); >+ updateButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false)); >+ updateButton.addSelectionListener(new SelectionAdapter() { >+ @Override >+ public void widgetSelected(SelectionEvent e) { >+ if (getTaskRepository() != null) { >+ updateConfiguration(true); >+ } else { >+ MessageDialog.openInformation(Display.getCurrent().getActiveShell(), >+ IBugzillaConstants.TITLE_MESSAGE_DIALOG, >+ Messages.BugzillaSearchPage_No_repository_available); >+ } >+ } >+ }); >+ >+ buttonComposite.setLayoutData(g); >+ Dialog.applyDialogFont(buttonComposite); > >- if (!inSearchContainer()) { >- final Label queryTitleLabel = new Label(composite, SWT.NONE); >- queryTitleLabel.setText(Messages.BugzillaSearchPage_Query_Title); >- >- queryTitle = new Text(composite, SWT.BORDER); >- queryTitle.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 3, 1)); >- if (originalQuery != null) { >- queryTitle.setText(originalQuery.getSummary()); >+ } >+ >+ private void createOptionsGroup(Composite control) { >+ Composite basicComposite = new Composite(control, SWT.NONE); >+ basicComposite.setLayout(new GridLayout(4, false)); >+ GridData g = new GridData(GridData.FILL_HORIZONTAL); >+ g.widthHint = 500; >+ g.heightHint = 200; >+ basicComposite.setLayoutData(g); >+ Dialog.applyDialogFont(basicComposite); >+ >+ advancedExpandComposite = toolkit.createExpandableComposite(control, ExpandableComposite.COMPACT >+ | ExpandableComposite.TWISTIE | ExpandableComposite.TITLE_BAR); >+ advancedExpandComposite.setFont(control.getFont()); >+ advancedExpandComposite.setBackground(null); >+ advancedExpandComposite.setText(Messages.BugzillaSearchPage_Advanced); >+ advancedExpandComposite.setLayout(new GridLayout(3, false)); >+ g = new GridData(GridData.FILL_HORIZONTAL); >+ g.horizontalSpan = 3; >+ advancedExpandComposite.setLayoutData(g); >+ advancedExpandComposite.addExpansionListener(new ExpansionAdapter() { >+ @Override >+ public void expansionStateChanged(ExpansionEvent e) { >+ getControl().getShell().pack(); > } >- queryTitle.addModifyListener(new ModifyListenerImplementation()); >- queryTitle.setFocus(); >- } >+ }); >+ >+ Composite advancedComposite = new Composite(advancedExpandComposite, SWT.NULL); >+ advancedComposite.setLayout(new GridLayout(4, false)); >+ g = new GridData(GridData.FILL_HORIZONTAL); >+ g.widthHint = 500; >+ g.heightHint = 200; >+ >+ advancedComposite.setLayoutData(g); >+ Dialog.applyDialogFont(advancedComposite); >+ advancedExpandComposite.setClient(advancedComposite); >+ >+ createBasicComposite(basicComposite); >+ createAdvancedComposite(advancedComposite); >+ createSearchGroup(advancedComposite); >+ } > >+ private void createBasicComposite(Composite basicComposite) { > // Info text >- Label labelSummary = new Label(composite, SWT.LEFT); >+ Label labelSummary = new Label(basicComposite, SWT.LEFT); > labelSummary.setText(Messages.BugzillaSearchPage_Summary); >-// labelSummary.setLayoutData(new GridData(LABEL_WIDTH, SWT.DEFAULT)); >- //labelSummary.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END)); > > // Pattern combo >- summaryPattern = new Combo(composite, SWT.SINGLE | SWT.BORDER); >+ summaryPattern = new Combo(basicComposite, SWT.SINGLE | SWT.BORDER); > summaryPattern.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false, 2, 1)); > summaryPattern.addModifyListener(new ModifyListenerImplementation()); > summaryPattern.addSelectionListener(new SelectionAdapter() { >@@ -434,39 +456,17 @@ > } > }); > >- summaryOperation = new Combo(composite, SWT.SINGLE | SWT.READ_ONLY | SWT.BORDER); >+ summaryOperation = new Combo(basicComposite, SWT.SINGLE | SWT.READ_ONLY | SWT.BORDER); > summaryOperation.setItems(patternOperationText); > summaryOperation.setText(patternOperationText[0]); > summaryOperation.select(0); >- >- // Info text >- Label labelComment = new Label(composite, SWT.LEFT); >- labelComment.setText(Messages.BugzillaSearchPage_Comment); >- //labelComment.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END)); >- >- // Comment pattern combo >- commentPattern = new Combo(composite, SWT.SINGLE | SWT.BORDER); >- commentPattern.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 2, 1)); >- commentPattern.addModifyListener(new ModifyListenerImplementation()); >- commentPattern.addSelectionListener(new SelectionAdapter() { >- @Override >- public void widgetSelected(SelectionEvent e) { >- handleWidgetSelected(commentPattern, commentOperation, previousCommentPatterns); >- } >- }); >- >- commentOperation = new Combo(composite, SWT.SINGLE | SWT.READ_ONLY | SWT.BORDER); >- commentOperation.setItems(patternOperationText); >- commentOperation.setText(patternOperationText[0]); >- commentOperation.select(0); >- >- Label labelEmail = new Label(composite, SWT.LEFT); >+ Label labelEmail = new Label(basicComposite, SWT.LEFT); > labelEmail.setText(Messages.BugzillaSearchPage_Email); > //labelEmail.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END)); > > // pattern combo >- emailPattern = new Combo(composite, SWT.SINGLE | SWT.BORDER); >- emailPattern.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); >+ emailPattern = new Combo(basicComposite, SWT.SINGLE | SWT.BORDER); >+ emailPattern.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1)); > emailPattern.addModifyListener(new ModifyListenerImplementation()); > emailPattern.addSelectionListener(new SelectionAdapter() { > @Override >@@ -484,8 +484,15 @@ > adapter.setLabelProvider(proposalLabelProvider); > adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE); > >- Composite emailComposite = new Composite(composite, SWT.NONE); >- emailComposite.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); >+ // operation combo >+ emailOperation = new Combo(basicComposite, SWT.SINGLE | SWT.READ_ONLY | SWT.BORDER); >+ emailOperation.setItems(emailOperationText); >+ emailOperation.setText(emailOperationText[0]); >+ emailOperation.select(0); >+ >+ new Label(basicComposite, SWT.NONE); >+ Composite emailComposite = new Composite(basicComposite, SWT.NONE); >+ emailComposite.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 2, 1)); > GridLayout emailLayout = new GridLayout(); > emailLayout.marginWidth = 0; > emailLayout.marginHeight = 0; >@@ -509,22 +516,144 @@ > button4.setText(Messages.BugzillaSearchPage_qacontact); > > emailButtons = new Button[] { button0, button1, button2, button3, button4 }; >+ new Label(basicComposite, SWT.NONE); >+ GridLayout sashFormLayout = new GridLayout(); >+ sashFormLayout.numColumns = 4; >+ sashFormLayout.marginHeight = 5; >+ sashFormLayout.marginWidth = 5; >+ sashFormLayout.horizontalSpacing = 5; > >- // operation combo >- emailOperation = new Combo(composite, SWT.SINGLE | SWT.READ_ONLY | SWT.BORDER); >- emailOperation.setItems(emailOperationText); >- emailOperation.setText(emailOperationText[0]); >- emailOperation.select(0); >+ SashForm sashForm = new SashForm(basicComposite, SWT.VERTICAL); >+ sashForm.setLayout(sashFormLayout); >+ final GridData gd_sashForm = new GridData(SWT.FILL, SWT.FILL, true, true, 4, 1); >+ gd_sashForm.widthHint = 400; >+ gd_sashForm.heightHint = 100; >+ sashForm.setLayoutData(gd_sashForm); >+ >+ GridLayout topLayout = new GridLayout(); >+ topLayout.numColumns = 4; >+ SashForm topForm = new SashForm(sashForm, SWT.NONE); >+ GridData topLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1); >+ topLayoutData.widthHint = 00; >+ topLayoutData.heightHint = 100; >+ topForm.setLayoutData(topLayoutData); >+ topForm.setLayout(topLayout); >+ >+ GridLayout productLayout = new GridLayout(); >+ productLayout.marginWidth = 0; >+ productLayout.marginHeight = 0; >+ productLayout.horizontalSpacing = 0; >+ Composite productComposite = new Composite(topForm, SWT.NONE); >+ productComposite.setLayout(productLayout); >+ >+ Label productLabel = new Label(productComposite, SWT.LEFT); >+ productLabel.setText(Messages.BugzillaSearchPage_Product); >+ productLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); >+ >+ GridData productLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true); >+ productLayoutData.heightHint = HEIGHT_ATTRIBUTE_COMBO; >+ product = new List(productComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER); >+ product.setLayoutData(productLayoutData); >+ product.addSelectionListener(new SelectionAdapter() { >+ @Override >+ public void widgetSelected(SelectionEvent e) { >+ if (product.getSelectionIndex() != -1) { >+ String[] selectedProducts = product.getSelection(); >+ updateAttributesFromConfiguration(selectedProducts); >+ } else { >+ updateAttributesFromConfiguration(null); >+ } >+ if (restoring) { >+ restoring = false; >+ restoreWidgetValues(); >+ } >+ setPageComplete(isPageComplete()); >+ } >+ }); >+ >+ GridLayout componentLayout = new GridLayout(); >+ componentLayout.marginWidth = 0; >+ componentLayout.marginHeight = 0; >+ componentLayout.horizontalSpacing = 0; >+ Composite componentComposite = new Composite(topForm, SWT.NONE); >+ componentComposite.setLayout(componentLayout); >+ >+ Label componentLabel = new Label(componentComposite, SWT.LEFT); >+ componentLabel.setText(Messages.BugzillaSearchPage_Component); >+ componentLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); >+ >+ component = new List(componentComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER); >+ GridData componentLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true); >+ componentLayoutData.heightHint = HEIGHT_ATTRIBUTE_COMBO; >+ component.setLayoutData(componentLayoutData); >+ component.addSelectionListener(updateActionSelectionAdapter); >+ >+ Composite statusComposite = new Composite(topForm, SWT.NONE); >+ GridLayout statusLayout = new GridLayout(); >+ statusLayout.marginWidth = 0; >+ statusLayout.horizontalSpacing = 0; >+ statusLayout.marginHeight = 0; >+ statusComposite.setLayout(statusLayout); > >- // Email2 >+ Label statusLabel = new Label(statusComposite, SWT.LEFT); >+ statusLabel.setText(Messages.BugzillaSearchPage_Status); >+ statusLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); > >- Label labelEmail2 = new Label(composite, SWT.LEFT); >+ status = new List(statusComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER); >+ final GridData gd_status = new GridData(SWT.FILL, SWT.FILL, true, true); >+ gd_status.heightHint = HEIGHT_ATTRIBUTE_COMBO; >+ status.setLayoutData(gd_status); >+ status.addSelectionListener(updateActionSelectionAdapter); >+ >+ Composite priorityComposite = new Composite(topForm, SWT.NONE); >+ GridLayout priorityLayout = new GridLayout(); >+ priorityLayout.marginWidth = 0; >+ priorityLayout.marginHeight = 0; >+ priorityLayout.horizontalSpacing = 0; >+ priorityComposite.setLayout(priorityLayout); >+ >+ Label priorityLabel = new Label(priorityComposite, SWT.LEFT); >+ priorityLabel.setText(Messages.BugzillaSearchPage_PROORITY); >+ priorityLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); >+ >+ priority = new List(priorityComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER); >+ final GridData gd_priority = new GridData(SWT.FILL, SWT.FILL, true, true); >+ gd_priority.heightHint = HEIGHT_ATTRIBUTE_COMBO; >+ priority.setLayoutData(gd_priority); >+ priority.addSelectionListener(updateActionSelectionAdapter); >+ >+ } >+ >+ private void createAdvancedComposite(Composite advancedComposite) { >+ >+ // Info text >+ Label labelComment = new Label(advancedComposite, SWT.LEFT); >+ labelComment.setText(Messages.BugzillaSearchPage_Comment); >+ //labelComment.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END)); >+ >+ // Comment pattern combo >+ commentPattern = new Combo(advancedComposite, SWT.SINGLE | SWT.BORDER); >+ commentPattern.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 2, 1)); >+ commentPattern.addModifyListener(new ModifyListenerImplementation()); >+ commentPattern.addSelectionListener(new SelectionAdapter() { >+ @Override >+ public void widgetSelected(SelectionEvent e) { >+ handleWidgetSelected(commentPattern, commentOperation, previousCommentPatterns); >+ } >+ }); >+ >+ commentOperation = new Combo(advancedComposite, SWT.SINGLE | SWT.READ_ONLY | SWT.BORDER); >+ commentOperation.setItems(patternOperationText); >+ commentOperation.setText(patternOperationText[0]); >+ commentOperation.select(0); >+ >+ Label labelEmail2 = new Label(advancedComposite, SWT.LEFT); > labelEmail2.setText(Messages.BugzillaSearchPage_Email_2); > //labelEmail.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END)); > > // pattern combo >- emailPattern2 = new Combo(composite, SWT.SINGLE | SWT.BORDER); >- emailPattern2.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); >+ emailPattern2 = new Combo(advancedComposite, SWT.SINGLE | SWT.BORDER); >+ emailPattern2.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1)); > emailPattern2.addModifyListener(new ModifyListenerImplementation()); > emailPattern2.addSelectionListener(new SelectionAdapter() { > @Override >@@ -532,14 +661,25 @@ > handleWidgetSelected(emailPattern2, emailOperation2, previousEmailPatterns2); > } > }); >+ IContentProposalProvider proposalProvider = TasksUi.getUiFactory().createPersonContentProposalProvider( >+ getTaskRepository()); >+ ILabelProvider proposalLabelProvider = TasksUi.getUiFactory().createPersonContentProposalLabelProvider( >+ getTaskRepository()); > ContentAssistCommandAdapter adapter2 = new ContentAssistCommandAdapter(emailPattern2, > new ComboContentAdapter(), proposalProvider, ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS, > new char[0], true); >- adapter.setLabelProvider(proposalLabelProvider); >+ adapter2.setLabelProvider(proposalLabelProvider); > adapter2.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE); > >- Composite emailComposite2 = new Composite(composite, SWT.NONE); >- emailComposite2.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, false, false, 1, 1)); >+ // operation combo >+ emailOperation2 = new Combo(advancedComposite, SWT.SINGLE | SWT.READ_ONLY | SWT.BORDER); >+ emailOperation2.setItems(emailOperationText); >+ emailOperation2.setText(emailOperationText[0]); >+ emailOperation2.select(0); >+ >+ new Label(advancedComposite, SWT.NONE); >+ Composite emailComposite2 = new Composite(advancedComposite, SWT.NONE); >+ emailComposite2.setLayoutData(new GridData(SWT.CENTER, SWT.CENTER, false, false, 2, 1)); > GridLayout emailLayout2 = new GridLayout(); > emailLayout2.marginWidth = 0; > emailLayout2.marginHeight = 0; >@@ -563,21 +703,11 @@ > e2button4.setText(Messages.BugzillaSearchPage_qacontact); > > emailButtons2 = new Button[] { e2button0, e2button1, e2button2, e2button3, e2button4 }; >+ new Label(advancedComposite, SWT.NONE); >+ Label keywordsLabel = new Label(advancedComposite, SWT.NONE); >+ keywordsLabel.setText(Messages.BugzillaSearchPage_Keywords); > >- // operation combo >- emailOperation2 = new Combo(composite, SWT.SINGLE | SWT.READ_ONLY | SWT.BORDER); >- emailOperation2.setItems(emailOperationText); >- emailOperation2.setText(emailOperationText[0]); >- emailOperation2.select(0); >- >- ///// >- >- Label labelKeywords = new Label(composite, SWT.NONE); >- labelKeywords.setText(Messages.BugzillaSearchPage_Keywords); >-// labelKeywords.setLayoutData(new GridData(LABEL_WIDTH, SWT.DEFAULT)); >- //labelKeywords.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_END)); >- >- Composite keywordsComposite = new Composite(composite, SWT.NONE); >+ Composite keywordsComposite = new Composite(advancedComposite, SWT.NONE); > keywordsComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false, 3, 1)); > GridLayout keywordsLayout = new GridLayout(); > keywordsLayout.marginWidth = 0; >@@ -616,70 +746,51 @@ > }); > keywordsSelectButton.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, false, false)); > keywordsSelectButton.setText(Messages.BugzillaSearchPage_Select_); >- SashForm sashForm = new SashForm(control, SWT.VERTICAL); >- sashForm.setLayout(sashFormLayout); >- final GridData gd_sashForm = new GridData(SWT.FILL, SWT.FILL, true, true); >- gd_sashForm.widthHint = 500; >- sashForm.setLayoutData(gd_sashForm); > >- GridLayout topLayout = new GridLayout(); >- topLayout.numColumns = 4; >- SashForm topForm = new SashForm(sashForm, SWT.NONE); >- GridData topLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true, 3, 1); >- topLayoutData.widthHint = 500; >- topForm.setLayoutData(topLayoutData); >- topForm.setLayout(topLayout); >+ SashForm bottomForm = new SashForm(advancedComposite, SWT.NONE); >+ GridLayout bottomLayout = new GridLayout(); >+ bottomLayout.numColumns = 6; >+ bottomForm.setLayout(bottomLayout); >+ GridData bottomLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true, 4, 1); >+ bottomLayoutData.heightHint = 119; >+ bottomLayoutData.widthHint = 400; >+ bottomForm.setLayoutData(bottomLayoutData); > >- GridLayout productLayout = new GridLayout(); >- productLayout.marginWidth = 0; >- productLayout.marginHeight = 0; >- productLayout.horizontalSpacing = 0; >- Composite productComposite = new Composite(topForm, SWT.NONE); >- productComposite.setLayout(productLayout); >+ Composite severityComposite = new Composite(bottomForm, SWT.NONE); >+ GridLayout severityLayout = new GridLayout(); >+ severityLayout.marginWidth = 0; >+ severityLayout.marginHeight = 0; >+ severityLayout.horizontalSpacing = 0; >+ severityComposite.setLayout(severityLayout); > >- Label productLabel = new Label(productComposite, SWT.LEFT); >- productLabel.setText(Messages.BugzillaSearchPage_Product); >- productLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); >+ Label severityLabel = new Label(severityComposite, SWT.LEFT); >+ severityLabel.setText(Messages.BugzillaSearchPage_Severity); >+ severityLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); > >- GridData productLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true); >- productLayoutData.heightHint = HEIGHT_ATTRIBUTE_COMBO; >- product = new List(productComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER); >- product.setLayoutData(productLayoutData); >- product.addSelectionListener(new SelectionAdapter() { >- @Override >- public void widgetSelected(SelectionEvent e) { >- if (product.getSelectionIndex() != -1) { >- String[] selectedProducts = product.getSelection(); >- updateAttributesFromConfiguration(selectedProducts); >- } else { >- updateAttributesFromConfiguration(null); >- } >- if (restoring) { >- restoring = false; >- restoreWidgetValues(); >- } >- setPageComplete(isPageComplete()); >- } >- }); >+ severity = new List(severityComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER); >+ final GridData gd_severity = new GridData(SWT.FILL, SWT.FILL, true, true); >+ gd_severity.heightHint = HEIGHT_ATTRIBUTE_COMBO; >+ severity.setLayoutData(gd_severity); >+ severity.addSelectionListener(updateActionSelectionAdapter); > >- GridLayout componentLayout = new GridLayout(); >- componentLayout.marginWidth = 0; >- componentLayout.marginHeight = 0; >- componentLayout.horizontalSpacing = 0; >- Composite componentComposite = new Composite(topForm, SWT.NONE); >- componentComposite.setLayout(componentLayout); >+ Composite resolutionComposite = new Composite(bottomForm, SWT.NONE); >+ GridLayout resolutionLayout = new GridLayout(); >+ resolutionLayout.marginWidth = 0; >+ resolutionLayout.marginHeight = 0; >+ resolutionLayout.horizontalSpacing = 0; >+ resolutionComposite.setLayout(resolutionLayout); > >- Label componentLabel = new Label(componentComposite, SWT.LEFT); >- componentLabel.setText(Messages.BugzillaSearchPage_Component); >- componentLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); >+ Label resolutionLabel = new Label(resolutionComposite, SWT.LEFT); >+ resolutionLabel.setText(Messages.BugzillaSearchPage_Resolution); >+ resolutionLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); > >- component = new List(componentComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER); >- GridData componentLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true); >- componentLayoutData.heightHint = HEIGHT_ATTRIBUTE_COMBO; >- component.setLayoutData(componentLayoutData); >- component.addSelectionListener(updateActionSelectionAdapter); >+ resolution = new List(resolutionComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER); >+ final GridData gd_resolution = new GridData(SWT.FILL, SWT.FILL, true, true); >+ gd_resolution.heightHint = HEIGHT_ATTRIBUTE_COMBO; >+ resolution.setLayoutData(gd_resolution); >+ resolution.addSelectionListener(updateActionSelectionAdapter); > >- Composite versionComposite = new Composite(topForm, SWT.NONE); >+ Composite versionComposite = new Composite(bottomForm, SWT.NONE); > GridLayout versionLayout = new GridLayout(); > versionLayout.marginWidth = 0; > versionLayout.marginHeight = 0; >@@ -696,7 +807,7 @@ > version.setLayoutData(versionLayoutData); > version.addSelectionListener(updateActionSelectionAdapter); > >- Composite milestoneComposite = new Composite(topForm, SWT.NONE); >+ Composite milestoneComposite = new Composite(bottomForm, SWT.NONE); > GridLayout milestoneLayout = new GridLayout(); > milestoneLayout.marginWidth = 0; > milestoneLayout.marginHeight = 0; >@@ -713,90 +824,8 @@ > target.setLayoutData(targetLayoutData); > target.addSelectionListener(updateActionSelectionAdapter); > >- SashForm bottomForm = new SashForm(sashForm, SWT.NONE); >- GridLayout bottomLayout = new GridLayout(); >- bottomLayout.numColumns = 6; >- bottomForm.setLayout(bottomLayout); >- GridData bottomLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true, 4, 1); >- bottomLayoutData.heightHint = 119; >- bottomLayoutData.widthHint = 400; >- bottomForm.setLayoutData(bottomLayoutData); >- >- Composite statusComposite = new Composite(bottomForm, SWT.NONE); >- GridLayout statusLayout = new GridLayout(); >- statusLayout.marginTop = 7; >- statusLayout.marginWidth = 0; >- statusLayout.horizontalSpacing = 0; >- statusLayout.marginHeight = 0; >- statusComposite.setLayout(statusLayout); >- >- Label statusLabel = new Label(statusComposite, SWT.LEFT); >- statusLabel.setText(Messages.BugzillaSearchPage_Status); >- statusLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); >- >- status = new List(statusComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER); >- final GridData gd_status = new GridData(SWT.FILL, SWT.FILL, true, true); >- gd_status.heightHint = 60; >- status.setLayoutData(gd_status); >- status.addSelectionListener(updateActionSelectionAdapter); >- >- Composite resolutionComposite = new Composite(bottomForm, SWT.NONE); >- GridLayout resolutionLayout = new GridLayout(); >- resolutionLayout.marginTop = 7; >- resolutionLayout.marginWidth = 0; >- resolutionLayout.marginHeight = 0; >- resolutionLayout.horizontalSpacing = 0; >- resolutionComposite.setLayout(resolutionLayout); >- >- Label resolutionLabel = new Label(resolutionComposite, SWT.LEFT); >- resolutionLabel.setText(Messages.BugzillaSearchPage_Resolution); >- resolutionLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); >- >- resolution = new List(resolutionComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER); >- final GridData gd_resolution = new GridData(SWT.FILL, SWT.FILL, true, true); >- gd_resolution.heightHint = 60; >- resolution.setLayoutData(gd_resolution); >- resolution.addSelectionListener(updateActionSelectionAdapter); >- >- Composite priorityComposite = new Composite(bottomForm, SWT.NONE); >- GridLayout priorityLayout = new GridLayout(); >- priorityLayout.marginTop = 7; >- priorityLayout.marginWidth = 0; >- priorityLayout.marginHeight = 0; >- priorityLayout.horizontalSpacing = 0; >- priorityComposite.setLayout(priorityLayout); >- >- Label priorityLabel = new Label(priorityComposite, SWT.LEFT); >- priorityLabel.setText(Messages.BugzillaSearchPage_PROORITY); >- priorityLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); >- >- priority = new List(priorityComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER); >- final GridData gd_priority = new GridData(SWT.FILL, SWT.FILL, true, true); >- gd_priority.heightHint = 60; >- priority.setLayoutData(gd_priority); >- priority.addSelectionListener(updateActionSelectionAdapter); >- >- Composite severityComposite = new Composite(bottomForm, SWT.NONE); >- GridLayout severityLayout = new GridLayout(); >- severityLayout.marginTop = 7; >- severityLayout.marginWidth = 0; >- severityLayout.marginHeight = 0; >- severityLayout.horizontalSpacing = 0; >- severityComposite.setLayout(severityLayout); >- >- Label severityLabel = new Label(severityComposite, SWT.LEFT); >- severityLabel.setText(Messages.BugzillaSearchPage_Severity); >- severityLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); >- >- severity = new List(severityComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER); >- final GridData gd_severity = new GridData(SWT.FILL, SWT.FILL, true, true); >- gd_severity.heightHint = 60; >- severity.setLayoutData(gd_severity); >- severity.addSelectionListener(updateActionSelectionAdapter); >- > Composite hardwareComposite = new Composite(bottomForm, SWT.NONE); > GridLayout hardwareLayout = new GridLayout(); >- hardwareLayout.marginTop = 7; > hardwareLayout.marginWidth = 0; > hardwareLayout.marginHeight = 0; > hardwareLayout.horizontalSpacing = 0; >@@ -808,13 +837,12 @@ > > hardware = new List(hardwareComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER); > final GridData gd_hardware = new GridData(SWT.FILL, SWT.FILL, true, true); >- gd_hardware.heightHint = 60; >+ gd_hardware.heightHint = HEIGHT_ATTRIBUTE_COMBO; > hardware.setLayoutData(gd_hardware); > hardware.addSelectionListener(updateActionSelectionAdapter); > > Composite osComposite = new Composite(bottomForm, SWT.NONE); > GridLayout osLayout = new GridLayout(); >- osLayout.marginTop = 7; > osLayout.marginWidth = 0; > osLayout.marginHeight = 0; > osLayout.horizontalSpacing = 0; >@@ -826,20 +854,22 @@ > > os = new List(osComposite, SWT.MULTI | SWT.V_SCROLL | SWT.BORDER); > final GridData gd_os = new GridData(SWT.FILL, SWT.FILL, true, true); >- gd_os.heightHint = 60; >+ gd_os.heightHint = HEIGHT_ATTRIBUTE_COMBO; > os.setLayoutData(gd_os); > os.addSelectionListener(updateActionSelectionAdapter); >- bottomForm.setWeights(new int[] { 88, 90, 50, 77, 88, 85 }); >+ > } > > private void createSearchGroup(Composite control) { > Composite composite = new Composite(control, SWT.NONE); >- composite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); >+ GridData gd = new GridData(SWT.FILL, SWT.CENTER, true, false); >+ gd.horizontalSpan = 4; >+ composite.setLayoutData(gd); > GridLayout gridLayout = new GridLayout(); > gridLayout.marginTop = 7; > gridLayout.marginHeight = 0; > gridLayout.marginWidth = 0; >- gridLayout.numColumns = 2; >+ gridLayout.numColumns = 3; > composite.setLayout(gridLayout); > > Label changedInTheLabel = new Label(composite, SWT.LEFT); >@@ -848,7 +878,7 @@ > > Composite updateComposite = new Composite(composite, SWT.NONE); > updateComposite.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, true, false)); >- GridLayout updateLayout = new GridLayout(3, false); >+ GridLayout updateLayout = new GridLayout(2, false); > updateLayout.marginWidth = 0; > updateLayout.horizontalSpacing = 0; > updateLayout.marginHeight = 0; >@@ -862,33 +892,6 @@ > Label label = new Label(updateComposite, SWT.LEFT); > label.setText(Messages.BugzillaSearchPage_days); > >- Button updateButton = new Button(updateComposite, SWT.PUSH); >- updateButton.setText(Messages.BugzillaSearchPage_Update_Attributes_from_Repository); >- updateButton.setLayoutData(new GridData(SWT.RIGHT, SWT.CENTER, true, false)); >- updateButton.addSelectionListener(new SelectionAdapter() { >- @Override >- public void widgetSelected(SelectionEvent e) { >- if (getTaskRepository() != null) { >-// try { >- >- updateConfiguration(true); >- >-// } catch (final CoreException e1) { >-// PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { >-// public void run() { >-// MessageDialog.openError(Display.getDefault().getActiveShell(), "Bugzilla Search Page", >-// "Unable to get configuration. Ensure proper repository configuration in " >-// + TasksUiPlugin.LABEL_VIEW_REPOSITORIES + ".\n\n"); >-// } >-// }); >-// } >- } else { >- MessageDialog.openInformation(Display.getCurrent().getActiveShell(), >- IBugzillaConstants.TITLE_MESSAGE_DIALOG, >- Messages.BugzillaSearchPage_No_repository_available); >- } >- } >- }); > } > > /** >@@ -1767,6 +1770,16 @@ > keywords.setText(settings.get(STORE_KEYWORDS_ID + repoId)); > keywordsOperation.select(settings.getInt(STORE_KEYWORDSMATCH_ID + repoId)); > } >+ >+ if ((commentPattern.getText() != null && !commentPattern.getText().equals("")) || // //$NON-NLS-1$ >+ (emailPattern2.getText() != null && !emailPattern2.getText().equals("")) || // //$NON-NLS-1$ >+ (keywords.getText() != null && !keywords.getText().equals("")) || // //$NON-NLS-1$ >+ severity.getSelection().length > 0 || resolution.getSelection().length > 0 >+ || version.getSelection().length > 0 || target.getSelection().length > 0 >+ || hardware.getSelection().length > 0 || os.getSelection().length > 0) { >+ advancedExpandComposite.setExpanded(true); >+ } >+ > } catch (IllegalArgumentException e) { > //ignore > } >@@ -1922,8 +1935,6 @@ > shell.setEnabled(true); > } > return; >-// this.setPageComplete(this.isPageComplete()); >-// this.setControlsEnabled(true); > } else { > StatusHandler.log(new Status(IStatus.ERROR, BugzillaUiPlugin.ID_PLUGIN, cause.getMessage(), > cause)); >@@ -1992,4 +2003,14 @@ > } > } > >+ @Override >+ public void dispose() { >+ if (toolkit != null) { >+ if (toolkit.getColors() != null) { >+ toolkit.dispose(); >+ } >+ } >+ super.dispose(); >+ } >+ > } >Index: src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/Messages.java >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/Messages.java,v >retrieving revision 1.5 >diff -u -r1.5 Messages.java >--- src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/Messages.java 24 Jan 2010 14:30:07 -0000 1.5 >+++ src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/Messages.java 7 Feb 2010 19:48:01 -0000 >@@ -81,8 +81,4 @@ > > public static String BugzillaTaskAttachmentPage_Advanced; > >- public static String BugzillaAttachmentDialog_DetailTitle; >- >- public static String BugzillaAttachmentDialog_OK_ButtonText; >- > } >Index: src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/messages.properties >=================================================================== >RCS file: /cvsroot/tools/org.eclipse.mylyn/org.eclipse.mylyn.bugzilla.ui/src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/messages.properties,v >retrieving revision 1.5 >diff -u -r1.5 messages.properties >--- src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/messages.properties 24 Jan 2010 14:30:07 -0000 1.5 >+++ src/org/eclipse/mylyn/internal/bugzilla/ui/tasklist/messages.properties 7 Feb 2010 19:48:01 -0000 >@@ -39,5 +39,3 @@ > BugzillaRepositorySettingsPage_supports_bugzilla_X=Supports Bugzilla {0} > BugzillaRepositorySettingsPage_Validating_server_settings=Validating server settings > BugzillaTaskAttachmentPage_Advanced=Advanced >-BugzillaAttachmentDialog_DetailTitle=Attachment Details >-BugzillaAttachmentDialog_OK_ButtonText=Update >Index: src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaAttachmentWizard.java >=================================================================== >RCS file: src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaAttachmentWizard.java >diff -N src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaAttachmentWizard.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaAttachmentWizard.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,152 @@ >+/******************************************************************************* >+ * Copyright (c) 2010 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.wizard; >+ >+import java.lang.reflect.InvocationTargetException; >+ >+import org.eclipse.core.runtime.IProgressMonitor; >+import org.eclipse.core.runtime.IStatus; >+import org.eclipse.core.runtime.Status; >+import org.eclipse.jface.dialogs.IMessageProvider; >+import org.eclipse.jface.operation.IRunnableWithProgress; >+import org.eclipse.jface.wizard.Wizard; >+import org.eclipse.mylyn.commons.core.StatusHandler; >+import org.eclipse.mylyn.internal.bugzilla.ui.BugzillaUiPlugin; >+import org.eclipse.mylyn.internal.bugzilla.ui.action.ChangeAttachmentJob; >+import org.eclipse.mylyn.internal.bugzilla.ui.editor.BugzillaTaskEditorPage; >+import org.eclipse.mylyn.tasks.core.ITaskAttachment; >+import org.eclipse.mylyn.tasks.core.data.TaskAttribute; >+import org.eclipse.mylyn.tasks.ui.editors.AttributeEditorFactory; >+import org.eclipse.mylyn.tasks.ui.editors.TaskEditor; >+import org.eclipse.swt.widgets.Shell; >+import org.eclipse.ui.PlatformUI; >+import org.eclipse.ui.forms.editor.IFormPage; >+ >+public class BugzillaAttachmentWizard extends Wizard { >+ >+ private final AttributeEditorFactory factory; >+ >+ private final TaskAttribute attachmentAttribute; >+ >+ private BugzillaAttachmentWizardPage attachmentWizardPage; >+ >+ private final Shell parentShell; >+ >+ private boolean changed = false; >+ >+ private final TaskEditor taskEditor; >+ >+ private final ITaskAttachment attachment; >+ >+ public BugzillaAttachmentWizard(Shell parentShell, AttributeEditorFactory factory, >+ TaskAttribute attachmentAttribute, TaskEditor taskEditor, ITaskAttachment attachment) { >+ super(); >+ this.factory = factory; >+ this.attachmentAttribute = attachmentAttribute; >+ this.parentShell = parentShell; >+ this.taskEditor = taskEditor; >+ this.attachment = attachment; >+ setNeedsProgressMonitor(true); >+ >+ } >+ >+ @Override >+ public boolean performFinish() { >+ TaskAttribute attachmentTaskAttribute = attachment.getTaskAttribute(); >+ for (TaskAttribute child : attachmentAttribute.getAttributes().values()) { >+ attachmentTaskAttribute.deepAddCopy(child); >+ } >+ >+ final ChangeAttachmentJob job = new ChangeAttachmentJob(attachment, taskEditor); >+ job.setUser(true); >+ if (attachmentWizardPage.runInBackground()) { >+ runInBackground(job); >+ } else { >+ runInWizard(job); >+ } >+ return true; >+ } >+ >+/* currently not needed >+ private void handleDone(final ChangeAttachmentJob job, IProgressMonitor monitor) { >+ try { >+ if (job.getError() != null) { >+ IFormPage formPage = taskEditor.getActivePageInstance(); >+ if (formPage instanceof BugzillaTaskEditorPage) { >+ final BugzillaTaskEditorPage bugzillaPage = (BugzillaTaskEditorPage) formPage; >+ PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { >+ public void run() { >+ bugzillaPage.getTaskEditor() >+ .setMessage(job.getError().getMessage(), IMessageProvider.ERROR); >+ } >+ }); >+ } >+ } else { >+ monitor.setTaskName(Messages.BugzillaAttachmentWizard_Now_synchronize_the_Task); >+ IFormPage formPage = taskEditor.getActivePageInstance(); >+ if (formPage instanceof BugzillaTaskEditorPage) { >+ final BugzillaTaskEditorPage bugzillaPage = (BugzillaTaskEditorPage) formPage; >+ PlatformUI.getWorkbench().getDisplay().asyncExec(new Runnable() { >+ public void run() { >+ bugzillaPage.refreshFormContent(); >+ } >+ }); >+ } >+ } >+ } finally { >+ monitor.done(); >+ } >+ } >+*/ >+ >+ private boolean runInWizard(final ChangeAttachmentJob job) { >+ try { >+ getContainer().run(true, true, new IRunnableWithProgress() { >+ public void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException { >+ job.run(monitor); >+ } >+ }); >+ return true; >+ } catch (InvocationTargetException e) { >+ StatusHandler.fail(new Status(IStatus.ERROR, BugzillaUiPlugin.ID_PLUGIN, "Unexpected error", e)); //$NON-NLS-1$ >+ return false; >+ } catch (InterruptedException e) { >+ // canceled >+ return false; >+ } >+ } >+ >+ private void runInBackground(final ChangeAttachmentJob job) { >+ job.schedule(); >+ } >+ >+ @Override >+ public void addPages() { >+ attachmentWizardPage = new BugzillaAttachmentWizardPage(parentShell, factory, attachmentAttribute, >+ attachment.getTask().getTaskId()); >+ addPage(attachmentWizardPage); >+ } >+ >+ @Override >+ public boolean canFinish() { >+ return isChanged(); >+ } >+ >+ public boolean isChanged() { >+ return changed; >+ } >+ >+ public void setChanged(boolean changed) { >+ this.changed = changed; >+ } >+ >+} >Index: src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaAttachmentWizardPage.java >=================================================================== >RCS file: src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaAttachmentWizardPage.java >diff -N src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaAttachmentWizardPage.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/BugzillaAttachmentWizardPage.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,361 @@ >+/******************************************************************************* >+ * Copyright (c) 2010 Tasktop Technologies 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: >+ * Tasktop Technologies - initial API and implementation >+ *******************************************************************************/ >+ >+package org.eclipse.mylyn.internal.bugzilla.ui.wizard; >+ >+import java.net.MalformedURLException; >+import java.net.URL; >+import java.text.MessageFormat; >+ >+import org.eclipse.jface.dialogs.Dialog; >+import org.eclipse.jface.dialogs.IDialogSettings; >+import org.eclipse.jface.layout.GridDataFactory; >+import org.eclipse.jface.layout.GridLayoutFactory; >+import org.eclipse.jface.resource.ImageDescriptor; >+import org.eclipse.jface.wizard.WizardPage; >+import org.eclipse.mylyn.internal.bugzilla.core.BugzillaAttribute; >+import org.eclipse.mylyn.internal.bugzilla.ui.BugzillaUiPlugin; >+import org.eclipse.mylyn.tasks.core.data.TaskAttribute; >+import org.eclipse.mylyn.tasks.ui.editors.AbstractAttributeEditor; >+import org.eclipse.mylyn.tasks.ui.editors.AttributeEditorFactory; >+import org.eclipse.swt.SWT; >+import org.eclipse.swt.custom.SashForm; >+import org.eclipse.swt.custom.ScrolledComposite; >+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.Label; >+import org.eclipse.swt.widgets.Shell; >+import org.eclipse.ui.forms.events.ExpansionAdapter; >+import org.eclipse.ui.forms.events.ExpansionEvent; >+import org.eclipse.ui.forms.widgets.ExpandableComposite; >+import org.eclipse.ui.forms.widgets.FormToolkit; >+ >+public class BugzillaAttachmentWizardPage extends WizardPage { >+ private static final String PAGE_NAME = "AttachmentDetailPage"; //$NON-NLS-1$ >+ >+ private static final String DIALOG_SETTING_RUN_IN_BACKGROUND = "run-in-background"; //$NON-NLS-1$ >+ >+ private static final String DIALOG_SETTINGS_SECTION_BUGZILLA_ATTACHMENTS_WIZARD = "bugzilla-attachments-wizard"; //$NON-NLS-1$ >+ >+ private final AttributeEditorFactory factory; >+ >+ private final TaskAttribute attachmentAttribute; >+ >+ private FormToolkit toolkit; >+ >+ private static final int LABEL_WIDTH = 120; >+ >+ private static final int COLUMN_GAP = 5; >+ >+ private static final int MULTI_ROW_HEIGHT = 55; >+ >+ private static final int COLUMN_WIDTH = 100; >+ >+ private static final int MULTI_COLUMN_WIDTH = COLUMN_WIDTH + 5 + COLUMN_GAP + LABEL_WIDTH + 5 + COLUMN_WIDTH; >+ >+ private AbstractAttributeEditor commentEditor; >+ >+ private ExpandableComposite flagExpandComposite; >+ >+ private Button runInBackgroundButton; >+ >+ private ScrolledComposite scrolledComposite; >+ >+ private Composite scrolledBodyComposite; >+ >+ public BugzillaAttachmentWizardPage(Shell parentShell, AttributeEditorFactory factory, >+ TaskAttribute attachmentAttribute, String taskID) { >+ super(PAGE_NAME); >+ setTitle(Messages.BugzillaAttachmentWizardPage_Titel); >+ setDescription(MessageFormat.format(Messages.BugzillaAttachmentWizardPage_Description, >+ attachmentAttribute.getValue(), taskID)); >+ setImageDescriptor(createImageDescriptor()); >+ this.factory = factory; >+ this.attachmentAttribute = attachmentAttribute; >+ } >+ >+ private static ImageDescriptor createImageDescriptor() { >+ return ImageDescriptor.createFromURL(makeIconFileURL()); >+ } >+ >+ private static URL makeIconFileURL() { >+ URL baseURL = BugzillaUiPlugin.getDefault().getBundle().getEntry("/icons/"); //$NON-NLS-1$ >+ if (baseURL == null) { >+ return null; >+ } >+ try { >+ return new URL(baseURL, "wizban/banner-attachment-update.gif"); //$NON-NLS-1$ >+ } catch (MalformedURLException e) { >+ e.printStackTrace(); >+ } >+ return null; >+ } >+ >+ public void createControl(Composite parent) { >+ toolkit = new FormToolkit(parent.getDisplay()); >+ >+ Composite pageArea = new Composite(parent, SWT.NONE); >+ pageArea.setBackground(parent.getBackground()); >+ pageArea.setForeground(parent.getDisplay().getSystemColor(SWT.COLOR_LIST_FOREGROUND)); >+ pageArea.setLayout(new GridLayout(1, false)); >+ >+ SashForm bottomForm = new SashForm(pageArea, SWT.NONE); >+ bottomForm.setOrientation(SWT.VERTICAL); >+ GridLayout bottomLayout = new GridLayout(); >+ bottomLayout.numColumns = 1; >+ bottomForm.setLayout(bottomLayout); >+ GridData bottomLayoutData = new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1); >+ bottomLayoutData.heightHint = 119; >+ bottomLayoutData.widthHint = 200; >+ bottomForm.setLayoutData(bottomLayoutData); >+ int currentColumn = 1; >+ int columnCount = 4; >+ >+ scrolledComposite = new ScrolledComposite(bottomForm, SWT.H_SCROLL | SWT.V_SCROLL) { >+ @Override >+ public Point computeSize(int hint, int hint2, boolean changed) { >+ return new Point(64, 64); >+ } >+ }; >+ scrolledComposite.setExpandHorizontal(true); >+ scrolledComposite.setExpandVertical(true); >+ >+ scrolledBodyComposite = new Composite(scrolledComposite, SWT.NONE); >+ scrolledBodyComposite.setBackground(pageArea.getBackground()); >+ scrolledBodyComposite.setForeground(scrolledBodyComposite.getDisplay() >+ .getSystemColor(SWT.COLOR_LIST_FOREGROUND)); >+ GridLayout layout = new GridLayout(4, false); >+ scrolledBodyComposite.setLayout(layout); >+ scrolledComposite.setContent(scrolledBodyComposite); >+ >+ Composite commentArea = new Composite(bottomForm, SWT.NONE); >+ commentArea.setBackground(pageArea.getBackground()); >+ commentArea.setForeground(commentArea.getDisplay().getSystemColor(SWT.COLOR_LIST_FOREGROUND)); >+ layout = new GridLayout(4, false); >+ commentArea.setLayout(layout); >+ >+ createAttributeEditors(currentColumn, columnCount, scrolledBodyComposite); >+ createCommentEditor(currentColumn, columnCount, commentArea); >+ createFlagSection(scrolledBodyComposite); >+ createAttributeEditor(attachmentAttribute.getMappedAttribute(TaskAttribute.ATTACHMENT_URL), currentColumn, >+ columnCount, scrolledBodyComposite); >+ GridDataFactory.fillDefaults().grab(true, false).hint(200, SWT.DEFAULT).span(4, SWT.DEFAULT).applyTo( >+ scrolledBodyComposite); >+ >+ runInBackgroundButton = new Button(pageArea, SWT.CHECK); >+ runInBackgroundButton.setText(Messages.BugzillaAttachmentWizardPage_RunInBackground); >+ IDialogSettings settings = BugzillaUiPlugin.getDefault().getDialogSettings(); >+ IDialogSettings attachmentsSettings = settings.getSection(DIALOG_SETTINGS_SECTION_BUGZILLA_ATTACHMENTS_WIZARD); >+ if (attachmentsSettings != null) { >+ runInBackgroundButton.setSelection(attachmentsSettings.getBoolean(DIALOG_SETTING_RUN_IN_BACKGROUND)); >+ } >+ setControl(pageArea); >+ Dialog.applyDialogFont(pageArea); >+ bottomForm.setWeights(new int[] { 65, 35 }); >+ scrolledComposite.setMinSize(scrolledBodyComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT, true)); >+ } >+ >+ private void createAttributeEditor(TaskAttribute attribute, int currentColumn, int columnCount, >+ Composite attributeArea) { >+ String type = attribute.getMetaData().getType(); >+ if (type != null) { >+ AbstractAttributeEditor editor = factory.createEditor(type, attribute); >+ if (attribute.getId().equals(BugzillaAttribute.TOKEN.getKey()) >+ || attribute.getId().equals("size") || attribute.getId().equals(TaskAttribute.ATTACHMENT_URL)) { //$NON-NLS-1$ >+ editor.setReadOnly(true); >+ } else { >+ editor.setReadOnly(false); >+ } >+ if (editor.hasLabel() && !TaskAttribute.ATTACHMENT_IS_PATCH.equals(attribute.getId())) { >+ editor.createLabelControl(attributeArea, toolkit); >+ Label label = editor.getLabelControl(); >+ label.setBackground(attributeArea.getBackground()); >+ label.setForeground(attributeArea.getForeground()); >+ >+ String labelString = editor.getLabel(); >+ if (labelString != null && !labelString.equals("")) { //$NON-NLS-1$ >+ GridData gd = GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).hint(LABEL_WIDTH, >+ SWT.DEFAULT).create(); >+ if (currentColumn > 1) { >+ gd.horizontalIndent = COLUMN_GAP; >+ gd.widthHint = LABEL_WIDTH + COLUMN_GAP; >+ } >+ label.setLayoutData(gd); >+ currentColumn++; >+ } >+ } >+ editor.createControl(attributeArea, toolkit); >+ GridData gd = new GridData(SWT.FILL, SWT.CENTER, false, false); >+ if (BugzillaAttribute.CTYPE.getKey().equals(attribute.getId())) { >+ gd.horizontalSpan = 2; >+ gd.widthHint = LABEL_WIDTH * 2; >+ } else if (TaskAttribute.ATTACHMENT_IS_PATCH.equals(attribute.getId())) { >+ gd.horizontalSpan = 1; >+ } else if (type.equals(TaskAttribute.TYPE_BOOLEAN) || type.equals(TaskAttribute.TYPE_SHORT_TEXT) >+ || type.equals(TaskAttribute.TYPE_URL)) { >+ gd.horizontalSpan = 3; >+ } else { >+ gd.horizontalSpan = 1; >+ } >+ editor.getControl().setLayoutData(gd); >+ editor.getControl().setBackground(attributeArea.getBackground()); >+ editor.getControl().setForeground(attributeArea.getForeground()); >+ currentColumn += gd.horizontalSpan; >+ currentColumn %= columnCount; >+ } >+ } >+ >+ private void createAttributeEditors(int currentColumn, int columnCount, Composite attributeArea) { >+ createAttributeEditor(attachmentAttribute.getMappedAttribute(TaskAttribute.ATTACHMENT_DESCRIPTION), >+ currentColumn, columnCount, attributeArea); >+ createAttributeEditor(attachmentAttribute.getMappedAttribute(TaskAttribute.ATTACHMENT_FILENAME), currentColumn, >+ columnCount, attributeArea); >+ createAttributeEditor(attachmentAttribute.getMappedAttribute(TaskAttribute.ATTACHMENT_SIZE), currentColumn, >+ columnCount, attributeArea); >+ createAttributeEditor(attachmentAttribute.getMappedAttribute(TaskAttribute.ATTACHMENT_CONTENT_TYPE), >+ currentColumn, columnCount, attributeArea); >+ createAttributeEditor(attachmentAttribute.getMappedAttribute(TaskAttribute.ATTACHMENT_IS_PATCH), currentColumn, >+ columnCount, attributeArea); >+ createAttributeEditor(attachmentAttribute.getMappedAttribute(TaskAttribute.ATTACHMENT_IS_DEPRECATED), >+ currentColumn, columnCount, attributeArea); >+ } >+ >+ private void createCommentEditor(int currentColumn, int columnCount, Composite attributeArea) { >+ TaskAttribute commentAttribute = attachmentAttribute.getAttribute("comment"); //$NON-NLS-1$ >+ if (commentAttribute == null) { >+ return; >+ } >+ String type = commentAttribute.getMetaData().getType(); >+ if (type != null) { >+ commentEditor = factory.createEditor(type, commentAttribute); >+ String labelString = commentEditor.getLabel(); >+ if (commentEditor.hasLabel()) { >+ commentEditor.createLabelControl(attributeArea, toolkit); >+ if (!labelString.equals("")) { //$NON-NLS-1$ >+ Label label = commentEditor.getLabelControl(); >+ label.setBackground(attributeArea.getBackground()); >+ label.setForeground(attributeArea.getForeground()); >+ GridData gd = GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.TOP).hint(LABEL_WIDTH, >+ SWT.DEFAULT).create(); >+ if (currentColumn > 1) { >+ gd.horizontalIndent = COLUMN_GAP; >+ gd.widthHint = LABEL_WIDTH + COLUMN_GAP; >+ } >+ label.setLayoutData(gd); >+ } >+ } >+ commentEditor.createControl(attributeArea, toolkit); >+ commentEditor.getControl().setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER); >+ GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true); >+ gd.heightHint = MULTI_ROW_HEIGHT; >+ gd.widthHint = MULTI_COLUMN_WIDTH; >+ gd.horizontalSpan = 3; >+ commentEditor.getControl().setLayoutData(gd); >+ commentEditor.getControl().setForeground(attributeArea.getForeground()); >+ >+ toolkit.paintBordersFor(attributeArea); >+ } >+ >+ } >+ >+ private void createFlagSection(final Composite container) { >+ boolean flagFound = false; >+ for (TaskAttribute attribute : attachmentAttribute.getAttributes().values()) { >+ if (!attribute.getId().startsWith("task.common.kind.flag")) { //$NON-NLS-1$ >+ continue; >+ } >+ flagFound = true; >+ break; >+ } >+ if (!flagFound) { >+ return; >+ } >+ flagExpandComposite = toolkit.createExpandableComposite(container, ExpandableComposite.COMPACT >+ | ExpandableComposite.TWISTIE | ExpandableComposite.TITLE_BAR); >+ flagExpandComposite.setFont(container.getFont()); >+ flagExpandComposite.setBackground(container.getBackground()); >+ flagExpandComposite.setText(Messages.BugzillaAttachmentWizardPage_Advanced); >+ flagExpandComposite.setLayout(new GridLayout(4, false)); >+ GridDataFactory.fillDefaults().indent(0, 5).grab(true, false).span(4, SWT.DEFAULT).applyTo(flagExpandComposite); >+ >+ flagExpandComposite.addExpansionListener(new ExpansionAdapter() { >+ @Override >+ public void expansionStateChanged(ExpansionEvent e) { >+ scrolledComposite.setMinSize(scrolledBodyComposite.computeSize(SWT.DEFAULT, SWT.DEFAULT, true)); >+ getControl().getShell().pack(); >+ } >+ }); >+ Composite flagBodyComposite = new Composite(flagExpandComposite, SWT.NONE); >+ GridLayoutFactory.fillDefaults().margins(0, 0).numColumns(2).applyTo(flagBodyComposite); >+ flagBodyComposite.setBackground(container.getBackground()); >+ createFlagEditors(2, flagBodyComposite); >+ flagExpandComposite.setClient(flagBodyComposite); >+ } >+ >+ private void createFlagEditors(int columnCount, Composite flagBodyComposite) { >+ int currentFlagColumn = 1; >+ >+ for (TaskAttribute attribute : attachmentAttribute.getAttributes().values()) { >+ if (!attribute.getId().startsWith("task.common.kind.flag")) { //$NON-NLS-1$ >+ continue; >+ } >+ String type = attribute.getMetaData().getType(); >+ if (type != null) { >+ AbstractAttributeEditor editor = factory.createEditor(type, attribute); >+ >+ if (editor.hasLabel()) { >+ editor.createLabelControl(flagBodyComposite, toolkit); >+ Label label = editor.getLabelControl(); >+ label.setBackground(flagBodyComposite.getBackground()); >+ label.setForeground(flagBodyComposite.getForeground()); >+ >+ GridData gd = GridDataFactory.fillDefaults().align(SWT.RIGHT, SWT.CENTER).hint( >+ LABEL_WIDTH - (4 * COLUMN_GAP), SWT.DEFAULT).create(); >+ if (currentFlagColumn > 1) { >+ gd.horizontalIndent = COLUMN_GAP; >+ gd.widthHint = LABEL_WIDTH + COLUMN_GAP; >+ } else { >+ gd.horizontalIndent = COLUMN_GAP * 3; >+ } >+ label.setLayoutData(gd); >+ currentFlagColumn++; >+ } >+ editor.createControl(flagBodyComposite, toolkit); >+ GridData gd = new GridData(SWT.FILL, SWT.CENTER, false, false); >+ gd.widthHint = MULTI_COLUMN_WIDTH;//COLUMN_WIDTH; >+ editor.getControl().setLayoutData(gd); >+ currentFlagColumn += gd.horizontalSpan; >+ currentFlagColumn %= columnCount; >+ editor.getControl().setBackground(flagBodyComposite.getBackground()); >+ editor.getControl().setForeground(flagBodyComposite.getForeground()); >+ } >+ } >+ } >+ >+ @Override >+ public void dispose() { >+ IDialogSettings settings = BugzillaUiPlugin.getDefault().getDialogSettings(); >+ IDialogSettings attachmentsSettings = settings.getSection(DIALOG_SETTINGS_SECTION_BUGZILLA_ATTACHMENTS_WIZARD); >+ if (attachmentsSettings == null) { >+ attachmentsSettings = settings.addNewSection(DIALOG_SETTINGS_SECTION_BUGZILLA_ATTACHMENTS_WIZARD); >+ } >+ attachmentsSettings.put(DIALOG_SETTING_RUN_IN_BACKGROUND, runInBackgroundButton.getSelection()); >+ super.dispose(); >+ } >+ >+ public boolean runInBackground() { >+ return runInBackgroundButton.getSelection(); >+ } >+ >+} >Index: src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/Messages.java >=================================================================== >RCS file: src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/Messages.java >diff -N src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/Messages.java >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/Messages.java 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,35 @@ >+/******************************************************************************* >+ * Copyright (c) 2010 Tasktop Technologies 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: >+ * Tasktop Technologies - initial API and implementation >+ *******************************************************************************/ >+ >+package org.eclipse.mylyn.internal.bugzilla.ui.wizard; >+ >+import org.eclipse.osgi.util.NLS; >+ >+public class Messages extends NLS { >+ private static final String BUNDLE_NAME = "org.eclipse.mylyn.internal.bugzilla.ui.wizard.messages"; //$NON-NLS-1$ >+ >+ public static String BugzillaAttachmentWizard_Now_synchronize_the_Task; >+ >+ public static String BugzillaAttachmentWizardPage_Advanced; >+ >+ public static String BugzillaAttachmentWizardPage_Description; >+ >+ public static String BugzillaAttachmentWizardPage_RunInBackground; >+ >+ public static String BugzillaAttachmentWizardPage_Titel; >+ static { >+ // initialize resource bundle >+ NLS.initializeMessages(BUNDLE_NAME, Messages.class); >+ } >+ >+ private Messages() { >+ } >+} >Index: src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/messages.properties >=================================================================== >RCS file: src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/messages.properties >diff -N src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/messages.properties >--- /dev/null 1 Jan 1970 00:00:00 -0000 >+++ src/org/eclipse/mylyn/internal/bugzilla/ui/wizard/messages.properties 1 Jan 1970 00:00:00 -0000 >@@ -0,0 +1,5 @@ >+BugzillaAttachmentWizard_Now_synchronize_the_Task=Updating Attachment: Now synchronize the Task >+BugzillaAttachmentWizardPage_Advanced=Advanced >+BugzillaAttachmentWizardPage_Description=Show Attachment {0} Details for Bug {1} >+BugzillaAttachmentWizardPage_RunInBackground=Run in Background >+BugzillaAttachmentWizardPage_Titel=Attachment Detail
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 272207
:
133266
|
135233
|
135234
|
137420
|
137421
|
145341
|
145342
|
148590
|
148596
|
155778
|
156125
|
156335
|
156336
|
156860
|
157056
|
157057
|
157179
|
157488
|
157719
|
157837
|
158090
|
158091
| 158395 |
158396
|
158871
|
161227