freemarker-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ddek...@apache.org
Subject [1/2] freemarker git commit: (Improved IntelliJ IDE setup instructions)
Date Wed, 26 Sep 2018 21:44:27 GMT
Repository: freemarker
Updated Branches:
  refs/heads/2.3-gae 683a0ab06 -> c4f84789b


(Improved IntelliJ IDE setup instructions)


Project: http://git-wip-us.apache.org/repos/asf/freemarker/repo
Commit: http://git-wip-us.apache.org/repos/asf/freemarker/commit/3d2f2b22
Tree: http://git-wip-us.apache.org/repos/asf/freemarker/tree/3d2f2b22
Diff: http://git-wip-us.apache.org/repos/asf/freemarker/diff/3d2f2b22

Branch: refs/heads/2.3-gae
Commit: 3d2f2b22ae6a00724a548933b7f9d09bd73dca9b
Parents: 683a0ab
Author: ddekany <ddekany@apache.org>
Authored: Wed Sep 26 23:37:54 2018 +0200
Committer: ddekany <ddekany@apache.org>
Committed: Wed Sep 26 23:37:54 2018 +0200

----------------------------------------------------------------------
 README.md                                       | 15 +++++++--
 .../Editor-Inspections-FreeMarker.xml           | 33 ++++++++++++++++++++
 .../Java-code-style-FreeMarker.xml              | 13 ++++++++
 3 files changed, 59 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/freemarker/blob/3d2f2b22/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index 7886a0d..dab9870 100644
--- a/README.md
+++ b/README.md
@@ -248,7 +248,7 @@ Originally done on IntelliJ IDEA Community 2018.2.4:
     Project location: Wherever you have checked out the 2.3-gae branch from Git.
     Press "Finish"
 
-- Open you newly created "FreeMarker-2.3-gae" project
+- Open your newly created "FreeMarker-2.3-gae" project
 
 - "File" -> "Project Structure..."
 
@@ -290,4 +290,15 @@ Originally done on IntelliJ IDEA Community 2018.2.4:
     FreeMarkerJspFactory2.java,  
     Java8*.java  
 
-- "Build" -> "Build project" should now succeed.
+- You may do "Build" / "Build project" (Ctrl+F9) to see if everything compiles now.
+    
+- "File" -> "Settings"
+  - Under "Editor" / "Code style", import and use
+    freemarker/src/ide-settings/IntelliJ-IDEA/Java-code-style-FreeMarker.xml
+  - Under "Editor" / "Inspections", import and use
+    freemarker/src/ide-settings/IntelliJ-IDEA/Editor-Inspections-FreeMarker.xml
+  - Copy the copyright header comment from some of the java files, then
+    under "Editor" / "Copyright" / "Copyright Profiles" click "+", enter "ASL2" as name,
+    then paste the copyright header. Delete the `/*` and ` */` lines, and the ` *`
+    prefixes (to select columns of text, hold Alt while selecting with the mouse.) Then
+    go back to "Copyright" in the tree, and set "Default project copyright" to "ASL2".

http://git-wip-us.apache.org/repos/asf/freemarker/blob/3d2f2b22/src/ide-settings/IntelliJ-IDEA/Editor-Inspections-FreeMarker.xml
----------------------------------------------------------------------
diff --git a/src/ide-settings/IntelliJ-IDEA/Editor-Inspections-FreeMarker.xml b/src/ide-settings/IntelliJ-IDEA/Editor-Inspections-FreeMarker.xml
new file mode 100644
index 0000000..4b40e57
--- /dev/null
+++ b/src/ide-settings/IntelliJ-IDEA/Editor-Inspections-FreeMarker.xml
@@ -0,0 +1,33 @@
+<!--
+  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.
+-->
+<component name="InspectionProjectProfileManager">
+  <profile version="1.0">
+    <option name="myName" value="FreeMarker" />
+    <inspection_tool class="LoggerInitializedWithForeignClass" enabled="false" level="WARNING"
enabled_by_default="false">
+      <option name="loggerClassName" value="org.apache.log4j.Logger,org.slf4j.LoggerFactory,org.apache.commons.logging.LogFactory,java.util.logging.Logger"
/>
+      <option name="loggerFactoryMethodName" value="getLogger,getLogger,getLog,getLogger"
/>
+    </inspection_tool>
+    <inspection_tool class="MissingOverrideAnnotation" enabled="true" level="WARNING"
enabled_by_default="true">
+      <option name="ignoreObjectMethods" value="true" />
+      <option name="ignoreAnonymousClassMethods" value="false" />
+    </inspection_tool>
+    <inspection_tool class="RawTypeCanBeGeneric" enabled="true" level="WARNING" enabled_by_default="true"
/>
+    <inspection_tool class="RawUseOfParameterizedType" enabled="true" level="WARNING"
enabled_by_default="true" />
+  </profile>
+</component>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/freemarker/blob/3d2f2b22/src/ide-settings/IntelliJ-IDEA/Java-code-style-FreeMarker.xml
----------------------------------------------------------------------
diff --git a/src/ide-settings/IntelliJ-IDEA/Java-code-style-FreeMarker.xml b/src/ide-settings/IntelliJ-IDEA/Java-code-style-FreeMarker.xml
index c4bbf97..983f742 100644
--- a/src/ide-settings/IntelliJ-IDEA/Java-code-style-FreeMarker.xml
+++ b/src/ide-settings/IntelliJ-IDEA/Java-code-style-FreeMarker.xml
@@ -45,9 +45,22 @@
   <option name="JD_PARAM_DESCRIPTION_ON_NEW_LINE" value="true" />
   <option name="WRAP_COMMENTS" value="true" />
   <JavaCodeStyleSettings>
+    <option name="ANNOTATION_PARAMETER_WRAP" value="1" />
     <option name="CLASS_NAMES_IN_JAVADOC" value="3" />
   </JavaCodeStyleSettings>
   <codeStyleSettings language="JAVA">
     <option name="RIGHT_MARGIN" value="120" />
+    <option name="CALL_PARAMETERS_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="BINARY_OPERATION_WRAP" value="1" />
+    <option name="TERNARY_OPERATION_WRAP" value="1" />
+    <option name="TERNARY_OPERATION_SIGNS_ON_NEXT_LINE" value="true" />
+    <option name="ARRAY_INITIALIZER_WRAP" value="1" />
+    <option name="ASSIGNMENT_WRAP" value="1" />
+    <option name="WRAP_LONG_LINES" value="true" />
+    <option name="PARAMETER_ANNOTATION_WRAP" value="1" />
+    <option name="VARIABLE_ANNOTATION_WRAP" value="1" />
   </codeStyleSettings>
 </code_scheme>
\ No newline at end of file


Mime
View raw message