java - 在 Intellij Idea 中禁用 java doc 自动格式化。2019
问题描述
我希望我的 javadoc 看起来像这样:
/**
* Date 10/01/2019
*
* Given a directed graph, find all strongly connected components in this graph.
* We are going to use Kosaraju's algorithm to find strongly connected component.
*
* Algorithm
* Create a order of vertices by finish time in decreasing order.
* Reverse the graph
* Do a DFS on reverse graph by finish time of vertex and created strongly connected
* components.
*
* Runtime complexity - O(V + E)
* Space complexity - O(V)
*
* References
* https://en.wikipedia.org/wiki/Strongly_connected_component
* http://www.geeksforgeeks.org/strongly-connected-components/
*/
但不幸的是,我的 javadoc 被自动格式化为:
/**
* Given a directed acyclic graph, find all connected components in the graph. We will be using
* Kosaraju’s algorithm for finding all connected components
*
* <p>Algorithm :
*
* <p>Do DFS on the graph, mark the adjacent vertices as visited and order the visited vertex
*
* <p>Reverse the graph - transpose<>
*
* <p>Do DFS on the reversed graph, by pop- ing elements from the stack and marking them as visited
*
* <p>Complexity:
*
* <p>Runtime - O(V+E) for DFS
*
* <p>Space = O(V) for the stack and visited vertices
*
* <p>Date : 15/02/20
*
*
* <p>Referances : https://www.youtube.com/watch?v=RpgcYiky7uw
* https://www.geeksforgeeks.org/strongly-connected-components/
*/
如果我手动添加换行符并开始在下一行写入,则在代码格式期间,这两行将合并为一行。我可以在下一行写的唯一方法是添加两个换行符,所以在代码格式 ide 添加
到新线
说假设我想分裂
“在图上做DFS,将相邻顶点标记为已访问,并对已访问的顶点进行排序”
分成两行,但是一旦我重新格式化我的代码,这两行就会合并一次
我正在使用 google-java-format 进行代码格式化。
我尝试修改代码样式 - > Java - > JavaDoc 选项,但不知何故发生了变化。似乎不起作用
解决方案
推荐阅读
- json - 将一些 JSON 提取到一个变量中,现在想要从该变量中提取 JSON 到另一个变量中
- c# - 如何在数据表中分配格式化的列值
- r - Apriori / Market Basket Analysis - 对特定长度项目集的限制分析
- c++ - 派生类的模板参数推导
- java - 在 jar 文件的类中调用静态方法
- android - 如何在 Android Studio 项目蓝图视图中自由移动组件
- sequelize.js - 当在带有传入参数的sql中使用like关键字时,如何在使用sequelize和sql模板字符串时获得返回的结果?
- python - 如何从 Python 在终端上执行多个命令
- css - 拉伸模糊的图像边
- excel - 如何在 PowerShell 中选择与特定模式匹配的对象