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 156890 Details for
Bug 290197
[ui] refactor bugzilla search query page layout
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
minor update
clipboard.txt (text/plain), 31.80 KB, created by
Robert Elves
on 2010-01-21 19:36:30 EST
(
hide
)
Description:
minor update
Filename:
MIME Type:
Creator:
Robert Elves
Created:
2010-01-21 19:36:30 EST
Size:
31.80 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.mylyn.bugzilla.ui >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 22 Jan 2010 00:33:03 -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,12 @@ > > private RepositoryConfiguration repositoryConfiguration; > >+ private final FormToolkit toolkit; >+ >+ private ExpandableComposite basicExpandComposite; >+ >+ private ExpandableComposite advancedExpandComposite; >+ > private final SelectionAdapter updateActionSelectionAdapter = new SelectionAdapter() { > @Override > public void widgetSelected(SelectionEvent e) { >@@ -315,6 +325,7 @@ > // } > // }); > // } >+ toolkit = new FormToolkit(Display.getCurrent()); > } > > public BugzillaSearchPage(TaskRepository repository, IRepositoryQuery origQuery) { >@@ -335,6 +346,7 @@ > // } > // }); > // } >+ toolkit = new FormToolkit(Display.getCurrent()); > } > > public void createControl(Composite parent) { >@@ -345,86 +357,82 @@ > 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 >- // } >- // } > 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; >- >- 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); >+ private void createOptionsGroup(Composite control) { >+ basicExpandComposite = toolkit.createExpandableComposite(control, ExpandableComposite.COMPACT >+ | ExpandableComposite.TWISTIE | ExpandableComposite.TITLE_BAR); >+ basicExpandComposite.setFont(control.getFont()); >+ basicExpandComposite.setBackground(null); >+ basicExpandComposite.setText("Basic"); >+ basicExpandComposite.setLayout(new GridLayout(3, false)); >+ GridData g = new GridData(GridData.FILL_HORIZONTAL); >+ g.horizontalSpan = 3; >+ basicExpandComposite.setLayoutData(g); >+ basicExpandComposite.addExpansionListener(new ExpansionAdapter() { >+ @Override >+ public void expansionStateChanged(ExpansionEvent e) { >+ getControl().getShell().pack(); >+ } >+ }); > >- 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()); >+ Composite basicComposite = new Composite(basicExpandComposite, SWT.NONE); >+ basicComposite.setLayout(new GridLayout(4, false)); >+ g = new GridData(GridData.FILL_HORIZONTAL); >+ g.widthHint = 500; >+ g.heightHint = 200; >+ >+ basicComposite.setLayoutData(g); >+ Dialog.applyDialogFont(basicComposite); >+ basicExpandComposite.setExpanded(true); >+ >+ basicExpandComposite.setClient(basicComposite); >+ >+ advancedExpandComposite = toolkit.createExpandableComposite(control, ExpandableComposite.COMPACT >+ | ExpandableComposite.TWISTIE | ExpandableComposite.TITLE_BAR); >+ advancedExpandComposite.setFont(control.getFont()); >+ advancedExpandComposite.setBackground(null); >+ advancedExpandComposite.setText("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); >+ >+ } > >+ 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 +442,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 +470,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 +502,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); > >- // Email2 >+ Label productLabel = new Label(productComposite, SWT.LEFT); >+ productLabel.setText(Messages.BugzillaSearchPage_Product); >+ productLabel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); > >- Label labelEmail2 = new Label(composite, SWT.LEFT); >+ 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); >+ >+ 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 = 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 +647,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 +689,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 +732,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 +793,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 +810,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 +823,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,10 +840,10 @@ > > 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) { >@@ -869,19 +883,7 @@ > @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, >@@ -1767,6 +1769,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 +1934,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 +2002,14 @@ > } > } > >+ @Override >+ public void dispose() { >+ if (toolkit != null) { >+ if (toolkit.getColors() != null) { >+ toolkit.dispose(); >+ } >+ } >+ super.dispose(); >+ } >+ > }
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 290197
:
147846
|
155687
|
156878
|
156879
|
156888
|
156889
| 156890 |
157061
|
158781
|
158782
|
160233
|
160234
|
160360
|
160361