| 17 |
<o:DocumentProperties> |
<o:DocumentProperties> |
| 18 |
<o:Author>IBM_USER</o:Author> |
<o:Author>IBM_USER</o:Author> |
| 19 |
<o:LastAuthor>IBM_USER</o:LastAuthor> |
<o:LastAuthor>IBM_USER</o:LastAuthor> |
| 20 |
<o:Revision>8</o:Revision> |
<o:Revision>16</o:Revision> |
| 21 |
<o:TotalTime>4519</o:TotalTime> |
<o:TotalTime>4560</o:TotalTime> |
| 22 |
<o:LastPrinted>2004-11-08T17:14:00Z</o:LastPrinted> |
<o:LastPrinted>2004-11-08T17:14:00Z</o:LastPrinted> |
| 23 |
<o:Created>2004-12-20T21:30:00Z</o:Created> |
<o:Created>2004-12-20T21:30:00Z</o:Created> |
| 24 |
<o:LastSaved>2004-12-20T22:54:00Z</o:LastSaved> |
<o:LastSaved>2005-02-23T20:07:00Z</o:LastSaved> |
| 25 |
<o:Pages>1</o:Pages> |
<o:Pages>1</o:Pages> |
| 26 |
<o:Words>6341</o:Words> |
<o:Words>3508</o:Words> |
| 27 |
<o:Characters>36147</o:Characters> |
<o:Characters>20002</o:Characters> |
| 28 |
<o:Company>IBM</o:Company> |
<o:Company>IBM</o:Company> |
| 29 |
<o:Lines>301</o:Lines> |
<o:Lines>166</o:Lines> |
| 30 |
<o:Paragraphs>84</o:Paragraphs> |
<o:Paragraphs>46</o:Paragraphs> |
| 31 |
<o:CharactersWithSpaces>42404</o:CharactersWithSpaces> |
<o:CharactersWithSpaces>23464</o:CharactersWithSpaces> |
| 32 |
<o:Version>10.6626</o:Version> |
<o:Version>10.6626</o:Version> |
| 33 |
</o:DocumentProperties> |
</o:DocumentProperties> |
| 34 |
</xml><![endif]--><!--[if gte mso 9]><xml> |
</xml><![endif]--><!--[if gte mso 9]><xml> |
| 183 |
{page:Section1;} |
{page:Section1;} |
| 184 |
/* List Definitions */ |
/* List Definitions */ |
| 185 |
@list l0 |
@list l0 |
| 186 |
|
{mso-list-id:125585718; |
| 187 |
|
mso-list-template-ids:-472349186;} |
| 188 |
|
@list l0:level1 |
| 189 |
|
{mso-level-number-format:bullet; |
| 190 |
|
mso-level-text:\F0B7; |
| 191 |
|
mso-level-tab-stop:.5in; |
| 192 |
|
mso-level-number-position:left; |
| 193 |
|
text-indent:-.25in; |
| 194 |
|
mso-ansi-font-size:10.0pt; |
| 195 |
|
font-family:Symbol;} |
| 196 |
|
@list l1 |
| 197 |
|
{mso-list-id:186870198; |
| 198 |
|
mso-list-template-ids:1303815946;} |
| 199 |
|
@list l2 |
| 200 |
|
{mso-list-id:200558114; |
| 201 |
|
mso-list-template-ids:-1989615594;} |
| 202 |
|
@list l2:level1 |
| 203 |
|
{mso-level-number-format:bullet; |
| 204 |
|
mso-level-text:\F0B7; |
| 205 |
|
mso-level-tab-stop:.5in; |
| 206 |
|
mso-level-number-position:left; |
| 207 |
|
text-indent:-.25in; |
| 208 |
|
mso-ansi-font-size:10.0pt; |
| 209 |
|
font-family:Symbol;} |
| 210 |
|
@list l3 |
| 211 |
{mso-list-id:347761159; |
{mso-list-id:347761159; |
| 212 |
mso-list-type:hybrid; |
mso-list-type:hybrid; |
| 213 |
mso-list-template-ids:-1680017606 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} |
mso-list-template-ids:-1680017606 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} |
| 214 |
@list l0:level1 |
@list l3:level1 |
| 215 |
{mso-level-number-format:bullet; |
{mso-level-number-format:bullet; |
| 216 |
mso-level-text:\F0B7; |
mso-level-text:\F0B7; |
| 217 |
mso-level-tab-stop:.5in; |
mso-level-tab-stop:.5in; |
| 218 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 219 |
text-indent:-.25in; |
text-indent:-.25in; |
| 220 |
font-family:Symbol;} |
font-family:Symbol;} |
| 221 |
@list l0:level2 |
@list l3:level2 |
| 222 |
{mso-level-tab-stop:1.0in; |
{mso-level-tab-stop:1.0in; |
| 223 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 224 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 225 |
@list l0:level3 |
@list l3:level3 |
| 226 |
{mso-level-tab-stop:1.5in; |
{mso-level-tab-stop:1.5in; |
| 227 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 228 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 229 |
@list l0:level4 |
@list l3:level4 |
| 230 |
{mso-level-tab-stop:2.0in; |
{mso-level-tab-stop:2.0in; |
| 231 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 232 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 233 |
@list l0:level5 |
@list l3:level5 |
| 234 |
{mso-level-tab-stop:2.5in; |
{mso-level-tab-stop:2.5in; |
| 235 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 236 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 237 |
@list l0:level6 |
@list l3:level6 |
| 238 |
{mso-level-tab-stop:3.0in; |
{mso-level-tab-stop:3.0in; |
| 239 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 240 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 241 |
@list l0:level7 |
@list l3:level7 |
| 242 |
{mso-level-tab-stop:3.5in; |
{mso-level-tab-stop:3.5in; |
| 243 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 244 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 245 |
@list l0:level8 |
@list l3:level8 |
| 246 |
{mso-level-tab-stop:4.0in; |
{mso-level-tab-stop:4.0in; |
| 247 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 248 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 249 |
@list l0:level9 |
@list l3:level9 |
| 250 |
{mso-level-tab-stop:4.5in; |
{mso-level-tab-stop:4.5in; |
| 251 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 252 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 253 |
@list l1 |
@list l4 |
|
{mso-list-id:364596818; |
|
|
mso-list-template-ids:-488625314;} |
|
|
@list l1:level1 |
|
|
{mso-level-number-format:bullet; |
|
|
mso-level-text:\F0B7; |
|
|
mso-level-tab-stop:.5in; |
|
|
mso-level-number-position:left; |
|
|
text-indent:-.25in; |
|
|
mso-ansi-font-size:10.0pt; |
|
|
font-family:Symbol;} |
|
|
@list l2 |
|
| 254 |
{mso-list-id:604456885; |
{mso-list-id:604456885; |
| 255 |
mso-list-type:hybrid; |
mso-list-type:hybrid; |
| 256 |
mso-list-template-ids:1734899956 67698703 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} |
mso-list-template-ids:1734899956 67698703 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} |
| 257 |
@list l2:level1 |
@list l4:level1 |
| 258 |
{mso-level-tab-stop:.5in; |
{mso-level-tab-stop:.5in; |
| 259 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 260 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 261 |
@list l2:level2 |
@list l4:level2 |
| 262 |
{mso-level-number-format:bullet; |
{mso-level-number-format:bullet; |
| 263 |
mso-level-text:o; |
mso-level-text:o; |
| 264 |
mso-level-tab-stop:1.0in; |
mso-level-tab-stop:1.0in; |
| 265 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 266 |
text-indent:-.25in; |
text-indent:-.25in; |
| 267 |
font-family:"Courier New";} |
font-family:"Courier New";} |
| 268 |
@list l2:level3 |
@list l4:level3 |
| 269 |
{mso-level-number-format:bullet; |
{mso-level-number-format:bullet; |
| 270 |
mso-level-text:\F0A7; |
mso-level-text:\F0A7; |
| 271 |
mso-level-tab-stop:1.5in; |
mso-level-tab-stop:1.5in; |
| 272 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 273 |
text-indent:-.25in; |
text-indent:-.25in; |
| 274 |
font-family:Wingdings;} |
font-family:Wingdings;} |
| 275 |
@list l2:level4 |
@list l4:level4 |
| 276 |
{mso-level-number-format:bullet; |
{mso-level-number-format:bullet; |
| 277 |
mso-level-text:\F0B7; |
mso-level-text:\F0B7; |
| 278 |
mso-level-tab-stop:2.0in; |
mso-level-tab-stop:2.0in; |
| 279 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 280 |
text-indent:-.25in; |
text-indent:-.25in; |
| 281 |
font-family:Symbol;} |
font-family:Symbol;} |
| 282 |
@list l2:level5 |
@list l4:level5 |
| 283 |
{mso-level-tab-stop:2.5in; |
{mso-level-tab-stop:2.5in; |
| 284 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 285 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 286 |
@list l2:level6 |
@list l4:level6 |
| 287 |
{mso-level-tab-stop:3.0in; |
{mso-level-tab-stop:3.0in; |
| 288 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 289 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 290 |
@list l2:level7 |
@list l4:level7 |
| 291 |
{mso-level-tab-stop:3.5in; |
{mso-level-tab-stop:3.5in; |
| 292 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 293 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 294 |
@list l2:level8 |
@list l4:level8 |
| 295 |
{mso-level-tab-stop:4.0in; |
{mso-level-tab-stop:4.0in; |
| 296 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 297 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 298 |
@list l2:level9 |
@list l4:level9 |
| 299 |
{mso-level-tab-stop:4.5in; |
{mso-level-tab-stop:4.5in; |
| 300 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 301 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 302 |
@list l3 |
@list l5 |
| 303 |
{mso-list-id:798038152; |
{mso-list-id:798038152; |
| 304 |
mso-list-type:hybrid; |
mso-list-type:hybrid; |
| 305 |
mso-list-template-ids:-2087438622 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} |
mso-list-template-ids:-2087438622 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} |
| 306 |
@list l3:level1 |
@list l5:level1 |
| 307 |
{mso-level-tab-stop:39.0pt; |
{mso-level-tab-stop:39.0pt; |
| 308 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 309 |
margin-left:39.0pt; |
margin-left:39.0pt; |
| 310 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 311 |
@list l3:level2 |
@list l5:level2 |
| 312 |
{mso-level-tab-stop:1.0in; |
{mso-level-tab-stop:1.0in; |
| 313 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 314 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 315 |
@list l3:level3 |
@list l5:level3 |
| 316 |
{mso-level-tab-stop:1.5in; |
{mso-level-tab-stop:1.5in; |
| 317 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 318 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 319 |
@list l3:level4 |
@list l5:level4 |
| 320 |
{mso-level-tab-stop:2.0in; |
{mso-level-tab-stop:2.0in; |
| 321 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 322 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 323 |
@list l3:level5 |
@list l5:level5 |
| 324 |
{mso-level-tab-stop:2.5in; |
{mso-level-tab-stop:2.5in; |
| 325 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 326 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 327 |
@list l3:level6 |
@list l5:level6 |
| 328 |
{mso-level-tab-stop:3.0in; |
{mso-level-tab-stop:3.0in; |
| 329 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 330 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 331 |
@list l3:level7 |
@list l5:level7 |
| 332 |
{mso-level-tab-stop:3.5in; |
{mso-level-tab-stop:3.5in; |
| 333 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 334 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 335 |
@list l3:level8 |
@list l5:level8 |
| 336 |
{mso-level-tab-stop:4.0in; |
{mso-level-tab-stop:4.0in; |
| 337 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 338 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 339 |
@list l3:level9 |
@list l5:level9 |
| 340 |
{mso-level-tab-stop:4.5in; |
{mso-level-tab-stop:4.5in; |
| 341 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 342 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 343 |
@list l4 |
@list l6 |
| 344 |
|
{mso-list-id:818612470; |
| 345 |
|
mso-list-template-ids:-543663642;} |
| 346 |
|
@list l7 |
| 347 |
|
{mso-list-id:974408184; |
| 348 |
|
mso-list-template-ids:-653113708;} |
| 349 |
|
@list l8 |
| 350 |
{mso-list-id:1085106306; |
{mso-list-id:1085106306; |
| 351 |
mso-list-type:hybrid; |
mso-list-type:hybrid; |
| 352 |
mso-list-template-ids:1015583604 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} |
mso-list-template-ids:1015583604 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} |
| 353 |
@list l4:level1 |
@list l8:level1 |
| 354 |
{mso-level-tab-stop:.5in; |
{mso-level-tab-stop:.5in; |
| 355 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 356 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 357 |
@list l4:level2 |
@list l8:level2 |
| 358 |
{mso-level-tab-stop:1.0in; |
{mso-level-tab-stop:1.0in; |
| 359 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 360 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 361 |
@list l4:level3 |
@list l8:level3 |
| 362 |
{mso-level-tab-stop:1.5in; |
{mso-level-tab-stop:1.5in; |
| 363 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 364 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 365 |
@list l4:level4 |
@list l8:level4 |
| 366 |
{mso-level-tab-stop:2.0in; |
{mso-level-tab-stop:2.0in; |
| 367 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 368 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 369 |
@list l4:level5 |
@list l8:level5 |
| 370 |
{mso-level-tab-stop:2.5in; |
{mso-level-tab-stop:2.5in; |
| 371 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 372 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 373 |
@list l4:level6 |
@list l8:level6 |
| 374 |
{mso-level-tab-stop:3.0in; |
{mso-level-tab-stop:3.0in; |
| 375 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 376 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 377 |
@list l4:level7 |
@list l8:level7 |
| 378 |
{mso-level-tab-stop:3.5in; |
{mso-level-tab-stop:3.5in; |
| 379 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 380 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 381 |
@list l4:level8 |
@list l8:level8 |
| 382 |
{mso-level-tab-stop:4.0in; |
{mso-level-tab-stop:4.0in; |
| 383 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 384 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 385 |
@list l4:level9 |
@list l8:level9 |
| 386 |
{mso-level-tab-stop:4.5in; |
{mso-level-tab-stop:4.5in; |
| 387 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 388 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 389 |
@list l5 |
@list l9 |
|
{mso-list-id:1167818358; |
|
|
mso-list-template-ids:-1827253532;} |
|
|
@list l6 |
|
|
{mso-list-id:1292246357; |
|
|
mso-list-template-ids:24384264;} |
|
|
@list l7 |
|
| 390 |
{mso-list-id:1478297229; |
{mso-list-id:1478297229; |
| 391 |
mso-list-type:hybrid; |
mso-list-type:hybrid; |
| 392 |
mso-list-template-ids:-438127954 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} |
mso-list-template-ids:-438127954 67698689 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;} |
| 393 |
@list l7:level1 |
@list l9:level1 |
| 394 |
{mso-level-number-format:bullet; |
{mso-level-number-format:bullet; |
| 395 |
mso-level-text:\F0B7; |
mso-level-text:\F0B7; |
| 396 |
mso-level-tab-stop:.5in; |
mso-level-tab-stop:.5in; |
| 397 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 398 |
text-indent:-.25in; |
text-indent:-.25in; |
| 399 |
font-family:Symbol;} |
font-family:Symbol;} |
| 400 |
@list l7:level2 |
@list l9:level2 |
| 401 |
{mso-level-tab-stop:1.0in; |
{mso-level-tab-stop:1.0in; |
| 402 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 403 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 404 |
@list l7:level3 |
@list l9:level3 |
| 405 |
{mso-level-tab-stop:1.5in; |
{mso-level-tab-stop:1.5in; |
| 406 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 407 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 408 |
@list l7:level4 |
@list l9:level4 |
| 409 |
{mso-level-tab-stop:2.0in; |
{mso-level-tab-stop:2.0in; |
| 410 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 411 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 412 |
@list l7:level5 |
@list l9:level5 |
| 413 |
{mso-level-tab-stop:2.5in; |
{mso-level-tab-stop:2.5in; |
| 414 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 415 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 416 |
@list l7:level6 |
@list l9:level6 |
| 417 |
{mso-level-tab-stop:3.0in; |
{mso-level-tab-stop:3.0in; |
| 418 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 419 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 420 |
@list l7:level7 |
@list l9:level7 |
| 421 |
{mso-level-tab-stop:3.5in; |
{mso-level-tab-stop:3.5in; |
| 422 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 423 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 424 |
@list l7:level8 |
@list l9:level8 |
| 425 |
{mso-level-tab-stop:4.0in; |
{mso-level-tab-stop:4.0in; |
| 426 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 427 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 428 |
@list l7:level9 |
@list l9:level9 |
| 429 |
{mso-level-tab-stop:4.5in; |
{mso-level-tab-stop:4.5in; |
| 430 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 431 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 432 |
@list l8 |
@list l10 |
|
{mso-list-id:1631007561; |
|
|
mso-list-template-ids:1365561448;} |
|
|
@list l8:level1 |
|
|
{mso-level-number-format:bullet; |
|
|
mso-level-text:\F0B7; |
|
|
mso-level-tab-stop:.5in; |
|
|
mso-level-number-position:left; |
|
|
text-indent:-.25in; |
|
|
mso-ansi-font-size:10.0pt; |
|
|
font-family:Symbol;} |
|
|
@list l9 |
|
| 433 |
{mso-list-id:1723091313; |
{mso-list-id:1723091313; |
| 434 |
mso-list-type:hybrid; |
mso-list-type:hybrid; |
| 435 |
mso-list-template-ids:-1797201838 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} |
mso-list-template-ids:-1797201838 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} |
| 436 |
@list l9:level1 |
@list l10:level1 |
| 437 |
{mso-level-tab-stop:.5in; |
{mso-level-tab-stop:.5in; |
| 438 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 439 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 440 |
@list l9:level2 |
@list l10:level2 |
| 441 |
{mso-level-tab-stop:1.0in; |
{mso-level-tab-stop:1.0in; |
| 442 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 443 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 444 |
@list l9:level3 |
@list l10:level3 |
| 445 |
{mso-level-tab-stop:1.5in; |
{mso-level-tab-stop:1.5in; |
| 446 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 447 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 448 |
@list l9:level4 |
@list l10:level4 |
| 449 |
{mso-level-tab-stop:2.0in; |
{mso-level-tab-stop:2.0in; |
| 450 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 451 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 452 |
@list l9:level5 |
@list l10:level5 |
| 453 |
{mso-level-tab-stop:2.5in; |
{mso-level-tab-stop:2.5in; |
| 454 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 455 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 456 |
@list l9:level6 |
@list l10:level6 |
| 457 |
{mso-level-tab-stop:3.0in; |
{mso-level-tab-stop:3.0in; |
| 458 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 459 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 460 |
@list l9:level7 |
@list l10:level7 |
| 461 |
{mso-level-tab-stop:3.5in; |
{mso-level-tab-stop:3.5in; |
| 462 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 463 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 464 |
@list l9:level8 |
@list l10:level8 |
| 465 |
{mso-level-tab-stop:4.0in; |
{mso-level-tab-stop:4.0in; |
| 466 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 467 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 468 |
@list l9:level9 |
@list l10:level9 |
| 469 |
{mso-level-tab-stop:4.5in; |
{mso-level-tab-stop:4.5in; |
| 470 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 471 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 472 |
@list l10 |
@list l11 |
| 473 |
{mso-list-id:1731031428; |
{mso-list-id:1731031428; |
| 474 |
mso-list-type:hybrid; |
mso-list-type:hybrid; |
| 475 |
mso-list-template-ids:1886447558 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} |
mso-list-template-ids:1886447558 67698703 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;} |
| 476 |
@list l10:level1 |
@list l11:level1 |
| 477 |
{mso-level-tab-stop:39.0pt; |
{mso-level-tab-stop:39.0pt; |
| 478 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 479 |
margin-left:39.0pt; |
margin-left:39.0pt; |
| 480 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 481 |
@list l10:level2 |
@list l11:level2 |
| 482 |
{mso-level-tab-stop:1.0in; |
{mso-level-tab-stop:1.0in; |
| 483 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 484 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 485 |
@list l10:level3 |
@list l11:level3 |
| 486 |
{mso-level-tab-stop:1.5in; |
{mso-level-tab-stop:1.5in; |
| 487 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 488 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 489 |
@list l10:level4 |
@list l11:level4 |
| 490 |
{mso-level-tab-stop:2.0in; |
{mso-level-tab-stop:2.0in; |
| 491 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 492 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 493 |
@list l10:level5 |
@list l11:level5 |
| 494 |
{mso-level-tab-stop:2.5in; |
{mso-level-tab-stop:2.5in; |
| 495 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 496 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 497 |
@list l10:level6 |
@list l11:level6 |
| 498 |
{mso-level-tab-stop:3.0in; |
{mso-level-tab-stop:3.0in; |
| 499 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 500 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 501 |
@list l10:level7 |
@list l11:level7 |
| 502 |
{mso-level-tab-stop:3.5in; |
{mso-level-tab-stop:3.5in; |
| 503 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 504 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 505 |
@list l10:level8 |
@list l11:level8 |
| 506 |
{mso-level-tab-stop:4.0in; |
{mso-level-tab-stop:4.0in; |
| 507 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 508 |
text-indent:-.25in;} |
text-indent:-.25in;} |
| 509 |
@list l10:level9 |
@list l11:level9 |
| 510 |
{mso-level-tab-stop:4.5in; |
{mso-level-tab-stop:4.5in; |
| 511 |
mso-level-number-position:left; |
mso-level-number-position:left; |
| 512 |
text-indent:-.25in;} |
text-indent:-.25in;} |
|
@list l11 |
|
|
{mso-list-id:1917208525; |
|
|
mso-list-template-ids:2040176132;} |
|
| 513 |
ol |
ol |
| 514 |
{margin-bottom:0in;} |
{margin-bottom:0in;} |
| 515 |
ul |
ul |
| 542 |
<h1>Generalized Undo Support in Eclipse</h1> |
<h1>Generalized Undo Support in Eclipse</h1> |
| 543 |
|
|
| 544 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>Last |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>Last |
| 545 |
updated:<span style='mso-spacerun:yes'> </span></span><st1:date Year="2004" |
updated:<span style='mso-spacerun:yes'> </span></span><st1:date Year="2005" |
| 546 |
Day="17" Month="12"><span style='font-size:10.0pt;font-family:Arial'>Dec. 17, |
Day="22" Month="2"><span style='font-size:10.0pt;font-family:Arial'>Feb. 22, |
| 547 |
2004</span></st1:date><span style='font-size:10.0pt;font-family:Arial'><o:p></o:p></span></p> |
2005</span></st1:date><span style='font-size:10.0pt;font-family:Arial'><o:p></o:p></span></p> |
| 548 |
|
|
| 549 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>Status:<span |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>Status:<span |
| 550 |
style='mso-spacerun:yes'> </span>Proposal <o:p></o:p></span></p> |
style='mso-spacerun:yes'> </span>Proposal – Implemented in 3.1M5<o:p></o:p></span></p> |
| 551 |
|
|
| 552 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>(<span |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>(<span |
| 553 |
class=GramE>see</span> also </span><a |
class=GramE>see</span> also bug <span style='mso-spacerun:yes'> </span></span><a |
| 554 |
href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=37716">37716</a>)<span |
href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=37716">37716</a>)<span |
| 555 |
style='font-size:10.0pt;font-family:Arial'><o:p></o:p></span></p> |
style='font-size:10.0pt;font-family:Arial'><o:p></o:p></span></p> |
| 556 |
|
|
| 557 |
<h2>Problem Description</h2> |
<h2>Problem Description</h2> |
| 558 |
|
|
| 559 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>In R3.0.1 of |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>In R3.0.1 |
| 560 |
the Eclipse SDK, there is no generalized support for undoing user actions.<span |
of the Eclipse SDK, there is no generalized support for undoing user |
| 561 |
style='mso-spacerun:yes'> </span>Each plug-in is left to implement its own |
actions.<span style='mso-spacerun:yes'> </span>Each plug-in is left to |
| 562 |
strategy for undo, if at all.<span style='mso-spacerun:yes'> </span>This |
implement its own strategy for undo, if at all.<span style='mso-spacerun:yes'> |
| 563 |
approach can cause problems for both Eclipse users and plug-in developers:<o:p></o:p></span></p> |
</span>This approach can cause problems for both Eclipse users and plug-in |
| 564 |
|
developers:<o:p></o:p></span></p> |
| 565 |
|
|
| 566 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'><span |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'><span |
| 567 |
style='mso-spacerun:yes'> </span><o:p></o:p></span></p> |
style='mso-spacerun:yes'> </span><o:p></o:p></span></p> |
| 568 |
|
|
| 569 |
<ul style='margin-top:0in' type=disc> |
<ul style='margin-top:0in' type=disc> |
| 570 |
<li class=MsoNormal style='mso-list:l0 level1 lfo3;tab-stops:list .5in'><span |
<li class=MsoNormal style='mso-list:l3 level1 lfo3;tab-stops:list .5in'><span |
| 571 |
style='font-size:10.0pt;font-family:Arial'>Undo and redo actions appear in |
style='font-size:10.0pt;font-family:Arial'>Undo and redo actions appear in |
| 572 |
different menus, causing user confusion and UI clutter<o:p></o:p></span></li> |
different menus, causing user confusion and UI clutter<o:p></o:p></span></li> |
| 573 |
<li class=MsoNormal style='mso-list:l0 level1 lfo3;tab-stops:list .5in'><span |
<li class=MsoNormal style='mso-list:l3 level1 lfo3;tab-stops:list .5in'><span |
| 574 |
style='font-size:10.0pt;font-family:Arial'>Undo and redo implementations |
style='font-size:10.0pt;font-family:Arial'>Undo and redo implementations |
| 575 |
may have different semantics.<o:p></o:p></span></li> |
may have different semantics.<o:p></o:p></span></li> |
| 576 |
<li class=MsoNormal style='mso-list:l0 level1 lfo3;tab-stops:list .5in'><span |
<li class=MsoNormal style='mso-list:l3 level1 lfo3;tab-stops:list .5in'><span |
| 577 |
style='font-size:10.0pt;font-family:Arial'>Plug-ins that depend on other |
style='font-size:10.0pt;font-family:Arial'>Plug-ins that depend on other |
| 578 |
plug-ins which implement their own undo strategy are forced to choose |
plug-ins which implement their own undo strategy are forced to choose |
| 579 |
between different implementations and possibly write integration code to |
between different implementations and possibly write integration code to |
| 597 |
<h2>Operations Framework</h2> |
<h2>Operations Framework</h2> |
| 598 |
|
|
| 599 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>The |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>The |
| 600 |
proposed framework defines an interface for describing work, called an |
proposed framework defines an interface for describing work, called an “undoable |
| 601 |
“operation” (<span class=SpellE>IOperation</span>), that can be executed, |
operation” (<span class=SpellE>IUndoableOperation</span><span class=GramE>), |
| 602 |
undone, and redone.<span style='mso-spacerun:yes'> </span>Operations are |
that</span> can be executed, undone, and redone.<span |
| 603 |
created, executed, and added to an operations history (<span class=SpellE>IOperationHistory</span>).<span |
style='mso-spacerun:yes'> </span>Undoable operations are created, executed, |
| 604 |
|
and added to an operations history (<span class=SpellE>IOperationHistory</span>).<span |
| 605 |
style='mso-spacerun:yes'> </span>Operations which are comprised of distinct |
style='mso-spacerun:yes'> </span>Operations which are comprised of distinct |
| 606 |
steps are represented as compound operations.<span style='mso-spacerun:yes'> |
steps should be represented as compound operations, which are executed, undone, |
| 607 |
</span>Compound operations must be executed, undone, or redone as a unit, and |
or redone as a unit, and can never be partially undone.<span |
| 608 |
can never be partially undone.<span style='mso-spacerun:yes'> </span><o:p></o:p></span></p> |
style='mso-spacerun:yes'> </span><o:p></o:p></span></p> |
| 609 |
|
|
| 610 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></p> |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></p> |
| 611 |
|
|
| 612 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>Operations |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>Operations |
| 613 |
can be assigned one or more contexts (<span class=SpellE>IOperationContext</span>) |
can be assigned one or more contexts (<span class=SpellE>IUndoContext</span>) |
| 614 |
to which they apply.<span style='mso-spacerun:yes'> </span>An operation<span |
to which they apply.<span style='mso-spacerun:yes'> </span>An undo context |
| 615 |
style='mso-spacerun:yes'> </span>context describes the context in which the |
describes the context in which the user is working when an operation is performed, |
| 616 |
user is working when an operation is performed, undone, or redone.<span |
undone, or redone.<span style='mso-spacerun:yes'> </span>Undo contexts can be |
| 617 |
style='mso-spacerun:yes'> </span>Contexts can be used by workbench parts to |
used by workbench parts to filter the operations history, so that only those |
| 618 |
filter the operations history, so that only those operations that have been |
operations that have been assigned the context of interest to a particular part |
| 619 |
assigned the part’s context are available for undo/redo when that part is |
are available for undo/redo when that part is active.<o:p></o:p></span></p> |
|
active.<o:p></o:p></span></p> |
|
| 620 |
|
|
| 621 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></p> |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></p> |
| 622 |
|
|
| 623 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>The |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>The |
| 624 |
interface for operation contexts is left very general so that operation |
interface for undo contexts is left very general so that operation implementers |
| 625 |
implementers may choose the appropriate representation for their contexts.<span |
may choose the appropriate representation for their contexts.<span |
| 626 |
style='mso-spacerun:yes'> </span>In some cases, a part-oriented context may be |
style='mso-spacerun:yes'> </span>In some cases, a part-oriented context may be |
| 627 |
appropriate. For example, a text editor’s context is related to the editor |
appropriate. For example, a text editor’s context is related to the editor |
| 628 |
itself and its life-cycle is similar to that of the editor.<span |
itself and its life-cycle is similar to that of the editor.<span |
| 629 |
style='mso-spacerun:yes'> </span>The navigator’s context is closely related to |
style='mso-spacerun:yes'> </span>The resource navigator’s context is closely |
| 630 |
the workspace model objects, and the context related to the workspace has a |
related to the workspace model objects, and the context related to the |
| 631 |
life cycle to similar to that of the workspace itself.<o:p></o:p></span></p> |
workspace has a life cycle to similar to that of the workspace itself.<o:p></o:p></span></p> |
| 632 |
|
|
| 633 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></p> |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></p> |
| 634 |
|
|
| 637 |
|
|
| 638 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></p> |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></p> |
| 639 |
|
|
| 640 |
<p class=MsoNormal style='margin-left:39.0pt;text-indent:-.25in;mso-list:l10 level1 lfo5; |
<p class=MsoNormal style='margin-left:39.0pt;text-indent:-.25in;mso-list:l11 level1 lfo5; |
| 641 |
tab-stops:list 39.0pt'><![if !supportLists]><span style='font-size:10.0pt; |
tab-stops:list 39.0pt'><![if !supportLists]><span style='font-size:10.0pt; |
| 642 |
font-family:Arial;mso-fareast-font-family:Arial'><span style='mso-list:Ignore'>1.<span |
font-family:Arial;mso-fareast-font-family:Arial'><span style='mso-list:Ignore'>1.<span |
| 643 |
style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span |
style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span |
| 647 |
the editor can assign its context to the operation before adding it to the |
the editor can assign its context to the operation before adding it to the |
| 648 |
history.<span style='mso-spacerun:yes'> </span><o:p></o:p></span></p> |
history.<span style='mso-spacerun:yes'> </span><o:p></o:p></span></p> |
| 649 |
|
|
| 650 |
<p class=MsoNormal style='margin-left:39.0pt;text-indent:-.25in;mso-list:l10 level1 lfo5; |
<p class=MsoNormal style='margin-left:39.0pt;text-indent:-.25in;mso-list:l11 level1 lfo5; |
| 651 |
tab-stops:list 39.0pt'><![if !supportLists]><span style='font-size:10.0pt; |
tab-stops:list 39.0pt'><![if !supportLists]><span style='font-size:10.0pt; |
| 652 |
font-family:Arial;mso-fareast-font-family:Arial'><span style='mso-list:Ignore'>2.<span |
font-family:Arial;mso-fareast-font-family:Arial'><span style='mso-list:Ignore'>2.<span |
| 653 |
style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span |
style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span |
| 657 |
context should be added to the operation.<span style='mso-spacerun:yes'> |
context should be added to the operation.<span style='mso-spacerun:yes'> |
| 658 |
</span><o:p></o:p></span></p> |
</span><o:p></o:p></span></p> |
| 659 |
|
|
| 660 |
|
<p class=MsoNormal style='margin-left:39.0pt;text-indent:-.25in;mso-list:l11 level1 lfo5; |
| 661 |
|
tab-stops:list 39.0pt'><![if !supportLists]><span style='font-size:10.0pt; |
| 662 |
|
font-family:Arial;mso-fareast-font-family:Arial'><span style='mso-list:Ignore'>3.<span |
| 663 |
|
style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span |
| 664 |
|
style='font-size:10.0pt;font-family:Arial'>Operations can be executed in a |
| 665 |
|
batch mode.<span style='mso-spacerun:yes'> </span>When a batching operation is |
| 666 |
|
being executed, any other operations that execute have their contexts assigned |
| 667 |
|
to the batch operation.<o:p></o:p></span></p> |
| 668 |
|
|
| 669 |
<p class=MsoNormal style='margin-left:21.0pt'><span style='font-size:10.0pt; |
<p class=MsoNormal style='margin-left:21.0pt'><span style='font-size:10.0pt; |
| 670 |
font-family:Arial'><o:p> </o:p></span></p> |
font-family:Arial'><o:p> </o:p></span></p> |
| 671 |
|
|
| 694 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></p> |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></p> |
| 695 |
|
|
| 696 |
<ol style='margin-top:0in' start=1 type=1> |
<ol style='margin-top:0in' start=1 type=1> |
| 697 |
<li class=MsoNormal style='mso-list:l9 level1 lfo8;tab-stops:list .5in'><span |
<li class=MsoNormal style='mso-list:l10 level1 lfo8;tab-stops:list .5in'><span |
| 698 |
style='font-size:10.0pt;font-family:Arial'>Existing command/undo frameworks |
style='font-size:10.0pt;font-family:Arial'>Existing command/undo |
| 699 |
can implement the <span class=SpellE>IOperation</span> interface on their |
frameworks can implement the <span class=SpellE>IUndoableOperation</span> |
| 700 |
existing command objects, while still maintaining their individual |
interface on their existing command objects, while still maintaining their |
| 701 |
strategies for managing undo stacks or histories.<span |
individual strategies for managing undo stacks or histories.<span |
| 702 |
style='mso-spacerun:yes'> </span>If there is a substantial investment in |
style='mso-spacerun:yes'> </span>If there is a substantial investment in |
| 703 |
an existing model-based operation or command framework, wrappers could be |
an existing model-based operation or command framework, wrappers could be |
| 704 |
used to map <span class=SpellE>IOperation</span> protocol to the existing |
used to map <span class=SpellE>IUndoableOperation</span> protocol to the |
| 705 |
protocol.<span style='mso-spacerun:yes'> </span>The commands/operations |
existing protocol.<span style='mso-spacerun:yes'> </span>The |
| 706 |
need not be assigned a context or added to a common operation |
commands/operations need not be assigned a context or added to a common |
| 707 |
history.<span style='mso-spacerun:yes'> </span>This level of integration |
operation history.<span style='mso-spacerun:yes'> </span>This level of |
| 708 |
allows command hierarchies built in different frameworks to be treated the |
integration allows command hierarchies built in different frameworks to be |
| 709 |
same by plug-ins that depend upon these different frameworks.<span |
treated the same by plug-ins that depend upon these different |
| 710 |
style='mso-spacerun:yes'> </span>Clients of existing command frameworks |
frameworks.<span style='mso-spacerun:yes'> </span>Clients of existing |
| 711 |
may then use the workbench operation history, assign contexts to |
command frameworks may then use the workbench operation history, assign |
| 712 |
operations as needed, and even add operations to the history, while still |
contexts to operations as needed, and even add operations to the history, |
| 713 |
using commands built on earlier frameworks.<o:p></o:p></span></li> |
while still using commands built on earlier frameworks.<o:p></o:p></span></li> |
| 714 |
<li class=MsoNormal style='mso-list:l9 level1 lfo8;tab-stops:list .5in'><span |
<li class=MsoNormal style='mso-list:l10 level1 lfo8;tab-stops:list .5in'><span |
| 715 |
style='font-size:10.0pt;font-family:Arial'>Existing command/undo |
style='font-size:10.0pt;font-family:Arial'>Existing command/undo |
| 716 |
frameworks may use the listener interfaces provided by the operations |
frameworks may use the listener interfaces provided by the operations |
| 717 |
history to listen for operations that are of interest.<span |
history to listen for operations that are of interest.<span |
| 721 |
integration allows views and editors to appear more tightly integrated |
integration allows views and editors to appear more tightly integrated |
| 722 |
with the operations framework, since workbench operations of interest can |
with the operations framework, since workbench operations of interest can |
| 723 |
be undone or redone from private undo implementations.<o:p></o:p></span></li> |
be undone or redone from private undo implementations.<o:p></o:p></span></li> |
| 724 |
<li class=MsoNormal style='mso-list:l9 level1 lfo8;tab-stops:list .5in'><span |
<li class=MsoNormal style='mso-list:l10 level1 lfo8;tab-stops:list .5in'><span |
| 725 |
style='font-size:10.0pt;font-family:Arial'>Full integration is achieved by |
style='font-size:10.0pt;font-family:Arial'>Full integration is achieved by |
| 726 |
using the workbench operation history to record the undo and redo history |
using the workbench operation history to record the undo and redo history |
| 727 |
as operations occur.<span style='mso-spacerun:yes'> </span>Once all |
as operations occur.<span style='mso-spacerun:yes'> </span>Once all |
| 733 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></p> |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></p> |
| 734 |
|
|
| 735 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>Framework |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>Framework |
| 736 |
interfaces will be defined in the <span class=SpellE>org.eclipse.core.operations</span> |
interfaces will be defined in the <span class=SpellE>org.eclipse.core.commands.operations</span> |
| 737 |
package.<span style='mso-spacerun:yes'> </span>This package will be contained |
package in the <span class=SpellE>org.eclipse.core.commands</span> |
| 738 |
in a plug-in that has no dependencies on the Eclipse runtime, so that raw <span |
plug-in.<span style='mso-spacerun:yes'> </span>This plug-in has no |
| 739 |
class=SpellE>JFace</span> users may make use of it.<span |
dependencies on the Eclipse runtime architecture (apart from some runtime classes |
| 740 |
style='mso-spacerun:yes'> </span>(The exact plug-in containing the framework |
such as <span class=SpellE>IProgressMonitor</span>, <span class=SpellE>IStatus</span>, |
| 741 |
package is not defined at this time, as these packages may be combined with |
<span class=SpellE><span class=GramE>IAdaptable</span></span>), so raw <span |
| 742 |
other packages that provide similar headless infrastructure.)<o:p></o:p></span></p> |
class=SpellE>JFace</span> clients may make use of it.<o:p></o:p></span></p> |
| 743 |
|
|
| 744 |
|
<h2>Operations and Concurrency</h2> |
| 745 |
|
|
| 746 |
|
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>The |
| 747 |
|
operations framework relies on the notion of sequential execution of undoable |
| 748 |
|
operations.<span style='mso-spacerun:yes'> </span>For R3.1, there will be no |
| 749 |
|
specific support built into the framework for concurrent operations that |
| 750 |
|
execute inside platform Jobs.<span style='mso-spacerun:yes'> </span>Actions whose |
| 751 |
|
work is currently executed inside a Job may be converted to <span class=SpellE>IUndoableOperation</span>, |
| 752 |
|
but they should not be added to the operation history until after they have |
| 753 |
|
finished their execution.<span style='mso-spacerun:yes'> </span>The undo and |
| 754 |
|
redo behavior for these kinds of <span class=SpellE>IUndoableOperation</span> must |
| 755 |
|
be implemented in a synchronous manner for R3.1, since the validity of other |
| 756 |
|
operations in the operation history may not be properly determined if an undo |
| 757 |
|
or redo is executing asynchronously in a Job.<span style='mso-spacerun:yes'> |
| 758 |
|
</span>More robust support for concurrent, undoable operations may be |
| 759 |
|
considered in future releases as requirements are discovered.<o:p></o:p></span></p> |
| 760 |
|
|
| 761 |
<h2>Framework interfaces</h2> |
<h2>Framework interfaces</h2> |
| 762 |
|
|
| 763 |
<h3><span class=SpellE>IOperation</span></h3> |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>Initial |
| 764 |
|
implementations of the proposed framework interfaces appear in R3.1 M5.<span |
| 765 |
|
style='mso-spacerun:yes'> </span>See the <span class=SpellE>Javadoc</span> for |
| 766 |
|
the described classes for the complete specification.<span |
| 767 |
|
style='mso-spacerun:yes'> </span>Please note that the specification is still |
| 768 |
|
evolving and early adopters should be prepared for API changes throughout the |
| 769 |
|
R3.1 development cycle.<o:p></o:p></span></p> |
| 770 |
|
|
| 771 |
|
<h3><span class=SpellE>IUndoableOperation</span></h3> |
| 772 |
|
|
| 773 |
<p class=MsoNormal><span class=SpellE><span style='font-size:10.0pt;font-family: |
<p class=MsoNormal><span class=SpellE><span style='font-size:10.0pt;font-family: |
| 774 |
Arial'>IOperation</span></span><span style='font-size:10.0pt;font-family:Arial'> |
Arial'>IUndoableOperation</span></span><span style='font-size:10.0pt; |
| 775 |
defines an operation that can be executed, undone, and redone.<span |
font-family:Arial'> defines an operation that can be executed, undone, and |
| 776 |
style='mso-spacerun:yes'> </span>Operations typically have fully defined |
redone.<span style='mso-spacerun:yes'> </span>Operations typically have fully |
| 777 |
parameters. That is, they are usually created after the user has been queried |
defined parameters. That is, they are usually created after the user has been |
| 778 |
for any input needed to define the operation.<o:p></o:p></span></p> |
queried for any input needed to define the operation.<o:p></o:p></span></p> |
| 779 |
|
|
| 780 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></p> |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></p> |
| 781 |
|
|
| 787 |
|
|
| 788 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></p> |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></p> |
| 789 |
|
|
|
<pre>public void <span class=SpellE>addContext</span>(<span class=SpellE>IOperationContext</span> context)</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Add |
|
|
the specified context to the operation. If the context is already present, do |
|
|
not add it again. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Parameters:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>context</span></code><span |
|
|
style='font-size:10.0pt'> - - the context to be added<o:p></o:p></span></p> |
|
|
|
|
|
<pre><a name="removeContext(org.eclipse.core.operation"></a>public void <span |
|
|
class=SpellE>removeContext</span>(<span class=SpellE>IOperationContext</span> context)</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Remove |
|
|
the specified context from the operation. This method has no effect if the |
|
|
context is not present. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Parameters:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>context</span></code><span |
|
|
style='font-size:10.0pt'> - - the context to be removed<o:p></o:p></span></p> |
|
|
|
|
|
<pre><a name="hasContext(org.eclipse.core.operations.I"></a>public <span |
|
|
class=SpellE>boolean</span> <span class=SpellE><b>hasContext</b></span>(<span |
|
|
class=SpellE>IOperationContext</span> context)</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Returns |
|
|
whether the operation has the specified context. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Parameters:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>context</span></code><span |
|
|
style='font-size:10.0pt'> - - the context in question <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>true</span></code><span |
|
|
style='font-size:10.0pt'> if the context is present, </span><code><span |
|
|
style='font-size:10.0pt'>false</span></code><span style='font-size:10.0pt'> if |
|
|
it is not.<o:p></o:p></span></p> |
|
|
|
|
|
<pre><a name="getContexts()"></a>public <span class=SpellE>IOperationContext</span> [] <span |
|
|
class=SpellE><b>getContexts</b></span>()</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Returns |
|
|
the array of contexts that have been assigned to the operation. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>the array |
|
|
of contexts<o:p></o:p></span></p> |
|
|
|
|
|
<pre><a name="canExecute()"></a>public <span class=SpellE>boolean</span> <span |
|
|
class=SpellE><b>canExecute</b></span>()</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Returns |
|
|
whether the operation can be executed in its current state. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>true</span></code><span |
|
|
style='font-size:10.0pt'> if the operation can be executed; </span><code><span |
|
|
style='font-size:10.0pt'>false</span></code><span style='font-size:10.0pt'> |
|
|
otherwise.<o:p></o:p></span></p> |
|
|
|
|
|
<pre><a name="canRedo()"></a>public <span class=SpellE>boolean</span> <span |
|
|
class=SpellE><b>canRedo</b></span>()</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Returns |
|
|
whether the operation can be redone in its current state. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>true</span></code><span |
|
|
style='font-size:10.0pt'> if the operation can be redone; </span><code><span |
|
|
style='font-size:10.0pt'>false</span></code><span style='font-size:10.0pt'> |
|
|
otherwise.<o:p></o:p></span></p> |
|
|
|
|
|
<pre><a name="canUndo()"></a>public <span class=SpellE>boolean</span> <span |
|
|
class=SpellE><b>canUndo</b></span>()</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Returns |
|
|
whether the operation can be undone in its current state. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>true</span></code><span |
|
|
style='font-size:10.0pt'> if the operation can be undone; </span><code><span |
|
|
style='font-size:10.0pt'>false</span></code><span style='font-size:10.0pt'> |
|
|
otherwise.<o:p></o:p></span></p> |
|
|
|
|
|
<pre><a name="execute(org.eclipse.core.runtime.IProgre"></a>public <span |
|
|
class=SpellE>org.eclipse.core.runtime.IStatus</span> <b>execute</b>(<span |
|
|
class=SpellE>org.eclipse.core.runtime.IProgressMonitor</span> monitor)</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Execute |
|
|
the operation. This method should only be called the first time that an |
|
|
operation is executed. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Parameters:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>monitor</span></code><span |
|
|
style='font-size:10.0pt'> - <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>the <span |
|
|
class=SpellE>IStatus</span> of the execution. The status severity should be set |
|
|
to </span><code><span style='font-size:10.0pt'>OK</span></code><span |
|
|
style='font-size:10.0pt'> if the operation was successful, and </span><code><span |
|
|
style='font-size:10.0pt'>ERROR</span></code><span style='font-size:10.0pt'> if |
|
|
it was not. Any other status is assumed to represent an incompletion of the |
|
|
execution.<o:p></o:p></span></p> |
|
|
|
|
|
<pre><a name="redo(org.eclipse.core.runtime.IProgressM"></a>public <span |
|
|
class=SpellE>org.eclipse.core.runtime.IStatus</span> <b>redo</b>(<span |
|
|
class=SpellE>org.eclipse.core.runtime.IProgressMonitor</span> monitor)</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Redo |
|
|
the operation. This method should only be called after an operation has been |
|
|
undone. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Parameters:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>monitor</span></code><span |
|
|
style='font-size:10.0pt'> - <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>the <span |
|
|
class=SpellE>IStatus</span> of the redo. The status severity should be set to </span><code><span |
|
|
style='font-size:10.0pt'>OK</span></code><span style='font-size:10.0pt'> if the |
|
|
redo was successful, and </span><code><span style='font-size:10.0pt'>ERROR</span></code><span |
|
|
style='font-size:10.0pt'> if it was not. Any other status is assumed to |
|
|
represent an incompletion of the redo.<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public <span class=SpellE>org.eclipse.core.runtime.IStatus</span> <b>undo</b>(<span |
|
|
class=SpellE>org.eclipse.core.runtime.IProgressMonitor</span> monitor)</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Undo |
|
|
the operation. This method should only be called after an operation has been |
|
|
executed. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Parameters:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>monitor</span></code><span |
|
|
style='font-size:10.0pt'> - <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>the <span |
|
|
class=SpellE>IStatus</span> of the undo. The status severity should be set to </span><code><span |
|
|
style='font-size:10.0pt'>OK</span></code><span style='font-size:10.0pt'> if the |
|
|
redo was successful, and </span><code><span style='font-size:10.0pt'>ERROR</span></code><span |
|
|
style='font-size:10.0pt'> if it was not. Any other status is assumed to |
|
|
represent an incompletion of the undo.<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public void <b>dispose</b>()</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Dispose |
|
|
of the operation. This method is used when the operation is no longer kept in |
|
|
the history. Implementers of this method typically <span class=SpellE>unregister</span> |
|
|
any listeners. <o:p></o:p></span></p> |
|
|
|
|
|
<pre>public <span class=SpellE>java.lang.String</span> <span class=SpellE><b>getLabel</b></span>()</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Return |
|
|
the label that should be used to show the name of the operation to the user. |
|
|
This label is typically appended to the "Undo" or "Redo" |
|
|
menu entry. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>the |
|
|
label<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public <span class=SpellE>java.lang.String</span> <span class=SpellE><b>getDescription</b></span>()</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Return |
|
|
the description that should be used to further describe this operation to the |
|
|
user. The description is used in history lists when the user requests more |
|
|
information about an operation. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>the |
|
|
description<o:p></o:p></span></p> |
|
|
|
|
| 790 |
<h3><span class=SpellE>IOperationHistory</span></h3> |
<h3><span class=SpellE>IOperationHistory</span></h3> |
| 791 |
|
|
| 792 |
<p class=MsoNormal><span class=SpellE><span style='font-size:10.0pt;font-family: |
<p class=MsoNormal><span class=SpellE><span style='font-size:10.0pt;font-family: |
| 793 |
Arial'>IOperationHistory</span></span><span style='font-size:10.0pt;font-family: |
Arial'>IOperationHistory</span></span><span style='font-size:10.0pt;font-family: |
| 794 |
Arial'> tracks a history of operations that can be undone or redone. Operations |
Arial'> tracks a history of operations that can be undone or redone. Operations |
| 795 |
are added to the history once they have been initially executed. Clients may |
are added to the history after they have been initially executed. Clients may |
| 796 |
choose whether to have the operations history perform the initial execution or |
choose whether to have the operations history perform the initial execution or |
| 797 |
simply add the operation to the history. Once operations are added to the |
simply add the operation to the history. Once operations are added to the |
| 798 |
history, the methods <span class=SpellE>canRedo</span>() and <span |
history, the methods <span class=SpellE><span class=GramE>canRedo</span></span><span |
| 799 |
class=SpellE>canUndo</span>() are used to determine whether there is an |
class=GramE>(</span>) and <span class=SpellE>canUndo</span>() are used to |
| 800 |
operation available for undo and redo in a given operation context.<span |
determine whether there is an operation available for undo and redo in a given undo |
| 801 |
style='mso-spacerun:yes'> </span>The context-based protocol implies that there |
context.<span style='mso-spacerun:yes'> </span>The context-based protocol |
| 802 |
is only one operation that can be undone or redone at a given time in a given |
implies that there is only one operation that can be undone or redone at a |
| 803 |
context. This is typical of a linear undo model, when only the most recently |
given time in a given context. This is typical of a linear undo model, when |
| 804 |
executed operation is available for undo. When this protocol is used, a linear |
only the most recently executed operation is available for undo. When this |
| 805 |
model is enforced by the history. It is up to clients to determine how to |
protocol is used, a linear model is enforced by the history. It is up to |
| 806 |
maintain a history that is invalid or stale. For example, when the most recent |
clients to determine how to maintain a history that is invalid or stale. For |
| 807 |
operation for a context cannot be performed, clients may wish to flush the |
example, when the most recent operation for a context cannot be performed, |
| 808 |
history for that context.<o:p></o:p></span></p> |
clients may wish to flush the history for that context.<o:p></o:p></span></p> |
| 809 |
|
|
| 810 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></p> |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></p> |
| 811 |
|
|
| 838 |
operation and need to determine whether an undo or redo will cause any |
operation and need to determine whether an undo or redo will cause any |
| 839 |
conflicts with their local state.<o:p></o:p></span></p> |
conflicts with their local state.<o:p></o:p></span></p> |
| 840 |
|
|
|
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></p> |
|
|
|
|
|
<pre>public void <b>add</b>(<span class=SpellE>IOperation</span> operation)</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Add |
|
|
the specified operation to the history without executing it. The operation should |
|
|
have already been executed by the time it is added to the history. Listeners |
|
|
will be notified that the operation was added to the history. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Parameters:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>operation</span></code><span |
|
|
style='font-size:10.0pt'> - - the operation to be added to the history<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public <span class=SpellE>org.eclipse.core.runtime.IStatus</span> <b>execute</b>(<span |
|
|
class=SpellE>IOperation</span> operation,</pre><pre><span style='mso-spacerun:yes'> </span><span |
|
|
class=SpellE>org.eclipse.core.runtime.IProgressMonitor</span> monitor)</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Execute |
|
|
the specified operation and add it to the operations history if successful. |
|
|
This method is used by clients who wish operation history listeners to receive |
|
|
notifications before and after the execution of the operation. Listeners will |
|
|
be notified before ( </span><span class=SpellE><code><span style='font-size: |
|
|
10.0pt'>aboutToExecute</span></code></span><span style='font-size:10.0pt'>) and |
|
|
after (</span><code><span style='font-size:10.0pt'>done</span></code><span |
|
|
style='font-size:10.0pt'> or </span><span class=SpellE><code><span |
|
|
style='font-size:10.0pt'>operationNotOK</span></code></span><span |
|
|
style='font-size:10.0pt'>). If the operation successfully executes, an |
|
|
additional notification that the operation has been added to the history (</span><span |
|
|
class=SpellE><code><span style='font-size:10.0pt'>operationAdded</span></code></span><span |
|
|
style='font-size:10.0pt'>) will be sent. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Parameters:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>operation</span></code><span |
|
|
style='font-size:10.0pt'> - - the operation to be executed and then added to |
|
|
the history <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>the <span |
|
|
class=SpellE>IStatus</span> indicating whether the execution succeeded. The |
|
|
severity code in the returned status describes whether the operation succeeded |
|
|
and whether it was added to the history. </span><code><span style='font-size: |
|
|
10.0pt'>OK</span></code><span style='font-size:10.0pt'> severity indicates that |
|
|
the execute operation was successful and that the operation has been added to |
|
|
the history. Listeners will receive the </span><code><span style='font-size: |
|
|
10.0pt'>done</span></code><span style='font-size:10.0pt'> notification. </span><code><span |
|
|
style='font-size:10.0pt'>CANCEL</span></code><span style='font-size:10.0pt'> |
|
|
severity indicates that the user cancelled the operation and that the operation |
|
|
was not added to the history. </span><code><span style='font-size:10.0pt'>ERROR</span></code><span |
|
|
style='font-size:10.0pt'> severity indicates that the operation did not |
|
|
successfully execute and that it was not added to the history. Any other severity |
|
|
code is not specifically interpreted by the history, and the operation will not |
|
|
be added to the history. For all severities other than </span><code><span |
|
|
style='font-size:10.0pt'>OK</span></code><span style='font-size:10.0pt'>, |
|
|
listeners will receive the </span><span class=SpellE><code><span |
|
|
style='font-size:10.0pt'>operationNotOK</span></code></span><span |
|
|
style='font-size:10.0pt'> notification instead of the </span><code><span |
|
|
style='font-size:10.0pt'>done</span></code><span style='font-size:10.0pt'> |
|
|
notification.<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public void <b>remove</b>(<span class=SpellE>IOperation</span> operation)</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Remove |
|
|
the specified operation from the history. Listeners will be notified of the |
|
|
removal of the operation. This method is used by clients who want to flush a |
|
|
particular subset of the history. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Parameters:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>operation</span></code><span |
|
|
style='font-size:10.0pt'> - - the operation to be removed from the history<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public <span class=SpellE>org.eclipse.core.runtime.IStatus</span> <b>redo</b>(<span |
|
|
class=SpellE>IOperationContext</span> context,</pre><pre><span style='mso-spacerun:yes'> </span><span |
|
|
class=SpellE>org.eclipse.core.runtime.IProgressMonitor</span> monitor)</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Redo |
|
|
the most recently undone operation in the given context <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Parameters:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>context</span></code><span |
|
|
style='font-size:10.0pt'> - - the context to be redone, or null if the context |
|
|
does not matter <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>monitor</span></code><span |
|
|
style='font-size:10.0pt'> - - the progress monitor to be used for the redo, or |
|
|
null if no progress monitor is provided. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>the <span |
|
|
class=SpellE>IStatus</span> indicating whether the redo succeeded. The severity |
|
|
code in the returned status describes whether the operation succeeded and |
|
|
whether it remains in the history. </span><code><span style='font-size:10.0pt'>OK</span></code><span |
|
|
style='font-size:10.0pt'> severity indicates that the redo operation was |
|
|
successful and that the operation has been placed on the undo history. Listeners |
|
|
will receive the </span><code><span style='font-size:10.0pt'>redone</span></code><span |
|
|
style='font-size:10.0pt'> notification. </span><code><span style='font-size: |
|
|
10.0pt'>CANCEL</span></code><span style='font-size:10.0pt'> severity indicates |
|
|
that the user cancelled the operation and that the operation remains in the |
|
|
redo history. </span><code><span style='font-size:10.0pt'>ERROR</span></code><span |
|
|
style='font-size:10.0pt'> severity indicates that the operation could not |
|
|
successfully be redone and that it has been removed from the history. Listeners |
|
|
will also be notified that the operation was removed. Any other severity code |
|
|
is not specifically interpreted by the history, and is simply passed back to |
|
|
the caller. For all severities other than </span><code><span style='font-size: |
|
|
10.0pt'>OK</span></code><span style='font-size:10.0pt'>, listeners will receive |
|
|
the </span><span class=SpellE><code><span style='font-size:10.0pt'>operationNotOK</span></code></span><span |
|
|
style='font-size:10.0pt'> notification instead of the </span><code><span |
|
|
style='font-size:10.0pt'>redone</span></code><span style='font-size:10.0pt'> |
|
|
notification.<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public <span class=SpellE>org.eclipse.core.runtime.IStatus</span> <span |
|
|
class=SpellE><b>redoOperation</b></span>(<span class=SpellE>IOperation</span> operation,</pre><pre><span style='mso-spacerun:yes'> </span><span |
|
|
class=SpellE>org.eclipse.core.runtime.IProgressMonitor</span> monitor)</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Redo |
|
|
the specified operation <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Parameters:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>operation</span></code><span |
|
|
style='font-size:10.0pt'> - - the operation to be redone <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>monitor</span></code><span |
|
|
style='font-size:10.0pt'> - - the progress monitor to be used for the redo, or |
|
|
null if no progress monitor is provided <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>the <span |
|
|
class=SpellE>IStatus</span> indicating whether the redo succeeded. The severity |
|
|
code in the returned status describes whether the operation succeeded and |
|
|
whether it remains in the history. </span><code><span style='font-size:10.0pt'>OK</span></code><span |
|
|
style='font-size:10.0pt'> severity indicates that the redo operation was |
|
|
successful and that the operation has been placed on the undo history. |
|
|
Listeners will receive the </span><code><span style='font-size:10.0pt'>redone</span></code><span |
|
|
style='font-size:10.0pt'> notification. </span><code><span style='font-size: |
|
|
10.0pt'>CANCEL</span></code><span style='font-size:10.0pt'> severity indicates |
|
|
that the user cancelled the operation and that the operation remains in the |
|
|
redo history. </span><code><span style='font-size:10.0pt'>ERROR</span></code><span |
|
|
style='font-size:10.0pt'> severity indicates that the operation could not |
|
|
successfully be redone. The operation will remain at its current location in |
|
|
the history, and callers must explicitly remove it if desired. Any other |
|
|
severity code is not interpreted by the history, and is simply passed back to |
|
|
the caller. For all severities other than </span><code><span style='font-size: |
|
|
10.0pt'>OK</span></code><span style='font-size:10.0pt'>, listeners will receive |
|
|
the </span><span class=SpellE><code><span style='font-size:10.0pt'>operationNotOK</span></code></span><span |
|
|
style='font-size:10.0pt'> notification instead of the </span><code><span |
|
|
style='font-size:10.0pt'>redone</span></code><span style='font-size:10.0pt'> |
|
|
notification.<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public <span class=SpellE>org.eclipse.core.runtime.IStatus</span> <b>undo</b>(<span |
|
|
class=SpellE>IOperationContext</span> context,</pre><pre><span style='mso-spacerun:yes'> </span><span |
|
|
class=SpellE>org.eclipse.core.runtime.IProgressMonitor</span> monitor)</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Undo |
|
|
the most recently undone operation in the given context <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Parameters:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>context</span></code><span |
|
|
style='font-size:10.0pt'> - - the context to be undone, or null if the context |
|
|
does not matter <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>monitor</span></code><span |
|
|
style='font-size:10.0pt'> - - the progress monitor to be used for the undo, or |
|
|
null if no progress monitor is provided. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>the <span |
|
|
class=SpellE>IStatus</span> indicating whether the undo succeeded. The severity |
|
|
code in the returned status describes whether the operation succeeded and |
|
|
whether it remains in the history. </span><code><span style='font-size:10.0pt'>OK</span></code><span |
|
|
style='font-size:10.0pt'> severity indicates that the undo operation was |
|
|
successful and that the operation has been placed on the redo history. |
|
|
Listeners will receive the </span><code><span style='font-size:10.0pt'>undone</span></code><span |
|
|
style='font-size:10.0pt'> notification. </span><code><span style='font-size: |
|
|
10.0pt'>CANCEL</span></code><span style='font-size:10.0pt'> severity indicates |
|
|
that the user cancelled the operation and that the operation remains in the |
|
|
undo history. </span><code><span style='font-size:10.0pt'>ERROR</span></code><span |
|
|
style='font-size:10.0pt'> severity indicates that the operation could not |
|
|
successfully be undone and that it has been removed from the history. Listeners |
|
|
will be notified that the operation was removed. Any other severity code is not |
|
|
interpreted by the history, and is simply passed back to the caller. For all |
|
|
severities other than </span><code><span style='font-size:10.0pt'>OK</span></code><span |
|
|
style='font-size:10.0pt'>, listeners will receive the </span><span |
|
|
class=SpellE><code><span style='font-size:10.0pt'>operationNotOK</span></code></span><span |
|
|
style='font-size:10.0pt'> notification instead of the </span><code><span |
|
|
style='font-size:10.0pt'>undone</span></code><span style='font-size:10.0pt'> |
|
|
notification.<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public <span class=SpellE>org.eclipse.core.runtime.IStatus</span> <span |
|
|
class=SpellE><b>undoOperation</b></span>(<span class=SpellE>IOperation</span> operation,</pre><pre><span style='mso-spacerun:yes'> </span><span |
|
|
class=SpellE>org.eclipse.core.runtime.IProgressMonitor</span> monitor)</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Undo |
|
|
the specified operation <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Parameters:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>operation</span></code><span |
|
|
style='font-size:10.0pt'> - - the operation to be undone <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>monitor</span></code><span |
|
|
style='font-size:10.0pt'> - - the progress monitor to be used for the undo, or |
|
|
null if no progress monitor is provided <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>the <span |
|
|
class=SpellE>IStatus</span> indicating whether the undo succeeded. The severity |
|
|
code in the returned status describes whether the operation succeeded and |
|
|
whether it remains in the history. </span><code><span style='font-size:10.0pt'>OK</span></code><span |
|
|
style='font-size:10.0pt'> severity indicates that the undo operation was |
|
|
successful and that the operation has been placed on the redo history. |
|
|
Listeners will receive the </span><code><span style='font-size:10.0pt'>undone</span></code><span |
|
|
style='font-size:10.0pt'> notification. </span><code><span style='font-size: |
|
|
10.0pt'>CANCEL</span></code><span style='font-size:10.0pt'> severity indicates |
|
|
that the user cancelled the operation and that the operation remains in the |
|
|
undo history. </span><code><span style='font-size:10.0pt'>ERROR</span></code><span |
|
|
style='font-size:10.0pt'> severity indicates that the operation could not successfully |
|
|
be undone. The operation will remain at its current location in the history, |
|
|
and callers must explicitly remove it if desired. Any other severity code is |
|
|
not interpreted by the history, and is simply passed back to the caller. For |
|
|
all severities other than </span><code><span style='font-size:10.0pt'>OK</span></code><span |
|
|
style='font-size:10.0pt'>, listeners will receive the </span><span |
|
|
class=SpellE><code><span style='font-size:10.0pt'>operationNotOK</span></code></span><span |
|
|
style='font-size:10.0pt'> notification instead of the </span><code><span |
|
|
style='font-size:10.0pt'>undone</span></code><span style='font-size:10.0pt'> |
|
|
notification.<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public <span class=SpellE>boolean</span> <span class=SpellE><b>canRedo</b></span>(<span |
|
|
class=SpellE>IOperationContext</span> context)</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Return |
|
|
whether there is a <span class=SpellE>redoable</span> operation available in |
|
|
the given context. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Parameters:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>context</span></code><span |
|
|
style='font-size:10.0pt'> - - the context to be checked, or null for any |
|
|
context <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>true</span></code><span |
|
|
style='font-size:10.0pt'> if there is a <span class=SpellE>redoable</span> |
|
|
operation, </span><code><span style='font-size:10.0pt'>false</span></code><span |
|
|
style='font-size:10.0pt'> otherwise.<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public <span class=SpellE>boolean</span> <span class=SpellE><b>canUndo</b></span>(<span |
|
|
class=SpellE>IOperationContext</span> context)</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Return |
|
|
whether there is an undoable operation available in the given context <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Parameters:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>context</span></code><span |
|
|
style='font-size:10.0pt'> - - the context to be checked, or null to represent |
|
|
any context <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>true</span></code><span |
|
|
style='font-size:10.0pt'> if there is an undoable operation, </span><code><span |
|
|
style='font-size:10.0pt'>false</span></code><span style='font-size:10.0pt'> |
|
|
otherwise.<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public void <span class=SpellE><b>addOperationApprover</b></span>(<span |
|
|
class=SpellE>IOperationApprover</span> approver)</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Add the |
|
|
specified approver to the operation history. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Parameters:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>approver</span></code><span |
|
|
style='font-size:10.0pt'> - - the <span class=SpellE>IOperationApprover</span> |
|
|
that will be consulted before any operation in the history is undone or redone<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public void <span class=SpellE><b>addOperationHistoryListener</b></span>(<span |
|
|
class=SpellE>IOperationHistoryListener</span> listener)</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Add |
|
|
the specified listener to the operation history. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Parameters:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>listener</span></code><span |
|
|
style='font-size:10.0pt'> - - the <span class=SpellE>IOperationHistoryListener</span> |
|
|
to receive notifications about changes in the history or operations that are |
|
|
executed, undone, or redone<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public void <span class=SpellE><b>removeOperationApprover</b></span>(<span |
|
|
class=SpellE>IOperationApprover</span> approver)</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Remove |
|
|
the specified operation approver from the operation history. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Parameters:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>approver</span></code><span |
|
|
style='font-size:10.0pt'> - - the <span class=SpellE>IOperationApprover</span> |
|
|
to be removed<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public void <span class=SpellE><b>removeOperationHistoryListener</b></span>(<span |
|
|
class=SpellE>IOperationHistoryListener</span> listener)</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Remove |
|
|
the specified listener from the operation history. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Parameters:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>listener</span></code><span |
|
|
style='font-size:10.0pt'> - - The <span class=SpellE>IOperationHistoryListener</span> |
|
|
to be removed<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public <span class=SpellE>IOperation</span> <span class=SpellE><b>getRedoOperation</b></span>(<span |
|
|
class=SpellE>IOperationContext</span> context)</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Get |
|
|
the operation that will next be redone in the given context. This method is |
|
|
used to retrieve the label or description as needed for the "Redo" |
|
|
menu. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Parameters:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>context</span></code><span |
|
|
style='font-size:10.0pt'> - - the context for the redo, or null if the context |
|
|
does not matter <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>the |
|
|
operation to be redone or </span><code><span style='font-size:10.0pt'>null</span></code><span |
|
|
style='font-size:10.0pt'> if there is no valid operation available.<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public <span class=SpellE>IOperation</span> [] <span class=SpellE><b>getRedoHistory</b></span>(<span |
|
|
class=SpellE>IOperationContext</span> context)</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Get |
|
|
the array of operations in the redo history for a given context. The operations |
|
|
are in the order that they would be redone if successive "Redo" |
|
|
commands were invoked. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Parameters:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>context</span></code><span |
|
|
style='font-size:10.0pt'> - - the context for the redo, or null if the entire |
|
|
history is requested <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>the |
|
|
array of operations in the history<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public <span class=SpellE>IOperation</span> <span class=SpellE><b>getUndoOperation</b></span>(<span |
|
|
class=SpellE>IOperationContext</span> context)</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Get |
|
|
the operation that will next be undone in the given context. This method is |
|
|
used to retrieve the label or description as needed for the "Undo" |
|
|
menu. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Parameters:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>context</span></code><span |
|
|
style='font-size:10.0pt'> - - the context for the undo, or null if the context |
|
|
does not matter <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>the |
|
|
operation to be undone or </span><code><span style='font-size:10.0pt'>null</span></code><span |
|
|
style='font-size:10.0pt'> if there is no operation available.<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public <span class=SpellE>IOperation</span> [] <span class=SpellE><b>getUndoHistory</b></span>(<span |
|
|
class=SpellE>IOperationContext</span> context)</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Get |
|
|
the array of operations that can be undone in the specified context. The |
|
|
operations are in the order that they would be undone if successive |
|
|
"Undo" commands were invoked. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Parameters:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>context</span></code><span |
|
|
style='font-size:10.0pt'> - - the context for the undo, or null if the entire |
|
|
history is requested <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>the |
|
|
array of operations in the history<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public void <b>dispose</b>(<span class=SpellE>IOperationContext</span> context,</pre><pre><span style='mso-spacerun:yes'> </span><span style='mso-spacerun:yes'> </span><span |
|
|
class=SpellE>boolean</span> <span class=SpellE>flushUndo</span>,</pre><pre><span style='mso-spacerun:yes'> </span><span |
|
|
class=SpellE>boolean</span> <span class=SpellE>flushRedo</span>)</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Dispose |
|
|
of the specified context in the history. All operations that have only the |
|
|
given context will be disposed. References to the context in operations that |
|
|
have more than one context will also be removed. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Parameters:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>context</span></code><span |
|
|
style='font-size:10.0pt'> - - the context to be disposed, or null if all |
|
|
contexts are to be disposed <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span class=SpellE><code><span |
|
|
style='font-size:10.0pt'>flushUndo</span></code></span><span style='font-size: |
|
|
10.0pt'> - - </span><code><span style='font-size:10.0pt'>true</span></code><span |
|
|
style='font-size:10.0pt'> if the context should be flushed from the undo |
|
|
history, </span><code><span style='font-size:10.0pt'>false</span></code><span |
|
|
style='font-size:10.0pt'> if it should not <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span class=SpellE><code><span |
|
|
style='font-size:10.0pt'>flushRedo</span></code></span><span style='font-size: |
|
|
10.0pt'> - - </span><code><span style='font-size:10.0pt'>true</span></code><span |
|
|
style='font-size:10.0pt'> if the context should be flushed from the redo |
|
|
history, </span><code><span style='font-size:10.0pt'>false</span></code><span |
|
|
style='font-size:10.0pt'> if it should not.<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public <span class=SpellE>int</span> <span class=SpellE><b>getLimit</b></span>()</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Return |
|
|
the specified limit on the undo and redo history. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>limit<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public void <span class=SpellE><b>setLimit</b></span>(<span class=SpellE>int</span> limit)</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Set |
|
|
the limit on the undo and redo history. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Parameters:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>limit</span></code><span |
|
|
style='font-size:10.0pt'> - - the maximum number of operations that should be |
|
|
kept in the history<o:p></o:p></span></p> |
|
|
|
|
|
<h3><span class=SpellE>IOperationContext</span></h3> |
|
|
|
|
|
<pre>public <span class=SpellE>java.lang.String</span> <span class=SpellE><b>getLabel</b></span>()</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Get |
|
|
the label that should be used to describe the context in any views. Contexts |
|
|
may be shown when filtered operation histories are shown to the user. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>the |
|
|
label for the context.<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public <span class=SpellE>IContextOperationApprover</span> <span |
|
|
class=SpellE><b>getOperationApprover</b></span>()</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Get |
|
|
the operation approver that is used to approve undo or redo operations |
|
|
involving this context. A null context signifies that no special approval is |
|
|
necessary. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>the |
|
|
operation approver for the context.<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public <span class=SpellE>boolean</span> <span class=SpellE><b>acceptOperation</b></span>(<span |
|
|
class=SpellE>IOperation</span> operation)</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Return |
|
|
a <span class=SpellE>boolean</span> that indicates whether this context should |
|
|
be assigned to the specified operation. This method should be overridden by |
|
|
contexts that have complex rules for whether they should be assigned to an |
|
|
operation. Simple contexts generally answer true. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>a <span |
|
|
class=SpellE>boolean</span> indicating whether this context should be assigned |
|
|
to the operation.<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public <span class=SpellE>boolean</span> <b>equals</b>(<span class=SpellE>IOperationContext</span> context)</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Return |
|
|
whether this context is equal to the specified context. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Parameters:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>context</span></code><span |
|
|
style='font-size:10.0pt'> - <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>true</span></code><span |
|
|
style='font-size:10.0pt'> if the contexts are equal, </span><code><span |
|
|
style='font-size:10.0pt'>false</span></code><span style='font-size:10.0pt'> |
|
|
otherwise.<o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></p> |
|
|
|
|
| 841 |
<h3><span class=SpellE>IOperationApprover</span></h3> |
<h3><span class=SpellE>IOperationApprover</span></h3> |
| 842 |
|
|
| 843 |
<p class=MsoNormal><span class=SpellE><span style='font-size:10.0pt;font-family: |
<p class=MsoNormal><span class=SpellE><span style='font-size:10.0pt;font-family: |
| 855 |
and false if it should not. When an operation is rejected, it is expected that |
and false if it should not. When an operation is rejected, it is expected that |
| 856 |
the object rejecting the operation has already consulted the user if necessary |
the object rejecting the operation has already consulted the user if necessary |
| 857 |
or otherwise provided any necessary information to the user about the |
or otherwise provided any necessary information to the user about the |
| 858 |
rejection.<o:p></o:p></span></p> |
rejection.<span style='mso-spacerun:yes'> </span>If an undo or redo is |
| 859 |
|
triggered from the UI, clients provide UI info (such as an <span class=SpellE>org.eclipse.swt.Shell</span>) |
| 860 |
<pre>public <span class=SpellE>org.eclipse.core.runtime.IStatus</span> <span |
to assist in prompting the user where necessary.<o:p></o:p></span></p> |
|
class=SpellE><b>proceedUndoing</b></span>(<span class=SpellE>IOperation</span> operation, <span |
|
|
class=SpellE>IOperationHistory</span> history)</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Return |
|
|
a status indicating whether the specified operation should be undone. Any |
|
|
status that does not have severity </span><span class=SpellE><code><span |
|
|
style='font-size:10.0pt'>IStatus.OK</span></code></span><span style='font-size: |
|
|
10.0pt'> will not be approved. Implementers should not assume that the undo |
|
|
will be performed when the status is </span><code><span style='font-size:10.0pt'>OK</span></code><span |
|
|
style='font-size:10.0pt'>, since other operation approvers can veto the undo. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Parameters:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>operation</span></code><span |
|
|
style='font-size:10.0pt'> - - the operation to be undone <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>history</span></code><span |
|
|
style='font-size:10.0pt'> - - the history undoing the operation <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>the <span |
|
|
class=SpellE>IStatus</span> describing whether the operation is approved. The |
|
|
undo will not proceed if the status severity is not </span><code><span |
|
|
style='font-size:10.0pt'>OK</span></code><span style='font-size:10.0pt'>, and |
|
|
the caller requesting the undo will be returned the status that caused the |
|
|
rejection. Any other status severities will not be interpreted by the history.<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public <span class=SpellE>org.eclipse.core.runtime.IStatus</span> <span |
|
|
class=SpellE><b>proceedRedoing</b></span>(<span class=SpellE>IOperation</span> operation, <span |
|
|
class=SpellE>IOperationHistory</span> history)</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Return |
|
|
a status indicating whether the specified operation should be redone. Any |
|
|
status that does not have severity </span><span class=SpellE><code><span |
|
|
style='font-size:10.0pt'>IStatus.OK</span></code></span><span style='font-size: |
|
|
10.0pt'> will not be approved. Implementers should not assume that the redo |
|
|
will be performed when the status is </span><code><span style='font-size:10.0pt'>OK</span></code><span |
|
|
style='font-size:10.0pt'>, since other operation approvers may veto the redo. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Parameters:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>operation</span></code><span |
|
|
style='font-size:10.0pt'> - - the operation to be redone <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>history</span></code><span |
|
|
style='font-size:10.0pt'> - - the history redoing the operation <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>the <span |
|
|
class=SpellE>IStatus</span> describing whether the operation is approved. The |
|
|
redo will not proceed if the status severity is no </span><code><span |
|
|
style='font-size:10.0pt'>OK</span></code><span style='font-size:10.0pt'>, and |
|
|
the caller requesting the redo will be returned the status that caused the |
|
|
rejection. Any other status severities will not be interpreted by the history.<o:p></o:p></span></p> |
|
| 861 |
|
|
| 862 |
<h3><span class=SpellE>IOperationHistoryListener</span></h3> |
<h3><span class=SpellE>IOperationHistoryListener</span></h3> |
| 863 |
|
|
| 864 |
<pre>public void <span class=SpellE><b>historyNotification</b></span>(<span |
<p class=MsoNormal><span class=SpellE><span style='font-size:10.0pt;font-family: |
| 865 |
class=SpellE>OperationHistoryEvent</span> event)</pre> |
Arial'>IOperationHistoryListener</span></span><span style='font-size:10.0pt; |
| 866 |
|
font-family:Arial'> defines the interface for being notified about particular |
| 867 |
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Something |
events that take place inside the operation history.<o:p></o:p></span></p> |
|
of note has happened in the <span class=SpellE>IOperationHistory</span>. |
|
|
Listeners should check the supplied event for details. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Parameters:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>event</span></code><span |
|
|
style='font-size:10.0pt'> - - the <span class=SpellE>OperationHistoryEvent</span> |
|
|
that describes the particular notification.<o:p></o:p></span></p> |
|
| 868 |
|
|
| 869 |
<h3><span class=SpellE>OperationHistoryEvent</span></h3> |
<h3><span class=SpellE>OperationHistoryEvent</span></h3> |
| 870 |
|
|
| 871 |
<pre>public <span class=SpellE>IOperationHistory</span> <b>history</b></pre><pre><o:p> </o:p></pre><pre>public <span |
<p class=MsoNormal><span class=SpellE><span style='font-size:10.0pt;font-family: |
| 872 |
class=SpellE>IOperation</span> <b>operation</b></pre><pre><o:p> </o:p></pre><pre>public <span |
Arial'>OperationHistoryEvent</span></span><span style='font-size:10.0pt; |
| 873 |
class=SpellE>boolean</span> <span class=SpellE><b>operationAdded</b></span>()</pre> |
font-family:Arial'> defines the different types of events that occur inside an |
| 874 |
|
operation history.<span style='mso-spacerun:yes'> </span><span class=GramE>Listeners |
| 875 |
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Returns |
are notified before and after an operation is</span> executed, undone, or |
| 876 |
whether or not an operation was added to the history. Listeners typically use |
redone.<span style='mso-spacerun:yes'> </span>Listeners are also notified when |
| 877 |
this to add their context to a new operation as appropriate or otherwise record |
operations are added or removed from the history.<o:p></o:p></span></p> |
|
the operation. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>true</span></code><span |
|
|
style='font-size:10.0pt'> if an operation has been added, </span><code><span |
|
|
style='font-size:10.0pt'>false</span></code><span style='font-size:10.0pt'> if |
|
|
not.<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public <span class=SpellE>boolean</span> <span class=SpellE><b>operationRemoved</b></span>()</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Returns |
|
|
whether or not an operation was removed from the history. Listeners typically |
|
|
remove any record of the operation that they may have kept in their own state. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>true</span></code><span |
|
|
style='font-size:10.0pt'> if an operation has been removed, </span><code><span |
|
|
style='font-size:10.0pt'>false</span></code><span style='font-size:10.0pt'> if |
|
|
not.<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public <span class=SpellE>boolean</span> <span class=SpellE><b>aboutToExecute</b></span>()</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Returns |
|
|
whether or not an operation is about to execute. Listeners should prepare for the |
|
|
execution as appropriate. Listeners will receive a done notification if the |
|
|
operation is successful, or an <span class=SpellE>operationNotCompleted</span> |
|
|
notification if the execution is cancelled or otherwise fails. This |
|
|
notification is only received for those operations executed by the operation |
|
|
history. Operations that are added to the history after execution do not |
|
|
trigger these notifications. If the operation successfully executes, clients |
|
|
will also receive a notification that it has been added to the history. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>true</span></code><span |
|
|
style='font-size:10.0pt'> if an operation is about to execute, </span><code><span |
|
|
style='font-size:10.0pt'>false</span></code><span style='font-size:10.0pt'> if |
|
|
not.<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public <span class=SpellE>boolean</span> <span class=SpellE><b>aboutToUndo</b></span>()</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Returns |
|
|
whether or not an operation is about to be undone. Listeners should prepare for |
|
|
the undo as appropriate. Listeners will receive an undone notification if the operation |
|
|
is successful, or an <span class=SpellE>operationNotCompleted</span> |
|
|
notification if the undo is cancelled or otherwise fails. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>true</span></code><span |
|
|
style='font-size:10.0pt'> if an operation is about to undo, </span><code><span |
|
|
style='font-size:10.0pt'>false</span></code><span style='font-size:10.0pt'> if |
|
|
not.<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public <span class=SpellE>boolean</span> <span class=SpellE><b>aboutToRedo</b></span>()</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Returns |
|
|
whether or not an operation is about to be redone. Listeners should prepare for |
|
|
the redo as appropriate. Listeners will receive a redone notification if the |
|
|
operation is successful, or an <span class=SpellE>operationNotCompleted</span> |
|
|
notification if the redo is cancelled or otherwise fails. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>true</span></code><span |
|
|
style='font-size:10.0pt'> if an operation is about to redo, </span><code><span |
|
|
style='font-size:10.0pt'>false</span></code><span style='font-size:10.0pt'> if |
|
|
not.<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public <span class=SpellE>boolean</span> <b>done</b>()</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Returns |
|
|
whether or not an operation was initially done. Listeners can take appropriate |
|
|
action, such as revealing any relevant state in the UI. This notification is |
|
|
only received for those operations executed by the operation history. |
|
|
Operations that are added to the history after execution do not trigger this |
|
|
notification. Clients will also receive a notification that the operation has |
|
|
been added to the history. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>true</span></code><span |
|
|
style='font-size:10.0pt'> if an operation has been done, </span><code><span |
|
|
style='font-size:10.0pt'>false</span></code><span style='font-size:10.0pt'> if |
|
|
not.<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public <span class=SpellE>boolean</span> <b>undone</b>()</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Returns |
|
|
whether or not an operation was undone. Listeners can take appropriate action, |
|
|
such as revealing any relevant state in the UI. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>true</span></code><span |
|
|
style='font-size:10.0pt'> if an operation has been undone, </span><code><span |
|
|
style='font-size:10.0pt'>false</span></code><span style='font-size:10.0pt'> if |
|
|
not.<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public <span class=SpellE>boolean</span> <b>redone</b>()</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Returns |
|
|
whether or not an operation was redone. Listeners can take appropriate action, |
|
|
such as revealing any relevant state in the UI. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>true</span></code><span |
|
|
style='font-size:10.0pt'> if an operation has been redone, </span><code><span |
|
|
style='font-size:10.0pt'>false</span></code><span style='font-size:10.0pt'> if |
|
|
not.<o:p></o:p></span></p> |
|
|
|
|
|
<pre>public <span class=SpellE>boolean</span> <span class=SpellE><b>operationNotOK</b></span>()</pre> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><span style='font-size:10.0pt'>Returns |
|
|
whether or not an operation was attempted and not successful. Listeners |
|
|
typically use this when they have prepared for an execute, undo, or redo, and |
|
|
need to know that the operation did not successfully complete. For example, |
|
|
listeners that turn redraw off before an operation is undone would turn redraw |
|
|
on when the operation completes, or when this notification is received, since |
|
|
there will be no notification of the completion. <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><b><span style='font-size:10.0pt'>Returns:</span></b><span |
|
|
style='font-size:10.0pt'> <o:p></o:p></span></p> |
|
|
|
|
|
<p class=MsoNormal style='margin-left:.5in'><code><span style='font-size:10.0pt'>true</span></code><span |
|
|
style='font-size:10.0pt'> if an operation has been redone, </span><code><span |
|
|
style='font-size:10.0pt'>false</span></code><span style='font-size:10.0pt'> if |
|
|
not.<o:p></o:p></span></p> |
|
| 878 |
|
|
| 879 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></p> |
<h3><span class=SpellE>OperationHistoryFactory</span></h3> |
| 880 |
|
|
| 881 |
|
<p class=MsoNormal><span class=SpellE><span style='font-size:10.0pt;font-family: |
| 882 |
|
Arial'>OperationHistoryFactory</span></span><span style='font-size:10.0pt; |
| 883 |
|
font-family:Arial'> provides access to a singleton instance of an operation |
| 884 |
|
history.<span style='mso-spacerun:yes'> </span>This factory will provide a |
| 885 |
|
default implementation for an operation history if one is not set by a |
| 886 |
|
caller.<span style='mso-spacerun:yes'> </span>Once the singleton is obtained |
| 887 |
|
by any client, the instance cannot be reset.<o:p></o:p></span></p> |
| 888 |
|
|
| 889 |
<h2>UI Support Classes<span style='font-size:10.0pt'><o:p></o:p></span></h2> |
<h2>UI Support Classes<span style='font-size:10.0pt'><o:p></o:p></span></h2> |
| 890 |
|
|
| 891 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>Additional |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>Additional |
| 892 |
support classes will be provided in the package <span class=SpellE>org.eclipse.ui.operations</span>.<span |
support classes are provided in the package <span class=SpellE>org.eclipse.ui.operations</span>.<span |
| 893 |
style='mso-spacerun:yes'> </span>These classes handle policy decisions about |
style='mso-spacerun:yes'> </span>These classes handle policy decisions about |
| 894 |
the undo model to be used by the workbench.<span style='mso-spacerun:yes'> |
the undo model to be used by the workbench.<span style='mso-spacerun:yes'> |
| 895 |
</span>Access to the undo and redo commands, as well as the operations history, |
</span>Access to the undo and redo handlers, as well as the operations history, |
| 896 |
will be provided through workbench.<o:p></o:p></span></p> |
will be provided through workbench.<o:p></o:p></span></p> |
| 897 |
|
|
|
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></p> |
|
|
|
|
| 898 |
<h3>Workbench Operation History</h3> |
<h3>Workbench Operation History</h3> |
| 899 |
|
|
| 900 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>The |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>The |
| 901 |
workbench will manage a common operation history that can be used by any |
workbench will configure the default operation history supplied by the <span |
| 902 |
plug-in to integrate its undo and redo history with the workbench.<span |
class=SpellE>OperationHistoryFactory</span> and register an <span class=SpellE>IUndoContext</span> |
| 903 |
style='mso-spacerun:yes'> </span>This operation history will be accessible |
adapter onto the workspace.<span style='mso-spacerun:yes'> |
| 904 |
through workbench API, to be determined by M5.<o:p></o:p></span></p> |
</span>Configuration of the operation history includes setting an undo limit |
| 905 |
|
for the workspace undo context and adding an <span class=SpellE>IOperationApprover</span> |
| 906 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></p> |
that enforces a per-context linear undo model.<span style='mso-spacerun:yes'> |
| 907 |
|
</span><o:p></o:p></span></p> |
|
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>Contexts |
|
|
will be defined for text editors (with specialization for source editors) and |
|
|
for the workspace.<span style='mso-spacerun:yes'> </span>Throughout the |
|
|
development of R3.1, plug-ins will be encouraged to define operations that |
|
|
represent their existing actions or command handlers.<span |
|
|
style='mso-spacerun:yes'> </span>Additional contexts may be defined by |
|
|
plug-ins.<o:p></o:p></span></p> |
|
| 908 |
|
|
| 909 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></p> |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></p> |
| 910 |
|
|
| 911 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>Existing |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>Undo |
| 912 |
workbench actions will be modified to support undo by mapping existing |
contexts will be defined for text editors and for the workspace.<span |
| 913 |
workbench actions and handlers to operations.<span style='mso-spacerun:yes'> |
style='mso-spacerun:yes'> </span>Throughout the development of R3.1, plug-ins |
| 914 |
</span>The operations will be added incrementally once the framework is in |
will be encouraged to define operations that represent their existing actions |
| 915 |
|
or command handlers.<span style='mso-spacerun:yes'> </span>Additional contexts |
| 916 |
|
may be defined by plug-ins as necessary.<span style='mso-spacerun:yes'> |
| 917 |
|
</span>Undoable operations will be added incrementally once the framework is in |
| 918 |
place.<span style='mso-spacerun:yes'> </span><o:p></o:p></span></p> |
place.<span style='mso-spacerun:yes'> </span><o:p></o:p></span></p> |
| 919 |
|
|
| 920 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></p> |
<h3><span class=SpellE>IWorkbenchOperationSupport</span></h3> |
| 921 |
|
|
| 922 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>Operations |
<p class=MsoNormal><span class=SpellE><span style='font-size:10.0pt;font-family: |
| 923 |
that are assigned the workspace context will implement a <span class=SpellE>subinterface</span>, |
Arial'>IWorkbenchOperationSupport</span></span><span style='font-size:10.0pt; |
| 924 |
<span class=SpellE>IWorkspaceOperation</span>.<span style='mso-spacerun:yes'> |
font-family:Arial'> provides access to the workbench operation history and the |
| 925 |
</span><span class=SpellE>IWorkspaceOperation</span> adds protocol to access |
workspace undo context.<span style='mso-spacerun:yes'> </span>Although these objects |
| 926 |
the model elements manipulated by an operation (<span class=SpellE>getElements</span>()), |
are actually managed elsewhere (in the <span class=SpellE>OperationHistoryFactory</span> |
| 927 |
so that listeners can decide if the workspace operation affects their |
and as an adapter on the workspace), <span class=SpellE>IWorkbenchOperationSupport</span> |
| 928 |
model.<span style='mso-spacerun:yes'> </span>This protocol is not generalized |
provides integrated access to all undo facilities used by the workbench.<span |
| 929 |
to <span class=SpellE>IOperation</span>.<span style='mso-spacerun:yes'> |
style='mso-spacerun:yes'> </span>Plug-ins aware of the workbench will typically |
| 930 |
</span>Prior experience with model-based operation frameworks has shown that |
get the <span class=SpellE>IWorkbenchOperationSupport</span> from the workbench |
| 931 |
there needs to be a very specific contract regarding how and when validation is |
to obtain the appropriate context and operation history.<span |
| 932 |
performed, what underlying model listeners are used to validate the operation, |
style='mso-spacerun:yes'> </span>Lower-level (headless) plug-ins that implement |
| 933 |
and whether operations history notifications or internal model notifications |
undo support will use the lower level constructs, such as the <span |
| 934 |
are used to maintain the validity of the operation and the undo stack.<span |
class=SpellE>OperationHistoryFactory</span>, to obtain these objects.</span><o:p></o:p></p> |
|
style='mso-spacerun:yes'> </span>These details for <span class=SpellE>IWorkspaceOperation</span> |
|
|
will evolve as more workbench operations are created. <o:p></o:p></span></p> |
|
| 935 |
|
|
| 936 |
<h3><span class=SpellE>UndoHandler</span> and <span class=SpellE>RedoHandler</span></h3> |
<h3><span class=SpellE>UndoActionHandler</span> and <span class=SpellE>RedoActionHandler</span></h3> |
| 937 |
|
|
| 938 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>The |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>The |
| 939 |
Edit>Undo and Edit>Redo commands should be handled by any parts that wish |
Edit>Undo and Edit>Redo commands should be handled by any parts that wish |
| 940 |
to support undo.<span style='mso-spacerun:yes'> </span>Common handlers for the |
to support undo.<span style='mso-spacerun:yes'> </span>Common handlers for the |
| 941 |
undo and redo commands will be provided.<span style='mso-spacerun:yes'> |
undo and redo commands will be provided.<span style='mso-spacerun:yes'> |
| 942 |
</span>These handlers can be assigned a context that should be used to filter |
</span>These handlers can be assigned an undo context that should be used to |
| 943 |
the undo and redo history.<span style='mso-spacerun:yes'> </span>The handlers |
filter the undo and redo history.<span style='mso-spacerun:yes'> </span>The |
| 944 |
are responsible for the following:<o:p></o:p></span></p> |
handlers are responsible for the following:<o:p></o:p></span></p> |
| 945 |
|
|
| 946 |
<ul style='margin-top:0in' type=disc> |
<ul style='margin-top:0in' type=disc> |
| 947 |
<li class=MsoNormal style='mso-list:l7 level1 lfo11;tab-stops:list .5in'><span |
<li class=MsoNormal style='mso-list:l9 level1 lfo11;tab-stops:list .5in'><span |
| 948 |
style='font-size:10.0pt;font-family:Arial'>Undo and Redo commands will be |
style='font-size:10.0pt;font-family:Arial'>Undo and Redo commands will be |
| 949 |
enabled based on the status of the history.<o:p></o:p></span></li> |
enabled based on the status of the history.<o:p></o:p></span></li> |
| 950 |
<li class=MsoNormal style='mso-list:l7 level1 lfo11;tab-stops:list .5in'><span |
<li class=MsoNormal style='mso-list:l9 level1 lfo11;tab-stops:list .5in'><span |
| 951 |
style='font-size:10.0pt;font-family:Arial'>The Undo and Redo commands will |
style='font-size:10.0pt;font-family:Arial'>The Undo and Redo commands will |
| 952 |
be appended with the label of the operation for the handler’s context.<o:p></o:p></span></li> |
be appended with the label of the operation for the handler’s context.<o:p></o:p></span></li> |
| 953 |
<li class=MsoNormal style='mso-list:l7 level1 lfo11;tab-stops:list .5in'><span |
<li class=MsoNormal style='mso-list:l9 level1 lfo11;tab-stops:list .5in'><span |
| 954 |
style='font-size:10.0pt;font-family:Arial'>The undo and redo history will |
style='font-size:10.0pt;font-family:Arial'>The handlers can be configured |
| 955 |
be flushed for the handler’s context whenever the most recent operation in |
to flush the undo and redo history for their context whenever the most |
| 956 |
the history is invalid.<span style='mso-spacerun:yes'> </span>This |
recent operation in the history is invalid.<span |
| 957 |
aggressive maintenance of the history is the most conservative approach |
style='mso-spacerun:yes'> </span>This aggressive maintenance of the |
| 958 |
for ensuring that the history contains valid operations, and this strategy |
history is the most conservative approach for ensuring that the history |
| 959 |
may evolve with experience.<o:p></o:p></span></li> |
contains valid operations, and this strategy may evolve with experience.<span |
| 960 |
|
style='mso-spacerun:yes'> </span>Localized undo contexts, such as text |
| 961 |
|
edits, may not need this aggressive pruning of the history.<o:p></o:p></span></li> |
| 962 |
</ul> |
</ul> |
| 963 |
|
|
| 964 |
<h3>Undo and Redo Toolbar Items</h3> |
<h3>Undo and Redo Toolbar Items</h3> |
| 976 |
|
|
| 977 |
<h3>Operation Approvers</h3> |
<h3>Operation Approvers</h3> |
| 978 |
|
|
| 979 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>The |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>The <span |
| 980 |
workbench will provide and install an <span class=SpellE>IOperationApprover</span> |
class=SpellE>IOperationApprover</span> installed by the workbench enforces a |
| 981 |
that consults the contexts of an operation to determine whether undo or redo |
per-context linear undo model by consulting all contexts of an operation to |
| 982 |
should proceed.<span style='mso-spacerun:yes'> </span>The policy is described |
determine whether undo or redo should proceed.<span style='mso-spacerun:yes'> |
| 983 |
as follows:<o:p></o:p></span></p> |
</span>The policy is described as follows:<o:p></o:p></span></p> |
| 984 |
|
|
| 985 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></p> |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'><o:p> </o:p></span></p> |
| 986 |
|
|
| 999 |
example will help explain this.<span style='mso-spacerun:yes'> </span><o:p></o:p></span></p> |
example will help explain this.<span style='mso-spacerun:yes'> </span><o:p></o:p></span></p> |
| 1000 |
|
|
| 1001 |
<ol style='margin-top:0in' start=1 type=1> |
<ol style='margin-top:0in' start=1 type=1> |
| 1002 |
<li class=MsoNormal style='mso-list:l2 level1 lfo14;tab-stops:list .5in'><span |
<li class=MsoNormal style='mso-list:l4 level1 lfo14;tab-stops:list .5in'><span |
| 1003 |
style='font-size:10.0pt;font-family:Arial'>The user makes local edits in |
style='font-size:10.0pt;font-family:Arial'>The user makes local edits in |
| 1004 |
editor A.<o:p></o:p></span></li> |
editor A.<o:p></o:p></span></li> |
| 1005 |
<li class=MsoNormal style='mso-list:l2 level1 lfo14;tab-stops:list .5in'><span |
<li class=MsoNormal style='mso-list:l4 level1 lfo14;tab-stops:list .5in'><span |
| 1006 |
style='font-size:10.0pt;font-family:Arial'>The user initiates a |
style='font-size:10.0pt;font-family:Arial'>The user initiates a |
| 1007 |
refactoring operation whose context is “A” and “workspace.”<o:p></o:p></span></li> |
refactoring operation whose context is “A” and “workspace.”<o:p></o:p></span></li> |
| 1008 |
<li class=MsoNormal style='mso-list:l2 level1 lfo14;tab-stops:list .5in'><span |
<li class=MsoNormal style='mso-list:l4 level1 lfo14;tab-stops:list .5in'><span |
| 1009 |
style='font-size:10.0pt;font-family:Arial'>The user makes additional local |
style='font-size:10.0pt;font-family:Arial'>The user makes additional local |
| 1010 |
edits to editor A.<o:p></o:p></span></li> |
edits to editor A.<o:p></o:p></span></li> |
| 1011 |
<li class=MsoNormal style='mso-list:l2 level1 lfo14;tab-stops:list .5in'><span |
<li class=MsoNormal style='mso-list:l4 level1 lfo14;tab-stops:list .5in'><span |
| 1012 |
style='font-size:10.0pt;font-family:Arial'>The user goes to the navigator |
style='font-size:10.0pt;font-family:Arial'>The user goes to the navigator |
| 1013 |
and selects Undo.<o:p></o:p></span></li> |
and selects Undo.<o:p></o:p></span></li> |
| 1014 |
</ol> |
</ol> |
| 1048 |
|
|
| 1049 |
<h3>Mapping existing actions or command handlers to operations</h3> |
<h3>Mapping existing actions or command handlers to operations</h3> |
| 1050 |
|
|
| 1051 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>Converting |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>Converting an |
| 1052 |
an existing action to use operations is straightforward, apart from |
existing action to use operations is straightforward, apart from implementing |
| 1053 |
implementing the undo and redo behavior for the action.<span |
the undo and redo behavior for the action.<span style='mso-spacerun:yes'> |
| 1054 |
style='mso-spacerun:yes'> </span>The run() or <span class=SpellE>runWithEvent</span> |
</span>The run() or <span class=SpellE>runWithEvent</span> method inside the |
| 1055 |
method inside the action should create an operation, execute it, and add it to |
action should create an operation, execute it, and add it to the operations |
| 1056 |
the operations history, rather than run the code inside the method.<span |
history, rather than run the code inside the method.<span |
| 1057 |
style='mso-spacerun:yes'> </span>The following code shows the existing run() |
style='mso-spacerun:yes'> </span>The following code shows the existing run() |
| 1058 |
method in the <span class=SpellE>EditorAction</span> of the <span class=SpellE>readme</span> |
method in the <span class=SpellE>EditorAction</span> of the <span class=SpellE>readme</span> |
| 1059 |
tool example (<span class=SpellE>org.eclipse.ui.examples.readmetool</span>):<o:p></o:p></span></p> |
tool example (<span class=SpellE>org.eclipse.ui.examples.readmetool</span>):<o:p></o:p></span></p> |
| 1063 |
<pre>public void run() {</pre><pre><span style='mso-spacerun:yes'> </span>String <span |
<pre>public void run() {</pre><pre><span style='mso-spacerun:yes'> </span>String <span |
| 1064 |
class=SpellE>editorName</span> = <span class=SpellE>MessageUtil.getString</span>("<span |
class=SpellE>editorName</span> = <span class=SpellE>MessageUtil.getString</span>("<span |
| 1065 |
class=SpellE>Empty_Editor_Name</span>"); </pre><pre><span style='mso-spacerun:yes'> </span>if (<span |
class=SpellE>Empty_Editor_Name</span>"); </pre><pre><span style='mso-spacerun:yes'> </span>if (<span |
| 1066 |
class=SpellE>activeEditor</span> != null)</pre><pre><span style='mso-spacerun:yes'> </span><span style='mso-spacerun:yes'> </span><span |
class=SpellE>activeEditor</span> != null)</pre><pre><span style='mso-spacerun:yes'> </span><span |
| 1067 |
class=SpellE>editorName</span> = <span class=SpellE>activeEditor.getTitle</span>();</pre><pre><span style='mso-spacerun:yes'> </span><span |
class=SpellE>editorName</span> = <span class=SpellE>activeEditor.getTitle</span>();</pre><pre><span style='mso-spacerun:yes'> </span><span |
| 1068 |
class=SpellE>MessageDialog</span></pre><pre><span style='mso-spacerun:yes'> </span>.<span |
class=SpellE>MessageDialog</span></pre><pre><span style='mso-spacerun:yes'> </span>.<span |
| 1069 |
class=SpellE>openInformation</span>(</pre><pre><span style='mso-spacerun:yes'> </span>shell,</pre><pre><span style='mso-spacerun:yes'> </span><span |
class=SpellE>openInformation</span>(</pre><pre><span style='mso-spacerun:yes'> </span>shell,</pre><pre><span style='mso-spacerun:yes'> </span><span |
| 1074 |
style='font-family:Arial'>Using operations, the run method simplifies:<o:p></o:p></span></pre><pre><span |
style='font-family:Arial'>Using operations, the run method simplifies:<o:p></o:p></span></pre><pre><span |
| 1075 |
style='font-family:Arial'><o:p> </o:p></span></pre><pre><span style='mso-spacerun:yes'> </span>public void run() {</pre><pre><span style='mso-spacerun:yes'> </span>String <span |
style='font-family:Arial'><o:p> </o:p></span></pre><pre><span style='mso-spacerun:yes'> </span>public void run() {</pre><pre><span style='mso-spacerun:yes'> </span>String <span |
| 1076 |
class=SpellE>editorName</span> = <span class=SpellE>MessageUtil.getString</span>("<span |
class=SpellE>editorName</span> = <span class=SpellE>MessageUtil.getString</span>("<span |
| 1077 |
class=SpellE>Empty_Editor_Name</span>"); </pre><pre><span style='mso-spacerun:yes'> </span><span style='mso-spacerun:yes'> </span>if (<span |
class=SpellE>Empty_Editor_Name</span>"); </pre><pre><span style='mso-spacerun:yes'> </span>if (<span |
| 1078 |
class=SpellE>activeEditor</span> != null)</pre><pre><span style='mso-spacerun:yes'> </span><span |
class=SpellE>activeEditor</span> != null)</pre><pre><span style='mso-spacerun:yes'> </span><span |
| 1079 |
class=SpellE>editorName</span> = <span class=SpellE>activeEditor.getTitle</span>();</pre><pre><span style='mso-spacerun:yes'> </span>// create the operation</pre><pre><span style='mso-spacerun:yes'> </span><span |
class=SpellE>editorName</span> = <span class=SpellE>activeEditor.getTitle</span>();</pre><pre><span style='mso-spacerun:yes'> </span>// create the operation</pre><pre><span style='mso-spacerun:yes'> </span><span |
| 1080 |
class=SpellE>IOperation</span> operation = new <span class=SpellE>EditorOperation</span>(</pre><pre><span |
class=SpellE>IUndoableOperation</span> operation = new <span class=SpellE><span |
| 1081 |
|
class=GramE>EditorOperation</span></span><span class=GramE>(</span></pre><pre><span |
| 1082 |
style='mso-tab-count:2'> </span><span class=SpellE>getText</span>(),shell, <span |
style='mso-tab-count:2'> </span><span class=SpellE>getText</span>(),shell, <span |
| 1083 |
class=SpellE>editorName</span>);</pre><pre><span style='mso-spacerun:yes'> </span>// execute (and add to the history)</pre><pre><span style='mso-spacerun:yes'> </span><span style='mso-spacerun:yes'> </span><span |
class=SpellE>editorName</span>);</pre><pre><span style='mso-spacerun:yes'> </span>// execute (and add to the history)</pre><pre><span style='mso-spacerun:yes'> </span><span |
| 1084 |
class=SpellE>history.execute</span>(operation, null);</pre><pre><span style='mso-spacerun:yes'> </span>}</pre><pre><span |
class=SpellE>history.execute</span>(operation, null, null);<span style='mso-spacerun:yes'> </span></pre><pre><span style='mso-spacerun:yes'> </span>}</pre><pre><span |
| 1085 |
style='font-family:Arial'>The operation encapsulates the old run behavior, as well as the undo and redo for the operation:<o:p></o:p></span></pre><pre><span |
style='font-family:Arial'>The operation encapsulates the old run behavior, as well as the undo and redo for the operation:<o:p></o:p></span></pre><pre><span |
| 1086 |
style='font-family:Arial'><o:p> </o:p></span></pre><pre>class <span |
style='font-family:Arial'><o:p> </o:p></span></pre><pre>class <span |
| 1087 |
class=SpellE>EditorOperation</span> extends <span class=SpellE>AbstractOperation</span> {</pre><pre><span style='mso-spacerun:yes'> </span>Shell <span |
class=SpellE>EditorOperation</span> extends <span class=SpellE>AbstractOperation</span> {</pre><pre><span style='mso-spacerun:yes'> </span>Shell <span |
| 1088 |
class=SpellE>fShell</span>;</pre><pre><span style='mso-spacerun:yes'> </span>String <span |
class=SpellE>fShell</span>;</pre><pre><span style='mso-spacerun:yes'> </span>String <span |
| 1089 |
class=SpellE>fEditorName</span>;</pre><pre><span style='mso-spacerun:yes'> </span><span style='mso-spacerun:yes'> </span>public <span |
class=SpellE>fEditorName</span>;</pre><pre><span style='mso-spacerun:yes'> </span>public <span |
| 1090 |
class=SpellE>EditorOperation</span>(String label, Shell <span class=SpellE>shell</span>, String <span |
class=SpellE>EditorOperation</span>(String label, Shell <span class=SpellE>shell</span>, String <span |
| 1091 |
class=SpellE>editorName</span>) {</pre><pre><span style='mso-spacerun:yes'> </span>super(label);</pre><pre><span style='mso-spacerun:yes'> </span><span |
class=SpellE>editorName</span>) {</pre><pre><span style='mso-spacerun:yes'> </span>super(label);</pre><pre><span style='mso-spacerun:yes'> </span><span |
| 1092 |
class=SpellE>fShell</span> = shell;</pre><pre><span style='mso-spacerun:yes'> </span><span |
class=SpellE>fShell</span> = shell;</pre><pre><span style='mso-spacerun:yes'> </span><span |
| 1093 |
class=SpellE>fEditorName</span> = <span class=SpellE>editorName</span>;</pre><pre><span style='mso-spacerun:yes'> </span></pre><pre><span style='mso-spacerun:yes'> </span>}</pre><pre><span style='mso-spacerun:yes'> </span>public <span |
class=SpellE>fEditorName</span> = <span class=SpellE>editorName</span>;</pre><pre><span style='mso-spacerun:yes'> </span></pre><pre><span style='mso-spacerun:yes'> </span><span style='mso-spacerun:yes'> </span>}</pre><pre><span style='mso-spacerun:yes'> </span>public <span |
| 1094 |
class=SpellE>IStatus</span> execute(<span class=SpellE>IProgressMonitor</span> monitor) {</pre><pre><span style='mso-spacerun:yes'> </span><span style='mso-spacerun:yes'> </span><span |
class=SpellE>IStatus</span> execute(<span class=SpellE>IProgressMonitor</span> monitor) {</pre><pre><span style='mso-spacerun:yes'> </span><span |
| 1095 |
class=SpellE>MessageDialog.openInformation</span>(</pre><pre><span style='mso-spacerun:yes'> </span><span |
class=SpellE>MessageDialog.openInformation</span>(</pre><pre><span style='mso-spacerun:yes'> </span><span |
| 1096 |
class=SpellE>fShell</span>,</pre><pre><span style='mso-spacerun:yes'> </span><span |
class=SpellE>fShell</span>,</pre><pre><span style='mso-spacerun:yes'> </span><span |
| 1097 |
class=SpellE>MessageUtil.getString</span>("<span class=SpellE>Readme_Editor</span>"), </pre><pre><span style='mso-spacerun:yes'> </span><span |
class=SpellE>MessageUtil.getString</span>("<span class=SpellE>Readme_Editor</span>"), </pre><pre><span style='mso-spacerun:yes'> </span><span |
| 1100 |
class=SpellE>getLabel</span>(), <span class=SpellE>fEditorName</span> }));<span style='mso-spacerun:yes'> </span></pre><pre><span style='mso-spacerun:yes'> </span>return <span |
class=SpellE>getLabel</span>(), <span class=SpellE>fEditorName</span> }));<span style='mso-spacerun:yes'> </span></pre><pre><span style='mso-spacerun:yes'> </span>return <span |
| 1101 |
class=SpellE>Status.OK_STATUS</span>;</pre><pre><span style='mso-spacerun:yes'> </span>}</pre><pre><span style='mso-spacerun:yes'> </span>public <span |
class=SpellE>Status.OK_STATUS</span>;</pre><pre><span style='mso-spacerun:yes'> </span>}</pre><pre><span style='mso-spacerun:yes'> </span>public <span |
| 1102 |
class=SpellE>IStatus</span> undo(<span class=SpellE>IProgressMonitor</span> monitor) {</pre><pre><span style='mso-spacerun:yes'> </span>// implement the undo here</pre><pre><span style='mso-spacerun:yes'> </span>return <span |
class=SpellE>IStatus</span> undo(<span class=SpellE>IProgressMonitor</span> monitor) {</pre><pre><span style='mso-spacerun:yes'> </span>// implement the undo here</pre><pre><span style='mso-spacerun:yes'> </span>return <span |
| 1103 |
class=SpellE>Status.OK_STATUS</span>;</pre><pre><span style='mso-spacerun:yes'> </span>}</pre><pre><span style='mso-spacerun:yes'> </span>public <span |
class=SpellE>Status.OK_STATUS</span>;</pre><pre><span style='mso-spacerun:yes'> </span>}</pre><pre><span style='mso-spacerun:yes'> </span><span style='mso-spacerun:yes'> </span>public <span |
| 1104 |
class=SpellE>IStatus</span> redo(<span class=SpellE>IProgressMonitor</span> monitor) {</pre><pre><span style='mso-spacerun:yes'> </span>// implement the redo here</pre><pre><span style='mso-spacerun:yes'> </span>return <span |
class=SpellE>IStatus</span> redo(<span class=SpellE>IProgressMonitor</span> monitor) {</pre><pre><span style='mso-spacerun:yes'> </span>// implement the redo here</pre><pre><span style='mso-spacerun:yes'> </span>return <span |
| 1105 |
class=SpellE>Status.OK_STATUS</span>;</pre><pre><span style='mso-spacerun:yes'> </span>}</pre><pre><span style='mso-spacerun:yes'> </span>}</pre><pre><o:p> </o:p></pre><pre><span |
class=SpellE>Status.OK_STATUS</span>;</pre><pre><span style='mso-spacerun:yes'> </span>}</pre><pre><span style='mso-spacerun:yes'> </span>}</pre><pre><o:p> </o:p></pre><pre><span |
| 1106 |
style='font-family:Arial'>If an <span class=SpellE>IHandler</span> is provided for a command instead of using actions, the execute method of the handler is mapped similarly to the run method in an action:<o:p></o:p></span></pre><pre><span |
style='font-family:Arial'>If an <span class=SpellE>IHandler</span> is provided for a command instead of using actions, the execute method of the handler is mapped similarly to the run method in an action:<o:p></o:p></span></pre><pre><span |
| 1118 |
class=SpellE>Empty_Editor_Name</span>"); </pre><pre><span style='mso-spacerun:yes'> </span>if (<span |
class=SpellE>Empty_Editor_Name</span>"); </pre><pre><span style='mso-spacerun:yes'> </span>if (<span |
| 1119 |
class=SpellE>activeEditor</span> != null)</pre><pre><span style='mso-spacerun:yes'> </span><span |
class=SpellE>activeEditor</span> != null)</pre><pre><span style='mso-spacerun:yes'> </span><span |
| 1120 |
class=SpellE>editorName</span> = <span class=SpellE>activeEditor.getTitle</span>();</pre><pre><span style='mso-spacerun:yes'> </span>// create the operation</pre><pre><span style='mso-spacerun:yes'> </span><span |
class=SpellE>editorName</span> = <span class=SpellE>activeEditor.getTitle</span>();</pre><pre><span style='mso-spacerun:yes'> </span>// create the operation</pre><pre><span style='mso-spacerun:yes'> </span><span |
| 1121 |
class=SpellE>IOperation</span> operation =new <span class=SpellE>EditorOperation</span>(label, shell, <span |
class=SpellE>IUndoableOperation</span> operation =new <span class=SpellE><span |
| 1122 |
|
class=GramE>EditorOperation</span></span><span class=GramE>(</span>label, shell, <span |
| 1123 |
class=SpellE>editorName</span>);</pre><pre><o:p> </o:p></pre><pre><span style='mso-spacerun:yes'> </span>// execute (and add to the history)</pre><pre><span style='mso-spacerun:yes'> </span><span |
class=SpellE>editorName</span>);</pre><pre><o:p> </o:p></pre><pre><span style='mso-spacerun:yes'> </span>// execute (and add to the history)</pre><pre><span style='mso-spacerun:yes'> </span><span |
| 1124 |
class=SpellE>history.execute</span>(operation, null);</pre><pre><span style='mso-spacerun:yes'> </span>} catch (Exception e) {</pre><pre><span style='mso-spacerun:yes'> </span>throw new <span |
class=SpellE><span class=GramE>history.execute</span></span><span class=GramE>(</span>operation, null, null);</pre><pre><span style='mso-spacerun:yes'> </span>} catch (Exception e) {</pre><pre><span style='mso-spacerun:yes'> </span>throw new <span |
| 1125 |
class=SpellE>ExecutionException</span>(</pre><pre><span style='mso-spacerun:yes'> </span>"While executing the operation, an exception occurred", e); </pre><pre><span style='mso-spacerun:yes'> </span>}</pre><pre><span style='mso-spacerun:yes'> </span>return null;</pre><pre><span style='mso-spacerun:yes'> </span>}</pre><pre><span |
class=SpellE>ExecutionException</span>(</pre><pre><span style='mso-spacerun:yes'> </span>"While executing the operation, an exception occurred", e); </pre><pre><span style='mso-spacerun:yes'> </span>}</pre><pre><span style='mso-spacerun:yes'> </span>return null;</pre><pre><span style='mso-spacerun:yes'> </span>}</pre><pre><span |
| 1126 |
style='font-family:Arial'><o:p> </o:p></span></pre> |
style='font-family:Arial'><o:p> </o:p></span></pre> |
| 1127 |
|
|
| 1136 |
corresponding hierarchy of operations. <o:p></o:p></span></p> |
corresponding hierarchy of operations. <o:p></o:p></span></p> |
| 1137 |
|
|
| 1138 |
<h3>Refactoring example:<span style='mso-spacerun:yes'> </span>mapping |
<h3>Refactoring example:<span style='mso-spacerun:yes'> </span>mapping |
| 1139 |
existing protocol to <span class=SpellE>IOperation</span></h3> |
existing protocol to <span class=SpellE>IUndoableOperation</span></h3> |
| 1140 |
|
|
| 1141 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>In the current |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>In the |
| 1142 |
SDK implementation, <span class=SpellE>org.eclipse.ltk.core.refactoring</span> |
current SDK implementation, <span class=SpellE>org.eclipse.ltk.core.refactoring</span> |
| 1143 |
provides an undo framework for undoing refactoring operations.<span |
provides an undo framework for undoing refactoring operations.<span |
| 1144 |
style='mso-spacerun:yes'> </span>This framework is based on the notion of |
style='mso-spacerun:yes'> </span>This framework is based on the notion of |
| 1145 |
“Change” objects.<span style='mso-spacerun:yes'> </span>Change objects that |
“Change” objects.<span style='mso-spacerun:yes'> </span>Change objects that |
| 1157 |
integrated the refactoring change framework with the operations framework as |
integrated the refactoring change framework with the operations framework as |
| 1158 |
follows:<o:p></o:p></span></p> |
follows:<o:p></o:p></span></p> |
| 1159 |
|
|
| 1160 |
<p class=MsoNormal style='margin-left:39.0pt;text-indent:-.25in;mso-list:l3 level1 lfo16; |
<p class=MsoNormal style='margin-left:39.0pt;text-indent:-.25in;mso-list:l5 level1 lfo16; |
| 1161 |
tab-stops:list 39.0pt'><![if !supportLists]><span style='font-size:10.0pt; |
tab-stops:list 39.0pt'><![if !supportLists]><span style='font-size:10.0pt; |
| 1162 |
font-family:Arial;mso-fareast-font-family:Arial'><span style='mso-list:Ignore'>1.<span |
font-family:Arial;mso-fareast-font-family:Arial'><span style='mso-list:Ignore'>1.<span |
| 1163 |
style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span |
style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span |
| 1164 |
style='font-size:10.0pt;font-family:Arial'>The change objects were <span |
style='font-size:10.0pt;font-family:Arial'>The change objects are <span |
| 1165 |
class=SpellE>wrappered</span> with a class that implements <span class=SpellE>IOperation</span> |
class=SpellE>wrappered</span> with a class that implements <span class=SpellE>IUndoableOperation</span> |
| 1166 |
(and <span class=SpellE>IWorkspaceOperation</span>) and maps the operation |
and maps the operation protocol to the Change protocol.<o:p></o:p></span></p> |
|
protocol to the Change protocol.<o:p></o:p></span></p> |
|
| 1167 |
|
|
| 1168 |
<p class=MsoNormal style='margin-left:39.0pt;text-indent:-.25in;mso-list:l3 level1 lfo16; |
<p class=MsoNormal style='margin-left:39.0pt;text-indent:-.25in;mso-list:l5 level1 lfo16; |
| 1169 |
tab-stops:list 39.0pt'><![if !supportLists]><span style='font-size:10.0pt; |
tab-stops:list 39.0pt'><![if !supportLists]><span style='font-size:10.0pt; |
| 1170 |
font-family:Arial;mso-fareast-font-family:Arial'><span style='mso-list:Ignore'>2.<span |
font-family:Arial;mso-fareast-font-family:Arial'><span style='mso-list:Ignore'>2.<span |
| 1171 |
style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span |
style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span |
| 1172 |
style='font-size:10.0pt;font-family:Arial'>The refactoring undo manager was |
style='font-size:10.0pt;font-family:Arial'>The refactoring undo manager is |
| 1173 |
replaced with an alternate implementation that uses the operations history to |
replaced with an alternate implementation that uses the operations history to |
| 1174 |
maintain the undo and redo history.<o:p></o:p></span></p> |
maintain the undo and redo history.<o:p></o:p></span></p> |
| 1175 |
|
|
| 1176 |
<p class=MsoNormal style='margin-left:39.0pt;text-indent:-.25in;mso-list:l3 level1 lfo16; |
<p class=MsoNormal style='margin-left:39.0pt;text-indent:-.25in;mso-list:l5 level1 lfo16; |
| 1177 |
tab-stops:list 39.0pt'><![if !supportLists]><span style='font-size:10.0pt; |
tab-stops:list 39.0pt'><![if !supportLists]><span style='font-size:10.0pt; |
| 1178 |
font-family:Arial;mso-fareast-font-family:Arial'><span style='mso-list:Ignore'>3.<span |
font-family:Arial;mso-fareast-font-family:Arial'><span style='mso-list:Ignore'>3.<span |
| 1179 |
style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span |
style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span |
| 1180 |
style='font-size:10.0pt;font-family:Arial'>The workspace listener and validation |
style='font-size:10.0pt;font-family:Arial'>The workspace listener and |
| 1181 |
strategy used in the Change framework was maintained since the timing of the |
validation strategy used in the Change framework is maintained, since the |
| 1182 |
notifications was critical.<span style='mso-spacerun:yes'> </span>Additional |
timing of the notifications was critical.<span style='mso-spacerun:yes'> |
| 1183 |
integration work could be done to use the operations history listeners for the |
</span>Additional integration work could be done to use the operations history |
| 1184 |
same purpose, or to change the validation strategy as more workspace operations |
listeners for the same purpose, or to change the validation strategy as more |
| 1185 |
are supported outside of refactoring.<o:p></o:p></span></p> |
workspace operations are supported outside of refactoring.<o:p></o:p></span></p> |
| 1186 |
|
|
| 1187 |
<p class=MsoNormal style='margin-left:39.0pt;text-indent:-.25in;mso-list:l3 level1 lfo16; |
<p class=MsoNormal style='margin-left:39.0pt;text-indent:-.25in;mso-list:l5 level1 lfo16; |
| 1188 |
tab-stops:list 39.0pt'><![if !supportLists]><span style='font-size:10.0pt; |
tab-stops:list 39.0pt'><![if !supportLists]><span style='font-size:10.0pt; |
| 1189 |
font-family:Arial;mso-fareast-font-family:Arial'><span style='mso-list:Ignore'>4.<span |
font-family:Arial;mso-fareast-font-family:Arial'><span style='mso-list:Ignore'>4.<span |
| 1190 |
style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span |
style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span |
| 1191 |
style='font-size:10.0pt;font-family:Arial'>Unrelated listeners (such as text |
style='font-size:10.0pt;font-family:Arial'>When a refactoring change is |
| 1192 |
editors) listened for new operations being added.<span |
executed, an operation is “opened” in the operations history.<span |
| 1193 |
style='mso-spacerun:yes'> </span>These listeners could check the elements |
style='mso-spacerun:yes'> </span>Subsequent operations added to the history |
| 1194 |
affected by the workspace operation and determine whether another context |
are considered part of the open operation, and their contexts are assigned to |
| 1195 |
should be assigned to the operation.<o:p></o:p></span></p> |
the original operation.<span style='mso-spacerun:yes'> </span>When the |
| 1196 |
|
refactoring change is finished, the operation is closed.<span |
| 1197 |
|
style='mso-spacerun:yes'> </span><o:p></o:p></span></p> |
| 1198 |
|
|
| 1199 |
<p class=MsoNormal style='margin-left:39.0pt;text-indent:-.25in;mso-list:l3 level1 lfo16; |
<p class=MsoNormal style='margin-left:39.0pt;text-indent:-.25in;mso-list:l5 level1 lfo16; |
| 1200 |
tab-stops:list 39.0pt'><![if !supportLists]><span style='font-size:10.0pt; |
tab-stops:list 39.0pt'><![if !supportLists]><span style='font-size:10.0pt; |
| 1201 |
font-family:Arial;mso-fareast-font-family:Arial'><span style='mso-list:Ignore'>5.<span |
font-family:Arial;mso-fareast-font-family:Arial'><span style='mso-list:Ignore'>5.<span |
| 1202 |
style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span |
style='font:7.0pt "Times New Roman"'> </span></span></span><![endif]><span |
| 1205 |
handlers on the workspace context.<o:p></o:p></span></p> |
handlers on the workspace context.<o:p></o:p></span></p> |
| 1206 |
|
|
| 1207 |
<h3>Text editor example:<span style='mso-spacerun:yes'> </span>implementing <span |
<h3>Text editor example:<span style='mso-spacerun:yes'> </span>implementing <span |
| 1208 |
class=SpellE>IOperation</span> in preexisting commands</h3> |
class=SpellE>IUndoableOperation</span> in preexisting commands</h3> |
| 1209 |
|
|
| 1210 |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>The <span |
<p class=MsoNormal><span style='font-size:10.0pt;font-family:Arial'>The <span |
| 1211 |
class=SpellE>JFace</span> text framework supports undo and redo of text editing |
class=SpellE>JFace</span> text framework supports undo and redo of text editing |
| 1223 |
framework as follows:<o:p></o:p></span></p> |
framework as follows:<o:p></o:p></span></p> |
| 1224 |
|
|
| 1225 |
<ol style='margin-top:0in' start=1 type=1> |
<ol style='margin-top:0in' start=1 type=1> |
| 1226 |
<li class=MsoNormal style='mso-list:l4 level1 lfo19;tab-stops:list .5in'><span |
<li class=MsoNormal style='mso-list:l8 level1 lfo19;tab-stops:list .5in'><span |
| 1227 |
style='font-size:10.0pt;font-family:Arial'>The existing <span |
style='font-size:10.0pt;font-family:Arial'>The existing <span |
| 1228 |
class=SpellE>TextCommand</span> was altered to implement the <span |
class=SpellE>TextCommand</span> was altered to implement the <span |
| 1229 |
class=SpellE>IOperation</span> interface.<o:p></o:p></span></li> |
class=SpellE>IUndoableOperation</span> interface.<o:p></o:p></span></li> |
| 1230 |
<li class=MsoNormal style='mso-list:l4 level1 lfo19;tab-stops:list .5in'><span |
<li class=MsoNormal style='mso-list:l8 level1 lfo19;tab-stops:list .5in'><span |
| 1231 |
style='font-size:10.0pt;font-family:Arial'>Specialized contexts (one |
style='font-size:10.0pt;font-family:Arial'>Specialized contexts (one |
| 1232 |
instance for each text editor) are assigned to the operations.<o:p></o:p></span></li> |
instance for each text editor) are assigned to the operations.<o:p></o:p></span></li> |
| 1233 |
<li class=MsoNormal style='mso-list:l4 level1 lfo19;tab-stops:list .5in'><span |
<li class=MsoNormal style='mso-list:l8 level1 lfo19;tab-stops:list .5in'><span |
| 1234 |
style='font-size:10.0pt;font-family:Arial'>The existing <span |
style='font-size:10.0pt;font-family:Arial'>The existing <span |
| 1235 |
class=SpellE>UndoManager</span> was replaced with an alternate |
class=SpellE>UndoManager</span> was replaced with an alternate |
| 1236 |
implementation that added text commands to the operations history instead |
implementation that added text commands to the operations history instead |
| 1237 |
of a local stack, and used the operation history protocol when handling |
of a local stack, and used the operation history protocol when handling |
| 1238 |
undo and redo commands.<o:p></o:p></span></li> |
undo and redo commands.<o:p></o:p></span></li> |
|
<li class=MsoNormal style='mso-list:l4 level1 lfo19;tab-stops:list .5in'><span |
|
|
style='font-size:10.0pt;font-family:Arial'>The undo manager installs a |
|
|
listener on the history to monitor new operations that are added to the |
|
|
history.<o:p></o:p></span></li> |
|
|
<li class=MsoNormal style='mso-list:l4 level1 lfo19;tab-stops:list .5in'><span |
|
|
style='font-size:10.0pt;font-family:Arial'>When an “outside” operation is |
|
|
added to the history, the undo manager consults the editor’s operation |
|
|
context to see if the outside operation is relevant.<span |
|
|
style='mso-spacerun:yes'> </span>The editor context can check the |
|
|
elements affected by workspace operations and add itself to the |
|
|
operation’s context if appropriate.<o:p></o:p></span></li> |
|
| 1239 |
</ol> |
</ol> |
| 1240 |
|
|
| 1241 |
<p class=MsoNormal style='text-align:justify'><span style='font-size:10.0pt; |
<p class=MsoNormal style='text-align:justify'><span style='font-size:10.0pt; |