|
Lines 247-256
Link Here
|
| 247 |
*/ |
247 |
*/ |
| 248 |
public String getName() { |
248 |
public String getName() { |
| 249 |
// Return the name of the file element as held in the compare input |
249 |
// Return the name of the file element as held in the compare input |
| 250 |
if (fileElement.equals(input.getLeft())) { |
250 |
if (input.getLeft().equals(fileElement)) { |
| 251 |
return input.getLeft().getName(); |
251 |
return input.getLeft().getName(); |
| 252 |
} |
252 |
} |
| 253 |
if (fileElement.equals(input.getRight())) { |
253 |
if (input.getRight().equals(fileElement)) { |
| 254 |
return input.getRight().getName(); |
254 |
return input.getRight().getName(); |
| 255 |
} |
255 |
} |
| 256 |
// Fallback call returning name of the main non-null element of the input |
256 |
// Fallback call returning name of the main non-null element of the input |
|
Lines 288-307
Link Here
|
| 288 |
|
288 |
|
| 289 |
ContentMergeViewer cmv = (ContentMergeViewer) e.getSource(); |
289 |
ContentMergeViewer cmv = (ContentMergeViewer) e.getSource(); |
| 290 |
|
290 |
|
| 291 |
if (fileElement.equals(input.getLeft())) { |
291 |
if (input.getLeft().equals(fileElement)) { |
| 292 |
if (changed && cmv.internalIsLeftDirty()) |
292 |
if (changed && cmv.internalIsLeftDirty()) |
| 293 |
setDirty(changed); |
293 |
setDirty(changed); |
| 294 |
else if (!changed && !cmv.internalIsLeftDirty()) { |
294 |
else if (!changed && !cmv.internalIsLeftDirty()) { |
| 295 |
setDirty(changed); |
295 |
setDirty(changed); |
| 296 |
} |
296 |
} |
| 297 |
} |
297 |
} |
| 298 |
if (fileElement.equals(input.getRight())) { |
298 |
if (input.getRight().equals(fileElement)) { |
| 299 |
if (changed && cmv.internalIsRightDirty()) |
299 |
if (changed && cmv.internalIsRightDirty()) |
| 300 |
setDirty(changed); |
300 |
setDirty(changed); |
| 301 |
else if (!changed && !cmv.internalIsRightDirty()) { |
301 |
else if (!changed && !cmv.internalIsRightDirty()) { |
| 302 |
setDirty(changed); |
302 |
setDirty(changed); |
| 303 |
} |
303 |
} |
| 304 |
} |
304 |
} |
|
|
305 |
|
| 306 |
if(fileElement==null){ |
| 307 |
if(changed && (cmv.internalIsLeftDirty() || cmv.internalIsRightDirty())) |
| 308 |
setDirty(changed); |
| 309 |
if(!changed && !cmv.internalIsLeftDirty() && !cmv.internalIsRightDirty()) |
| 310 |
setDirty(changed); |
| 311 |
} |
| 312 |
|
| 305 |
} |
313 |
} |
| 306 |
} |
314 |
} |
| 307 |
|
315 |
|