|
Lines 1-5
Link Here
|
| 1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2007, 2010 IBM Corporation and others. |
2 |
* Copyright (c) 2007, 2012 IBM Corporation and others. |
| 3 |
* All rights reserved. This program and the accompanying materials |
3 |
* All rights reserved. This program and the accompanying materials |
| 4 |
* are made available under the terms of the Eclipse Public License v1.0 |
4 |
* are made available under the terms of the Eclipse Public License v1.0 |
| 5 |
* which accompanies this distribution, and is available at |
5 |
* which accompanies this distribution, and is available at |
|
Lines 1221-1233
Link Here
|
| 1221 |
return fAllDiffs.iterator(); |
1221 |
return fAllDiffs.iterator(); |
| 1222 |
} |
1222 |
} |
| 1223 |
|
1223 |
|
| 1224 |
public boolean isFirstChildDiff(char contributor, int startOffset, |
1224 |
public boolean isFirstChildDiff(char contributor, int start, Diff diff) { |
| 1225 |
Diff diff) { |
|
|
| 1226 |
if (!diff.hasChildren()) |
1225 |
if (!diff.hasChildren()) |
| 1227 |
return false; |
1226 |
return false; |
| 1228 |
Diff d = (Diff)diff.fDiffs.get(0); |
1227 |
Diff d = (Diff)diff.fDiffs.get(0); |
| 1229 |
Position p= d.getPosition(contributor); |
1228 |
Position p= d.getPosition(contributor); |
| 1230 |
return (p.getOffset() >= startOffset); |
1229 |
return (p.getOffset() >= start); |
| 1231 |
} |
1230 |
} |
| 1232 |
|
1231 |
|
| 1233 |
public Diff getWrappedDiff(Diff diff, boolean down) { |
1232 |
public Diff getWrappedDiff(Diff diff, boolean down) { |
|
Lines 1393-1399
Link Here
|
| 1393 |
} else if (start >= startOffset) { |
1392 |
} else if (start >= startOffset) { |
| 1394 |
// If we are at or before the first diff, select the |
1393 |
// If we are at or before the first diff, select the |
| 1395 |
// entire diff so next and previous are symmetrical |
1394 |
// entire diff so next and previous are symmetrical |
| 1396 |
if (isFirstChildDiff(contributor, startOffset, diff)) { |
1395 |
if (isFirstChildDiff(contributor, start, diff)) { |
| 1397 |
return diff; |
1396 |
return diff; |
| 1398 |
} |
1397 |
} |
| 1399 |
d= findPrev(contributor, diff.fDiffs, start, end, deep); |
1398 |
d= findPrev(contributor, diff.fDiffs, start, end, deep); |