1 6 package org.netbeans.test.subversion.operators; 7 8 import org.netbeans.jemmy.operators.*; 9 import org.netbeans.jemmy.util.NameComponentChooser; 10 11 16 public class MergeTwoRepoOperator extends JDialogOperator { 17 18 21 public MergeTwoRepoOperator() { 22 super("Merge"); 23 } 24 25 private JLabelOperator _lblSecondRepositoryFolder; 26 private JLabelOperator _lblStartingWithRevision; 27 private JLabelOperator _lblEndingWithRevision; 28 private JLabelOperator _lblFirstRepositoryFolder; 29 private JLabelOperator _lblEmptyMeansRepositoryHEAD; 30 private JComboBoxOperator _cboMergeFrom; 31 private JComboBoxOperator _cboRepository1; 32 private JTextFieldOperator _txtStartRevision; 33 private JButtonOperator _btSearch; 34 private JTextFieldOperator _txtEndRevision; 35 private JButtonOperator _btSearch2; 36 private JLabelOperator _lblEmptyMeansRepositoryHEAD2; 37 private JButtonOperator _btBrowse1; 38 private JButtonOperator _btBrowse2; 39 private JLabelOperator _lblMergeIntoLocalFolderChangesBetweenTwoRepositoryFolders; 40 private JLabelOperator _lblMergeFrom; 41 private JComboBoxOperator _cboRepository2; 42 private JLabelOperator _lblJLabel; 43 private JTextFieldOperator _txtRepositoryFolder1; 44 private JTextFieldOperator _txtCurrentFolder; 45 private JTextFieldOperator _txtRepositoryFolder2; 46 private JLabelOperator _lblPreview; 47 private JButtonOperator _btMerge; 48 private JButtonOperator _btCancel; 49 private JButtonOperator _btHelp; 50 51 52 56 59 public JLabelOperator lblSecondRepositoryFolder() { 60 if (_lblSecondRepositoryFolder==null) { 61 _lblSecondRepositoryFolder = new JLabelOperator(this, "Second Repository Folder"); 62 } 63 return _lblSecondRepositoryFolder; 64 } 65 66 69 public JLabelOperator lblStartingWithRevision() { 70 if (_lblStartingWithRevision==null) { 71 _lblStartingWithRevision = new JLabelOperator(this, "Starting"); 72 } 73 return _lblStartingWithRevision; 74 } 75 76 79 public JLabelOperator lblEndingWithRevision() { 80 if (_lblEndingWithRevision==null) { 81 _lblEndingWithRevision = new JLabelOperator(this, "Ending"); 82 } 83 return _lblEndingWithRevision; 84 } 85 86 89 public JLabelOperator lblFirstRepositoryFolder() { 90 if (_lblFirstRepositoryFolder==null) { 91 _lblFirstRepositoryFolder = new JLabelOperator(this, "First Repository Folder"); 92 } 93 return _lblFirstRepositoryFolder; 94 } 95 96 99 public JLabelOperator lblEmptyMeansRepositoryHEAD() { 100 if (_lblEmptyMeansRepositoryHEAD==null) { 101 _lblEmptyMeansRepositoryHEAD = new JLabelOperator(this, "(empty means repository HEAD)"); 102 } 103 return _lblEmptyMeansRepositoryHEAD; 104 } 105 106 109 public JComboBoxOperator cboMergeFrom() { 110 if (_cboMergeFrom==null) { 111 _cboMergeFrom = new JComboBoxOperator(this, 2); 112 } 113 return _cboMergeFrom; 114 } 115 116 119 public JComboBoxOperator cboRepository1() { 120 if (_cboRepository1==null) { 121 _cboRepository1 = new JComboBoxOperator(this, 1); 122 } 123 return _cboRepository1; 124 } 125 126 129 public JTextFieldOperator txtStartRevision() { 130 if (_txtStartRevision==null) { 131 _txtStartRevision = new JTextFieldOperator(this, 2); 132 } 133 return _txtStartRevision; 134 } 135 136 139 public JButtonOperator btSearch() { 140 if (_btSearch==null) { 141 _btSearch = new JButtonOperator(this, "Search..."); 142 } 143 return _btSearch; 144 } 145 146 149 public JTextFieldOperator txtEndRevision() { 150 if (_txtEndRevision==null) { 151 _txtEndRevision = new JTextFieldOperator(this, 3); 152 } 153 return _txtEndRevision; 154 } 155 156 159 public JButtonOperator btSearch2() { 160 if (_btSearch2==null) { 161 _btSearch2 = new JButtonOperator(this, "Search...", 1); 162 } 163 return _btSearch2; 164 } 165 166 169 public JLabelOperator lblEmptyMeansRepositoryHEAD2() { 170 if (_lblEmptyMeansRepositoryHEAD2==null) { 171 _lblEmptyMeansRepositoryHEAD2 = new JLabelOperator(this, "(empty means repository HEAD)", 1); 172 } 173 return _lblEmptyMeansRepositoryHEAD2; 174 } 175 176 179 public JButtonOperator btBrowseRepositoryFolder1() { 180 if (_btBrowse1==null) { 181 _btBrowse1 = new JButtonOperator(this, "Browse", 1); 182 } 183 return _btBrowse1; 184 } 185 186 189 public JButtonOperator btBrowseRepositoryFolder2() { 190 if (_btBrowse2==null) { 191 _btBrowse2 = new JButtonOperator(this, "Browse"); 192 } 193 return _btBrowse2; 194 } 195 196 199 public JLabelOperator lblMergeIntoLocalFolderChangesBetweenTwoRepositoryFolders() { 200 if (_lblMergeIntoLocalFolderChangesBetweenTwoRepositoryFolders==null) { 201 _lblMergeIntoLocalFolderChangesBetweenTwoRepositoryFolders = new JLabelOperator(this, "Merge into local folder changes between two repository folders."); 202 } 203 return _lblMergeIntoLocalFolderChangesBetweenTwoRepositoryFolders; 204 } 205 206 209 public JLabelOperator lblMergeFrom() { 210 if (_lblMergeFrom==null) { 211 _lblMergeFrom = new JLabelOperator(this, "Merge from:"); 212 } 213 return _lblMergeFrom; 214 } 215 216 219 public JComboBoxOperator cboRepository2() { 220 if (_cboRepository2==null) { 221 _cboRepository2 = new JComboBoxOperator(this); 222 } 223 return _cboRepository2; 224 } 225 226 229 public JLabelOperator lblJLabel() { 230 if (_lblJLabel==null) { 231 _lblJLabel = new JLabelOperator(this, 8); 232 } 233 return _lblJLabel; 234 } 235 236 239 public JTextFieldOperator txtRepositoryFolder1() { 240 if (_txtRepositoryFolder1==null) { 241 _txtRepositoryFolder1 = new JTextFieldOperator(this, 4); 242 } 243 return _txtRepositoryFolder1; 244 } 245 246 249 public JTextFieldOperator txtCurrentFolder() { 250 if (_txtCurrentFolder==null) { 251 _txtCurrentFolder = new JTextFieldOperator(this, 5); 252 } 253 return _txtCurrentFolder; 254 } 255 256 259 public JTextFieldOperator txtRepositoryFolder2() { 260 if (_txtRepositoryFolder2==null) { 261 _txtRepositoryFolder2 = new JTextFieldOperator(this, 6); 262 } 263 return _txtRepositoryFolder2; 264 } 265 266 269 public JLabelOperator lblPreview() { 270 if (_lblPreview==null) { 271 _lblPreview = new JLabelOperator(this, "Preview:"); 272 } 273 return _lblPreview; 274 } 275 276 279 public JButtonOperator btMerge() { 280 if (_btMerge==null) { 281 _btMerge = new JButtonOperator(this, "Merge"); 282 } 283 return _btMerge; 284 } 285 286 289 public JButtonOperator btCancel() { 290 if (_btCancel==null) { 291 _btCancel = new JButtonOperator(this, "Cancel"); 292 } 293 return _btCancel; 294 } 295 296 299 public JButtonOperator btHelp() { 300 if (_btHelp==null) { 301 _btHelp = new JButtonOperator(this, "Help"); 302 } 303 return _btHelp; 304 } 305 306 307 311 316 public String getSelectedMergeFrom() { 317 return cboMergeFrom().getSelectedItem().toString(); 318 } 319 320 325 public void selectMergeFrom(String item) { 326 cboMergeFrom().selectItem(item); 327 } 328 329 334 public void setMergeFrom(String text) { 335 cboMergeFrom().clearText(); 336 cboMergeFrom().typeText(text); 337 } 338 339 344 public String getSelectedRepositoryFolder1() { 345 return cboRepository1().getSelectedItem().toString(); 346 } 347 348 public String getRepositoryFolder1() { 349 return cboRepository1().getEditor().getItem().toString(); 350 } 351 352 357 public void selectRepositoryFolder1(String item) { 358 cboRepository1().selectItem(item); 359 } 360 361 366 public void setRepositoryFolder1(String text) { 367 cboRepository1().clearText(); 368 cboRepository1().typeText(text); 369 } 370 371 376 public String getStartRevision() { 377 return txtStartRevision().getText(); 378 } 379 380 385 public void setStartRevision(String text) { 386 txtStartRevision().clearText(); 387 txtStartRevision().typeText(text); 388 } 389 390 392 public void search() { 393 btSearch().push(); 394 } 395 396 401 public String getEndRevision() { 402 return txtEndRevision().getText(); 403 } 404 405 410 public void setEndRevision(String text) { 411 txtEndRevision().clearText(); 412 txtEndRevision().typeText(text); 413 } 414 415 417 public void search2() { 418 btSearch2().push(); 419 } 420 421 423 public RepositoryBrowserOperator browseRepositoryFolder1() { 424 btBrowseRepositoryFolder1().pushNoBlock(); 425 return new RepositoryBrowserOperator(); 426 } 427 428 430 public RepositoryBrowserOperator browseRepositoryFolder2() { 431 btBrowseRepositoryFolder2().pushNoBlock(); 432 return new RepositoryBrowserOperator(); 433 } 434 435 440 public String getSelectedRepositoryFolder2() { 441 return cboRepository2().getSelectedItem().toString(); 442 } 443 444 public String getRepositoryFolder2() { 445 return cboRepository2().getEditor().getItem().toString(); 446 } 447 448 453 public void selectRepositoryFolder2(String item) { 454 cboRepository2().selectItem(item); 455 } 456 457 462 public void setRepositoryFolder2(String text) { 463 cboRepository2().clearText(); 464 cboRepository2().typeText(text); 465 } 466 467 472 public String getTxtRepositoryFolder1() { 473 return txtRepositoryFolder1().getText(); 474 } 475 476 481 public String getTxtCurrentFolder() { 482 return txtCurrentFolder().getText(); 483 } 484 485 490 public String getTxtRepositoryFolder2() { 491 return txtRepositoryFolder2().getText(); 492 } 493 494 496 public void merge() { 497 btMerge().push(); 498 } 499 500 502 public void cancel() { 503 btCancel().push(); 504 } 505 506 508 public void help() { 509 btHelp().push(); 510 } 511 512 513 517 520 public void verify() { 521 lblSecondRepositoryFolder(); 522 lblStartingWithRevision(); 523 lblEndingWithRevision(); 524 lblFirstRepositoryFolder(); 525 lblEmptyMeansRepositoryHEAD(); 526 cboMergeFrom(); 527 cboRepository1(); 528 txtStartRevision(); 529 btSearch(); 530 txtEndRevision(); 531 btSearch2(); 532 lblEmptyMeansRepositoryHEAD2(); 533 btBrowseRepositoryFolder1(); 534 btBrowseRepositoryFolder2(); 535 lblMergeIntoLocalFolderChangesBetweenTwoRepositoryFolders(); 536 lblMergeFrom(); 537 cboRepository2(); 538 lblJLabel(); 539 txtRepositoryFolder1(); 540 txtCurrentFolder(); 541 txtRepositoryFolder2(); 542 lblPreview(); 543 btMerge(); 544 btCancel(); 545 btHelp(); 546 } 547 } 548 549 | Popular Tags |