ВУЗ:
Составители:
Рубрика:
ɋɬɟɩɚɧɰɨɜ ȼ.Ⱥ. ɉɪɚɤɬɢɱɟɫɤɚɹ ɪɚɛɨɬɚ ɜ Eclipse 3.2
23
2. ɂɡ ɤɨɧɬɟɤɫɬɧɨɝɨ ɦɟɧɸ ɜ ɪɟɞɚɤɬɨɪɟ ɜɵɛɟɪɢɬɟ Source > Organize
Imports. ɇɟɨɛɯɨɞɢɦɵɟ ɨɩɟɪɚɬɨɪɵ ɢɦɩɨɪɬɚ ɞɨɛɚɜɥɹɸɬɫɹ ɜ ɧɚɱɚɥɨ
ɜɚɲɟɝɨ ɤɨɞɚ ɩɨɞ ɨɛɴɹɜɥɟɧɢɟɦ ɩɚɤɟɬɚ.
Ɇɨɠɧɨ ɬɚɤɠɟ ɜɵɛɪɚɬɶ Source > Organize Imports ɢɡ ɤɨɧɬɟɤɫɬɧɨɝɨ
ɦɟɧɸ ɨɛɴɹɜɥɟɧɢɣ ɢɦɩɨɪɬɚ ɜ ɩɪɟɞɫɬɚɜɥɟɧɢɢ Outline.
Ɂɚɞɚɬɶ ɩɨɪɹɞɨɤ ɨɛɴɹɜɥɟɧɢɣ ɢɦɩɨɪɬɚ ɦɨɠɧɨ ɜ ɧɚɫɬɪɨɣɤɟ Window >
Preferences > Java > Code Style > Organize Imports.
3. ɋɨɯɪɚɧɢɬɟ ɮɚɣɥ.
3.7. ɂɫɩɨɥɶɡɨɜɚɧɢɟ ɥɨɤɚɥɶɧɨɣ ɢɫɬɨɪɢɢ
Ⱦɚɥɟɟ ɛɭɞɟɦ ɢɫɩɨɥɶɡɨɜɚɬɶ ɫɜɨɣɫɬɜɚ ɥɨɤɚɥɶɧɨɣ ɢɫɬɨɪɢɢ, ɱɬɨɛɵ
ɩɟɪɟɤɥɸɱɢɬɶɫɹ ɧɚ ɩɪɟɞɵɞɭɳɭɸ ɫɨɯɪɚɧɟɧɧɭɸ ɜɟɪɫɢɸ ɤɨɧɤɪɟɬɧɨɝɨ
ɷɥɟɦɟɧɬɚ Java.
1. Ɉɬɤɪɨɣɬɟ ɮɚɣɥ
junit.samples.VectorTest.java ɜ ɪɟɞɚɤɬɨɪɟ Java ɢ
ɜɵɛɟɪɢɬɟ ɦɟɬɨɞ
testCapacity() ɜ ɩɪɟɞɫɬɚɜɥɟɧɢɢ Outline.
2. ɂɡɦɟɧɢɬɟ ɫɨɞɟɪɠɢɦɨɟ ɦɟɬɨɞɚ ɬɚɤ, ɱɬɨɛɵ ɨɩɟɪɚɬɨɪ for ɱɢɬɚɥɫɹ ɤɚɤ:
for (int i= 0; i < 99; i++)
ɋɨɯɪɚɧɢɬɟ ɮɚɣɥ, ɧɚɠɚɜ Ctrl+S.
3. ȼ ɩɪɟɞɫɬɚɜɥɟɧɢɢ Outline ɜɵɛɟɪɢɬɟ ɦɟɬɨɞ
testCapacity(), ɢɢɡ
ɤɨɧɬɟɤɫɬɧɨɝɨ ɦɟɧɸ ɜɵɛɟɪɢɬɟ Replace With > Element from Local
History.
4. ȼ ɞɢɚɥɨɝɟ Replace Java Element from Local History ɫɩɢɫɨɤ Local
History ɩɨɤɚɡɵɜɚɟɬ ɪɚɡɥɢɱɧɵɟ ɫɨɯɪɚɧɟɧɧɵɟ ɫɨɫɬɨɹɧɢɹ ɦɟɬɨɞɚ.
ɉɚɧɟɥɶ Java Source Compare ɩɨɤɚɡɵɜɚɟɬ ɩɨɞɪɨɛɧɨɫɬɢ ɜ ɪɚɡɥɢɱɢɹɯ
ɦɟɠɞɭ ɪɟɫɭɪɫɨɦ, ɜɵɛɪɚɧɧɨɦ ɢɡ ɢɫɬɨɪɢɢ, ɢ ɪɟɫɭɪɫɨɦ, ɫɭɳɟɫɬɜɭɸɳɢɦ
ɧɚ ɪɚɛɨɱɟɦ ɦɟɫɬɟ.
ɋɬɟɩɚɧɰɨɜ ȼ.Ⱥ. ɉɪɚɤɬɢɱɟɫɤɚɹ ɪɚɛɨɬɚ ɜ Eclipse 3.2
2. ɂɡ ɤɨɧɬɟɤɫɬɧɨɝɨ ɦɟɧɸ ɜ ɪɟɞɚɤɬɨɪɟ ɜɵɛɟɪɢɬɟ Source > Organize
Imports. ɇɟɨɛɯɨɞɢɦɵɟ ɨɩɟɪɚɬɨɪɵ ɢɦɩɨɪɬɚ ɞɨɛɚɜɥɹɸɬɫɹ ɜ ɧɚɱɚɥɨ
ɜɚɲɟɝɨ ɤɨɞɚ ɩɨɞ ɨɛɴɹɜɥɟɧɢɟɦ ɩɚɤɟɬɚ.
Ɇɨɠɧɨ ɬɚɤɠɟ ɜɵɛɪɚɬɶ Source > Organize Imports ɢɡ ɤɨɧɬɟɤɫɬɧɨɝɨ
ɦɟɧɸ ɨɛɴɹɜɥɟɧɢɣ ɢɦɩɨɪɬɚ ɜ ɩɪɟɞɫɬɚɜɥɟɧɢɢ Outline.
Ɂɚɞɚɬɶ ɩɨɪɹɞɨɤ ɨɛɴɹɜɥɟɧɢɣ ɢɦɩɨɪɬɚ ɦɨɠɧɨ ɜ ɧɚɫɬɪɨɣɤɟ Window >
Preferences > Java > Code Style > Organize Imports.
3. ɋɨɯɪɚɧɢɬɟ ɮɚɣɥ.
3.7. ɂɫɩɨɥɶɡɨɜɚɧɢɟ ɥɨɤɚɥɶɧɨɣ ɢɫɬɨɪɢɢ
Ⱦɚɥɟɟ ɛɭɞɟɦ ɢɫɩɨɥɶɡɨɜɚɬɶ ɫɜɨɣɫɬɜɚ ɥɨɤɚɥɶɧɨɣ ɢɫɬɨɪɢɢ, ɱɬɨɛɵ
ɩɟɪɟɤɥɸɱɢɬɶɫɹ ɧɚ ɩɪɟɞɵɞɭɳɭɸ ɫɨɯɪɚɧɟɧɧɭɸ ɜɟɪɫɢɸ ɤɨɧɤɪɟɬɧɨɝɨ
ɷɥɟɦɟɧɬɚ Java.
1. Ɉɬɤɪɨɣɬɟ ɮɚɣɥ junit.samples.VectorTest.java ɜ ɪɟɞɚɤɬɨɪɟ Java ɢ
ɜɵɛɟɪɢɬɟ ɦɟɬɨɞ testCapacity() ɜ ɩɪɟɞɫɬɚɜɥɟɧɢɢ Outline.
2. ɂɡɦɟɧɢɬɟ ɫɨɞɟɪɠɢɦɨɟ ɦɟɬɨɞɚ ɬɚɤ, ɱɬɨɛɵ ɨɩɟɪɚɬɨɪ for ɱɢɬɚɥɫɹ ɤɚɤ:
for (int i= 0; i < 99; i++)
ɋɨɯɪɚɧɢɬɟ ɮɚɣɥ, ɧɚɠɚɜ Ctrl+S.
3. ȼ ɩɪɟɞɫɬɚɜɥɟɧɢɢ Outline ɜɵɛɟɪɢɬɟ ɦɟɬɨɞ testCapacity(), ɢ ɢɡ
ɤɨɧɬɟɤɫɬɧɨɝɨ ɦɟɧɸ ɜɵɛɟɪɢɬɟ Replace With > Element from Local
History.
4. ȼ ɞɢɚɥɨɝɟ Replace Java Element from Local History ɫɩɢɫɨɤ Local
History ɩɨɤɚɡɵɜɚɟɬ ɪɚɡɥɢɱɧɵɟ ɫɨɯɪɚɧɟɧɧɵɟ ɫɨɫɬɨɹɧɢɹ ɦɟɬɨɞɚ.
ɉɚɧɟɥɶ Java Source Compare ɩɨɤɚɡɵɜɚɟɬ ɩɨɞɪɨɛɧɨɫɬɢ ɜ ɪɚɡɥɢɱɢɹɯ
ɦɟɠɞɭ ɪɟɫɭɪɫɨɦ, ɜɵɛɪɚɧɧɨɦ ɢɡ ɢɫɬɨɪɢɢ, ɢ ɪɟɫɭɪɫɨɦ, ɫɭɳɟɫɬɜɭɸɳɢɦ
ɧɚ ɪɚɛɨɱɟɦ ɦɟɫɬɟ.
23
Страницы
- « первая
- ‹ предыдущая
- …
- 21
- 22
- 23
- 24
- 25
- …
- следующая ›
- последняя »
