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

UptoLike

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

ɋɬɟɩɚɧɰɨɜ ȼ.Ⱥ. ɉɪɚɤɬɢɱɟɫɤɚɹ ɪɚɛɨɬɚ ɜ Eclipse 3.2
3
ȼɜɟɞɟɧɢɟ ɜ Eclipse
Eclipse – ɷɬɨ ɪɚɫɲɢɪɹɟɦɚɹ ɫɪɟɞɚ ɪɚɡɪɚɛɨɬɤɢ Integrated Development
Environment (IDE) ɫ ɨɬɤɪɵɬɵɦ ɢɫɯɨɞɧɵɦ ɤɨɞɨɦ (OpenSource). ɉɪɨɟɤɬ ɛɵɥ
ɡɚɩɭɳɟɧ ɜ ɧɨɹɛɪɟ 2001 ɝɨɞɚ, ɤɨɝɞɚ IBM ɩɟɪɟɞɚɥɚ ɢɫɯɨɞɧɵɣ ɤɨɞ ɫɜɨɟɝɨ
Websphere Studio Workbench ɫɬɨɢɦɨɫɬɶɸ 40 ɦɢɥɥɢɨɧɨɜ ɞɨɥɥɚɪɨɜ ɧɚ
OpenSource ɢ ɫɮɨɪɦɢɪɨɜɚɥɚ ɤɨɧɫɨɪɰɢɭɦ Eclipse ɞɥɹ ɭɩɪɚɜɥɟɧɢɹ
ɩɪɨɞɨɥɠɚɸɳɟɣɫɹ ɪɚɡɪɚɛɨɬɤɨɣ. Ʉɨɧɫɨɪɰɢɭɦ ɧɚɰɟɥɟɧ ɧɚ ɬɪɢ ɝɥɚɜɧɵɯ
ɩɪɨɟɤɬɚ:
1. The Eclipse (
http://www.eclipse.org/eclipse/) ɧɟɩɨɫɪɟɞɫɬɜɟɧɧɨ Eclipse
IDE – ɩɥɚɬɮɨɪɦɵ, ɫɨɞɟɪɠɚɳɟɣ ɢ ɢɫɩɨɥɧɹɸɳɟɣ ɢɧɫɬɪɭɦɟɧɬɵ
Eclipse, ɢɧɫɬɪɭɦɟɧɬɨɜ ɪɚɡɪɚɛɨɬɤɢ ɞɥɹ Java – Java Development Tools
(JDT) (
http://www.eclipse.org/jdt/) ɢ ɫɪɟɞɵ ɪɚɡɪɚɛɨɬɤɢ Plug-In – Plug-In
Development Environment (PDE) (
http://www.eclipse.org/pde/),
ɩɨɡɜɨɥɹɸɳɢɯ ɪɚɫɲɢɪɹɬɶ ɩɥɚɬɮɨɪɦɭ.
2. Eclipse Tools (
http://www.eclipse.org/projects/) ɢɦɟɟɬ ɫɜɨɟɣ ɰɟɥɶɸ
ɫɨɡɞɚɧɢɟ ɢɧɫɬɪɭɦɟɧɬɨɜ ɞɥɹ ɩɥɚɬɮɨɪɦɵ Eclipse. ȼ ɬɟɤɭɳɟɣ
ɪɚɡɪɚɛɨɬɤɟ ɧɚɯɨɞɹɬɫɹ ɩɨɞɩɪɨɟɤɬɵ ɫɨɡɞɚɧɢɹ IDE ɞɥɹ Cobol, IDE ɞɥɹ
C/C++, ɚ ɬɚɤɠɟ ɢɧɫɬɪɭɦɟɧɬɚ ɞɥɹ ɩɨɫɬɪɨɟɧɢɹ EMF ɦɨɞɟɥɟɣ.
3. The Eclipse Technology
(http://www.eclipse.org/technology/) ɨɬɜɟɬɫɬɜɟɧɟɧ
ɡɚ ɬɟɯɧɨɥɨɝɢɱɟɫɤɢɟ ɪɚɡɪɚɛɨɬɤɢ, ɷɜɨɥɸɰɢɸ ɢ ɨɛɭɱɟɧɢɟ
ɢɫɩɨɥɶɡɨɜɚɧɢɸ ɩɥɚɬɮɨɪɦɵ Eclipse.
ɉɥɚɬɮɨɪɦɚ Eclipse ɜ ɫɨɱɟɬɚɧɢɢ ɫ JDT ɜɤɥɸɱɚɟɬ ɦɧɨɝɢɟ ɢɡ
ɜɨɡɦɨɠɧɨɫɬɟɣ, ɤɨɬɨɪɵɟ ɜɤɥɸɱɚɸɬɫɹ ɜ ɤɨɦɦɟɪɱɟɫɤɢɟ IDE: ɪɟɞɚɤɬɨɪ ɫ
ɩɨɞɫɜɟɬɤɨɣ ɫɢɧɬɚɤɫɢɫɚ, ɢɧɤɪɟɦɟɧɬɚɥɶɧɚɹ ɤɨɦɩɢɥɹɰɢɹ ɤɨɞɚ,
ɩɨɬɨɤɨɛɟɡɨɩɚɫɧɵɣ ɨɬɥɚɞɱɢɤ, ɧɚɜɢɝɚɬɨɪ ɩɨ ɤɥɚɫɫɚɦ, ɦɟɧɟɞɠɟɪɵ ɮɚɣɥɨɜ ɢ
ɩɪɨɟɤɬɨɜ, ɚ ɬɚɤɠɟ ɢɧɬɟɪɮɟɣɫɵ ɤ ɫɬɚɧɞɚɪɬɧɵɦ ɫɢɫɬɟɦɚɦ ɤɨɧɬɪɨɥɹ
ɢɫɯɨɞɧɵɯ ɬɟɤɫɬɨɜ, ɬɚɤɢɦ ɤɚɤ CVS ɢ ClearCase.
ɉɪɨɟɤɬ Eclipse ɩɪɟɞɫɬɚɜɥɹɟɬ ɫɨɛɨɣ ɩɟɪɜɭɸ ɫɬɨɥɶ ɦɨɳɧɨ ɩɨɞɞɟɪɠɚɧɧɭɸ
ɦɢɪɨɜɵɦ IT-ɫɨɨɛɳɟɫɬɜɨɦ ɩɨɩɵɬɤɭ ɫɨɡɞɚɧɢɹ ɟɞɢɧɨɣ ɨɬɤɪɵɬɨɣ
ɢɧɬɟɝɪɢɪɨɜɚɧɧɨɣ ɩɥɚɬɮɨɪɦɵ ɪɚɡɪɚɛɨɬɤɢ ɩɪɢɥɨɠɟɧɢɣ, ɨɛɥɚɞɚɸɳɟɣ
ɧɚɞɟɠɧɨɫɬɶɸ, ɮɭɧɤɰɢɨɧɚɥɶɧɨɫɬɶɸ ɢ ɭɪɨɜɧɟɦ ɤɚɱɟɫɬɜɚ ɤɨɦɦɟɪɱɟɫɤɨɝɨ
ɩɪɨɞɭɤɬɚ. Ɏɚɤɬɢɱɟɫɤɢ ɷɬɚ ɩɥɚɬɮɨɪɦɚ ɩɪɟɞɧɚɡɧɚɱɟɧɚ ɞɥɹ ɜɫɟɝɨ ɢ ɧɢ ɞɥɹ
ɱɟɝɨ ɤɨɧɤɪɟɬɧɨ: ɨɧɚ ɩɪɟɞɫɬɚɜɥɹɟɬ ɫɨɛɨɣ ɨɫɧɨɜɭ, ɢɦɟɸɳɭɸ ɛɥɨɱɧɭɸ
ɫɬɪɭɤɬɭɪɭ ɢ ɢɧɬɟɝɪɢɪɭɸɳɭɸ ɢɧɫɬɪɭɦɟɧɬɵ ɪɚɡɪɚɛɨɬɤɢ ɉɈ ɪɚɡɥɢɱɧɵɯ
ɩɪɨɢɡɜɨɞɢɬɟɥɟɣ ɞɥɹ ɫɨɡɞɚɧɢɹ ɩɪɢɥɨɠɟɧɢɣ ɧɚ ɥɸɛɨɦ ɹɡɵɤɟ, ɫ
ɢɫɩɨɥɶɡɨɜɚɧɢɟɦ ɥɸɛɵɯ ɬɟɯɧɨɥɨɝɢɣ ɢ ɞɥɹ ɥɸɛɨɣ ɩɪɨɝɪɚɦɦɧɨɣ ɩɥɚɬɮɨɪɦɵ.
ȼɨɤɪɭɝ ɩɪɨɟɤɬɚ Eclipse ɜ ɧɚɫɬɨɹɳɟɟ ɜɪɟɦɹ ɫɮɨɪɦɢɪɨɜɚɧɨ ɫɨɨɛɳɟɫɬɜɨ
ɤɪɭɩɧɟɣɲɢɯ IT-ɤɨɦɩɚɧɢɣ, ɫɪɟɞɢ ɤɨɬɨɪɵɯ Borland, IBM, SAP AG, RedHat ɢ
ɞɪɭɝɢɟ.
Ɍɚɤɠɟ Eclipse ɩɪɟɞɥɚɝɚɟɬ ɦɧɨɠɟɫɬɜɨ ɭɧɢɤɚɥɶɧɵɯ ɜɨɡɦɨɠɧɨɫɬɟɣ,
ɧɚɩɪɢɦɟɪ ɪɟɮɚɤɬɨɪɢɧɝ ɤɨɞɚ (
http://www.refactoring.com/), ɚɜɬɨɦɚɬɢɱɟɫɤɨɟ
ɨɛɧɨɜɥɟɧɢɟ ɢɥɢ ɭɫɬɚɧɨɜɤɚ ɤɨɞɚ (ɫ ɩɨɦɨɳɶɸ Ɇɟɧɟɞɠɟɪɚ Ɉɛɧɨɜɥɟɧɢɣ),
                                             ɋɬɟɩɚɧɰɨɜ ȼ.Ⱥ. ɉɪɚɤɬɢɱɟɫɤɚɹ ɪɚɛɨɬɚ ɜ Eclipse 3.2


   ȼɜɟɞɟɧɢɟ ɜ Eclipse
   Eclipse – ɷɬɨ ɪɚɫɲɢɪɹɟɦɚɹ ɫɪɟɞɚ ɪɚɡɪɚɛɨɬɤɢ Integrated Development
Environment (IDE) ɫ ɨɬɤɪɵɬɵɦ ɢɫɯɨɞɧɵɦ ɤɨɞɨɦ (OpenSource). ɉɪɨɟɤɬ ɛɵɥ
ɡɚɩɭɳɟɧ ɜ ɧɨɹɛɪɟ 2001 ɝɨɞɚ, ɤɨɝɞɚ IBM ɩɟɪɟɞɚɥɚ ɢɫɯɨɞɧɵɣ ɤɨɞ ɫɜɨɟɝɨ
Websphere Studio Workbench ɫɬɨɢɦɨɫɬɶɸ 40 ɦɢɥɥɢɨɧɨɜ ɞɨɥɥɚɪɨɜ ɧɚ
OpenSource ɢ ɫɮɨɪɦɢɪɨɜɚɥɚ ɤɨɧɫɨɪɰɢɭɦ Eclipse ɞɥɹ ɭɩɪɚɜɥɟɧɢɹ
ɩɪɨɞɨɥɠɚɸɳɟɣɫɹ ɪɚɡɪɚɛɨɬɤɨɣ. Ʉɨɧɫɨɪɰɢɭɦ ɧɚɰɟɥɟɧ ɧɚ ɬɪɢ ɝɥɚɜɧɵɯ
ɩɪɨɟɤɬɚ:
   1. The Eclipse (http://www.eclipse.org/eclipse/) ɧɟɩɨɫɪɟɞɫɬɜɟɧɧɨ Eclipse
      IDE – ɩɥɚɬɮɨɪɦɵ, ɫɨɞɟɪɠɚɳɟɣ ɢ ɢɫɩɨɥɧɹɸɳɟɣ ɢɧɫɬɪɭɦɟɧɬɵ
      Eclipse, ɢɧɫɬɪɭɦɟɧɬɨɜ ɪɚɡɪɚɛɨɬɤɢ ɞɥɹ Java – Java Development Tools
      (JDT) (http://www.eclipse.org/jdt/) ɢ ɫɪɟɞɵ ɪɚɡɪɚɛɨɬɤɢ Plug-In – Plug-In
      Development      Environment         (PDE)     (http://www.eclipse.org/pde/),
      ɩɨɡɜɨɥɹɸɳɢɯ ɪɚɫɲɢɪɹɬɶ ɩɥɚɬɮɨɪɦɭ.
   2. Eclipse Tools (http://www.eclipse.org/projects/) ɢɦɟɟɬ ɫɜɨɟɣ ɰɟɥɶɸ
      ɫɨɡɞɚɧɢɟ ɢɧɫɬɪɭɦɟɧɬɨɜ ɞɥɹ ɩɥɚɬɮɨɪɦɵ Eclipse. ȼ ɬɟɤɭɳɟɣ
      ɪɚɡɪɚɛɨɬɤɟ ɧɚɯɨɞɹɬɫɹ ɩɨɞɩɪɨɟɤɬɵ ɫɨɡɞɚɧɢɹ IDE ɞɥɹ Cobol, IDE ɞɥɹ
      C/C++, ɚ ɬɚɤɠɟ ɢɧɫɬɪɭɦɟɧɬɚ ɞɥɹ ɩɨɫɬɪɨɟɧɢɹ EMF ɦɨɞɟɥɟɣ.
   3. The Eclipse Technology (http://www.eclipse.org/technology/) ɨɬɜɟɬɫɬɜɟɧɟɧ
      ɡɚ    ɬɟɯɧɨɥɨɝɢɱɟɫɤɢɟ       ɪɚɡɪɚɛɨɬɤɢ,      ɷɜɨɥɸɰɢɸ       ɢ     ɨɛɭɱɟɧɢɟ
      ɢɫɩɨɥɶɡɨɜɚɧɢɸ ɩɥɚɬɮɨɪɦɵ Eclipse.
   ɉɥɚɬɮɨɪɦɚ Eclipse ɜ ɫɨɱɟɬɚɧɢɢ ɫ JDT ɜɤɥɸɱɚɟɬ ɦɧɨɝɢɟ ɢɡ
ɜɨɡɦɨɠɧɨɫɬɟɣ, ɤɨɬɨɪɵɟ ɜɤɥɸɱɚɸɬɫɹ ɜ ɤɨɦɦɟɪɱɟɫɤɢɟ IDE: ɪɟɞɚɤɬɨɪ ɫ
ɩɨɞɫɜɟɬɤɨɣ      ɫɢɧɬɚɤɫɢɫɚ,       ɢɧɤɪɟɦɟɧɬɚɥɶɧɚɹ         ɤɨɦɩɢɥɹɰɢɹ         ɤɨɞɚ,
ɩɨɬɨɤɨɛɟɡɨɩɚɫɧɵɣ ɨɬɥɚɞɱɢɤ, ɧɚɜɢɝɚɬɨɪ ɩɨ ɤɥɚɫɫɚɦ, ɦɟɧɟɞɠɟɪɵ ɮɚɣɥɨɜ ɢ
ɩɪɨɟɤɬɨɜ, ɚ ɬɚɤɠɟ ɢɧɬɟɪɮɟɣɫɵ ɤ ɫɬɚɧɞɚɪɬɧɵɦ ɫɢɫɬɟɦɚɦ ɤɨɧɬɪɨɥɹ
ɢɫɯɨɞɧɵɯ ɬɟɤɫɬɨɜ, ɬɚɤɢɦ ɤɚɤ CVS ɢ ClearCase.
   ɉɪɨɟɤɬ Eclipse ɩɪɟɞɫɬɚɜɥɹɟɬ ɫɨɛɨɣ ɩɟɪɜɭɸ ɫɬɨɥɶ ɦɨɳɧɨ ɩɨɞɞɟɪɠɚɧɧɭɸ
ɦɢɪɨɜɵɦ IT-ɫɨɨɛɳɟɫɬɜɨɦ ɩɨɩɵɬɤɭ ɫɨɡɞɚɧɢɹ ɟɞɢɧɨɣ ɨɬɤɪɵɬɨɣ
ɢɧɬɟɝɪɢɪɨɜɚɧɧɨɣ ɩɥɚɬɮɨɪɦɵ ɪɚɡɪɚɛɨɬɤɢ ɩɪɢɥɨɠɟɧɢɣ, ɨɛɥɚɞɚɸɳɟɣ
ɧɚɞɟɠɧɨɫɬɶɸ, ɮɭɧɤɰɢɨɧɚɥɶɧɨɫɬɶɸ ɢ ɭɪɨɜɧɟɦ ɤɚɱɟɫɬɜɚ ɤɨɦɦɟɪɱɟɫɤɨɝɨ
ɩɪɨɞɭɤɬɚ. Ɏɚɤɬɢɱɟɫɤɢ ɷɬɚ ɩɥɚɬɮɨɪɦɚ ɩɪɟɞɧɚɡɧɚɱɟɧɚ ɞɥɹ ɜɫɟɝɨ ɢ ɧɢ ɞɥɹ
ɱɟɝɨ ɤɨɧɤɪɟɬɧɨ: ɨɧɚ ɩɪɟɞɫɬɚɜɥɹɟɬ ɫɨɛɨɣ ɨɫɧɨɜɭ, ɢɦɟɸɳɭɸ ɛɥɨɱɧɭɸ
ɫɬɪɭɤɬɭɪɭ ɢ ɢɧɬɟɝɪɢɪɭɸɳɭɸ ɢɧɫɬɪɭɦɟɧɬɵ ɪɚɡɪɚɛɨɬɤɢ ɉɈ ɪɚɡɥɢɱɧɵɯ
ɩɪɨɢɡɜɨɞɢɬɟɥɟɣ ɞɥɹ ɫɨɡɞɚɧɢɹ ɩɪɢɥɨɠɟɧɢɣ ɧɚ ɥɸɛɨɦ ɹɡɵɤɟ, ɫ
ɢɫɩɨɥɶɡɨɜɚɧɢɟɦ ɥɸɛɵɯ ɬɟɯɧɨɥɨɝɢɣ ɢ ɞɥɹ ɥɸɛɨɣ ɩɪɨɝɪɚɦɦɧɨɣ ɩɥɚɬɮɨɪɦɵ.
ȼɨɤɪɭɝ ɩɪɨɟɤɬɚ Eclipse ɜ ɧɚɫɬɨɹɳɟɟ ɜɪɟɦɹ ɫɮɨɪɦɢɪɨɜɚɧɨ ɫɨɨɛɳɟɫɬɜɨ
ɤɪɭɩɧɟɣɲɢɯ IT-ɤɨɦɩɚɧɢɣ, ɫɪɟɞɢ ɤɨɬɨɪɵɯ Borland, IBM, SAP AG, RedHat ɢ
ɞɪɭɝɢɟ.
   Ɍɚɤɠɟ Eclipse ɩɪɟɞɥɚɝɚɟɬ ɦɧɨɠɟɫɬɜɨ ɭɧɢɤɚɥɶɧɵɯ ɜɨɡɦɨɠɧɨɫɬɟɣ,
ɧɚɩɪɢɦɟɪ ɪɟɮɚɤɬɨɪɢɧɝ ɤɨɞɚ (http://www.refactoring.com/), ɚɜɬɨɦɚɬɢɱɟɫɤɨɟ
ɨɛɧɨɜɥɟɧɢɟ ɢɥɢ ɭɫɬɚɧɨɜɤɚ ɤɨɞɚ (ɫ ɩɨɦɨɳɶɸ Ɇɟɧɟɞɠɟɪɚ Ɉɛɧɨɜɥɟɧɢɣ),

                                        3