Skip to content

Commit

Permalink
v0.5.0 (#742)
Browse files Browse the repository at this point in the history
* archive media

* should be only place that needs null check

* revert to dynamic

* fixes #701

* use readme for unreleased

* verify oldest version

* bump vertx

* determine locale

* translate

* bump

* impl guide marks

* #610

* url can be censored

* fix modified check

* dev id will always be system

* ability to get sw version

* #695

* sw 9 uses endpoint_resp_time instead of endpoint_avg

* basic py coding for LCP

* basic py coding for LCP

* formatting

* correct defaults

* sw 9 compatability

* use guide marks

* fix isModified (handles override=true)

* sw 9 compatability

* use guide marks

* override can't be modified

* single page portals
preload views

* remove spp-skywalking-reroute header
add spp-platform-request header
changed port 5445 to 12800 for live-platform

* fix isModified

* changed port 5445 to 12800 for live-platform

* impl failing endpoint indicator for SW oap

* live platform supports endpoint id and endpoint name subs

* send events directly to subs

* bump

* bump

* bump

* bump

* /graphql/spp endpoint

* bump

* correct

* use SourceMarkerPlugin.getConfig

* test

* dev commands + booster ui

* move portal logic

* initial url

* using dev commands

* using dev commands

* relative icon

* handle missing resource

* impl instruments dev commands

* bump

* clean

* bump

* refactor

* bump

* bump

* new command command

* new command command

* refactor dev commands

* sort/filter commands

* refactor

* use more memory

* bump intellij

* refactor

* bump

* command config

* boot-time command

* remove suspend

* impl library check

* impl watch-variable

* smaller default description font size

* fix commander

* bump

* with submodules

* test

* limit to commander

* limit to commander

* fix plugin verify

* bump

* bump

* fix plugin verify

* revert version

* create kotlin guide marks

* don't show control bar on kt fields

* don't show control bar on kt properties

* work on class expressions

* bump

* revert

* bump

* removed

* bump

* paint hints/require command params

* more strict

* can show on local properties

* works in mono repo

* bump

* bump

* impl rest

* bump

* bump

* unused

* bump

* get by project

* add kotlin version

* Update build.yml

* fix autocomplete tab/enter

* use internal portal

* bump

* bump
  • Loading branch information
BFergerson authored May 19, 2022
1 parent a2a55bb commit 7322ee5
Show file tree
Hide file tree
Showing 61 changed files with 892 additions and 1,854 deletions.
10 changes: 7 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,8 @@ jobs:
# Check out current repository
- name: Fetch Sources
uses: actions/[email protected]
with:
submodules: true

# Validate wrapper
- name: Gradle Wrapper Validation
Expand Down Expand Up @@ -108,9 +110,11 @@ jobs:
name: pluginVerifier-result
path: ${{ github.workspace }}/plugin/build/reports/pluginVerifier

# Run Qodana inspections
- name: Qodana - Code Inspection
uses: JetBrains/[email protected]
# # Run Qodana inspections
# - name: Qodana - Code Inspection
# uses: JetBrains/[email protected]
# with:
# upload-result: false

# Prepare plugin archive content for creating artifact
- name: Prepare Plugin Artifact
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
[submodule "test/e2e/example-web-app"]
path = test/e2e/example-web-app
url = https://github.com/sourceplusplus/example-web-app
[submodule "commander"]
path = commander
url = https://github.com/sourceplusplus/jetbrains-commander
18 changes: 7 additions & 11 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
id("com.diffplug.spotless") apply false
id("com.avast.gradle.docker-compose")
id("org.jetbrains.kotlin.jvm") apply false
id("io.gitlab.arturbosch.detekt")
// id("io.gitlab.arturbosch.detekt") apply false
id("maven-publish")
}

Expand All @@ -25,22 +25,18 @@ repositories {
}

subprojects {
ext {
set("kotlinVersion", "1.5.0")
}

repositories {
mavenCentral()
maven(url = "https://jitpack.io")
}

apply<MavenPublishPlugin>()
apply<io.gitlab.arturbosch.detekt.DetektPlugin>()
// apply<io.gitlab.arturbosch.detekt.DetektPlugin>()
tasks {
withType<io.gitlab.arturbosch.detekt.Detekt> {
parallel = true
buildUponDefaultConfig = true
}
// withType<io.gitlab.arturbosch.detekt.Detekt> {
// parallel = true
// buildUponDefaultConfig = true
// }

withType<JavaCompile> {
sourceCompatibility = "1.8"
Expand Down Expand Up @@ -70,7 +66,7 @@ subprojects {
apply(plugin = "com.diffplug.spotless")
configure<com.diffplug.gradle.spotless.SpotlessExtension> {
kotlin {
targetExclude("**/generated/**")
targetExclude("**/generated/**", "**/liveplugin/**")
if (file("../LICENSE-HEADER.txt").exists()) {
licenseHeaderFile(file("../LICENSE-HEADER.txt"))
} else {
Expand Down
1 change: 1 addition & 0 deletions commander
Submodule commander added at a9ef4b
14 changes: 8 additions & 6 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,27 @@ kotlin.code.style=official

pluginGroup = spp.jetbrains
pluginName = Source++
projectVersion=0.4.7
pluginSinceBuild = 202.4357
projectVersion=0.5.0
pluginSinceBuild = 221.5080.210
# Plugin Verifier integration -> https://github.com/JetBrains/gradle-intellij-plugin#plugin-verifier-dsl
# See https://jb.gg/intellij-platform-builds-list for available build versions
pluginVerifierIdeVersions = 2020.2.4, 2021.3.3
pluginVerifierIdeVersions = 2022.1, 2022.1.1

platformType = IC
ideVersion = 2021.3.3
ideVersion = 2022.1.1
platformDownloadSources = true
# Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html
# Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22
platformPlugins = java, Groovy, Kotlin, PythonCore:213.5744.223, org.intellij.scala:2021.3.18
platformPlugins = java, Groovy, Kotlin, PythonCore:221.5591.52, org.intellij.scala:2022.1.14

# Opt-out flag for bundling Kotlin standard library.
# See https://kotlinlang.org/docs/reference/using-gradle.html#dependency-on-the-standard-library for details.
kotlin.stdlib.default.dependency = true

apolloVersion=3.3.0
vertxVersion=4.2.6
vertxVersion=4.3.0
slf4jVersion=1.7.33
jacksonVersion=2.13.1
joorVersion=0.9.13

kotlinVersion=1.6.10
21 changes: 5 additions & 16 deletions marker/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,37 +1,26 @@
plugins {
id("org.jetbrains.kotlin.jvm")
id("maven-publish")
}

val kotlinVersion = ext.get("kotlinVersion")
val kotlinVersion: String by project
val pluginGroup: String by project
val projectVersion: String by project
val slf4jVersion: String by project
val joorVersion: String by project

publishing {
publications {
create<MavenPublication>("maven") {
groupId = pluginGroup
artifactId = "marker"
version = projectVersion

from(components["java"])
}
}
}
val vertxVersion: String by project

repositories {
maven(url = "https://www.jetbrains.com/intellij-repository/releases") { name = "intellij-releases" }
maven(url = "https://cache-redirector.jetbrains.com/intellij-dependencies/") { name = "intellij-dependencies" }
}

dependencies {
val intellijVersion = "213.7172.25"
val intellijVersion = "221.5080.210"

compileOnly("io.vertx:vertx-core:$vertxVersion")
compileOnly("org.jooq:joor:$joorVersion")
compileOnly("com.github.sourceplusplus.protocol:protocol:$projectVersion")
compileOnly("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinVersion")
compileOnly("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.1")
compileOnly("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
compileOnly("com.google.guava:guava:31.1-jre")
compileOnly("org.jetbrains:annotations:23.0.0")
Expand Down
6 changes: 3 additions & 3 deletions marker/jvm-marker/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ plugins {
id("org.jetbrains.kotlin.jvm")
}

val kotlinVersion = ext.get("kotlinVersion")
val kotlinVersion: String by project
val vertxVersion: String by project
val projectVersion: String by project
val slf4jVersion: String by project
Expand All @@ -22,9 +22,9 @@ dependencies {
compileOnly(project(":monitor"))
}
compileOnly("com.github.sourceplusplus.protocol:protocol:$projectVersion")
val intellijVersion = "213.7172.25"
val intellijVersion = "221.5080.210"

implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:$kotlinVersion")
implementation("org.jetbrains.kotlinx:kotlinx-coroutines-core:1.6.1")
implementation("org.jetbrains.kotlin:kotlin-stdlib-jdk8")
implementation("com.google.guava:guava:31.1-jre")
implementation("org.jetbrains:annotations:23.0.0")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@ package spp.jetbrains.marker.jvm
import com.intellij.psi.PsiClassOwner
import com.intellij.psi.PsiElement
import com.intellij.psi.PsiFile
import org.jetbrains.uast.UClass
import org.jetbrains.uast.UExpression
import org.jetbrains.uast.UMethod
import org.jetbrains.uast.toUElement
import org.jetbrains.uast.*
import spp.jetbrains.marker.ArtifactNamingService
import spp.jetbrains.marker.source.JVMMarkerUtils
import spp.protocol.artifact.ArtifactQualifiedName
Expand All @@ -42,6 +39,7 @@ class JVMArtifactNamingService : ArtifactNamingService {
is UClass -> JVMMarkerUtils.getFullyQualifiedName(uElement)
is UMethod -> JVMMarkerUtils.getFullyQualifiedName(uElement)
is UExpression -> JVMMarkerUtils.getFullyQualifiedName(element)
is UDeclaration -> JVMMarkerUtils.getFullyQualifiedName(element)
else -> TODO("Not yet implemented")
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ package spp.jetbrains.marker.jvm

import com.intellij.openapi.application.ApplicationManager
import com.intellij.psi.JavaRecursiveElementVisitor
import com.intellij.psi.PsiElement
import com.intellij.psi.PsiMethod
import com.intellij.psi.PsiNameIdentifierOwner
import spp.jetbrains.marker.plugin.SourceGuideProvider
Expand All @@ -29,15 +30,22 @@ class JVMGuideProvider : SourceGuideProvider {

override fun determineGuideMarks(fileMarker: SourceFileMarker) {
fileMarker.psiFile.acceptChildren(object : JavaRecursiveElementVisitor() {
override fun visitMethod(method: PsiMethod) {
super.visitMethod(method)

ApplicationManager.getApplication().runReadAction {
fileMarker.createMethodSourceMark(
method as PsiNameIdentifierOwner, SourceMark.Type.GUIDE
).apply(true)
override fun visitElement(element: PsiElement) {
super.visitElement(element)
if (element is PsiMethod) {
makeMethodGuideMark(fileMarker, element)
} else if (element::class.java.name == "org.jetbrains.kotlin.psi.KtNamedFunction") {
makeMethodGuideMark(fileMarker, element)
}
}
})
}

private fun makeMethodGuideMark(fileMarker: SourceFileMarker, element: PsiElement) {
ApplicationManager.getApplication().runReadAction {
fileMarker.createMethodSourceMark(
element as PsiNameIdentifierOwner, SourceMark.Type.GUIDE
).apply(true)
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,12 @@ package spp.jetbrains.marker.jvm
import com.intellij.codeInsight.daemon.GutterIconNavigationHandler
import com.intellij.codeInsight.daemon.LineMarkerInfo
import com.intellij.openapi.editor.markup.GutterIconRenderer
import com.intellij.psi.*
import com.intellij.psi.PsiClass
import com.intellij.psi.PsiElement
import com.intellij.psi.PsiIdentifier
import com.intellij.psi.PsiJavaFile
import org.jetbrains.kotlin.psi.KtFile
import org.jetbrains.kotlin.psi.KtNamedFunction
import org.jetbrains.plugins.groovy.lang.psi.GroovyFile
import org.jetbrains.plugins.groovy.lang.psi.api.statements.typedef.members.GrMethod
import org.jetbrains.uast.UClass
import org.jetbrains.uast.UMethod
import org.jetbrains.uast.toUElement
Expand Down Expand Up @@ -58,15 +59,7 @@ abstract class JVMLineMarkerProvider : SourceLineMarkerProvider() {
): LineMarkerInfo<PsiElement>? {
return when {
parent is PsiClass && element === parent.nameIdentifier -> getClassGutterMark(element)
parent is PsiMethod && element === parent.nameIdentifier -> getMethodGutterMark(element)
parent?.javaClass?.simpleName?.equals("GrMethod") == true
&& (parent is GrMethod && element === parent.nameIdentifierGroovy) -> {
getMethodGutterMark(element)
}
parent?.javaClass?.simpleName?.equals("KtNamedFunction") == true
&& (parent is KtNamedFunction && element === parent.nameIdentifier) -> {
getMethodGutterMark(element)
}
element == JVMMarkerUtils.getNameIdentifier(parent) -> getMethodGutterMark(element)
else -> null
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,9 @@ package spp.jetbrains.marker.jvm

import com.intellij.codeInsight.hints.InlayHintsSink
import com.intellij.codeInsight.hints.presentation.InlayPresentation
import com.intellij.openapi.editor.BlockInlayPriority
import com.intellij.psi.PsiElement
import com.intellij.psi.PsiMethod
import com.intellij.psi.PsiStatement
import org.jetbrains.kotlin.psi.KtNamedFunction
import org.jetbrains.kotlin.psi.psiUtil.getParentOfType
import org.jetbrains.plugins.groovy.lang.psi.api.statements.typedef.members.GrMethod
import org.jetbrains.uast.UExpression
import org.jetbrains.uast.UMethod
import org.jetbrains.uast.toUElement
Expand All @@ -46,8 +42,7 @@ class JVMSourceInlayHintProvider : SourceInlayHintProvider() {
override fun createInlayMarkIfNecessary(element: PsiElement): InlayMark? {
val parent = element.parent
if ((parent is PsiMethod && element === parent.nameIdentifier)
|| (parent is GrMethod && element === parent.nameIdentifierGroovy)
|| (parent is KtNamedFunction && element === parent.nameIdentifier)
|| (JVMMarkerUtils.getNameIdentifier(parent) === element)
) {
val fileMarker = SourceMarker.getSourceFileMarker(element.containingFile)!!
val artifactQualifiedName = JVMMarkerUtils.getFullyQualifiedName(parent.toUElement() as UMethod)
Expand Down Expand Up @@ -106,7 +101,7 @@ class JVMSourceInlayHintProvider : SourceInlayHintProvider() {
startOffset,
virtualText.relatesToPrecedingText,
virtualText.showAbove,
BlockInlayPriority.CODE_VISION,
0,
representation
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
package spp.jetbrains.marker.jvm

import com.intellij.icons.AllIcons
import com.intellij.ide.highlighter.JavaHighlightingColors
import com.intellij.ide.projectView.PresentationData
import com.intellij.openapi.editor.DefaultLanguageHighlighterColors
import com.intellij.ui.SimpleTextAttributes
import com.intellij.ui.treeStructure.SimpleNode
import com.intellij.xdebugger.impl.ui.DebuggerUIUtil
Expand Down Expand Up @@ -98,12 +98,12 @@ class JVMVariableSimpleNode(val variable: LiveVariable) : SimpleNode() {
} else if (variable.liveClazz == "java.lang.String") {
presentation.addText(
"\"" + variable.value + "\"",
SimpleTextAttributes.fromTextAttributes(scheme.getAttributes(JavaHighlightingColors.STRING))
SimpleTextAttributes.fromTextAttributes(scheme.getAttributes(DefaultLanguageHighlighterColors.STRING))
)
} else if (numerals.contains(variable.liveClazz)) {
presentation.addText(
variable.value.toString(),
SimpleTextAttributes.fromTextAttributes(scheme.getAttributes(JavaHighlightingColors.NUMBER))
SimpleTextAttributes.fromTextAttributes(scheme.getAttributes(DefaultLanguageHighlighterColors.NUMBER))
)
}
presentation.setIcon(AllIcons.Debugger.Db_primitive)
Expand All @@ -121,12 +121,12 @@ class JVMVariableSimpleNode(val variable: LiveVariable) : SimpleNode() {
if (variable.value is Number) {
presentation.addText(
variable.value.toString(),
SimpleTextAttributes.fromTextAttributes(scheme.getAttributes(JavaHighlightingColors.NUMBER))
SimpleTextAttributes.fromTextAttributes(scheme.getAttributes(DefaultLanguageHighlighterColors.NUMBER))
)
} else {
presentation.addText(
"\"" + variable.value + "\"",
SimpleTextAttributes.fromTextAttributes(scheme.getAttributes(JavaHighlightingColors.STRING))
SimpleTextAttributes.fromTextAttributes(scheme.getAttributes(DefaultLanguageHighlighterColors.STRING))
)
}

Expand Down
Loading

0 comments on commit 7322ee5

Please sign in to comment.