eclipse簡單使用

來源:互聯網
上載者:User

標籤:style   blog   http   io   ar   color   使用   sp   for   

1.10個快速鍵:

     1. ctrl+shift+r:開啟資源

      Control-Shift-T: 開啟類型(Open type)

     Control-Shift-F: CodeàJavaàPreferencesà根據代碼風格設定重新格式化代碼。

     Control-Shift-G: 在workspace中搜尋引用(reference)。

      ctrl+o:快速outline 查看當前類的方法或某個特定方法

     ctrl+e:快速轉換編輯器  協助你在開啟的編輯器之間瀏覽

1.顯示行號:

      任意java類中, ctrl+F10  出右鍵菜單,選中: show lines numbers

2.設定workspace utf-8編碼:

      windows->reference->general->Workspace,右側Text file encoding,選擇Other,改變為UTF-8

      general->Content Types,右側Context Types樹,點開Text,選擇Java Source File,在下面的Default encoding輸入框中輸入UTF-8,點Update,   則設定Java檔案編碼為UTF-8。其他如果需要更改,方法一樣。

3.java編譯循環參考,設定

   

   4.修改web項目發布名:

        在工程目錄上右鍵, 選properties, 彈出屬性視窗, 選中Web Project Settings, 在右邊的Context root中修改儲存即可

  5.3中方法可以更改workspace的路徑設定

1. 啟動Eclipse/MyEclipse後, 開啟"Window -> Preferences -> General -> Startup and Shutdown->Workspaces",  然後勾選"Workspaces"頁中的"Prompt for workspace on startup";

2. 用記事本開啟"\eclipse\configuration\.settings\org.eclipse.ui.ide.prefs", 將"SHOW_WORKSPACE_SELECTION_DIALOG"的值改為"true";

P.S.:  "RECENT_WORKSPACES"的值表示設定過的workspace絕對路徑. 第一個路徑是當前設定的路徑, 向後依次之前曾設定過的. 各路徑之間用"\n"分隔.

 3. 刪掉"\eclipse\configuration\.settings\org.eclipse.ui.ide.prefs". 

執行上述操作後, 再次啟動, 又會彈出"Workspace Launcher"對話方塊, 可以重新設定了.

eclipse簡單使用

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.