Lines 338-348
Link Here
|
338 |
DiffProject proj = null; |
338 |
DiffProject proj = null; |
339 |
if (obj instanceof DiffProject){ |
339 |
if (obj instanceof DiffProject){ |
340 |
proj = (DiffProject) obj; |
340 |
proj = (DiffProject) obj; |
|
|
341 |
//Check to see if any of the Diffs contained by the DiffProject |
342 |
//have their diff problems set |
343 |
Object[] diffs = proj.getChildren(null); |
344 |
for (int i= 0; i<diffs.length; i++) { |
345 |
if (((Diff) diffs[i]).containsProblems()){ |
346 |
checked.setChecked(obj, false); |
347 |
break; |
348 |
} |
349 |
} |
341 |
} else if (obj instanceof Diff){ |
350 |
} else if (obj instanceof Diff){ |
342 |
proj = ((Diff) obj).getProject(); |
351 |
proj = ((Diff) obj).getProject(); |
|
|
352 |
//If Diff has any diff problems set, at least one hunk underneath |
353 |
//does not match - so don't allow entire tree to be checked |
354 |
if (((Diff) obj).containsProblems()){ |
355 |
checked.setChecked(obj, false); |
356 |
} |
343 |
} else if (obj instanceof Hunk){ |
357 |
} else if (obj instanceof Hunk){ |
344 |
Diff diff = (Diff) ((Hunk) obj).getParent(null); |
358 |
Diff diff = (Diff) ((Hunk) obj).getParent(null); |
345 |
proj = diff.getProject(); |
359 |
proj = diff.getProject(); |
|
|
360 |
//Check to see if this hunk has any problems OR |
361 |
//if its parent has any problems |
362 |
if( diff.getDiffProblem() || |
363 |
((Hunk) obj).getHunkProblem()){ |
364 |
checked.setChecked(obj, false); |
365 |
} |
346 |
} |
366 |
} |
347 |
if (proj!= null && |
367 |
if (proj!= null && |
348 |
!proj.getProject().exists()){ |
368 |
!proj.getProject().exists()){ |
Lines 359-365
Link Here
|
359 |
Object obj= sel.getFirstElement(); |
379 |
Object obj= sel.getFirstElement(); |
360 |
|
380 |
|
361 |
if (obj instanceof Hunk) { |
381 |
if (obj instanceof Hunk) { |
362 |
PreviewPatchPage.this.fHunkViewer.setInput(createInput((Hunk) obj)); |
382 |
PreviewPatchPage.this.fHunkViewer.setInput(createInput((Hunk) obj)); |
363 |
} else |
383 |
} else |
364 |
PreviewPatchPage.this.fHunkViewer.setInput(null); |
384 |
PreviewPatchPage.this.fHunkViewer.setInput(null); |
365 |
|
385 |
|