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

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


The following commit(s) were added to refs/heads/master by this push:
     new 417ae7c62a HDDS-12365. Provide editor settings and IDEA run config in 
standard location (#7924)
417ae7c62a is described below

commit 417ae7c62aff75569c49713a33b89cab22296e79
Author: Ivan Zlenko <[email protected]>
AuthorDate: Fri Feb 21 21:09:48 2025 +0500

    HDDS-12365. Provide editor settings and IDEA run config in standard 
location (#7924)
---
 .editorconfig                                      | 77 ++++++++++++++++++++++
 .../CsiServer.xml => .run/CsiServer.run.xml        |  0
 .../Datanode1-ha.xml => .run/Datanode1-ha.run.xml  |  0
 .../Datanode1.xml => .run/Datanode1.run.xml        |  0
 .../Datanode2-ha.xml => .run/Datanode2-ha.run.xml  |  0
 .../Datanode2.xml => .run/Datanode2.run.xml        |  0
 .../Datanode3-ha.xml => .run/Datanode3-ha.run.xml  |  0
 .../Datanode3.xml => .run/Datanode3.run.xml        |  0
 .../FreonStandalone.run.xml                        |  0
 .../OzoneFsShell-ha.run.xml                        |  0
 .../OzoneFsShell.xml => .run/OzoneFsShell.run.xml  |  0
 .../OzoneManager-ha.run.xml                        |  0
 .../OzoneManager.xml => .run/OzoneManager.run.xml  |  0
 .../OzoneManagerInit-ha.run.xml                    |  0
 .../OzoneManagerInit.run.xml                       |  0
 .../OzoneShell-ha.run.xml                          |  0
 .../OzoneShell.xml => .run/OzoneShell.run.xml      |  0
 .../PrimordialSCM-ha.run.xml                       |  0
 .../PrimordialSCMInit-ha.run.xml                   |  0
 .../Recon-ha.xml => .run/Recon-ha.run.xml          |  0
 .../Recon.xml => .run/Recon.run.xml                |  0
 .../S3Gateway.xml => .run/S3Gateway.run.xml        |  0
 .../Scm2-ha.xml => .run/Scm2-ha.run.xml            |  0
 .../Scm2Bootstrap-ha.run.xml                       |  0
 .../Scm3-ha.xml => .run/Scm3-ha.run.xml            |  0
 .../Scm3Bootstrap-ha.run.xml                       |  0
 .../ScmRoles.xml => .run/ScmRoles.run.xml          |  0
 .../StorageContainerManager.run.xml                |  0
 .../StorageContainerManagerInit.run.xml            |  0
 CONTRIBUTING.md                                    | 23 +++----
 .../dev-support/intellij/install-runconfigs.sh     | 21 ------
 hadoop-ozone/dev-support/intellij/ozone-style.xml  | 71 --------------------
 32 files changed, 87 insertions(+), 105 deletions(-)

diff --git a/.editorconfig b/.editorconfig
new file mode 100644
index 0000000000..c32bec2c91
--- /dev/null
+++ b/.editorconfig
@@ -0,0 +1,77 @@
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements. See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License. You may obtain a copy of the License at
+#
+#      http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+root = true
+
+[*]
+charset = utf-8
+end_of_line = lf
+indent_size = 2
+indent_style = space
+insert_final_newline = true
+max_line_length = 120
+tab_width = 2
+ij_continuation_indent_size = 4
+ij_formatter_off_tag = @formatter:off
+ij_formatter_on_tag = @formatter:on
+ij_formatter_tags_enabled = true
+ij_smart_tabs = false
+ij_visual_guides = 
+ij_wrap_on_typing = false
+
+[*.java]
+ij_java_indent_case_from_switch = false
+ij_java_call_parameters_new_line_after_left_paren = false
+ij_java_call_parameters_right_paren_on_new_line = false
+ij_java_call_parameters_wrap = normal
+ij_java_method_parameters_new_line_after_left_paren = false
+ij_java_method_parameters_right_paren_on_new_line = false
+ij_java_method_parameters_wrap = normal
+ij_java_resource_list_new_line_after_left_paren = false
+ij_java_resource_list_right_paren_on_new_line = false
+ij_java_resource_list_wrap = normal
+ij_java_extends_list_wrap = normal
+ij_java_throws_list_wrap = normal
+ij_java_extends_keyword_wrap = normal
+ij_java_throws_keyword_wrap = normal
+ij_java_method_call_chain_wrap = normal
+ij_java_binary_operation_wrap = normal
+ij_java_ternary_operation_wrap = normal
+ij_java_for_statement_wrap = normal
+ij_java_array_initializer_wrap = normal
+ij_java_assignment_wrap = normal
+ij_java_assert_statement_wrap = normal
+ij_java_if_brace_force = always
+ij_java_do_while_brace_force = always
+ij_java_while_brace_force = always
+ij_java_for_brace_force = always
+ij_java_parameter_annotation_wrap = normal
+ij_java_variable_annotation_wrap = normal
+ij_java_enum_constants_wrap = normal
+ij_java_blank_lines_after_imports = 1
+ij_java_blank_lines_before_imports = 1
+ij_java_class_count_to_use_import_on_demand = 9999
+ij_java_packages_to_use_import_on_demand =
+ij_java_imports_layout = $*,|,*
+ij_java_layout_static_imports_separately = true
+ij_java_use_single_class_imports = true
+
+[.editorconfig]
+ij_editorconfig_align_group_field_declarations = false
+ij_editorconfig_space_after_colon = false
+ij_editorconfig_space_after_comma = true
+ij_editorconfig_space_before_colon = false
+ij_editorconfig_space_before_comma = false
+ij_editorconfig_spaces_around_assignment_operators = true
diff --git a/hadoop-ozone/dev-support/intellij/runConfigurations/CsiServer.xml 
b/.run/CsiServer.run.xml
similarity index 100%
rename from hadoop-ozone/dev-support/intellij/runConfigurations/CsiServer.xml
rename to .run/CsiServer.run.xml
diff --git 
a/hadoop-ozone/dev-support/intellij/runConfigurations/Datanode1-ha.xml 
b/.run/Datanode1-ha.run.xml
similarity index 100%
rename from hadoop-ozone/dev-support/intellij/runConfigurations/Datanode1-ha.xml
rename to .run/Datanode1-ha.run.xml
diff --git a/hadoop-ozone/dev-support/intellij/runConfigurations/Datanode1.xml 
b/.run/Datanode1.run.xml
similarity index 100%
rename from hadoop-ozone/dev-support/intellij/runConfigurations/Datanode1.xml
rename to .run/Datanode1.run.xml
diff --git 
a/hadoop-ozone/dev-support/intellij/runConfigurations/Datanode2-ha.xml 
b/.run/Datanode2-ha.run.xml
similarity index 100%
rename from hadoop-ozone/dev-support/intellij/runConfigurations/Datanode2-ha.xml
rename to .run/Datanode2-ha.run.xml
diff --git a/hadoop-ozone/dev-support/intellij/runConfigurations/Datanode2.xml 
b/.run/Datanode2.run.xml
similarity index 100%
rename from hadoop-ozone/dev-support/intellij/runConfigurations/Datanode2.xml
rename to .run/Datanode2.run.xml
diff --git 
a/hadoop-ozone/dev-support/intellij/runConfigurations/Datanode3-ha.xml 
b/.run/Datanode3-ha.run.xml
similarity index 100%
rename from hadoop-ozone/dev-support/intellij/runConfigurations/Datanode3-ha.xml
rename to .run/Datanode3-ha.run.xml
diff --git a/hadoop-ozone/dev-support/intellij/runConfigurations/Datanode3.xml 
b/.run/Datanode3.run.xml
similarity index 100%
rename from hadoop-ozone/dev-support/intellij/runConfigurations/Datanode3.xml
rename to .run/Datanode3.run.xml
diff --git 
a/hadoop-ozone/dev-support/intellij/runConfigurations/FreonStandalone.xml 
b/.run/FreonStandalone.run.xml
similarity index 100%
rename from 
hadoop-ozone/dev-support/intellij/runConfigurations/FreonStandalone.xml
rename to .run/FreonStandalone.run.xml
diff --git 
a/hadoop-ozone/dev-support/intellij/runConfigurations/OzoneFsShell-ha.xml 
b/.run/OzoneFsShell-ha.run.xml
similarity index 100%
rename from 
hadoop-ozone/dev-support/intellij/runConfigurations/OzoneFsShell-ha.xml
rename to .run/OzoneFsShell-ha.run.xml
diff --git 
a/hadoop-ozone/dev-support/intellij/runConfigurations/OzoneFsShell.xml 
b/.run/OzoneFsShell.run.xml
similarity index 100%
rename from hadoop-ozone/dev-support/intellij/runConfigurations/OzoneFsShell.xml
rename to .run/OzoneFsShell.run.xml
diff --git 
a/hadoop-ozone/dev-support/intellij/runConfigurations/OzoneManager-ha.xml 
b/.run/OzoneManager-ha.run.xml
similarity index 100%
rename from 
hadoop-ozone/dev-support/intellij/runConfigurations/OzoneManager-ha.xml
rename to .run/OzoneManager-ha.run.xml
diff --git 
a/hadoop-ozone/dev-support/intellij/runConfigurations/OzoneManager.xml 
b/.run/OzoneManager.run.xml
similarity index 100%
rename from hadoop-ozone/dev-support/intellij/runConfigurations/OzoneManager.xml
rename to .run/OzoneManager.run.xml
diff --git 
a/hadoop-ozone/dev-support/intellij/runConfigurations/OzoneManagerInit-ha.xml 
b/.run/OzoneManagerInit-ha.run.xml
similarity index 100%
rename from 
hadoop-ozone/dev-support/intellij/runConfigurations/OzoneManagerInit-ha.xml
rename to .run/OzoneManagerInit-ha.run.xml
diff --git 
a/hadoop-ozone/dev-support/intellij/runConfigurations/OzoneManagerInit.xml 
b/.run/OzoneManagerInit.run.xml
similarity index 100%
rename from 
hadoop-ozone/dev-support/intellij/runConfigurations/OzoneManagerInit.xml
rename to .run/OzoneManagerInit.run.xml
diff --git 
a/hadoop-ozone/dev-support/intellij/runConfigurations/OzoneShell-ha.xml 
b/.run/OzoneShell-ha.run.xml
similarity index 100%
rename from 
hadoop-ozone/dev-support/intellij/runConfigurations/OzoneShell-ha.xml
rename to .run/OzoneShell-ha.run.xml
diff --git a/hadoop-ozone/dev-support/intellij/runConfigurations/OzoneShell.xml 
b/.run/OzoneShell.run.xml
similarity index 100%
rename from hadoop-ozone/dev-support/intellij/runConfigurations/OzoneShell.xml
rename to .run/OzoneShell.run.xml
diff --git 
a/hadoop-ozone/dev-support/intellij/runConfigurations/PrimordialSCM-ha.xml 
b/.run/PrimordialSCM-ha.run.xml
similarity index 100%
rename from 
hadoop-ozone/dev-support/intellij/runConfigurations/PrimordialSCM-ha.xml
rename to .run/PrimordialSCM-ha.run.xml
diff --git 
a/hadoop-ozone/dev-support/intellij/runConfigurations/PrimordialSCMInit-ha.xml 
b/.run/PrimordialSCMInit-ha.run.xml
similarity index 100%
rename from 
hadoop-ozone/dev-support/intellij/runConfigurations/PrimordialSCMInit-ha.xml
rename to .run/PrimordialSCMInit-ha.run.xml
diff --git a/hadoop-ozone/dev-support/intellij/runConfigurations/Recon-ha.xml 
b/.run/Recon-ha.run.xml
similarity index 100%
rename from hadoop-ozone/dev-support/intellij/runConfigurations/Recon-ha.xml
rename to .run/Recon-ha.run.xml
diff --git a/hadoop-ozone/dev-support/intellij/runConfigurations/Recon.xml 
b/.run/Recon.run.xml
similarity index 100%
rename from hadoop-ozone/dev-support/intellij/runConfigurations/Recon.xml
rename to .run/Recon.run.xml
diff --git a/hadoop-ozone/dev-support/intellij/runConfigurations/S3Gateway.xml 
b/.run/S3Gateway.run.xml
similarity index 100%
rename from hadoop-ozone/dev-support/intellij/runConfigurations/S3Gateway.xml
rename to .run/S3Gateway.run.xml
diff --git a/hadoop-ozone/dev-support/intellij/runConfigurations/Scm2-ha.xml 
b/.run/Scm2-ha.run.xml
similarity index 100%
rename from hadoop-ozone/dev-support/intellij/runConfigurations/Scm2-ha.xml
rename to .run/Scm2-ha.run.xml
diff --git 
a/hadoop-ozone/dev-support/intellij/runConfigurations/Scm2Bootstrap-ha.xml 
b/.run/Scm2Bootstrap-ha.run.xml
similarity index 100%
rename from 
hadoop-ozone/dev-support/intellij/runConfigurations/Scm2Bootstrap-ha.xml
rename to .run/Scm2Bootstrap-ha.run.xml
diff --git a/hadoop-ozone/dev-support/intellij/runConfigurations/Scm3-ha.xml 
b/.run/Scm3-ha.run.xml
similarity index 100%
rename from hadoop-ozone/dev-support/intellij/runConfigurations/Scm3-ha.xml
rename to .run/Scm3-ha.run.xml
diff --git 
a/hadoop-ozone/dev-support/intellij/runConfigurations/Scm3Bootstrap-ha.xml 
b/.run/Scm3Bootstrap-ha.run.xml
similarity index 100%
rename from 
hadoop-ozone/dev-support/intellij/runConfigurations/Scm3Bootstrap-ha.xml
rename to .run/Scm3Bootstrap-ha.run.xml
diff --git a/hadoop-ozone/dev-support/intellij/runConfigurations/ScmRoles.xml 
b/.run/ScmRoles.run.xml
similarity index 100%
rename from hadoop-ozone/dev-support/intellij/runConfigurations/ScmRoles.xml
rename to .run/ScmRoles.run.xml
diff --git 
a/hadoop-ozone/dev-support/intellij/runConfigurations/StorageContainerManager.xml
 b/.run/StorageContainerManager.run.xml
similarity index 100%
rename from 
hadoop-ozone/dev-support/intellij/runConfigurations/StorageContainerManager.xml
rename to .run/StorageContainerManager.run.xml
diff --git 
a/hadoop-ozone/dev-support/intellij/runConfigurations/StorageContainerManagerInit.xml
 b/.run/StorageContainerManagerInit.run.xml
similarity index 100%
rename from 
hadoop-ozone/dev-support/intellij/runConfigurations/StorageContainerManagerInit.xml
rename to .run/StorageContainerManagerInit.run.xml
diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 8a1eeda8cf..dcd525d09d 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -125,13 +125,9 @@ Basic code conventions followed by Ozone:
 
 These are checked by tools like Checkstyle and RAT.
 
-For IntelliJ users, it is recommended to import and select the Code Style 
scheme located at:
+Ozone code style is shared via `.editorconfig` configuration file and will be 
automatically imported when the project is opened.
 
-```
-./hadoop-ozone/dev-support/intellij/ozone-style.xml
-```
-
-See 
https://www.jetbrains.com/help/idea/configuring-code-style.html#import-code-style
 for detailed instructions.
+See 
https://www.jetbrains.com/help/idea/configure-project-settings.html#share-project-through-vcs
 for detailed instructions.
 
 ### Check your contribution
 
@@ -166,16 +162,17 @@ As Ozone uses Apache Maven it can be developed from any 
IDE.  IntelliJ IDEA is a
 
 ### Run Ozone from IntelliJ
 
-Ozone components depends on maven classpath. We generate classpath descriptor 
from the maven pom.xml files to use exactly the same classpath at runtime.
+Ozone components depend on maven classpath. We generate classpath descriptor 
from the maven pom.xml files to use exactly the same classpath at runtime.
 
-As a result, it's easy to start _all_ the components from IDE as the right 
classpath (without provided scope) has already been set.
+As a result, it's straightforward to start _all_ the components from IDE as 
the right classpath (without provided scope) has already been set.
 
-To start Ozone from IntelliJ:
+Ozone project has pre-defined run configurations shared via standard IDE 
folder for run configurations:
+
+```
+.run
+```
 
-1. Stop your IDE
-2. Execute the `./hadoop-ozone/dev-support/intellij/install-runconfigs.sh` 
helper script.
-3. Start the IDE
-4. New runner definitions are available from the Run menu.
+They will be automatically added to the IDE on project import.
 
 You can use the installed Run configurations in the following order:
 
diff --git a/hadoop-ozone/dev-support/intellij/install-runconfigs.sh 
b/hadoop-ozone/dev-support/intellij/install-runconfigs.sh
deleted file mode 100755
index fc877bdde6..0000000000
--- a/hadoop-ozone/dev-support/intellij/install-runconfigs.sh
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env bash
-# Licensed to the Apache Software Foundation (ASF) under one or more
-# contributor license agreements.  See the NOTICE file distributed with
-# this work for additional information regarding copyright ownership.
-# The ASF licenses this file to You under the Apache License, Version 2.0
-# (the "License"); you may not use this file except in compliance with
-# the License.  You may obtain a copy of the License at
-#
-#     http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing, software
-# distributed under the License is distributed on an "AS IS" BASIS,
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-# See the License for the specific language governing permissions and
-# limitations under the License.
-SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
-SRC_DIR="$SCRIPT_DIR/runConfigurations"
-DEST_DIR="$SCRIPT_DIR/../../../.idea/runConfigurations/"
-mkdir -p "$DEST_DIR"
-#shellcheck disable=SC2010
-ls -1 "$SRC_DIR" | grep -v ozone-site.xml | xargs -n1 -I FILE cp 
"$SRC_DIR/FILE" "$DEST_DIR"
diff --git a/hadoop-ozone/dev-support/intellij/ozone-style.xml 
b/hadoop-ozone/dev-support/intellij/ozone-style.xml
deleted file mode 100644
index fa69abd2de..0000000000
--- a/hadoop-ozone/dev-support/intellij/ozone-style.xml
+++ /dev/null
@@ -1,71 +0,0 @@
-<!--
-  Licensed under the Apache License, Version 2.0 (the "License");
-  you may not use this file except in compliance with the License.
-  You may obtain a copy of the License at
-
-    http://www.apache.org/licenses/LICENSE-2.0
-
-  Unless required by applicable law or agreed to in writing, software
-  distributed under the License is distributed on an "AS IS" BASIS,
-  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-  See the License for the specific language governing permissions and
-  limitations under the License. See accompanying LICENSE file.
--->
-<code_scheme name="ozonestyle" version="173">
-  <JavaCodeStyleSettings>
-    <option name="CLASS_COUNT_TO_USE_IMPORT_ON_DEMAND" value="9999" />
-    <option name="NAMES_COUNT_TO_USE_IMPORT_ON_DEMAND" value="9999" />
-    <option name="PACKAGES_TO_USE_IMPORT_ON_DEMAND">
-      <value />
-    </option>
-    <option name="IMPORT_LAYOUT_TABLE">
-      <value>
-        <package name="" withSubpackages="true" static="true" />
-        <emptyLine />
-        <package name="" withSubpackages="true" static="false" />
-      </value>
-    </option>
-  </JavaCodeStyleSettings>
-  <codeStyleSettings language="Cookie">
-    <indentOptions>
-      <option name="USE_TAB_CHARACTER" value="false" />
-    </indentOptions>
-  </codeStyleSettings>
-  <codeStyleSettings language="JAVA">
-    <option name="RIGHT_MARGIN" value="120" />
-    <option name="INDENT_CASE_FROM_SWITCH" value="false" />
-    <option name="CALL_PARAMETERS_WRAP" value="1" />
-    <option name="METHOD_PARAMETERS_WRAP" value="1" />
-    <option name="RESOURCE_LIST_WRAP" value="1" />
-    <option name="EXTENDS_LIST_WRAP" value="1" />
-    <option name="THROWS_LIST_WRAP" value="1" />
-    <option name="EXTENDS_KEYWORD_WRAP" value="1" />
-    <option name="THROWS_KEYWORD_WRAP" value="1" />
-    <option name="METHOD_CALL_CHAIN_WRAP" value="1" />
-    <option name="BINARY_OPERATION_WRAP" value="1" />
-    <option name="TERNARY_OPERATION_WRAP" value="1" />
-    <option name="FOR_STATEMENT_WRAP" value="1" />
-    <option name="ARRAY_INITIALIZER_WRAP" value="1" />
-    <option name="ASSIGNMENT_WRAP" value="1" />
-    <option name="ASSERT_STATEMENT_WRAP" value="1" />
-    <option name="IF_BRACE_FORCE" value="3" />
-    <option name="DOWHILE_BRACE_FORCE" value="3" />
-    <option name="WHILE_BRACE_FORCE" value="3" />
-    <option name="FOR_BRACE_FORCE" value="3" />
-    <option name="PARAMETER_ANNOTATION_WRAP" value="1" />
-    <option name="VARIABLE_ANNOTATION_WRAP" value="1" />
-    <option name="ENUM_CONSTANTS_WRAP" value="1" />
-    <indentOptions>
-      <option name="INDENT_SIZE" value="2" />
-      <option name="CONTINUATION_INDENT_SIZE" value="4" />
-      <option name="TAB_SIZE" value="2" />
-    </indentOptions>
-  </codeStyleSettings>
-  <codeStyleSettings language="XML">
-    <indentOptions>
-      <option name="INDENT_SIZE" value="2" />
-      <option name="CONTINUATION_INDENT_SIZE" value="4" />
-      <option name="TAB_SIZE" value="2" />
-    </indentOptions>
-  </codeStyleSettings>
-</code_scheme>
\ No newline at end of file


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to