|
Lines 1-5
Link Here
|
| 1 |
/******************************************************************************* |
1 |
/******************************************************************************* |
| 2 |
* Copyright (c) 2000, 2010 IBM Corporation and others. |
2 |
* Copyright (c) 2000, 2011 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 1087-1093
Link Here
|
| 1087 |
Utilities.firePropertyChange(fListenerList, this, DIRTY_STATE, Boolean.valueOf(oldDirty), Boolean.valueOf(isSaveNeeded())); |
1087 |
Utilities.firePropertyChange(fListenerList, this, DIRTY_STATE, Boolean.valueOf(oldDirty), Boolean.valueOf(isSaveNeeded())); |
| 1088 |
} |
1088 |
} |
| 1089 |
} |
1089 |
} |
| 1090 |
|
1090 |
|
|
|
1091 |
/** |
| 1092 |
* Sets the dirty state of left site of this input to the given value and |
| 1093 |
* sends out a <code>PropertyChangeEvent</code> if the new value for whole |
| 1094 |
* input differs from the old value. Direct calling this method with |
| 1095 |
* parameter dirty equal to <code>false</code> when there are unsaved |
| 1096 |
* changes in left viewer, results in inconsistent state. The dirty state of |
| 1097 |
* compare input should be based only on the information if there are |
| 1098 |
* changes in viewers for left side. |
| 1099 |
* |
| 1100 |
* @param dirty |
| 1101 |
* the dirty state for this compare input |
| 1102 |
* @since 3.7 |
| 1103 |
* @noreference This method is not intended to be referenced by clients. |
| 1104 |
* @nooverride This method is not intended to be re-implemented or extended |
| 1105 |
* by clients. |
| 1106 |
*/ |
| 1107 |
protected void setLeftDirty(boolean dirty) { |
| 1108 |
boolean oldDirty = isSaveNeeded(); |
| 1109 |
boolean newDirty = dirty; |
| 1110 |
if (!newDirty) { |
| 1111 |
fLeftDirtyViewer = null; |
| 1112 |
} else { |
| 1113 |
if (fLeftDirtyViewer == null) |
| 1114 |
fLeftDirtyViewer = (ContentMergeViewer) fContentInputPane |
| 1115 |
.getViewer(); |
| 1116 |
|
| 1117 |
} |
| 1118 |
if (oldDirty != isSaveNeeded()) { |
| 1119 |
Utilities.firePropertyChange(fListenerList, this, DIRTY_STATE, |
| 1120 |
Boolean.valueOf(oldDirty), Boolean.valueOf(isSaveNeeded())); |
| 1121 |
} |
| 1122 |
} |
| 1123 |
|
| 1124 |
/** |
| 1125 |
* Sets the dirty state of right site of this input to the given value and |
| 1126 |
* sends out a <code>PropertyChangeEvent</code> if the new value for whole |
| 1127 |
* input differs from the old value. Direct calling this method with |
| 1128 |
* parameter dirty equal to <code>false</code> when there are unsaved |
| 1129 |
* changes in right viewer, results in inconsistent state. The dirty state |
| 1130 |
* of compare input should be based only on the information if there are |
| 1131 |
* changes in viewers for right side. |
| 1132 |
* |
| 1133 |
* @param dirty |
| 1134 |
* the dirty state for this compare input |
| 1135 |
* @since 3.7 |
| 1136 |
* @noreference This method is not intended to be referenced by clients. |
| 1137 |
* @nooverride This method is not intended to be re-implemented or extended |
| 1138 |
* by clients. |
| 1139 |
*/ |
| 1140 |
protected void setRightDirty(boolean dirty) { |
| 1141 |
boolean oldDirty = isSaveNeeded(); |
| 1142 |
boolean newDirty = dirty; |
| 1143 |
if (!newDirty) { |
| 1144 |
fRightDirtyViewer = null; |
| 1145 |
} else { |
| 1146 |
if (fRightDirtyViewer == null) |
| 1147 |
fRightDirtyViewer = (ContentMergeViewer) fContentInputPane |
| 1148 |
.getViewer(); |
| 1149 |
} |
| 1150 |
if (oldDirty != isSaveNeeded()) { |
| 1151 |
Utilities.firePropertyChange(fListenerList, this, DIRTY_STATE, |
| 1152 |
Boolean.valueOf(oldDirty), Boolean.valueOf(isSaveNeeded())); |
| 1153 |
} |
| 1154 |
} |
| 1155 |
|
| 1091 |
/** |
1156 |
/** |
| 1092 |
* Method adds or removes viewers that changed left or right side of this |
1157 |
* Method adds or removes viewers that changed left or right side of this |
| 1093 |
* compare input. Any modification of any of the list of viewers may result |
1158 |
* compare input. Any modification of any of the list of viewers may result |