You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by pa...@apache.org on 2023/01/28 09:26:15 UTC

[shardingsphere] branch master updated: Refactor default idea code width (#23779)

This is an automated email from the ASF dual-hosted git repository.

panjuan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shardingsphere.git


The following commit(s) were added to refs/heads/master by this push:
     new 0af3a99fcd2 Refactor default idea code width (#23779)
0af3a99fcd2 is described below

commit 0af3a99fcd235eeb30646750c741e031bf93c645
Author: 孙念君 Nianjun Sun <su...@apache.org>
AuthorDate: Sat Jan 28 17:26:01 2023 +0800

    Refactor default idea code width (#23779)
---
 docs/document/content/test-manual/integration-test/_index.cn.md | 2 +-
 docs/document/content/test-manual/integration-test/_index.en.md | 2 +-
 src/resources/code-style-idea.xml                               | 3 ++-
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/docs/document/content/test-manual/integration-test/_index.cn.md b/docs/document/content/test-manual/integration-test/_index.cn.md
index 7b2218210f7..5972c265b85 100644
--- a/docs/document/content/test-manual/integration-test/_index.cn.md
+++ b/docs/document/content/test-manual/integration-test/_index.cn.md
@@ -186,7 +186,7 @@ IDEA -> Run -> Edit Configurations -> Add New Configuration -> Remote JVM Debug
 > 注意:如果通过 Testcontainer 启动 Proxy 容器,由于 Testcontainer 启动前 3308 端口还没有暴露出来,无法通过 `远程调试通过镜像启动的 Proxy` 方式进行 debug。
 可以通过如下方式 debug Testcontainer 启动的 Proxy 容器:
   - 在 Testcontainer 的相关启动类后打一个断点,例如 suite 测试中 BaseE2EIT#setUp() -> `containerComposer.start();` 后面的一行打断点,此时相关容器一定已经启动。
-  - 通过快捷键 Alt + F8,进入断点调试模式,查看 containerComposer 下的 Proxy 对象 3308 映射的端口(Testcontainer 对外映射端口是随机的)。例如本次通过该表达式:`((ShardingSphereProxyClusterContainer)((java.util.LinkedList)((ITContainers)((ClusterContainerComposer)containerComposer).containers).dockerContainers).getLast()).getMappedPort(3308)` 获取到映射的对外随机端口为 51837
+  - 通过快捷键 Alt + F8,进入断点调试模式,查看 containerComposer 下的 Proxy 对象 3308 映射的端口(Testcontainer 对外映射端口是随机的)。例如本次通过该表达式:`((ShardingSphereProxyClusterContainer)((java.util.LinkedList)((ITContainers)((ClusterContainerComposer)containerComposer).containers).dockerContainers).getLast()).getMappedPort(3308)` 获取到映射的对外随机端口为 51837。(或者通过命令 `docker ps` 查看)
   - 参考 `远程调试通过镜像启动的 Proxy` 中的方式,Port 设置为上一步中获取到的端口。
 
 编辑好上面的信息后,在 IDEA 中 Run -> Run -> e2e-debug 即可启动 IDEA 的远程 debug。
diff --git a/docs/document/content/test-manual/integration-test/_index.en.md b/docs/document/content/test-manual/integration-test/_index.en.md
index e019381440b..3029f2472cf 100644
--- a/docs/document/content/test-manual/integration-test/_index.en.md
+++ b/docs/document/content/test-manual/integration-test/_index.en.md
@@ -186,7 +186,7 @@ After editing the above information, run Run -> Run -> e2e-debug in IDEA to star
 > Note: If the Proxy container is started by Testcontainer, because the 3308 port is not exposed before Testcontainer starts, it cannot be debugged by the `Remote debug Proxy started by docker image` method.
 Debug Testcontainer started Proxy container by the following method:
   - Set a breakpoint in the relevant startup class of Testcontainer, for example, after the line `containerComposer.start();` in BaseE2EIT#setUp() in the suite test, at this time, the relevant containers must have been started.
-  - Access breakpoint debugging mode through shortcut key Alt + F8, and view the port mapped by the 3308 mapping of the Proxy object under the containerComposer (the external mapping port of Testcontainer is random). For example, the expression `((ShardingSphereProxyClusterContainer)((java.util.LinkedList)((ITContainers)((ClusterContainerComposer)containerComposer).containers).dockerContainers).getLast()).getMappedPort(3308)` get the mapped random port 51837.
+  - Access breakpoint debugging mode through shortcut key Alt + F8, and view the port mapped by the 3308 mapping of the Proxy object under the containerComposer (the external mapping port of Testcontainer is random). For example, the expression `((ShardingSphereProxyClusterContainer)((java.util.LinkedList)((ITContainers)((ClusterContainerComposer)containerComposer).containers).dockerContainers).getLast()).getMappedPort(3308)` get the mapped random port 51837.(or get mapped port by `docker ps`)
   - See the `Remote debug Proxy started by docker image` method, set the Name, Host, Port, and use the port got in previous step.
 
 After editing the above information, run Run -> Run -> e2e-debug in IDEA to start the remote debug of IDEA.
diff --git a/src/resources/code-style-idea.xml b/src/resources/code-style-idea.xml
index 6798aee2905..52fe517937f 100644
--- a/src/resources/code-style-idea.xml
+++ b/src/resources/code-style-idea.xml
@@ -16,7 +16,8 @@
   -->
 
 <code_scheme name="ShardingSphere" version="173">
-  <option name="LINE_SEPARATOR" value="&#xA;" />
+  <option name="LINE_SEPARATOR" value="&#10;" />
+  <option name="RIGHT_MARGIN" value="200" />
   <JavaCodeStyleSettings>
     <option name="GENERATE_FINAL_LOCALS" value="true" />
     <option name="GENERATE_FINAL_PARAMETERS" value="true" />