IDEA 2021年首個新版本發佈,重要更新速覽

{"type":"doc","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"近日,JetBrains 正式發佈 IntelliJ IDEA 2021.1,這也是今年的首個新版本。開發者可以從"},{"type":"link","attrs":{"href":"https:\/\/www.jetbrains.com\/idea\/?fileGuid=Rh53J74517Q9BKqm","title":"","type":null},"content":[{"type":"text","text":"官網"}]},{"type":"text","text":"或通過 "},{"type":"link","attrs":{"href":"https:\/\/www.jetbrains.com\/toolbox-app\/?fileGuid=Rh53J74517Q9BKqm","title":"","type":null},"content":[{"type":"text","text":"Toolbox App"}]},{"type":"text","text":" 進行下載。當然,Ubuntu 用戶們也可以在 IDE 內或者使用快照進行升級。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"新版本解決了一系列原有問題,又引入大量新功能。現在,您可以在WSL 2中使用Java項目進行工作、使用集成Space、直接在IDE內配合視頻通話使用Code With Me進行協作開發,並在SSH主機及Docker容器內運行代碼了。我們還添加了對Java 16的基本支持、幾項實用的新檢查以及IDE內的HTML預覽窗口。總之,IDE內的幾乎各個部分都迎來了多項更新。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在本文中,我們將快速介紹v2021.1中的所有重要功能:"}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"重要更新"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"新版本以開箱即用的方式與官方的全新軟件開發及團隊協作平臺"},{"type":"link","attrs":{"href":"https:\/\/www.jetbrains.com\/space\/?fileGuid=Rh53J74517Q9BKqm","title":"","type":null},"content":[{"type":"text","text":"Space"}]},{"type":"text","text":"相集成。在登錄至組織的JetBrains Space之後,您可以立即查看並克隆項目repo、查看同事編寫的代碼並編寫Space自動化腳本。"},{"type":"link","attrs":{"href":"https:\/\/blog.jetbrains.com\/space\/2021\/04\/07\/space-code-reviews-in-intellij-idea-2021-1\/?fileGuid=Rh53J74517Q9BKqm","title":"","type":null},"content":[{"type":"text","text":"點擊此處"}]},{"type":"text","text":"瞭解更多。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們現在還爲Java項目提供WSL 2支持。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/www.jetbrains.com\/code-with-me\/?fileGuid=Rh53J74517Q9BKqm","title":"","type":null},"content":[{"type":"text","text":"Code With Me"}]},{"type":"text","text":"是一項用於協作開發與結對編程的服務,現已開箱即用並附帶視頻與音頻通話功能。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"新的Run Targets功能使您可以在Docker容器或遠程計算機上運行、測試、分析與調試應用程序。"}]}]}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"用戶體驗"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"現在,您的這款IDE已經擁有面向HTML文件的內置瀏覽器預覽功能。在更改HTML或鏈接的CSS與JavaScript文件時,您可以實時預覽更新效果。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"您可以在搜索範圍內包含或排除指定的外部依賴項。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們標記了多個UI與gutter元素,現在您可以使用屏幕讀取器正確讀取這些元素了。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"如果在Windows上使用高對比度模式,則IDE會在首次啓動時自動應用高對比度主題。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"如果您是Windows用戶,則可通過右鍵單擊任務欄或Start菜單上的IntelliJ IDEA圖標,快速打開最近項目。"}]}]}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"版本控制"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"新版本引入了關於Pull Requests的多項更新,包括快速創建、快速啓用編輯器內diff功能以及pull request模板支持等。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們新增對Git提交模板的支持功能,現在您可以在提交消息中添加自定義描述信息。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"現在,您可以在向VCS提交變更之前輕鬆選擇代碼檢查配置文件——只需單擊齒輪圖標以顯示提交選項,而後勾選Analyze code複選框,再單擊Choose profile即可選擇所需的配置文件。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們在"},{"type":"link","attrs":{"href":"https:\/\/www.jetbrains.com\/help\/idea\/comparing-file-versions.html#compare-revisions-another-branch?fileGuid=Rh53J74517Q9BKqm","title":"","type":null},"content":[{"type":"text","text":"Compare with branch"}]},{"type":"text","text":"對話框的Show diff in旁邊添加了新的向下箭頭圖標,您可以藉此從另一分支處獲取文件。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"通過我們提供的全新Save to Shelf操作,您可以將變更復制至Shelf處,同時將其保留在本地變更當中。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Perforce插件現在可與IntelliJ IDEA社區全面兼容,並與您的IDE實現輕鬆捆綁。"}]}]}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"編輯器"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Preferences\/Settings | Editor | Fonts中提供新的字體設置,供您靈活微調各正文與粗體文本的樣式與磅數。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在開啓多個選項卡以垂直拆分編輯器時,您可以雙擊其中任意一個選項卡,將當前編輯器的窗口最大化顯示。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"您的IDE現可支持採用 Goessner 或 Jayway 語法的JSONPath 表達式。您可以使用新的Evaluate JSONPath Expression操作在JSONPath中寫入查詢,並通過Edit|Find進行測試。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"IntelliJ IDEA現可支持JSON Lines格式,並能夠識別*.jsonl*,"},{"type":"text","marks":[{"type":"italic"}],"text":".jslines"},{"type":"text","text":","},{"type":"text","marks":[{"type":"italic"}],"text":".ldjson"},{"type":"text","text":"和 ."},{"type":"text","marks":[{"type":"italic"}],"text":"ndjson"},{"type":"text","text":"等多種文件類型。"}]}]}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"Profiler"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們重新設計了Profiler UI,並添加兩個新的操作選項,您可以通過右鍵單擊運行中的應用程序訪問這些功能。其中Capture MemorySnapshot操作使您可以爲應用程序創建.hprof快照;CPUand Memory Live Charts則開啓一個選項卡,其中包含多種資源消耗量跟蹤與可視化工具。"}]}]}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"Java"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"從2021年3月開始,IntelliJ IDEA將爲Java 16提供基本支持。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們新增幾項檢查機制,包括數據流分析檢查。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們爲chained builder方法提供多種新的格式選項,用以幫助提高可讀性。"}]}]}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"Kotlin"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們提高了代碼分析速度,希望進一步提高錯誤檢測與警報速度。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"如果您使用的函數需要配合類型參數,我們的IDE會將正確的類型參數添加至之前的代碼當中。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"UML類圖現可用於編譯爲JVM的Kotlin代碼。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"IntelliJ IDEA自己的代碼覆蓋運行器現在可全面支持Kotlin的內聯函數與協同程序。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"IntelliJ IDEA調度器現可在Kotlin中評估get表達式,並將其顯示在Varaiables視圖當中。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們重新設計了用於Change Signature重構的UI,並添加新的複選框以供您將後續添加的參數設置爲默認項。"}]}]}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"JavaScript"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"現在,您可以更輕鬆地使用Stylelint修復代碼問題——只需將鼠標懸停在問題上或在其上添加插入符號,按下Alt + Enter,而後選擇"},{"type":"text","marks":[{"type":"italic"}],"text":"Stylelint**: Fix current file"},{"type":"text","text":"即可。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"現在,我們的IDE中嵌入了JavaScript API、HTML與CSS的快速"},{"type":"link","attrs":{"href":"https:\/\/developer.mozilla.org\/en-US\/?fileGuid=Rh53J74517Q9BKqm","title":"","type":null},"content":[{"type":"text","text":"MDN"}]},{"type":"link","attrs":{"href":"https:\/\/developer.mozilla.org\/en-US\/?fileGuid=Rh53J74517Q9BKqm","title":"","type":null},"content":[{"type":"text","text":"文檔"}]},{"type":"text","text":"。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"現在,您可以在處理樣式表時檢查選擇器特殊性。"}]}]}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"Scala"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Type Diff工具現可支持kinds。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"新版本引入了基於機器學習的Scala代碼補全功能。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"除了模塊之外,編譯圖現在還可以顯示編譯器的階段與單位,幫助您更深入地瞭解編譯過程。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"link","attrs":{"href":"https:\/\/github.com\/JetBrains\/sbt-idea-plugin?fileGuid=Rh53J74517Q9BKqm","title":"","type":null},"content":[{"type":"text","text":"sbt-idea"}]},{"type":"link","attrs":{"href":"https:\/\/github.com\/JetBrains\/sbt-idea-plugin?fileGuid=Rh53J74517Q9BKqm","title":"","type":null},"content":[{"type":"text","text":"插件"}]},{"type":"text","text":"可幫助您使用Scala與sbt自主開發IntelliJ Platform插件。新版本還提供一套內置的Project Wizard模板,讓整個插件開發流程更加輕鬆易行(此功能依賴於PluginDevKit)。"}]}]}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"數據庫工具"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們添加一個UI,用於在對象修復過程中編輯grant授權。此項更新適用於PostgreSQL、Redshift、Greenplum、MySQL、MariaDB、DB2、SQL Server以及Sybase。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們新增多套實時模板,可直接在數據庫瀏覽器上生成簡單語句。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們簡化了導航機制——現在,在SQL當中對對象進行Go to declaration (Ctrl\/Cmd+B)調用會將您轉向DDL,而非數據庫樹。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們改進了數據排序機制。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"每位計算機用戶都無比熟悉的Ctrl\/Cmd+C\/V\/X操作,現在可在IDE中實現對數據源的複製、剪切與粘貼。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"現在,您可以編輯MongoDB集合當中的數據。我們還提供語句預覽功能。"}]}]}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"Build工具"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在導入Maven項目的同時,我們也恢復了自定義設置功能。"}]}]}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"框架與技術"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"新檢查將高亮顯示http:\/\/協議的位置,並將其變更爲https:\/\/。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"HTTP客戶端附帶一些更新。您可以摺疊返回的HTML、JSON或XML,並複製其中的正文、隱藏行號、選擇顯示格式,以及快速滾動至響應內容的頂部或底部。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"如果您在https:\/\/協議當中使用SSL客戶端身份驗證,則可以在HTTP客戶端中配置SSL設置。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"在創建Spring、Micronaut、Quarkus與MicroProfile項目時,您只需兩個步驟即可開始使用。您可以在更新後的嚮導首屏中輸入所有關鍵信息,並在第二屏內爲框架設定具體配置。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"對於包含JPA實體的項目,我們還在gutter當中添加了經過重新設計的可單擊圖標。我們還改善了對Kotlin及多模塊項目的JPA支持能力。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"您可以使用JPA控制檯在Jakarta EE9項目內編寫及運行JPQL查詢。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"如果您使用我們的淺色主題,則UML圖表也將更新爲新的配色方案。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"Swagger現可支持帶有外部文件引用($ref)的規範,並在Structure視圖中爲規範文件提供更多節點。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我們添加了新的實驗工具,用於檢測Web應用程序中的DOM元素。您可以通過Tools | Generate Selenium Page Object訪問這款工具。"}]}]}]},{"type":"heading","attrs":{"align":null,"level":3},"content":[{"type":"text","text":"其他"}]},{"type":"bulletedlist","content":[{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"IntelliJ IDEA社區版正式引入對通用共享索引的支持。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"IntelliJ IDEA現可支持全部Android Studio 4.1.1更新。"}]}]},{"type":"listitem","attrs":{"listStyle":null},"content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"IntelliJ IDEA現可支持從bnd-maven-plugin導入OSGIfacet設置。"}]}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"原文鏈接:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"https:\/\/blog.jetbrains.com\/idea\/2021\/04\/intellij-idea-2021-1\/"}]}]}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章