|
Lines 15-21
Link Here
|
| 15 |
import java.util.Iterator; |
15 |
import java.util.Iterator; |
| 16 |
import java.util.List; |
16 |
import java.util.List; |
| 17 |
|
17 |
|
| 18 |
import org.eclipse.jface.resource.ImageDescriptor; |
|
|
| 19 |
import org.eclipse.jface.viewers.IColorProvider; |
18 |
import org.eclipse.jface.viewers.IColorProvider; |
| 20 |
import org.eclipse.jface.viewers.ILabelProvider; |
19 |
import org.eclipse.jface.viewers.ILabelProvider; |
| 21 |
import org.eclipse.jface.viewers.ILabelProviderListener; |
20 |
import org.eclipse.jface.viewers.ILabelProviderListener; |
|
Lines 35-40
Link Here
|
| 35 |
import org.eclipse.mylar.provisional.tasklist.MylarTaskListPlugin; |
34 |
import org.eclipse.mylar.provisional.tasklist.MylarTaskListPlugin; |
| 36 |
import org.eclipse.mylar.provisional.tasklist.TaskRepository; |
35 |
import org.eclipse.mylar.provisional.tasklist.TaskRepository; |
| 37 |
import org.eclipse.swt.SWT; |
36 |
import org.eclipse.swt.SWT; |
|
|
37 |
import org.eclipse.swt.custom.SashForm; |
| 38 |
import org.eclipse.swt.events.FocusAdapter; |
38 |
import org.eclipse.swt.events.FocusAdapter; |
| 39 |
import org.eclipse.swt.events.FocusEvent; |
39 |
import org.eclipse.swt.events.FocusEvent; |
| 40 |
import org.eclipse.swt.events.ModifyEvent; |
40 |
import org.eclipse.swt.events.ModifyEvent; |
|
Lines 119-127
Link Here
|
| 119 |
* @param title |
119 |
* @param title |
| 120 |
* @param titleImage |
120 |
* @param titleImage |
| 121 |
*/ |
121 |
*/ |
| 122 |
protected FilterSummaryPage(TaskRepository repository, String pageName, String title, ImageDescriptor titleImage, |
122 |
protected FilterSummaryPage(TaskRepository repository, FilterDefinition workingCopy, boolean isNew) { |
| 123 |
FilterDefinition workingCopy, boolean isNew) { |
123 |
super("summaryPage", "Filter Summary", null); |
| 124 |
super(pageName, title, titleImage); |
|
|
| 125 |
this.repository = repository; |
124 |
this.repository = repository; |
| 126 |
|
125 |
|
| 127 |
this.server = JiraServerFacade.getDefault().getJiraServer(repository); |
126 |
this.server = JiraServerFacade.getDefault().getJiraServer(repository); |
|
Lines 132-140
Link Here
|
| 132 |
} |
131 |
} |
| 133 |
|
132 |
|
| 134 |
public void createControl(Composite parent) { |
133 |
public void createControl(Composite parent) { |
| 135 |
GridData gd; |
|
|
| 136 |
Composite c = new Composite(parent, SWT.NONE); |
134 |
Composite c = new Composite(parent, SWT.NONE); |
| 137 |
c.setLayout(new GridLayout(3, false)); |
135 |
c.setLayout(new GridLayout(5, false)); |
| 138 |
|
136 |
|
| 139 |
Label lblName = new Label(c, SWT.NONE); |
137 |
Label lblName = new Label(c, SWT.NONE); |
| 140 |
final GridData gridData = new GridData(); |
138 |
final GridData gridData = new GridData(); |
|
Lines 142-148
Link Here
|
| 142 |
lblName.setText("Name:"); |
140 |
lblName.setText("Name:"); |
| 143 |
|
141 |
|
| 144 |
name = new Text(c, SWT.BORDER); |
142 |
name = new Text(c, SWT.BORDER); |
| 145 |
name.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1)); |
143 |
name.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 4, 1)); |
| 146 |
name.addModifyListener(new ModifyListener() { |
144 |
name.addModifyListener(new ModifyListener() { |
| 147 |
|
145 |
|
| 148 |
public void modifyText(ModifyEvent e) { |
146 |
public void modifyText(ModifyEvent e) { |
|
Lines 160-166
Link Here
|
| 160 |
lblDescription.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false)); |
158 |
lblDescription.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false)); |
| 161 |
|
159 |
|
| 162 |
description = new Text(c, SWT.BORDER | SWT.MULTI | SWT.WRAP | SWT.V_SCROLL); |
160 |
description = new Text(c, SWT.BORDER | SWT.MULTI | SWT.WRAP | SWT.V_SCROLL); |
| 163 |
gd = new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1); |
161 |
GridData gd = new GridData(SWT.FILL, SWT.FILL, false, false, 4, 1); |
| 164 |
gd.heightHint = 40; |
162 |
gd.heightHint = 40; |
| 165 |
description.setLayoutData(gd); |
163 |
description.setLayoutData(gd); |
| 166 |
description.addFocusListener(new FocusAdapter() { |
164 |
description.addFocusListener(new FocusAdapter() { |
|
Lines 172-209
Link Here
|
| 172 |
}); |
170 |
}); |
| 173 |
|
171 |
|
| 174 |
{ |
172 |
{ |
| 175 |
Composite cc = new Composite(c, SWT.NONE); |
173 |
SashForm cc = new SashForm(c, SWT.HORIZONTAL); |
| 176 |
final GridData gridData_1 = new GridData(SWT.FILL, SWT.FILL, false, true, 3, 1); |
174 |
cc.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, true, 5, 1)); |
| 177 |
cc.setLayoutData(gridData_1); |
|
|
| 178 |
cc.setLayout(new GridLayout(4, false)); |
| 179 |
|
| 180 |
Label lblProject = new Label(cc, SWT.NONE); |
| 181 |
lblProject.setText("Project:"); |
| 182 |
|
| 183 |
Label lblFixFor = new Label(cc, SWT.NONE); |
| 184 |
lblFixFor.setText("Fix For:"); |
| 185 |
lblFixFor.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false)); |
| 186 |
|
| 187 |
Label lblComponent = new Label(cc, SWT.NONE); |
| 188 |
lblComponent.setText("In Components:"); |
| 189 |
lblComponent.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false)); |
| 190 |
|
| 191 |
Label lblReportedIn = new Label(cc, SWT.NONE); |
| 192 |
lblReportedIn.setText("Reported In:"); |
| 193 |
lblReportedIn.setLayoutData(new GridData(SWT.LEFT, SWT.TOP, false, false)); |
| 194 |
|
| 195 |
createProjectsViewer(cc); |
| 196 |
createFixForViewer(cc); |
| 197 |
createComponentsViewer(cc); |
| 198 |
createReportedInViewer(cc); |
| 199 |
|
175 |
|
|
|
176 |
{ |
| 177 |
Composite comp = new Composite(cc, SWT.NONE); |
| 178 |
GridLayout gridLayout = new GridLayout(1, false); |
| 179 |
gridLayout.marginWidth = 0; |
| 180 |
gridLayout.marginHeight = 0; |
| 181 |
comp.setLayout(gridLayout); |
| 182 |
|
| 183 |
Label label = new Label(comp, SWT.NONE); |
| 184 |
label.setText("Project:"); |
| 185 |
createProjectsViewer(comp); |
| 186 |
} |
| 187 |
|
| 188 |
{ |
| 189 |
Composite comp = new Composite(cc, SWT.NONE); |
| 190 |
GridLayout gridLayout = new GridLayout(1, false); |
| 191 |
gridLayout.marginWidth = 0; |
| 192 |
gridLayout.marginHeight = 0; |
| 193 |
comp.setLayout(gridLayout); |
| 194 |
|
| 195 |
new Label(comp, SWT.NONE).setText("Fix For:"); |
| 196 |
createFixForViewer(comp); |
| 197 |
} |
| 198 |
|
| 199 |
{ |
| 200 |
Composite comp = new Composite(cc, SWT.NONE); |
| 201 |
GridLayout gridLayout = new GridLayout(1, false); |
| 202 |
gridLayout.marginWidth = 0; |
| 203 |
gridLayout.marginHeight = 0; |
| 204 |
comp.setLayout(gridLayout); |
| 205 |
|
| 206 |
new Label(comp, SWT.NONE).setText("In Components:"); |
| 207 |
createComponentsViewer(comp); |
| 208 |
} |
| 209 |
|
| 210 |
{ |
| 211 |
Composite comp = new Composite(cc, SWT.NONE); |
| 212 |
GridLayout gridLayout = new GridLayout(1, false); |
| 213 |
gridLayout.marginWidth = 0; |
| 214 |
gridLayout.marginHeight = 0; |
| 215 |
comp.setLayout(gridLayout); |
| 216 |
|
| 217 |
Label label = new Label(comp, SWT.NONE); |
| 218 |
label.setText("Reported In:"); |
| 219 |
createReportedInViewer(comp); |
| 220 |
} |
| 221 |
// cc.setWeights(new int[] {1,1,1,1}); |
| 200 |
} |
222 |
} |
| 201 |
|
223 |
|
| 202 |
Label lblQuery = new Label(c, SWT.NONE); |
224 |
Label lblQuery = new Label(c, SWT.NONE); |
| 203 |
lblQuery.setLayoutData(new GridData()); |
225 |
lblQuery.setLayoutData(new GridData()); |
| 204 |
lblQuery.setText("Query:"); |
226 |
lblQuery.setText("Query:"); |
| 205 |
queryString = new Text(c, SWT.BORDER); |
227 |
queryString = new Text(c, SWT.BORDER); |
| 206 |
queryString.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, false, 2, 1)); |
228 |
queryString.setLayoutData(new GridData(SWT.FILL, SWT.FILL, false, false, 4, 1)); |
| 207 |
// TODO put content assist here and a label describing what is available |
229 |
// TODO put content assist here and a label describing what is available |
| 208 |
|
230 |
|
| 209 |
queryString.addFocusListener(new FocusAdapter() { |
231 |
queryString.addFocusListener(new FocusAdapter() { |
|
Lines 239-254
Link Here
|
| 239 |
} |
261 |
} |
| 240 |
|
262 |
|
| 241 |
}); |
263 |
}); |
| 242 |
new Label(c, SWT.NONE); |
|
|
| 243 |
|
| 244 |
// Need to turn off validation here |
| 245 |
if (isNew) { |
| 246 |
loadFromDefaults(); |
| 247 |
} else { |
| 248 |
loadFromWorkingCopy(); |
| 249 |
} |
| 250 |
|
| 251 |
setControl(c); |
| 252 |
|
264 |
|
| 253 |
searchComments = new Button(c, SWT.CHECK); |
265 |
searchComments = new Button(c, SWT.CHECK); |
| 254 |
searchComments.setLayoutData(new GridData()); |
266 |
searchComments.setLayoutData(new GridData()); |
|
Lines 262-268
Link Here
|
| 262 |
}); |
274 |
}); |
| 263 |
|
275 |
|
| 264 |
searchEnvironment = new Button(c, SWT.CHECK); |
276 |
searchEnvironment = new Button(c, SWT.CHECK); |
| 265 |
searchEnvironment.setLayoutData(new GridData()); |
277 |
searchEnvironment.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false)); |
| 266 |
searchEnvironment.setText("Environment"); |
278 |
searchEnvironment.setText("Environment"); |
| 267 |
searchEnvironment.addSelectionListener(new SelectionAdapter() { |
279 |
searchEnvironment.addSelectionListener(new SelectionAdapter() { |
| 268 |
|
280 |
|
|
Lines 271-282
Link Here
|
| 271 |
} |
283 |
} |
| 272 |
|
284 |
|
| 273 |
}); |
285 |
}); |
|
|
286 |
|
| 287 |
// Need to turn off validation here |
| 288 |
if (isNew) { |
| 289 |
loadFromDefaults(); |
| 290 |
} else { |
| 291 |
loadFromWorkingCopy(); |
| 292 |
} |
| 293 |
|
| 294 |
setControl(c); |
| 274 |
} |
295 |
} |
| 275 |
|
296 |
|
| 276 |
public IWizardPage getNextPage() { |
297 |
public IWizardPage getNextPage() { |
| 277 |
if (issueAttributesPage == null) { |
298 |
if (issueAttributesPage == null) { |
| 278 |
issueAttributesPage = new IssueAttributesPage(repository, "issueAttributes", "Issue Attributes", null, |
299 |
issueAttributesPage = new IssueAttributesPage(repository, workingCopy, isNew); |
| 279 |
workingCopy, isNew); |
|
|
| 280 |
issueAttributesPage.setWizard(getWizard()); |
300 |
issueAttributesPage.setWizard(getWizard()); |
| 281 |
} |
301 |
} |
| 282 |
|
302 |
|
|
Lines 284-294
Link Here
|
| 284 |
} |
304 |
} |
| 285 |
|
305 |
|
| 286 |
private void createReportedInViewer(Composite c) { |
306 |
private void createReportedInViewer(Composite c) { |
| 287 |
GridData gd; |
307 |
reportedIn = new ListViewer(c, SWT.V_SCROLL | SWT.MULTI | SWT.BORDER | SWT.H_SCROLL); |
| 288 |
reportedIn = new ListViewer(c, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL); |
308 |
GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true); |
| 289 |
gd = new GridData(SWT.FILL, SWT.FILL, true, true); |
309 |
gridData.heightHint = 200; |
| 290 |
gd.heightHint = 40; |
310 |
gridData.widthHint = 80; |
| 291 |
reportedIn.getControl().setLayoutData(gd); |
311 |
reportedIn.getControl().setLayoutData(gridData); |
| 292 |
|
312 |
|
| 293 |
reportedIn.setContentProvider(new IStructuredContentProvider() { |
313 |
reportedIn.setContentProvider(new IStructuredContentProvider() { |
| 294 |
private Project project; |
314 |
private Project project; |
|
Lines 327-337
Link Here
|
| 327 |
} |
347 |
} |
| 328 |
|
348 |
|
| 329 |
private void createComponentsViewer(Composite c) { |
349 |
private void createComponentsViewer(Composite c) { |
| 330 |
GridData gd; |
350 |
components = new ListViewer(c, SWT.V_SCROLL | SWT.MULTI | SWT.BORDER | SWT.H_SCROLL); |
| 331 |
components = new ListViewer(c, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL); |
351 |
GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true); |
| 332 |
gd = new GridData(SWT.FILL, SWT.FILL, true, true); |
352 |
gridData.heightHint = 200; |
| 333 |
gd.heightHint = 40; |
353 |
gridData.widthHint = 80; |
| 334 |
components.getControl().setLayoutData(gd); |
354 |
components.getControl().setLayoutData(gridData); |
| 335 |
|
355 |
|
| 336 |
components.setContentProvider(new IStructuredContentProvider() { |
356 |
components.setContentProvider(new IStructuredContentProvider() { |
| 337 |
private Project project; |
357 |
private Project project; |
|
Lines 362-372
Link Here
|
| 362 |
} |
382 |
} |
| 363 |
|
383 |
|
| 364 |
private void createFixForViewer(Composite c) { |
384 |
private void createFixForViewer(Composite c) { |
| 365 |
GridData gd; |
385 |
fixFor = new ListViewer(c, SWT.V_SCROLL | SWT.MULTI | SWT.BORDER | SWT.H_SCROLL); |
| 366 |
fixFor = new ListViewer(c, SWT.MULTI | SWT.BORDER | SWT.V_SCROLL); |
386 |
GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true); |
| 367 |
gd = new GridData(SWT.FILL, SWT.FILL, true, true); |
387 |
gridData.heightHint = 200; |
| 368 |
gd.heightHint = 40; |
388 |
gridData.widthHint = 80; |
| 369 |
fixFor.getControl().setLayoutData(gd); |
389 |
fixFor.getControl().setLayoutData(gridData); |
| 370 |
|
390 |
|
| 371 |
fixFor.setContentProvider(new IStructuredContentProvider() { |
391 |
fixFor.setContentProvider(new IStructuredContentProvider() { |
| 372 |
private Project project; |
392 |
private Project project; |
|
Lines 405-412
Link Here
|
| 405 |
} |
425 |
} |
| 406 |
|
426 |
|
| 407 |
private void createProjectsViewer(Composite c) { |
427 |
private void createProjectsViewer(Composite c) { |
| 408 |
project = new ListViewer(c, SWT.V_SCROLL | SWT.MULTI | SWT.BORDER); |
428 |
project = new ListViewer(c, SWT.V_SCROLL | SWT.MULTI | SWT.BORDER | SWT.H_SCROLL); |
| 409 |
project.getControl().setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true)); |
429 |
GridData gridData = new GridData(SWT.FILL, SWT.FILL, true, true); |
|
|
430 |
gridData.heightHint = 200; |
| 431 |
gridData.widthHint = 120; |
| 432 |
project.getControl().setLayoutData(gridData); |
| 433 |
|
| 410 |
project.setContentProvider(new IStructuredContentProvider() { |
434 |
project.setContentProvider(new IStructuredContentProvider() { |
| 411 |
|
435 |
|
| 412 |
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { |
436 |
public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { |