Skip to content

Commit 725dea7

Browse files
committed
Version 3.0pre3
I merged the library support and the faster caching into develop. Additionally, the complete IDEA config is now not on the repo anymore. There was too much overwritten settings in the past due to different system. The necessary config has now its own subfolder. See the README therein.
1 parent eb698db commit 725dea7

13 files changed

Lines changed: 183 additions & 12 deletions

.gitignore

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,5 @@ gradle.properties
33
build/
44
$LOG_DIR$/
55
out/
6-
7-
/.idea/compiler.xml
8-
/.idea/gradle.xml
9-
/.idea/libraries/
10-
/.idea/markdown-navigator/
11-
/.idea/modules.xml
12-
/.idea/workspace.xml
13-
/.idea/misc.xml
14-
/.idea/kotlinc.xml
15-
/.idea/dictionaries/
16-
/.idea/vcs.xml
176
*.iml
7+
/.idea/

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ task wrapper(type: Wrapper) {
7575
// Information about the plugin
7676

7777
// Plugin version number
78-
version '3.0pre2'
78+
version '3.0pre3'
7979

8080
intellij {
8181
// version = '2017.2.5'

config/README.md

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Config files for IDEA
2+
3+
After a long struggle between different systems and using Gradle in combination with IDEA's build system for plugins,
4+
I decided to leave all compilation-related files and modules for IDEA out of the repository. The folders here are
5+
configurations unrelated to compilation. It doesn't matter if you use Gradle or IDEA's built-in compilation, you
6+
can copy these folders into the .idea path, once your set-up is finished.
7+
8+
In detail, the settings in the folder will adjust the following things:
9+
10+
- `codestyle/` The code-style I'm using. Nothing spectacular and I'm not a codestyle-fanatic, but I use an default indent
11+
of 2 which is uncommon. Additionally, I adjusted some line wrapping and how code is reformatted.
12+
- `copyright/` I'm using two copyrights. The MIT license for the plugin code and files that I extracted from Mathematica
13+
get the Wolfram license.
14+
- `inspectionProfiles/` Again nothing special but I try to keep my files clean as much as possible of inspection warnings.
15+
- `scopes/` The scopes are import because they define which license is applied to which file
16+
17+
# Building the plugin
18+
19+
There are two ways: You use Gradle or you set up an IDEA Plugin project. Gradle is easier to set up but doesn't integrate
20+
as well as a real IDEA project. To use Gradle, simply import the code as "new from existing source" and check Gradle
21+
in the following dialog. You should turn on "auto-import" and make sure that Gradle uses Java 1.8. Everything else
22+
should be working out of the box. Please check the doc of the IntelliJ Gradle plugin on GitHub.
23+
24+
Setting up an IDEA Plugin project contains the following steps
25+
26+
- Clone the repo
27+
- IDEA, new project and use Plugin Project. Use a JDK 1.8.0_152 or later. I haven't tried with Java 9!
28+
- When the project is ready, close it again
29+
- copy the folders here into your .idea path
30+
- In Project Settings -> Modules, mark the folders appropriately:
31+
- `src/` is Source
32+
- `resources/` is Resources
33+
- `tests/` is Test
34+
- `testData/` is TestResources
35+
- Under Libraries, create a new Java library and select the jars from inside the `lib/` folder. Except of `usages.jar`
36+
- `usage.jar` are the bundled usage messages that are used when you want documentation for a symbol. For this, go back to
37+
Modules, Dependencies and attach a new Jar library on the little green plus sign in the top right corner. Select `usages.jar`
38+
and choose `Classes` in the following dialog. In the table where the library appears, select `Runtime` and `Export`.
39+
- Finally, go to Settings, Compiler, Kotlin and set the JVM target version to 1.8

config/codeStyles/Project.xml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<component name="ProjectCodeStyleConfiguration">
2+
<code_scheme name="Project" version="173">
3+
<option name="WRAP_COMMENTS" value="true" />
4+
<MarkdownNavigatorCodeStyleSettings>
5+
<option name="WRAP_ON_TYPING" value="1" />
6+
<option name="RIGHT_MARGIN" value="140" />
7+
</MarkdownNavigatorCodeStyleSettings>
8+
<codeStyleSettings language="JAVA">
9+
<indentOptions>
10+
<option name="INDENT_SIZE" value="2" />
11+
<option name="CONTINUATION_INDENT_SIZE" value="4" />
12+
<option name="TAB_SIZE" value="2" />
13+
</indentOptions>
14+
</codeStyleSettings>
15+
</code_scheme>
16+
</component>
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<component name="ProjectCodeStyleConfiguration">
2+
<state>
3+
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
4+
</state>
5+
</component>

config/copyright/MIT.xml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
<component name="CopyrightManager">
2+
<copyright>
3+
<option name="notice" value="Copyright (c) &amp;#36;today.year Patrick Scheibe&#10;&#10; Permission is hereby granted, free of charge, to any person obtaining a copy&#10; of this software and associated documentation files (the &quot;Software&quot;), to deal&#10; in the Software without restriction, including without limitation the rights&#10; to use, copy, modify, merge, publish, distribute, sublicense, and/or sell&#10; copies of the Software, and to permit persons to whom the Software is&#10; furnished to do so, subject to the following conditions:&#10; &#10; The above copyright notice and this permission notice shall be included in&#10; all copies or substantial portions of the Software.&#10; &#10; THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR&#10; IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,&#10; FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE&#10; AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER&#10; LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,&#10; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN&#10; THE SOFTWARE.&#10; " />
4+
</copyright>
5+
</component>

config/copyright/Wolfram.xml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<component name="CopyrightManager">
2+
<copyright>
3+
<option name="notice" value="Copyright (c) &amp;#36;today.year Wolfram Research, Inc. All rights reserved. &#10;Redistribution or use of this work in any form, with or without modification, &#10;requires written permission from the copyright holder." />
4+
<option name="myName" value="Wolfram" />
5+
</copyright>
6+
</component>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
<component name="CopyrightManager">
2+
<settings>
3+
<module2copyright>
4+
<element module="Halirutan Code" copyright="MIT" />
5+
<element module="Wolfram Code" copyright="Wolfram" />
6+
</module2copyright>
7+
</settings>
8+
</component>
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
<component name="InspectionProjectProfileManager">
2+
<profile version="1.0">
3+
<option name="myName" value="Mathematica Plugin" />
4+
<inspection_tool class="AbstractClassExtendsConcreteClass" enabled="true" level="WARNING" enabled_by_default="true" />
5+
<inspection_tool class="AbstractClassWithoutAbstractMethods" enabled="true" level="WARNING" enabled_by_default="true" />
6+
<inspection_tool class="BooleanExpressionMayBeConditional" enabled="true" level="WARNING" enabled_by_default="true" />
7+
<inspection_tool class="BooleanVariableAlwaysNegated" enabled="true" level="WARNING" enabled_by_default="true" />
8+
<inspection_tool class="BreakStatement" enabled="true" level="WARNING" enabled_by_default="true" />
9+
<inspection_tool class="BreakStatementWithLabel" enabled="true" level="WARNING" enabled_by_default="true" />
10+
<inspection_tool class="CloneCallsConstructors" enabled="true" level="WARNING" enabled_by_default="true" />
11+
<inspection_tool class="CloneInNonCloneableClass" enabled="true" level="WARNING" enabled_by_default="true" />
12+
<inspection_tool class="CloneReturnsClassType" enabled="true" level="WARNING" enabled_by_default="true" />
13+
<inspection_tool class="ConditionalExpressionWithIdenticalBranches" enabled="true" level="WARNING" enabled_by_default="true" />
14+
<inspection_tool class="ConstantValueVariableUse" enabled="true" level="WARNING" enabled_by_default="true" />
15+
<inspection_tool class="DefaultNotLastCaseInSwitch" enabled="true" level="WARNING" enabled_by_default="true" />
16+
<inspection_tool class="Destructure" enabled="true" level="INFO" enabled_by_default="true" />
17+
<inspection_tool class="DuplicateBooleanBranch" enabled="true" level="WARNING" enabled_by_default="true" />
18+
<inspection_tool class="DuplicateCondition" enabled="true" level="WARNING" enabled_by_default="true">
19+
<option name="ignoreMethodCalls" value="true" />
20+
</inspection_tool>
21+
<inspection_tool class="EnumSwitchStatementWhichMissesCases" enabled="true" level="WARNING" enabled_by_default="true">
22+
<option name="ignoreSwitchStatementsWithDefault" value="false" />
23+
</inspection_tool>
24+
<inspection_tool class="FallthruInSwitchStatement" enabled="true" level="WARNING" enabled_by_default="true" />
25+
<inspection_tool class="FieldAccessNotGuarded" enabled="true" level="WARNING" enabled_by_default="true" />
26+
<inspection_tool class="ForLoopReplaceableByWhile" enabled="true" level="WARNING" enabled_by_default="true">
27+
<option name="m_ignoreLoopsWithoutConditions" value="false" />
28+
</inspection_tool>
29+
<inspection_tool class="ForLoopWithMissingComponent" enabled="true" level="WARNING" enabled_by_default="true">
30+
<option name="ignoreCollectionLoops" value="false" />
31+
</inspection_tool>
32+
<inspection_tool class="IfMayBeConditional" enabled="true" level="WARNING" enabled_by_default="true" />
33+
<inspection_tool class="IfStatementWithIdenticalBranches" enabled="true" level="WARNING" enabled_by_default="true" />
34+
<inspection_tool class="InstanceGuardedByStatic" enabled="true" level="WARNING" enabled_by_default="true" />
35+
<inspection_tool class="JavaLangImport" enabled="true" level="WARNING" enabled_by_default="true" />
36+
<inspection_tool class="LawOfDemeter" enabled="true" level="WARNING" enabled_by_default="true">
37+
<option name="ignoreLibraryCalls" value="true" />
38+
</inspection_tool>
39+
<inspection_tool class="LoopWithImplicitTerminationCondition" enabled="true" level="WARNING" enabled_by_default="true" />
40+
<inspection_tool class="NegatedConditional" enabled="true" level="WARNING" enabled_by_default="true">
41+
<option name="m_ignoreNegatedNullComparison" value="true" />
42+
</inspection_tool>
43+
<inspection_tool class="NegatedEqualityExpression" enabled="true" level="WARNING" enabled_by_default="true" />
44+
<inspection_tool class="NegatedIfElse" enabled="true" level="WARNING" enabled_by_default="true">
45+
<option name="m_ignoreNegatedNullComparison" value="true" />
46+
<option name="m_ignoreNegatedZeroComparison" value="false" />
47+
</inspection_tool>
48+
<inspection_tool class="NegativelyNamedBooleanVariable" enabled="true" level="WARNING" enabled_by_default="true" />
49+
<inspection_tool class="NonFinalFieldInImmutable" enabled="true" level="WARNING" enabled_by_default="true" />
50+
<inspection_tool class="NonFinalGuard" enabled="true" level="WARNING" enabled_by_default="true" />
51+
<inspection_tool class="NonPublicClone" enabled="true" level="WARNING" enabled_by_default="true" />
52+
<inspection_tool class="ObsoleteCollection" enabled="true" level="WARNING" enabled_by_default="true">
53+
<option name="ignoreRequiredObsoleteCollectionTypes" value="false" />
54+
</inspection_tool>
55+
<inspection_tool class="PointlessIndexOfComparison" enabled="true" level="WARNING" enabled_by_default="true" />
56+
<inspection_tool class="PointlessNullCheck" enabled="true" level="WARNING" enabled_by_default="true" />
57+
<inspection_tool class="RedundantThrowsDeclaration" enabled="true" level="WARNING" enabled_by_default="true" />
58+
<inspection_tool class="Reformat" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
59+
<inspection_tool class="SamePackageImport" enabled="true" level="WARNING" enabled_by_default="true" />
60+
<inspection_tool class="StaticGuardedByInstance" enabled="true" level="WARNING" enabled_by_default="true" />
61+
<inspection_tool class="SwitchStatement" enabled="true" level="WARNING" enabled_by_default="true" />
62+
<inspection_tool class="SwitchStatementDensity" enabled="true" level="WARNING" enabled_by_default="true">
63+
<option name="m_limit" value="20" />
64+
</inspection_tool>
65+
<inspection_tool class="SwitchStatementWithConfusingDeclaration" enabled="true" level="WARNING" enabled_by_default="true" />
66+
<inspection_tool class="SwitchStatementWithTooFewBranches" enabled="true" level="WARNING" enabled_by_default="true">
67+
<option name="m_limit" value="2" />
68+
</inspection_tool>
69+
<inspection_tool class="SwitchStatementWithTooManyBranches" enabled="true" level="WARNING" enabled_by_default="true">
70+
<option name="m_limit" value="10" />
71+
</inspection_tool>
72+
<inspection_tool class="SwitchStatementsWithoutDefault" enabled="true" level="WARNING" enabled_by_default="true">
73+
<option name="m_ignoreFullyCoveredEnums" value="true" />
74+
</inspection_tool>
75+
<inspection_tool class="TooBroadScope" enabled="true" level="WARNING" enabled_by_default="true">
76+
<option name="m_allowConstructorAsInitializer" value="false" />
77+
<option name="m_onlyLookAtBlocks" value="false" />
78+
</inspection_tool>
79+
<inspection_tool class="UnknownGuard" enabled="true" level="WARNING" enabled_by_default="true" />
80+
<inspection_tool class="UnnecessaryDefault" enabled="true" level="WARNING" enabled_by_default="true" />
81+
<inspection_tool class="UnusedLibrary" enabled="true" level="WARNING" enabled_by_default="true" />
82+
<inspection_tool class="UseOfClone" enabled="true" level="WARNING" enabled_by_default="true" />
83+
<inspection_tool class="UseOfObsoleteDateTimeApi" enabled="true" level="WARNING" enabled_by_default="true" />
84+
</profile>
85+
</component>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<component name="InspectionProjectProfileManager">
2+
<settings>
3+
<option name="PROJECT_PROFILE" value="Mathematica Plugin" />
4+
<version value="1.0" />
5+
</settings>
6+
</component>

0 commit comments

Comments
 (0)