.. _sphinx: http://www.sphinx-doc.org ****************************** 使用eclipse IDE 編寫 ****************************** 概述 ============================= 文字編輯器雖然可以編寫reStructuredText文件,但語法無法自動突出顯示. 且必須使用指令來產生html檔案,使用eclipse IDE各種功能自然可以讓開發者更多的方便. 接下來我們介紹如何用免費的eclipse來增加工作效率. 下載eclipse --------------------- .. rubric:: 下載eclipse執行檔 下載檔案為安裝執行檔,例如 :strong:`eclipse-inst-win64.exe` ,請至 下載eclipse_ 網頁下載如圖所示: .. figure:: ../img/use_eclipse_001.jpg .. rubric:: 下載eclipse套件 下載檔案為套件的壓縮檔例如 :strong:`eclipse-jee-2019-12-R-win32-x86_64.zip` ,請至 下載eclipse套件_ 網頁下載如圖所示: .. figure:: ../img/use_eclipse_002.jpg R = Release SR = Service Release RC = Release Candidate M = Milestone 安裝執行eclipse --------------------- .. rubric:: 安裝eclipse執行檔 執行 |eclipse-inst-win64.exe| 執行檔,選擇安裝IDE種類, 這裡筆者使用 ``Eclipse IDE for Enterprise Java Developers`` IDE, 來作開發,其它的也行哦,只因筆者長期使用java作為開發. 如下所示: .. figure:: ../img/use_eclipse_003.jpg .. figure:: ../img/use_eclipse_004.jpg .. figure:: ../img/use_eclipse_005.jpg .. figure:: ../img/use_eclipse_006.jpg .. figure:: ../img/use_eclipse_007.jpg .. figure:: ../img/use_eclipse_008.jpg .. figure:: ../img/use_eclipse_009.jpg .. figure:: ../img/use_eclipse_010.jpg .. figure:: ../img/use_eclipse_011.jpg 完成了安裝並且啟動了eclipse. .. rubric:: 使用eclipse套件 eclipse套件下載完成是一個.zip的壓縮檔,解壓縮後直接啟動eclipse.exe即可如上所示. eclipse pydev 插件安裝 --------------------------------- 安裝pydev的前提是你已經安裝了python,如果你已經忘記請至 :ref:`下載安裝python` 章節. 在eclipse安裝插件有二個方式,一是 ``Install New Software`` 選項,另一是 ``Eclipse Marketplace`` ,此插件我們從Eclipse Marketplace上來安裝.如下所示: .. figure:: ../img/use_eclipse_012_0.jpg .. figure:: ../img/use_eclipse_012.jpg .. figure:: ../img/use_eclipse_013.jpg .. figure:: ../img/use_eclipse_014.jpg .. figure:: ../img/use_eclipse_015.jpg 設定python直譯器 ------------------------------------------------- 在eclipse內設定python直譯器 .. figure:: ../img/use_eclipse_021.jpg .. figure:: ../img/use_eclipse_022.jpg eclipse ReST編輯器插件安裝 ------------------------------------------------- 在Eclipse Marketplace找不到ReST編輯器插件,我們直接上網找到插件使用``Install New Software``方式來安裝. .. figure:: ../img/use_eclipse_016.jpg .. figure:: ../img/use_eclipse_017.jpg .. figure:: ../img/use_eclipse_018.jpg .. figure:: ../img/use_eclipse_019.jpg .. figure:: ../img/use_eclipse_020.jpg 建立pydev專案 --------------------- 建立pydev專案前,我們先用sphinx-quickstart指令來建置文件專案的架構, 請參考 :ref:`執行sphinx-quickstart指令` 章節. .. figure:: ../img/use_eclipse_023.jpg .. figure:: ../img/use_eclipse_024.jpg .. figure:: ../img/use_eclipse_025.jpg .. figure:: ../img/use_eclipse_026.jpg .. figure:: ../img/use_eclipse_027.jpg 外部工具配置 ---------------------- .. figure:: ../img/use_eclipse_028.jpg .. figure:: ../img/use_eclipse_029.jpg .. figure:: ../img/use_eclipse_030.jpg .. figure:: ../img/use_eclipse_031.jpg .. figure:: ../img/use_eclipse_032.jpg .. figure:: ../img/use_eclipse_033.jpg .. _下載eclipse: https://www.eclipse.org/downloads/ .. _下載eclipse套件: https://www.eclipse.org/downloads/packages/ .. |eclipse-inst-win64.exe| image:: ../img/eclipse-inst-win64.exe.jpg :scale: 40%