adding icon to the plugin, better demonstrations at README and a description for the Plugin

This commit is contained in:
DevSrSouza committed 2020-08-19 01:41:42 -03:00
1 parent d921173ddc
commit 04e2a73dc4
4 files changed
+48 -49

No files matched your search

+9 -6
View File
@@ -1,17 +1,20 @@
# KotlinBukkitAPI-Tooling [WIP]
# KotlinBukkitAPI-Tooling
The KotlinBukkitAPI Tooling is plugin for IntelliJ that helps developers using [KotlinBukkitAPI](https://github.com/DevSrSouza/KotlinBukkitAPI) and scripts for [Bukkript](https://github.com/DevSrSouza/Bukkript).
## Features
- [Menu Preview](#Menu-Preview)
#### Future Features
- Tooling for Bukkript scripts.
- Tooling for [Bukkript Scripts](#Bukkript-Script).
## Menu Preview
When using KotlinBukkitAPI Menu DSL you have a good preview of how the slots are arranged in the Menu in the game.
![Preview](https://media.giphy.com/media/iDOK1cb41kqHCw6BH8/giphy.gif)
![Preview](https://i.imgur.com/9MzzAzs.gif)
## [Bukkript Script](https://github.com/DevSrSouza/Bukkript/)
The plugin provides out of the box Bukkript Script resolution (`.bk.kts` files).
![Preview](https://i.imgur.com/exlwVUs.gif)
+38 -8
View File
@@ -4,6 +4,10 @@ plugins {
kotlin("jvm") version "1.4.0"
}
val kotlinVersion = "1.4.0"
val kotlinBukkitAPIVersion = "0.1.0-SNAPSHOT"
val bukkriptVersion = "0.1.0-SNAPSHOT"
group = "br.com.devsrsouza.kotlinbukkitapi"
version = "0.0.1-SNAPSHOT"
@@ -16,7 +20,7 @@ dependencies {
implementation(kotlin("stdlib-jdk8"))
val changing = Action<ExternalModuleDependency> { isChanging = true }
api("br.com.devsrsouza.bukkript:script-definition-embedded:0.1.0-SNAPSHOT", changing)
api("br.com.devsrsouza.bukkript:script-definition-embedded:$bukkriptVersion", changing)
testCompile("junit", "junit", "4.12")
}
@@ -27,9 +31,11 @@ intellij {
setPlugins("java", "Kotlin")
}
configure<JavaPluginConvention> {
sourceCompatibility = JavaVersion.VERSION_1_8
}
tasks {
compileKotlin {
kotlinOptions.jvmTarget = "1.8"
@@ -40,14 +46,38 @@ tasks {
}
tasks.getByName<org.jetbrains.intellij.tasks.PatchPluginXmlTask>("patchPluginXml") {
pluginDescription("""
The KotlinBukkitAPI Tooling adds Tooling to IntelliJ API when using <a href="https://github.com/DevSrSouza/KotlinBukkitAPI">KotlinBukkitAPI</a> and <a href="https://github.com/DevSrSouza/Bukkript">Bukkript</a>.
""".trimIndent())
}
<img src="https://github.com/DevSrSouza/KotlinBukkitAPI/raw/master/logo.png" width="417" height="161"/>
listOf("compileKotlin", "compileTestKotlin").forEach {
tasks.getByName<org.jetbrains.kotlin.gradle.tasks.KotlinCompile>(it) {
kotlinOptions.jvmTarget = "1.8"
}
<br />
The KotlinBukkitAPI Tooling is plugin for IntelliJ that helps developers using <a href="https://github.com/DevSrSouza/KotlinBukkitAPI">KotlinBukkitAPI</a> and scripts for <a href="https://github.com/DevSrSouza/Bukkript">Bukkript</a>. This libraries help build extensions for Minecraft Server using Spigot server.
<br />
<img src="https://img.shields.io/static/v1?label=Kotlin&message=${kotlinVersion}&color=Orange&style=for-the-badge" />
<a href="https://github.com/DevSrSouza/KotlinBukkitAPI"><img src="https://img.shields.io/static/v1?label=KotlinBukkitAPI&message=${kotlinBukkitAPIVersion}&color=Orange&style=for-the-badge" /></a>
<a href="https://github.com/DevSrSouza/Bukkript"><img src="https://img.shields.io/static/v1?label=Bukkript&message=${bukkriptVersion}&color=Orange&style=for-the-badge" /></a>
<img src="https://img.shields.io/github/stars/DevSrSouza/KotlinBukkitAPI-Tooling.svg?style=for-the-badge&color=orange&logo=data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAEAAAABACAYAAACqaXHeAAADYklEQVR4XuWbvbPNQBiHn9uo6NFT0GEYHa0/QofOR2MojI8xxmh8VFwVf4RaxTB0KOhdPRUF8zPJmdy1J3l3N9ndxDb3zr0n2exzfu/zJjk5G5Qdh5vp35c6jI1SEzfzbgK/gXOljqMkgF3A1wbAXuBHCQglAehdf9wsWr8rDdlHSQCq+0MdBxzJvnqgFADJ752zYAHILsNSABT3Mw4A/S27DEsAaOW30wHwHcguwxIAuvJzyz67DEsA6MrPBaD/ZZVhbgA++bkQssowNwCf/FwAWWWYE8A6+bkAssowJ4A++RWTYU4AffIrJsNcACzyKyLDXAAs8isiwxwArPIrIsMcAELkl12GOQCEyC+7DAUgpj5LXLpPMeemAOwAXgLHp5ih4n2+Ak62JbCnuRmhn//D2ALUmre6DlAClAQlYsnjJ3ACeK1FuhI8CzxZ8uqbu06rG7C+LrBkKf5zpekDsFQp/pUeoBJYjXXnAUuT4kp6bnn3nQgtRYrbpBcCQK9dghR7b7RaToXnLMXB22sWAHOVold6oSXQvn5uUlwrvVgA2m4uUuyVXgqAuUgx6NMliwN8t6rcDzZrOXselF5qArR9rVI0SW8MANpHbVI0S28sADVJMUh6YwKoRYpB0hsbwEHgQ2ED6hg+xR5DTBfoznUDuB47+Ujb6Rhuxu4rFcBH4EDs5CNtp3dfKYgaKQBqiH+76OgySAFQQ/xbANFlkAKghvi3AKLLIBZATfFPKoNYADXFP6kMYgHUFP+kMogBUGP8o8sgBsBY8f8MXGqO/D6wP6qRb98ouBvEAEiNvx6DuwU8BH41x69L7AvANUBPlMSO4G4QCiAl/vpqzDPgKvBtzQp3A3eB0wmP8gedFIUCiI3/G+A88Nb41h4DHgFHja93r0/M1wahAELjr3f6CvC8+W5QyHp0bEqCEqFkWEdQGYQACIm/blI8AG4DqvmUISfIDXKE9dkFcxmEALDG/wVwEfiSsmrPtvsaqKcM+zV3gxAAQ/Fv25oATDkEYKhtmsvACqAv/r62NiUA7dvSNk1lYAXgi7+lrU0Noq9tmsrACsCNf2hbmxqEr22aysACoBv/lLY2NQRf2xwsAwsARUlnb2O1talBdNvmnaEbphYA94CnE7S1qUGobeozzMt9E/0BUX274HXoySkAAAAASUVORK5CYII=" />
<img src="https://img.shields.io/badge/license-MIT-blue.svg?color=ORANGE&style=for-the-badge" />
<br />
<ul>
<li><a href='https://github.com/DevSrSouza/Bukkript'>Bukkript</a></li>
<li<a href='https://github.com/DevSrSouza/KotlinBukkitAPI-Tooling'>KotlinBukkitAPI-Tooling (this plugin)</a></li>
<li<a href='https://github.com/DevSrSouza/KotlinBukkitAPI'>KotlinBukkitAPI</a></li>
<li><a href='https://github.com/KotlinMinecraft/KotlinBukkitAPI-Examples'>KotlinBukkitAPI Examples</a></li>
</ul>
<br />
<br />
<h3>Demonstration</h3>
<br />
<img src="https://i.imgur.com/exlwVUs.gif" width='680' height='390'/>
""".trimIndent())
}
configurations.all {
@@ -1,35 +0,0 @@
package br.com.devsrsouza.kotlinbukkitapi.tooling
import com.intellij.lang.annotation.AnnotationHolder
import com.intellij.lang.annotation.Annotator
import com.intellij.openapi.fileEditor.FileEditorManager
import com.intellij.openapi.fileEditor.TextEditorWithPreview
import com.intellij.openapi.wm.IdeFocusManager
import com.intellij.psi.PsiElement
import org.jetbrains.kotlin.psi.KtCallExpression
import javax.swing.SwingUtilities
/*
* This annotator if the file has menu declaration, he set the file editor
* to the KotlinBukkitAPI one.
*
object TestAnnotator : Annotator {
override fun annotate(element: PsiElement, holder: AnnotationHolder) {
if(element is KtCallExpression && isMenuCall(element)) {
val project = element.project
val fileEditorManager = FileEditorManager.getInstance(project)
SwingUtilities.invokeLater {
val virtualFile = element.containingFile.virtualFile
if(fileEditorManager.selectedEditor is TextEditorWithPreview) return@invokeLater
fileEditorManager.setSelectedEditor(
virtualFile,
MenuPreviewFileEditorProvider.ID
)
}
}
}
}*/
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 354.67 501.96"><defs><style>.cls-1{isolation:isolate;}.cls-2{fill:#797879;}.cls-3{fill:#6d6d6d;}.cls-4{fill:#989999;}.cls-5{fill:#565656;}.cls-6{fill:#525252;}.cls-7{fill:#353535;}.cls-8{opacity:0.65;}.cls-17,.cls-8{mix-blend-mode:multiply;}.cls-9{fill:url(#Gradiente_sem_nome_4);}.cls-10{fill:url(#Gradiente_sem_nome_2);}.cls-11{fill:url(#Gradiente_sem_nome_3);}.cls-12{fill:#979797;}.cls-13{fill:#d8d8d8;}.cls-14{fill:#a8a8a8;}.cls-15{fill:#737373;}.cls-16{fill:#fff;}.cls-17{opacity:0.45;}</style><linearGradient id="Gradiente_sem_nome_4" x1="196.69" y1="389.39" x2="360.57" y2="225.51" gradientUnits="userSpaceOnUse"><stop offset="0.1" stop-color="#0995d3"/><stop offset="0.3" stop-color="#3387c8"/><stop offset="0.62" stop-color="#5876b9"/><stop offset="0.86" stop-color="#6a6eb2"/><stop offset="1" stop-color="#716baf"/></linearGradient><linearGradient id="Gradiente_sem_nome_2" x1="184.43" y1="194.2" x2="266.91" y2="111.72" gradientTransform="matrix(0.98, -0.21, 0.21, 0.98, -180.79, -26.57)" gradientUnits="userSpaceOnUse"><stop offset="0.12" stop-color="#0995d3"/><stop offset="0.42" stop-color="#497fc1"/><stop offset="0.7" stop-color="#676fb3"/><stop offset="0.83" stop-color="#716baf"/></linearGradient><linearGradient id="Gradiente_sem_nome_3" x1="112.74" y1="410.17" x2="392.46" y2="130.45" gradientTransform="matrix(0.98, -0.21, 0.21, 0.98, -180.79, -26.57)" gradientUnits="userSpaceOnUse"><stop offset="0.11" stop-color="#af5ea1"/><stop offset="0.21" stop-color="#d1609b"/><stop offset="0.43" stop-color="#e1725c"/><stop offset="0.6" stop-color="#ef7f30"/><stop offset="0.74" stop-color="#f18519"/><stop offset="0.82" stop-color="#f18816"/></linearGradient></defs><title>kotlinbukkitapi-logo</title><g class="cls-1"><g id="Camada_1" data-name="Camada 1"><rect class="cls-2" x="210.57" y="242.57" width="28.82" height="28.82"/><rect class="cls-2" x="181.75" y="242.57" width="28.82" height="28.82"/><rect class="cls-2" x="152.93" y="242.57" width="28.82" height="28.82"/><rect class="cls-3" x="124.11" y="242.57" width="28.82" height="28.82"/><rect class="cls-4" x="268.21" y="213.75" width="28.82" height="28.82"/><rect class="cls-4" x="239.39" y="213.75" width="28.82" height="28.82"/><rect class="cls-2" x="210.57" y="213.75" width="28.82" height="28.82"/><rect class="cls-2" x="181.75" y="213.75" width="28.82" height="28.82"/><rect class="cls-2" x="152.93" y="213.75" width="28.82" height="28.82"/><rect class="cls-3" x="124.11" y="213.75" width="28.82" height="28.82"/><rect class="cls-3" x="95.29" y="213.75" width="28.82" height="28.82"/><rect class="cls-5" x="66.46" y="213.75" width="28.82" height="28.82"/><rect class="cls-4" x="297.03" y="184.93" width="28.82" height="28.82"/><rect class="cls-4" x="268.21" y="184.93" width="28.82" height="28.82"/><rect class="cls-4" x="239.39" y="184.93" width="28.82" height="28.82"/><rect class="cls-2" x="210.57" y="184.93" width="28.82" height="28.82"/><rect class="cls-2" x="181.75" y="184.93" width="28.82" height="28.82"/><rect class="cls-2" x="152.93" y="184.93" width="28.82" height="28.82"/><rect class="cls-2" x="124.11" y="184.93" width="28.82" height="28.82"/><rect class="cls-3" x="95.29" y="184.93" width="28.82" height="28.82"/><rect class="cls-5" x="66.46" y="184.93" width="28.82" height="28.82"/><rect class="cls-5" x="37.64" y="184.93" width="28.82" height="28.82"/><rect class="cls-6" x="297.03" y="156.11" width="28.82" height="28.82"/><rect class="cls-6" x="268.21" y="156.11" width="28.82" height="28.82"/><rect class="cls-4" x="239.39" y="156.11" width="28.82" height="28.82"/><rect class="cls-2" x="210.57" y="156.11" width="28.82" height="28.82"/><rect class="cls-2" x="181.75" y="156.11" width="28.82" height="28.82"/><rect class="cls-2" x="152.93" y="156.11" width="28.82" height="28.82"/><rect class="cls-2" x="124.11" y="156.11" width="28.82" height="28.82"/><rect class="cls-3" x="95.29" y="156.11" width="28.82" height="28.82"/><rect class="cls-7" x="66.46" y="156.11" width="28.82" height="28.82"/><rect class="cls-7" x="37.64" y="156.11" width="28.82" height="28.82"/><rect class="cls-6" x="239.39" y="127.29" width="28.82" height="28.82"/><rect class="cls-6" x="210.57" y="127.29" width="28.82" height="28.82"/><rect class="cls-6" x="181.75" y="127.29" width="28.82" height="28.82"/><rect class="cls-7" x="152.93" y="127.29" width="28.82" height="28.82"/><rect class="cls-7" x="124.11" y="127.29" width="28.82" height="28.82"/><rect class="cls-7" x="95.29" y="127.29" width="28.82" height="28.82"/></g><g id="Camada_2_cópia_cópia" data-name="Camada 2 cópia cópia"><image class="cls-8" width="1456" height="1563" transform="scale(0.24)" xlink:href="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABbEAAAYcCAYAAAA8LMeNAAAACXBIWXMAAC4jAAAuIwF4pT92AAAgAElEQVR4Xuy9244jyQ4ly6yZ///h6ew6D7XjtIvFy2JclCHJDCCcXO6hUgjoF4Mj++v3798GAAAAAAAAAAAAAHBHfnUHAAAAAAAAAAAAAAB+CiQ2AAAAAAAAAAAAANwWJDYAAAAAAAAAAAAA3BYkNgAAALine truncated

After

Width:  |  Height:  |  Size: 304 KiB