Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f8aeb13980 | |||
| fd23d0b19c | |||
| 438d7f03a8 | |||
| ca49a5a8d5 | |||
| 6d52f12b68 | |||
| e0e7327b15 | |||
| d47039d7b9 | |||
| 82b9694552 |
|
|
@ -1,7 +1,6 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="CompilerConfiguration">
|
<component name="CompilerConfiguration">
|
||||||
<option name="BUILD_PROCESS_HEAP_SIZE" value="2048" />
|
<bytecodeTargetLevel target="1.8" />
|
||||||
<bytecodeTargetLevel target="17" />
|
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
102
.idea/icon.svg
102
.idea/icon.svg
|
|
@ -1,102 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<svg
|
|
||||||
xmlns:dc="http://purl.org/dc/elements/1.1/"
|
|
||||||
xmlns:cc="http://creativecommons.org/ns#"
|
|
||||||
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
||||||
width="40"
|
|
||||||
height="40"
|
|
||||||
version="1.1"
|
|
||||||
id="svg929"
|
|
||||||
sodipodi:docname="pluginIcon_dark.svg"
|
|
||||||
inkscape:version="1.0.1 (3bc2e813f5, 2020-09-07)">
|
|
||||||
<metadata
|
|
||||||
id="metadata933">
|
|
||||||
<rdf:RDF>
|
|
||||||
<cc:Work
|
|
||||||
rdf:about="">
|
|
||||||
<dc:format>image/svg+xml</dc:format>
|
|
||||||
<dc:type
|
|
||||||
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
|
|
||||||
<dc:title></dc:title>
|
|
||||||
</cc:Work>
|
|
||||||
</rdf:RDF>
|
|
||||||
</metadata>
|
|
||||||
<sodipodi:namedview
|
|
||||||
pagecolor="#ffffff"
|
|
||||||
bordercolor="#666666"
|
|
||||||
borderopacity="1"
|
|
||||||
objecttolerance="10"
|
|
||||||
gridtolerance="10"
|
|
||||||
guidetolerance="10"
|
|
||||||
inkscape:pageopacity="0"
|
|
||||||
inkscape:pageshadow="2"
|
|
||||||
inkscape:window-width="1920"
|
|
||||||
inkscape:window-height="1007"
|
|
||||||
id="namedview931"
|
|
||||||
showgrid="false"
|
|
||||||
inkscape:zoom="17.706014"
|
|
||||||
inkscape:cx="31.770979"
|
|
||||||
inkscape:cy="17.766763"
|
|
||||||
inkscape:window-x="0"
|
|
||||||
inkscape:window-y="0"
|
|
||||||
inkscape:window-maximized="1"
|
|
||||||
inkscape:current-layer="svg929"
|
|
||||||
inkscape:pagecheckerboard="false" />
|
|
||||||
<defs>
|
|
||||||
<inkscape:path-effect
|
|
||||||
effect="powermask"
|
|
||||||
id="path-effect1102"
|
|
||||||
is_visible="true"
|
|
||||||
lpeversion="1"
|
|
||||||
uri="#mask-powermask-path-effect1102"
|
|
||||||
invert="false"
|
|
||||||
hide_mask="false"
|
|
||||||
background="true"
|
|
||||||
background_color="#ffffffff" />
|
|
||||||
<mask
|
|
||||||
maskUnits="userSpaceOnUse"
|
|
||||||
id="mask-powermask-path-effect1102">
|
|
||||||
<path
|
|
||||||
id="mask-powermask-path-effect1102_box"
|
|
||||||
style="fill:#ffffff;fill-opacity:1"
|
|
||||||
d="M 7,3 H 33 V 37 H 7 Z" />
|
|
||||||
<path
|
|
||||||
id="path1100"
|
|
||||||
style="opacity:1;fill:#aaaaaa;fill-opacity:1;stroke:#00a700;stroke-width:0;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
|
|
||||||
d="M 26.009922,4.0000005 32,10 H 27.763434 C 26.786492,10 26,9.2135087 26,8.2365661 Z"
|
|
||||||
sodipodi:nodetypes="ccscc" />
|
|
||||||
</mask>
|
|
||||||
<filter
|
|
||||||
id="mask-powermask-path-effect1102_inverse"
|
|
||||||
inkscape:label="filtermask-powermask-path-effect1102"
|
|
||||||
style="color-interpolation-filters:sRGB"
|
|
||||||
height="100"
|
|
||||||
width="100"
|
|
||||||
x="-50"
|
|
||||||
y="-50">
|
|
||||||
<feColorMatrix
|
|
||||||
id="mask-powermask-path-effect1102_primitive1"
|
|
||||||
values="1"
|
|
||||||
type="saturate"
|
|
||||||
result="fbSourceGraphic" />
|
|
||||||
<feColorMatrix
|
|
||||||
id="mask-powermask-path-effect1102_primitive2"
|
|
||||||
values="-1 0 0 0 1 0 -1 0 0 1 0 0 -1 0 1 0 0 0 1 0 "
|
|
||||||
in="fbSourceGraphic" />
|
|
||||||
</filter>
|
|
||||||
</defs>
|
|
||||||
<path
|
|
||||||
id="rect927"
|
|
||||||
mask="url(#mask-powermask-path-effect1102)"
|
|
||||||
style="fill:#b9d6f2;fill-opacity:1"
|
|
||||||
d="M 9.6210938 4 C 8.7230661 4 8 4.7230663 8 5.6210938 L 8 34.378906 C 8 35.276933 8.7230661 36 9.6210938 36 L 30.378906 36 C 31.276933 36 32 35.276933 32 34.378906 L 32 10 L 26.009766 4 L 9.6210938 4 z M 19.214844 12.783203 L 20.785156 12.783203 L 20.785156 27.216797 L 19.214844 27.216797 L 19.214844 12.783203 z M 16.373047 13.414062 L 16.373047 15.027344 C 15.991713 15.037124 15.68778 15.105313 15.462891 15.232422 C 15.238001 15.359533 15.126953 15.628395 15.126953 16.039062 L 15.126953 18.181641 C 15.126953 19.07142 14.567794 19.599402 13.453125 19.765625 L 13.453125 19.853516 C 14.567794 20.019738 15.126953 20.54772 15.126953 21.4375 L 15.126953 23.578125 C 15.126953 23.988793 15.238001 24.257654 15.462891 24.384766 C 15.68778 24.511877 15.991713 24.580066 16.373047 24.589844 L 16.373047 26.203125 C 15.541934 26.203125 14.897057 26.134936 14.4375 25.998047 C 13.987721 25.861158 13.674047 25.64685 13.498047 25.353516 C 13.322046 25.060182 13.234375 24.678319 13.234375 24.208984 L 13.234375 21.951172 C 13.234375 21.491615 13.078514 21.164306 12.765625 20.96875 C 12.452735 20.773194 11.996836 20.673828 11.400391 20.673828 L 11.400391 18.958984 C 11.996836 18.958984 12.452735 18.861572 12.765625 18.666016 C 13.078514 18.47046 13.234375 18.14315 13.234375 17.683594 L 13.234375 15.410156 C 13.234375 14.940822 13.322046 14.558959 13.498047 14.265625 C 13.674047 13.972291 13.987721 13.75603 14.4375 13.619141 C 14.897057 13.482251 15.541934 13.414062 16.373047 13.414062 z M 23.626953 13.414062 C 24.467844 13.414062 25.112721 13.482251 25.5625 13.619141 C 26.012279 13.75603 26.325953 13.972291 26.501953 14.265625 C 26.677954 14.558959 26.765625 14.940822 26.765625 15.410156 L 26.765625 17.683594 C 26.765625 18.14315 26.921486 18.47046 27.234375 18.666016 C 27.547265 18.861572 28.003164 18.958984 28.599609 18.958984 L 28.599609 20.673828 C 28.003164 20.673828 27.547265 20.773194 27.234375 20.96875 C 26.921486 21.164306 26.765625 21.491615 26.765625 21.951172 L 26.765625 24.208984 C 26.765625 24.678319 26.677954 25.060182 26.501953 25.353516 C 26.325953 25.64685 26.012279 25.861158 25.5625 25.998047 C 25.112721 26.134936 24.467844 26.203125 23.626953 26.203125 L 23.626953 24.589844 C 24.008287 24.580064 24.31222 24.511875 24.537109 24.384766 C 24.761999 24.257654 24.873047 23.988793 24.873047 23.578125 L 24.873047 21.4375 C 24.873047 20.54772 25.432206 20.019738 26.546875 19.853516 L 26.546875 19.765625 C 25.432206 19.599402 24.873047 19.07142 24.873047 18.181641 L 24.873047 16.039062 C 24.873047 15.628395 24.761999 15.359533 24.537109 15.232422 C 24.31222 15.105311 24.008287 15.037122 23.626953 15.027344 L 23.626953 13.414062 z " />
|
|
||||||
<g
|
|
||||||
aria-label="{|}"
|
|
||||||
id="text980"
|
|
||||||
style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:14.6667px;line-height:1.25;font-family:'Noto Sans';-inkscape-font-specification:'Noto Sans Bold';letter-spacing:-1px;fill:#000000;fill-opacity:1;stroke:none"
|
|
||||||
transform="translate(-2.15e-5,1.6039835)" />
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 5.9 KiB |
|
|
@ -1,6 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
|
||||||
<project version="4">
|
|
||||||
<component name="KotlinJpsPluginSettings">
|
|
||||||
<option name="version" value="1.9.21" />
|
|
||||||
</component>
|
|
||||||
</project>
|
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
<component name="FrameworkDetectionExcludesConfiguration">
|
<component name="FrameworkDetectionExcludesConfiguration">
|
||||||
<file type="web" url="file://$PROJECT_DIR$" />
|
<file type="web" url="file://$PROJECT_DIR$" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="openjdk-19" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_14" default="true" project-jdk-name="openjdk-14" project-jdk-type="JavaSDK">
|
||||||
<output url="file://$PROJECT_DIR$/out" />
|
<output url="file://$PROJECT_DIR$/out" />
|
||||||
</component>
|
</component>
|
||||||
</project>
|
</project>
|
||||||
8
.idea/modules.xml
Normal file
8
.idea/modules.xml
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/filename_template-merge.iml" filepath="$PROJECT_DIR$/.idea/filename_template-merge.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
|
|
@ -1,46 +1,28 @@
|
||||||
import org.jetbrains.kotlin.gradle.tasks.KotlinCompile
|
|
||||||
|
|
||||||
fun properties(key: String) = project.findProperty(key).toString()
|
|
||||||
|
|
||||||
plugins {
|
plugins {
|
||||||
id("org.jetbrains.intellij") version "1.17.3"
|
id("org.jetbrains.intellij") version "0.6.5"
|
||||||
id("org.jetbrains.kotlin.jvm") version "1.9.21"
|
kotlin("jvm") version "1.4.10"
|
||||||
}
|
}
|
||||||
|
|
||||||
group = properties("pluginGroup")
|
val pluginVersion: String by project
|
||||||
version = properties("pluginVersion")
|
val platformVersion: String by project
|
||||||
|
|
||||||
|
group = "de.idetools"
|
||||||
|
version = pluginVersion
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
mavenCentral()
|
mavenCentral()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation(kotlin("stdlib"))
|
||||||
|
}
|
||||||
|
|
||||||
// See https://github.com/JetBrains/gradle-intellij-plugin/
|
// See https://github.com/JetBrains/gradle-intellij-plugin/
|
||||||
intellij {
|
intellij {
|
||||||
pluginName.set(properties("pluginName"))
|
version = platformVersion
|
||||||
version.set(properties("platformVersion"))
|
|
||||||
}
|
}
|
||||||
|
tasks.getByName<org.jetbrains.intellij.tasks.PatchPluginXmlTask>("patchPluginXml") {
|
||||||
tasks {
|
changeNotes("""
|
||||||
// Set the JVM compatibility versions
|
|
||||||
properties("javaVersion").let {
|
|
||||||
withType<JavaCompile> {
|
|
||||||
sourceCompatibility = it
|
|
||||||
targetCompatibility = it
|
|
||||||
}
|
|
||||||
withType<KotlinCompile> {
|
|
||||||
kotlinOptions {
|
|
||||||
jvmTarget = it
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
wrapper {
|
|
||||||
gradleVersion = properties("gradleVersion")
|
|
||||||
}
|
|
||||||
|
|
||||||
patchPluginXml {
|
|
||||||
changeNotes.set(
|
|
||||||
"""
|
|
||||||
<h3>[1.2]</h3>
|
<h3>[1.2]</h3>
|
||||||
|
|
||||||
<ul>
|
<ul>
|
||||||
|
|
@ -61,11 +43,11 @@ tasks {
|
||||||
<ul>
|
<ul>
|
||||||
<li>Initial release</li>
|
<li>Initial release</li>
|
||||||
</ul>
|
</ul>
|
||||||
"""
|
""")
|
||||||
)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
publishPlugin {
|
tasks.withType<org.jetbrains.kotlin.gradle.tasks.KotlinCompile> {
|
||||||
token.set(System.getenv("PUBLISH_TOKEN"))
|
kotlinOptions {
|
||||||
|
jvmTarget = "1.8"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,18 +1,4 @@
|
||||||
# suppress inspection "UnusedProperty"
|
|
||||||
kotlin.code.style=official
|
kotlin.code.style=official
|
||||||
|
|
||||||
pluginGroup = de.idetools
|
pluginVersion = 1.2.0-193
|
||||||
pluginName = filename_template
|
platformVersion = 2019.3
|
||||||
pluginVersion = 1.2.0-241
|
|
||||||
platformVersion = 2024.1
|
|
||||||
|
|
||||||
# Java language level used to compile sources and to generate the files for - Java 11 is required since 2020.3
|
|
||||||
javaVersion = 17
|
|
||||||
org.gradle.jvmargs=-Xmx2048m
|
|
||||||
|
|
||||||
gradleVersion = 8.2.1
|
|
||||||
|
|
||||||
# Opt-out flag for bundling Kotlin standard library.
|
|
||||||
# See https://plugins.jetbrains.com/docs/intellij/kotlin.html#kotlin-standard-library for details.
|
|
||||||
# suppress inspection "UnusedProperty"
|
|
||||||
kotlin.stdlib.default.dependency = false
|
|
||||||
|
|
|
||||||
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
4
gradle/wrapper/gradle-wrapper.properties
vendored
4
gradle/wrapper/gradle-wrapper.properties
vendored
|
|
@ -1,7 +1,5 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-6.7-bin.zip
|
||||||
networkTimeout=10000
|
|
||||||
validateDistributionUrl=true
|
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|
|
||||||
257
gradlew
vendored
257
gradlew
vendored
|
|
@ -1,7 +1,7 @@
|
||||||
#!/bin/sh
|
#!/usr/bin/env sh
|
||||||
|
|
||||||
#
|
#
|
||||||
# Copyright © 2015-2021 the original authors.
|
# Copyright 2015 the original author or authors.
|
||||||
#
|
#
|
||||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
# you may not use this file except in compliance with the License.
|
# you may not use this file except in compliance with the License.
|
||||||
|
|
@ -17,101 +17,67 @@
|
||||||
#
|
#
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
##
|
||||||
# Gradle start up script for POSIX generated by Gradle.
|
## Gradle start up script for UN*X
|
||||||
#
|
##
|
||||||
# Important for running:
|
|
||||||
#
|
|
||||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
|
||||||
# noncompliant, but you have some other compliant shell such as ksh or
|
|
||||||
# bash, then to run this script, type that shell name before the whole
|
|
||||||
# command line, like:
|
|
||||||
#
|
|
||||||
# ksh Gradle
|
|
||||||
#
|
|
||||||
# Busybox and similar reduced shells will NOT work, because this script
|
|
||||||
# requires all of these POSIX shell features:
|
|
||||||
# * functions;
|
|
||||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
|
||||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
|
||||||
# * compound commands having a testable exit status, especially «case»;
|
|
||||||
# * various built-in commands including «command», «set», and «ulimit».
|
|
||||||
#
|
|
||||||
# Important for patching:
|
|
||||||
#
|
|
||||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
|
||||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
|
||||||
#
|
|
||||||
# The "traditional" practice of packing multiple parameters into a
|
|
||||||
# space-separated string is a well documented source of bugs and security
|
|
||||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
|
||||||
# options in "$@", and eventually passing that to Java.
|
|
||||||
#
|
|
||||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
|
||||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
|
||||||
# see the in-line comments for details.
|
|
||||||
#
|
|
||||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
|
||||||
# Darwin, MinGW, and NonStop.
|
|
||||||
#
|
|
||||||
# (3) This script is generated from the Groovy template
|
|
||||||
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
|
||||||
# within the Gradle project.
|
|
||||||
#
|
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
|
||||||
#
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
|
|
||||||
# Attempt to set APP_HOME
|
# Attempt to set APP_HOME
|
||||||
|
|
||||||
# Resolve links: $0 may be a link
|
# Resolve links: $0 may be a link
|
||||||
app_path=$0
|
PRG="$0"
|
||||||
|
# Need this for relative symlinks.
|
||||||
# Need this for daisy-chained symlinks.
|
while [ -h "$PRG" ] ; do
|
||||||
while
|
ls=`ls -ld "$PRG"`
|
||||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
link=`expr "$ls" : '.*-> \(.*\)$'`
|
||||||
[ -h "$app_path" ]
|
if expr "$link" : '/.*' > /dev/null; then
|
||||||
do
|
PRG="$link"
|
||||||
ls=$( ls -ld "$app_path" )
|
else
|
||||||
link=${ls#*' -> '}
|
PRG=`dirname "$PRG"`"/$link"
|
||||||
case $link in #(
|
fi
|
||||||
/*) app_path=$link ;; #(
|
|
||||||
*) app_path=$APP_HOME$link ;;
|
|
||||||
esac
|
|
||||||
done
|
done
|
||||||
|
SAVED="`pwd`"
|
||||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
cd "`dirname \"$PRG\"`/" >/dev/null
|
||||||
|
APP_HOME="`pwd -P`"
|
||||||
|
cd "$SAVED" >/dev/null
|
||||||
|
|
||||||
APP_NAME="Gradle"
|
APP_NAME="Gradle"
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=`basename "$0"`
|
||||||
|
|
||||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD="maximum"
|
||||||
|
|
||||||
warn () {
|
warn () {
|
||||||
echo "$*"
|
echo "$*"
|
||||||
} >&2
|
}
|
||||||
|
|
||||||
die () {
|
die () {
|
||||||
echo
|
echo
|
||||||
echo "$*"
|
echo "$*"
|
||||||
echo
|
echo
|
||||||
exit 1
|
exit 1
|
||||||
} >&2
|
}
|
||||||
|
|
||||||
# OS specific support (must be 'true' or 'false').
|
# OS specific support (must be 'true' or 'false').
|
||||||
cygwin=false
|
cygwin=false
|
||||||
msys=false
|
msys=false
|
||||||
darwin=false
|
darwin=false
|
||||||
nonstop=false
|
nonstop=false
|
||||||
case "$( uname )" in #(
|
case "`uname`" in
|
||||||
CYGWIN* ) cygwin=true ;; #(
|
CYGWIN* )
|
||||||
Darwin* ) darwin=true ;; #(
|
cygwin=true
|
||||||
MSYS* | MINGW* ) msys=true ;; #(
|
;;
|
||||||
NONSTOP* ) nonstop=true ;;
|
Darwin* )
|
||||||
|
darwin=true
|
||||||
|
;;
|
||||||
|
MINGW* )
|
||||||
|
msys=true
|
||||||
|
;;
|
||||||
|
NONSTOP* )
|
||||||
|
nonstop=true
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
|
|
@ -121,9 +87,9 @@ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||||
if [ -n "$JAVA_HOME" ] ; then
|
if [ -n "$JAVA_HOME" ] ; then
|
||||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||||
# IBM's JDK on AIX uses strange locations for the executables
|
# IBM's JDK on AIX uses strange locations for the executables
|
||||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
JAVACMD="$JAVA_HOME/jre/sh/java"
|
||||||
else
|
else
|
||||||
JAVACMD=$JAVA_HOME/bin/java
|
JAVACMD="$JAVA_HOME/bin/java"
|
||||||
fi
|
fi
|
||||||
if [ ! -x "$JAVACMD" ] ; then
|
if [ ! -x "$JAVACMD" ] ; then
|
||||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||||
|
|
@ -132,7 +98,7 @@ Please set the JAVA_HOME variable in your environment to match the
|
||||||
location of your Java installation."
|
location of your Java installation."
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
JAVACMD=java
|
JAVACMD="java"
|
||||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||||
|
|
||||||
Please set the JAVA_HOME variable in your environment to match the
|
Please set the JAVA_HOME variable in your environment to match the
|
||||||
|
|
@ -140,95 +106,80 @@ location of your Java installation."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Increase the maximum file descriptors if we can.
|
# Increase the maximum file descriptors if we can.
|
||||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
|
||||||
case $MAX_FD in #(
|
MAX_FD_LIMIT=`ulimit -H -n`
|
||||||
max*)
|
if [ $? -eq 0 ] ; then
|
||||||
MAX_FD=$( ulimit -H -n ) ||
|
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
|
||||||
warn "Could not query maximum file descriptor limit"
|
MAX_FD="$MAX_FD_LIMIT"
|
||||||
esac
|
fi
|
||||||
case $MAX_FD in #(
|
ulimit -n $MAX_FD
|
||||||
'' | soft) :;; #(
|
if [ $? -ne 0 ] ; then
|
||||||
*)
|
warn "Could not set maximum file descriptor limit: $MAX_FD"
|
||||||
ulimit -n "$MAX_FD" ||
|
fi
|
||||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
else
|
||||||
esac
|
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Collect all arguments for the java command, stacking in reverse order:
|
# For Darwin, add options to specify how the application appears in the dock
|
||||||
# * args from the command line
|
if $darwin; then
|
||||||
# * the main class name
|
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
|
||||||
# * -classpath
|
fi
|
||||||
# * -D...appname settings
|
|
||||||
# * --module-path (only if needed)
|
|
||||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
|
||||||
|
|
||||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||||
if "$cygwin" || "$msys" ; then
|
if [ "$cygwin" = "true" -o "$msys" = "true" ] ; then
|
||||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
|
||||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
|
||||||
|
|
||||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
JAVACMD=`cygpath --unix "$JAVACMD"`
|
||||||
|
|
||||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
# We build the pattern for arguments to be converted via cygpath
|
||||||
for arg do
|
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
|
||||||
if
|
SEP=""
|
||||||
case $arg in #(
|
for dir in $ROOTDIRSRAW ; do
|
||||||
-*) false ;; # don't mess with options #(
|
ROOTDIRS="$ROOTDIRS$SEP$dir"
|
||||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
SEP="|"
|
||||||
[ -e "$t" ] ;; #(
|
|
||||||
*) false ;;
|
|
||||||
esac
|
|
||||||
then
|
|
||||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
|
||||||
fi
|
|
||||||
# Roll the args list around exactly as many times as the number of
|
|
||||||
# args, so each arg winds up back in the position where it started, but
|
|
||||||
# possibly modified.
|
|
||||||
#
|
|
||||||
# NB: a `for` loop captures its iteration list before it begins, so
|
|
||||||
# changing the positional parameters here affects neither the number of
|
|
||||||
# iterations, nor the values presented in `arg`.
|
|
||||||
shift # remove old arg
|
|
||||||
set -- "$@" "$arg" # push replacement arg
|
|
||||||
done
|
done
|
||||||
|
OURCYGPATTERN="(^($ROOTDIRS))"
|
||||||
|
# Add a user-defined pattern to the cygpath arguments
|
||||||
|
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
|
||||||
|
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
|
||||||
|
fi
|
||||||
|
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||||
|
i=0
|
||||||
|
for arg in "$@" ; do
|
||||||
|
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
|
||||||
|
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
|
||||||
|
|
||||||
|
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
|
||||||
|
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
|
||||||
|
else
|
||||||
|
eval `echo args$i`="\"$arg\""
|
||||||
|
fi
|
||||||
|
i=`expr $i + 1`
|
||||||
|
done
|
||||||
|
case $i in
|
||||||
|
0) set -- ;;
|
||||||
|
1) set -- "$args0" ;;
|
||||||
|
2) set -- "$args0" "$args1" ;;
|
||||||
|
3) set -- "$args0" "$args1" "$args2" ;;
|
||||||
|
4) set -- "$args0" "$args1" "$args2" "$args3" ;;
|
||||||
|
5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
|
||||||
|
6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
|
||||||
|
7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
|
||||||
|
8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
|
||||||
|
9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
|
||||||
|
esac
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Collect all arguments for the java command;
|
# Escape application args
|
||||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
save () {
|
||||||
# shell script including quotes and variable substitutions, so put them in
|
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done
|
||||||
# double quotes to make sure that they get re-expanded; and
|
echo " "
|
||||||
# * put everything else in single quotes, so that it's not re-expanded.
|
}
|
||||||
|
APP_ARGS=`save "$@"`
|
||||||
|
|
||||||
set -- \
|
# Collect all arguments for the java command, following the shell quoting and substitution rules
|
||||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS"
|
||||||
-classpath "$CLASSPATH" \
|
|
||||||
org.gradle.wrapper.GradleWrapperMain \
|
|
||||||
"$@"
|
|
||||||
|
|
||||||
# Use "xargs" to parse quoted args.
|
|
||||||
#
|
|
||||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
|
||||||
#
|
|
||||||
# In Bash we could simply go:
|
|
||||||
#
|
|
||||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
|
||||||
# set -- "${ARGS[@]}" "$@"
|
|
||||||
#
|
|
||||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
|
||||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
|
||||||
# character that might be a shell metacharacter, then use eval to reverse
|
|
||||||
# that process (while maintaining the separation between arguments), and wrap
|
|
||||||
# the whole thing up as a single "set" statement.
|
|
||||||
#
|
|
||||||
# This will of course break if any of these variables contains a newline or
|
|
||||||
# an unmatched quote.
|
|
||||||
#
|
|
||||||
|
|
||||||
eval "set -- $(
|
|
||||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
|
||||||
xargs -n1 |
|
|
||||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
|
||||||
tr '\n' ' '
|
|
||||||
)" '"$@"'
|
|
||||||
|
|
||||||
exec "$JAVACMD" "$@"
|
exec "$JAVACMD" "$@"
|
||||||
|
|
|
||||||
|
|
@ -4,6 +4,7 @@ import com.intellij.icons.AllIcons
|
||||||
import com.intellij.ide.IdeBundle
|
import com.intellij.ide.IdeBundle
|
||||||
import com.intellij.ide.actions.CreateFileAction
|
import com.intellij.ide.actions.CreateFileAction
|
||||||
import com.intellij.ide.ui.newItemPopup.NewItemPopupUtil
|
import com.intellij.ide.ui.newItemPopup.NewItemPopupUtil
|
||||||
|
import com.intellij.lang.LangBundle
|
||||||
import com.intellij.openapi.actionSystem.AnActionEvent
|
import com.intellij.openapi.actionSystem.AnActionEvent
|
||||||
import com.intellij.openapi.project.Project
|
import com.intellij.openapi.project.Project
|
||||||
import com.intellij.openapi.ui.InputValidatorEx
|
import com.intellij.openapi.ui.InputValidatorEx
|
||||||
|
|
@ -14,11 +15,10 @@ import de.idetools.filename_template.placeholders.*
|
||||||
import de.idetools.filename_template.settings.FilenameTemplateSettingsState
|
import de.idetools.filename_template.settings.FilenameTemplateSettingsState
|
||||||
import java.awt.event.InputEvent
|
import java.awt.event.InputEvent
|
||||||
import java.util.function.Consumer
|
import java.util.function.Consumer
|
||||||
import java.util.function.Supplier
|
|
||||||
import kotlin.math.max
|
import kotlin.math.max
|
||||||
|
|
||||||
class CreateFileWithFilenameTemplateAction :
|
class CreateFileWithFilenameTemplateAction :
|
||||||
CreateFileAction(Supplier { "Filename Template"}, Supplier { "Create a new file based on template"}, Supplier { AllIcons.Actions.AddFile }) {
|
CreateFileAction("Filename Template", "Create a new file based on template", AllIcons.FileTypes.AddAny) {
|
||||||
|
|
||||||
private val placeholders: List<Placeholder> = listOf(
|
private val placeholders: List<Placeholder> = listOf(
|
||||||
EpochPlaceholder(),
|
EpochPlaceholder(),
|
||||||
|
|
@ -41,7 +41,7 @@ class CreateFileWithFilenameTemplateAction :
|
||||||
override fun invokeDialog(
|
override fun invokeDialog(
|
||||||
project: Project,
|
project: Project,
|
||||||
directory: PsiDirectory,
|
directory: PsiDirectory,
|
||||||
elementsConsumer: Consumer<in Array<PsiElement>>
|
elementsConsumer: Consumer<Array<PsiElement?>?>
|
||||||
) {
|
) {
|
||||||
val settings: FilenameTemplateSettingsState = FilenameTemplateSettingsState.instance
|
val settings: FilenameTemplateSettingsState = FilenameTemplateSettingsState.instance
|
||||||
settings.filenameTemplates.forEach {
|
settings.filenameTemplates.forEach {
|
||||||
|
|
@ -55,7 +55,7 @@ class CreateFileWithFilenameTemplateAction :
|
||||||
val templates = settings.filenameTemplates
|
val templates = settings.filenameTemplates
|
||||||
.filter { it.isActive }
|
.filter { it.isActive }
|
||||||
.map {
|
.map {
|
||||||
Trinity(it.title, AllIcons.Actions.AddFile, processTemplate(it.template, project, directory))
|
Trinity(it.title, AllIcons.FileTypes.AddAny, processTemplate(it.template, project, directory))
|
||||||
}
|
}
|
||||||
val validator: MyInputValidator = MyValidator(project, directory)
|
val validator: MyInputValidator = MyValidator(project, directory)
|
||||||
val contentPanel = CreateWithFilenameTemplateDialogPanel(templates)
|
val contentPanel = CreateWithFilenameTemplateDialogPanel(templates)
|
||||||
|
|
@ -68,7 +68,11 @@ class CreateFileWithFilenameTemplateAction :
|
||||||
popup.closeOk(event)
|
popup.closeOk(event)
|
||||||
elementsConsumer.accept(validator.createdElements)
|
elementsConsumer.accept(validator.createdElements)
|
||||||
} else {
|
} else {
|
||||||
val errorMessage = (validator as InputValidatorEx).getErrorText(name)
|
val errorMessage =
|
||||||
|
if (validator is InputValidatorEx)
|
||||||
|
(validator as InputValidatorEx).getErrorText(name)
|
||||||
|
else
|
||||||
|
LangBundle.message("incorrect.name")
|
||||||
contentPanel.setError(errorMessage)
|
contentPanel.setError(errorMessage)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5,9 +5,7 @@ import com.intellij.openapi.util.Trinity
|
||||||
import javax.swing.Icon
|
import javax.swing.Icon
|
||||||
|
|
||||||
class CreateWithFilenameTemplateDialogPanel(templates: List<Trinity<String, Icon, String>>) :
|
class CreateWithFilenameTemplateDialogPanel(templates: List<Trinity<String, Icon, String>>) :
|
||||||
CreateWithTemplatesDialogPanel(templates.first().first, templates.map {
|
CreateWithTemplatesDialogPanel(templates, templates.first().first) {
|
||||||
trinity -> TemplatePresentation(trinity.first, trinity.second, trinity.third)
|
|
||||||
}) {
|
|
||||||
|
|
||||||
init {
|
init {
|
||||||
updateSelectedText()
|
updateSelectedText()
|
||||||
|
|
@ -17,7 +15,7 @@ class CreateWithFilenameTemplateDialogPanel(templates: List<Trinity<String, Icon
|
||||||
private fun updateSelectedText() {
|
private fun updateSelectedText() {
|
||||||
val selectedValue = myTemplatesList.selectedValue
|
val selectedValue = myTemplatesList.selectedValue
|
||||||
if (selectedValue != null) {
|
if (selectedValue != null) {
|
||||||
var filename = selectedValue.templateName
|
var filename = selectedValue.third
|
||||||
val caretPosition = determineCaretPosition(filename)
|
val caretPosition = determineCaretPosition(filename)
|
||||||
filename = filename.replace("{|}", "")
|
filename = filename.replace("{|}", "")
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
package de.idetools.filename_template.settings
|
package de.idetools.filename_template.settings
|
||||||
|
|
||||||
import com.intellij.openapi.application.ApplicationManager
|
|
||||||
import com.intellij.openapi.components.PersistentStateComponent
|
import com.intellij.openapi.components.PersistentStateComponent
|
||||||
|
import com.intellij.openapi.components.ServiceManager
|
||||||
import com.intellij.openapi.components.State
|
import com.intellij.openapi.components.State
|
||||||
import com.intellij.openapi.components.Storage
|
import com.intellij.openapi.components.Storage
|
||||||
import com.intellij.util.xmlb.XmlSerializerUtil
|
import com.intellij.util.xmlb.XmlSerializerUtil
|
||||||
|
|
@ -23,6 +23,6 @@ class FilenameTemplateSettingsState : PersistentStateComponent<FilenameTemplateS
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
val instance: FilenameTemplateSettingsState
|
val instance: FilenameTemplateSettingsState
|
||||||
get() = ApplicationManager.getApplication().getService(FilenameTemplateSettingsState::class.java)
|
get() = ServiceManager.getService(FilenameTemplateSettingsState::class.java)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user