Skip to content

Commit

Permalink
Added project editor config
Browse files Browse the repository at this point in the history
  • Loading branch information
Unthrottled committed Oct 14, 2020
1 parent 0c2c0e2 commit f3de873
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 37 deletions.
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
root = true

[*]
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true
end_of_line = lf
2 changes: 1 addition & 1 deletion gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ platformVersion = 2020.2
platformDownloadSources = true
# Plugin Dependencies -> https://www.jetbrains.org/intellij/sdk/docs/basics/plugin_structure/plugin_dependencies.html
# Example: platformPlugins = com.intellij.java,com.jetbrains.php:203.4449.22
platformPlugins =
platformPlugins = io.acari.DDLCTheme:11.0.0
16 changes: 8 additions & 8 deletions src/main/kotlin/io/unthrottled/amii/MyBundle.kt
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ private const val BUNDLE = "messages.MyBundle"

object MyBundle : AbstractBundle(BUNDLE) {

@Suppress("SpreadOperator")
@JvmStatic
fun message(@PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any) = getMessage(key, *params)
@Suppress("SpreadOperator")
@JvmStatic
fun message(@PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any) = getMessage(key, *params)

@Suppress("SpreadOperator")
@JvmStatic
fun messagePointer(@PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any) = run {
message(key, *params)
}
@Suppress("SpreadOperator")
@JvmStatic
fun messagePointer(@PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any) = run {
message(key, *params)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import io.unthrottled.amii.services.MyProjectService

internal class MyProjectManagerListener : ProjectManagerListener {

override fun projectOpened(project: Project) {
project.getService(MyProjectService::class.java)
}
override fun projectOpened(project: Project) {
project.getService(MyProjectService::class.java)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import io.unthrottled.amii.MyBundle

class MyApplicationService {

init {
println(MyBundle.message("applicationService"))
}
init {
println(MyBundle.message("applicationService"))
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import io.unthrottled.amii.MyBundle

class MyProjectService(project: Project) {

init {
println(MyBundle.message("projectService", project.name))
}
init {
println(MyBundle.message("projectService", project.name))
}
}
28 changes: 14 additions & 14 deletions src/main/resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
<idea-plugin>
<id>io.unthrottled.amii</id>
<name>AMII</name>
<vendor>unthrottled</vendor>
<id>io.unthrottled.amii</id>
<name>AMII</name>
<vendor>unthrottled</vendor>

<!-- Product and plugin compatibility requirements -->
<!-- https://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/plugin_compatibility.html -->
<depends>com.intellij.modules.platform</depends>
<!-- Product and plugin compatibility requirements -->
<!-- https://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/plugin_compatibility.html -->
<depends>com.intellij.modules.platform</depends>

<extensions defaultExtensionNs="com.intellij">
<applicationService serviceImplementation="io.unthrottled.amii.services.MyApplicationService"/>
<projectService serviceImplementation="io.unthrottled.amii.services.MyProjectService"/>
</extensions>
<extensions defaultExtensionNs="com.intellij">
<applicationService serviceImplementation="io.unthrottled.amii.services.MyApplicationService"/>
<projectService serviceImplementation="io.unthrottled.amii.services.MyProjectService"/>
</extensions>

<applicationListeners>
<listener class="io.unthrottled.amii.listeners.MyProjectManagerListener"
topic="com.intellij.openapi.project.ProjectManagerListener"/>
</applicationListeners>
<applicationListeners>
<listener class="io.unthrottled.amii.listeners.MyProjectManagerListener"
topic="com.intellij.openapi.project.ProjectManagerListener"/>
</applicationListeners>
</idea-plugin>
15 changes: 10 additions & 5 deletions src/main/resources/META-INF/pluginIcon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit f3de873

Please sign in to comment.