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\/"}]}]}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章