Практическая работа в ECLIPSE 3.2. Степанцов В.А. - 30 стр.

UptoLike

Составители: 

ɋɬɟɩɚɧɰɨɜ ȼ.Ⱥ. ɉɪɚɤɬɢɱɟɫɤɚɹ ɪɚɛɨɬɚ ɜ Eclipse 3.2
30
16. Ⱦɢɚɥɨɝ Generate Getter and Setter ɩɪɟɞɩɨɥɚɝɚɟɬ, ɱɬɨ ɫɨɡɞɚɸɬɫɹ
ɦɟɬɨɞɵ
getContainer() ɢ setContainer(). ȼɵɛɟɪɢɬɟ ɨɛɚ ɢ
ɳɟɥɤɧɢɬɟ ɧɚ OK. Ⱦɨɛɚɜɥɹɸɬɫɹ ɦɟɬɨɞɵ-ɚɤɰɟɫɫɨɪɵ ɞɥɹ ɩɨɥɹ.
17. ɋɨɯɪɚɧɢɬɟ ɮɚɣɥ.
18. Ɏɨɪɦɚɬɢɪɨɜɚɧɢɟ ɫɝɟɧɟɪɢɪɨɜɚɧɧɨɝɨ ɤɨɞɚ ɦɨɠɟɬ ɤɨɧɮɢɝɭɪɢɪɨɜɚɬɶɫɹ
ɜ Window > Preferences > Java > Code Style > Code Formatter. ȿɫɥɢ
ɢɫɩɨɥɶɡɭɟɬɟ ɩɪɟɮɢɤɫ ɢɥɢ ɫɭɮɮɢɤɫ ɞɥɹ ɢɦɟɧɢ ɩɨɥɹ, ɧɚɩɪɢɦɟɪ,
fContainer, ɬɨ ɦɨɠɟɬɟ ɡɚɞɚɬɶ ɢɯ ɜ Window > Preferences > Java >
Code Style >
Fields, ɬɚɤ ɱɬɨ ɫɝɟɧɟɪɢɪɨɜɚɧɧɵɟ ɦɟɬɨɞɵ-ɚɤɰɟɫɫɨɪɵ
ɛɭɞɭɬ ɭɝɚɞɵɜɚɬɶ ɢɦɟɧɚ ɦɟɬɨɞɨɜ ɛɟɡ ɩɪɟɮɢɤɫɚ ɢɥɢ ɫɭɮɮɢɤɫɚ.
3.10. ɉɟɪɟɢɦɟɧɨɜɚɧɢɟ ɷɥɟɦɟɧɬɨɜ Java
ɇɢɠɟ ɩɟɪɟɢɦɟɧɭɟɦ ɷɥɟɦɟɧɬ Java, ɢɫɩɨɥɶɡɭɹ ɪɟɮɚɤɬɨɪɢɧɝ. Ⱦɟɣɫɬɜɢɹ
ɪɟɮɚɤɬɨɪɢɧɝɚ ɢɡɦɟɧɹɸɬ ɫɬɪɭɤɬɭɪɭ ɤɨɞɚ ɛɟɡ ɢɡɦɟɧɟɧɢɹ ɫɟɦɚɧɬɢɤɢ
ɩɨɜɟɞɟɧɢɹ.
1. ȼ ɩɪɟɞɫɬɚɜɥɟɧɢɢ Package Explorer ɜɵɛɟɪɢɬɟ
junit.framework.TestCase.java.
    ɋɬɟɩɚɧɰɨɜ ȼ.Ⱥ. ɉɪɚɤɬɢɱɟɫɤɚɹ ɪɚɛɨɬɚ ɜ Eclipse 3.2




  16. Ⱦɢɚɥɨɝ Generate Getter and Setter ɩɪɟɞɩɨɥɚɝɚɟɬ, ɱɬɨ ɫɨɡɞɚɸɬɫɹ
     ɦɟɬɨɞɵ getContainer() ɢ setContainer(). ȼɵɛɟɪɢɬɟ ɨɛɚ ɢ
     ɳɟɥɤɧɢɬɟ ɧɚ OK. Ⱦɨɛɚɜɥɹɸɬɫɹ ɦɟɬɨɞɵ-ɚɤɰɟɫɫɨɪɵ ɞɥɹ ɩɨɥɹ.




  17. ɋɨɯɪɚɧɢɬɟ ɮɚɣɥ.
  18. Ɏɨɪɦɚɬɢɪɨɜɚɧɢɟ ɫɝɟɧɟɪɢɪɨɜɚɧɧɨɝɨ ɤɨɞɚ ɦɨɠɟɬ ɤɨɧɮɢɝɭɪɢɪɨɜɚɬɶɫɹ
     ɜ Window > Preferences > Java > Code Style > Code Formatter. ȿɫɥɢ
     ɢɫɩɨɥɶɡɭɟɬɟ ɩɪɟɮɢɤɫ ɢɥɢ ɫɭɮɮɢɤɫ ɞɥɹ ɢɦɟɧɢ ɩɨɥɹ, ɧɚɩɪɢɦɟɪ,
     fContainer, ɬɨ ɦɨɠɟɬɟ ɡɚɞɚɬɶ ɢɯ ɜ Window > Preferences > Java >
     Code Style > Fields, ɬɚɤ ɱɬɨ ɫɝɟɧɟɪɢɪɨɜɚɧɧɵɟ ɦɟɬɨɞɵ-ɚɤɰɟɫɫɨɪɵ
     ɛɭɞɭɬ ɭɝɚɞɵɜɚɬɶ ɢɦɟɧɚ ɦɟɬɨɞɨɜ ɛɟɡ ɩɪɟɮɢɤɫɚ ɢɥɢ ɫɭɮɮɢɤɫɚ.
   3.10. ɉɟɪɟɢɦɟɧɨɜɚɧɢɟ ɷɥɟɦɟɧɬɨɜ Java
ɇɢɠɟ ɩɟɪɟɢɦɟɧɭɟɦ ɷɥɟɦɟɧɬ Java, ɢɫɩɨɥɶɡɭɹ ɪɟɮɚɤɬɨɪɢɧɝ. Ⱦɟɣɫɬɜɢɹ
ɪɟɮɚɤɬɨɪɢɧɝɚ ɢɡɦɟɧɹɸɬ ɫɬɪɭɤɬɭɪɭ ɤɨɞɚ ɛɟɡ ɢɡɦɟɧɟɧɢɹ ɫɟɦɚɧɬɢɤɢ
ɩɨɜɟɞɟɧɢɹ.
   1. ȼ         ɩɪɟɞɫɬɚɜɥɟɧɢɢ        Package Explorer ɜɵɛɟɪɢɬɟ
      junit.framework.TestCase.java.
                                                       30