1
0
mirror of https://github.com/chylex/IntelliJ-AceJump.git synced 2025-04-09 17:15:43 +02:00

add settings page

This commit is contained in:
breandan 2017-07-10 18:31:25 -04:00
parent b1ca7360a0
commit ced8526fb1
7 changed files with 69 additions and 2 deletions

View File

@ -5,7 +5,7 @@ buildscript {
}
plugins {
id("org.jetbrains.intellij") version "0.2.13"
id("org.jetbrains.intellij") version "0.2.14"
id("org.jetbrains.kotlin.jvm") version "1.1.3"
}

View File

@ -3,4 +3,4 @@ distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=https\://repo.gradle.org/gradle/dist-snapshots/gradle-kotlin-dsl-4.1-20170624053347+0000-all.zip
distributionUrl=https\://repo.gradle.org/gradle/dist-snapshots/gradle-kotlin-dsl-4.1-20170707032407+0000-all.zip

View File

@ -79,6 +79,7 @@ object Finder {
}
private fun determineJumpLocations(): Collection<JumpInfo> {
fun allBigrams() = with('a'..'z') { flatMap { e -> map { c -> "$e$c" } } }
unseen2grams = LinkedHashSet(allBigrams())

View File

@ -0,0 +1,7 @@
package com.johnlindquist.acejump.settings
import javax.swing.*
class AceConfig {
lateinit var tagCharacters: JTextField
}

View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.johnlindquist.acejump.settings.AceConfig">
<grid id="27dc6" layout-manager="GridLayoutManager" row-count="3" column-count="3" same-size-horizontally="false" same-size-vertically="false" hgap="-1" vgap="-1">
<margin top="0" left="0" bottom="0" right="0"/>
<constraints>
<xy x="62" y="47" width="336" height="319"/>
</constraints>
<properties/>
<border type="none" title=""/>
<children>
<component id="586f2" class="javax.swing.JLabel">
<constraints>
<grid row="0" column="0" row-span="1" col-span="2" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
</constraints>
<properties>
<text value="Characters allowed in Tags:"/>
</properties>
</component>
<vspacer id="61505">
<constraints>
<grid row="2" column="1" row-span="1" col-span="2" vsize-policy="6" hsize-policy="1" anchor="0" fill="2" indent="0" use-parent-layout="false"/>
</constraints>
</vspacer>
<component id="14f08" class="javax.swing.JTextField" binding="tagCharacters">
<constraints>
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="6" anchor="8" fill="1" indent="0" use-parent-layout="false">
<preferred-size width="150" height="-1"/>
</grid>
</constraints>
<properties>
<text resource-bundle="AceResources" key="tagCharacters"/>
</properties>
</component>
</children>
</grid>
</form>

View File

@ -0,0 +1,22 @@
package com.johnlindquist.acejump.settings
import com.intellij.openapi.components.PersistentStateComponent
import com.intellij.openapi.components.State
import com.intellij.openapi.components.ServiceManager.getService
@State(name = "AceConfigProvider")
class AceConfigProvider : PersistentStateComponent<AceConfigProvider.State> {
override fun getState() = state
private var state: State = State()
data class State(var allowedChars: String = "abc")
override fun loadState(state: State) {
this.state = state
}
companion object {
val instance: AceConfigProvider
get() = getService(AceConfigProvider::class.java)
}
}

View File

@ -0,0 +1 @@
tagCharacters=abcdefghijklmnopqrstuvwxyz