diff --git a/gradle.properties b/gradle.properties index 0addd6acb..070f00a12 100644 --- a/gradle.properties +++ b/gradle.properties @@ -4,14 +4,14 @@ kotlin.code.style=official pluginGroup = spp.jetbrains pluginName = Source++ -projectVersion=0.4.3 +projectVersion=0.4.4 pluginSinceBuild = 202.4357 # 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.3.2, 2021.3.2 +pluginVerifierIdeVersions = 2020.3.2, 2021.3.3 platformType = IC -ideVersion = 2021.3.2 +ideVersion = 2021.3.3 platformDownloadSources = true # Plugin Dependencies -> https://plugins.jetbrains.com/docs/intellij/plugin-dependencies.html # Example: platformPlugins = com.intellij.java, com.jetbrains.php:203.4449.22 diff --git a/marker/src/main/kotlin/spp/jetbrains/marker/SourceMarker.kt b/marker/src/main/kotlin/spp/jetbrains/marker/SourceMarker.kt index 77de1777f..4663b3186 100755 --- a/marker/src/main/kotlin/spp/jetbrains/marker/SourceMarker.kt +++ b/marker/src/main/kotlin/spp/jetbrains/marker/SourceMarker.kt @@ -51,7 +51,7 @@ object SourceMarker { private val availableSourceFileMarkers = Maps.newConcurrentMap() private val globalSourceMarkEventListeners = Lists.newArrayList() - fun clearAvailableSourceFileMarkers() { + suspend fun clearAvailableSourceFileMarkers() { check(enabled) { "SourceMarker disabled" } availableSourceFileMarkers.forEach { @@ -60,23 +60,7 @@ object SourceMarker { availableSourceFileMarkers.clear() } - fun refreshAvailableSourceFileMarkers(recreateFileMarkers: Boolean) { - check(enabled) { "SourceMarker disabled" } - - if (recreateFileMarkers) { - val previousFileMarkers = getAvailableSourceFileMarkers() - clearAvailableSourceFileMarkers() - previousFileMarkers.forEach { - getSourceFileMarker(it.psiFile)!!.refresh() - } - } else { - availableSourceFileMarkers.forEach { - it.value.refresh() - } - } - } - - fun deactivateSourceFileMarker(sourceFileMarker: SourceFileMarker): Boolean { + suspend fun deactivateSourceFileMarker(sourceFileMarker: SourceFileMarker): Boolean { check(enabled) { "SourceMarker disabled" } if (availableSourceFileMarkers.remove(sourceFileMarker.hashCode()) != null) { diff --git a/marker/src/main/kotlin/spp/jetbrains/marker/plugin/FileActivityListener.kt b/marker/src/main/kotlin/spp/jetbrains/marker/plugin/FileActivityListener.kt index 3725fe75d..4180b6ab5 100644 --- a/marker/src/main/kotlin/spp/jetbrains/marker/plugin/FileActivityListener.kt +++ b/marker/src/main/kotlin/spp/jetbrains/marker/plugin/FileActivityListener.kt @@ -31,6 +31,7 @@ import com.intellij.openapi.project.Project import com.intellij.openapi.vfs.VirtualFile import com.intellij.psi.PsiFile import com.intellij.psi.PsiManager +import kotlinx.coroutines.runBlocking import org.slf4j.LoggerFactory import spp.jetbrains.marker.SourceMarker import spp.jetbrains.marker.source.SourceFileMarker @@ -61,7 +62,9 @@ class FileActivityListener : FileEditorManagerListener { val psiFile = PsiManager.getInstance(source.project).findFile(file) val fileMarker = psiFile?.getUserData(SourceFileMarker.KEY) if (fileMarker != null) { - SourceMarker.deactivateSourceFileMarker(fileMarker) + runBlocking { + SourceMarker.deactivateSourceFileMarker(fileMarker) + } } } } diff --git a/marker/src/main/kotlin/spp/jetbrains/marker/plugin/SourceInlayHintProvider.kt b/marker/src/main/kotlin/spp/jetbrains/marker/plugin/SourceInlayHintProvider.kt index f824e1024..5be1fe4ce 100644 --- a/marker/src/main/kotlin/spp/jetbrains/marker/plugin/SourceInlayHintProvider.kt +++ b/marker/src/main/kotlin/spp/jetbrains/marker/plugin/SourceInlayHintProvider.kt @@ -29,6 +29,7 @@ import com.intellij.openapi.editor.impl.EditorImpl import com.intellij.openapi.editor.markup.EffectType import com.intellij.openapi.editor.markup.TextAttributes import com.intellij.openapi.fileEditor.FileEditorManager +import com.intellij.openapi.util.Disposer import com.intellij.psi.PsiElement import com.intellij.psi.PsiFile import com.intellij.ui.paint.EffectPainter @@ -37,6 +38,7 @@ import org.slf4j.LoggerFactory import spp.jetbrains.marker.SourceMarker import spp.jetbrains.marker.SourceMarker.getSourceFileMarker import spp.jetbrains.marker.source.mark.api.event.SourceMarkEventCode.MARK_REMOVED +import spp.jetbrains.marker.source.mark.api.event.SourceMarkEventListener import spp.jetbrains.marker.source.mark.api.key.SourceKey import spp.jetbrains.marker.source.mark.inlay.InlayMark import spp.jetbrains.marker.source.mark.inlay.config.InlayMarkVirtualText @@ -60,37 +62,32 @@ abstract class SourceInlayHintProvider : InlayHintsProvider { companion object { private val log = LoggerFactory.getLogger(SourceInlayHintProvider::class.java) - @Volatile - @JvmField - var latestInlayMarkAddedAt: Long = -1L - - init { - SourceMarker.addGlobalSourceMarkEventListener { event -> - when (event.eventCode) { - VIRTUAL_TEXT_UPDATED, INLAY_MARK_VISIBLE, INLAY_MARK_HIDDEN -> { - ApplicationManager.getApplication().invokeLater { - FileEditorManager.getInstance(event.sourceMark.project).selectedTextEditor?.inlayModel - //todo: smaller range - ?.getInlineElementsInRange(0, Integer.MAX_VALUE)?.forEach { - it.repaint() - } - FileEditorManager.getInstance(event.sourceMark.project).selectedTextEditor?.inlayModel - //todo: smaller range - ?.getAfterLineEndElementsInRange(0, Integer.MAX_VALUE)?.forEach { - it.repaint() - } - FileEditorManager.getInstance(event.sourceMark.project).selectedTextEditor?.inlayModel - //todo: smaller range - ?.getBlockElementsInRange(0, Integer.MAX_VALUE)?.forEach { - it.repaint() - } - } + val EVENT_LISTENER = SourceMarkEventListener { event -> + when (event.eventCode) { + VIRTUAL_TEXT_UPDATED, INLAY_MARK_VISIBLE, INLAY_MARK_HIDDEN -> { + ApplicationManager.getApplication().invokeLater { + FileEditorManager.getInstance(event.sourceMark.project).selectedTextEditor?.inlayModel + //todo: smaller range + ?.getInlineElementsInRange(0, Integer.MAX_VALUE)?.forEach { + it.repaint() + } + FileEditorManager.getInstance(event.sourceMark.project).selectedTextEditor?.inlayModel + //todo: smaller range + ?.getAfterLineEndElementsInRange(0, Integer.MAX_VALUE)?.forEach { + it.repaint() + } + FileEditorManager.getInstance(event.sourceMark.project).selectedTextEditor?.inlayModel + //todo: smaller range + ?.getBlockElementsInRange(0, Integer.MAX_VALUE)?.forEach { + it.repaint() + } } - MARK_REMOVED -> { - ApplicationManager.getApplication().invokeLater { - FileEditorManager.getInstance(event.sourceMark.project).selectedTextEditor?.inlayModel - //todo: smaller range - ?.getBlockElementsInRange(0, Integer.MAX_VALUE)?.forEach { + } + MARK_REMOVED -> { + ApplicationManager.getApplication().invokeLater { + FileEditorManager.getInstance(event.sourceMark.project).selectedTextEditor?.inlayModel + //todo: smaller range + ?.getBlockElementsInRange(0, Integer.MAX_VALUE)?.forEach { if (it.renderer is BlockInlayRenderer) { val cachedPresentation = Reflect.on(it.renderer).field("cachedPresentation").get() if (cachedPresentation is RecursivelyUpdatingRootPresentation) { @@ -99,18 +96,21 @@ abstract class SourceInlayHintProvider : InlayHintsProvider { if (delegatePresentation.presentation is DynamicTextInlayPresentation) { val dynamicPresentation = delegatePresentation.presentation as DynamicTextInlayPresentation if (dynamicPresentation.inlayMark == event.sourceMark) { - it.dispose() + Disposer.dispose(it) } } } } } } - } } } } } + + @Volatile + @JvmField + var latestInlayMarkAddedAt: Long = -1L } override val key: SettingsKey = SettingsKey("SourceMarker/InlayHints") @@ -201,13 +201,13 @@ abstract class SourceInlayHintProvider : InlayHintsProvider { if (virtualText.icon != null) { virtualText.icon!!.paintIcon(null, g, virtualText.iconLocation.x, virtualText.iconLocation.y) } - g.font = font + g.font = virtualText.font ?: font g.setRenderingHint( RenderingHints.KEY_TEXT_ANTIALIASING, AntialiasingType.getKeyForCurrentScope(false) ) g.color = foreground - g.drawString(virtualText.getRenderedVirtualText(), 0, ascent) + g.drawString(virtualText.getRenderedVirtualText(), virtualText.xOffset, ascent) val effectColor = virtualText.textAttributes.effectColor if (effectColor != null) { g.color = effectColor diff --git a/marker/src/main/kotlin/spp/jetbrains/marker/source/SourceFileMarker.kt b/marker/src/main/kotlin/spp/jetbrains/marker/source/SourceFileMarker.kt index 8b093e294..d76cf660f 100755 --- a/marker/src/main/kotlin/spp/jetbrains/marker/source/SourceFileMarker.kt +++ b/marker/src/main/kotlin/spp/jetbrains/marker/source/SourceFileMarker.kt @@ -26,6 +26,7 @@ import com.intellij.openapi.util.Key import com.intellij.psi.PsiElement import com.intellij.psi.PsiFile import com.intellij.psi.PsiNameIdentifierOwner +import kotlinx.coroutines.runBlocking import org.slf4j.LoggerFactory import spp.jetbrains.marker.source.mark.api.* import spp.jetbrains.marker.source.mark.api.event.SourceMarkEvent @@ -83,9 +84,11 @@ open class SourceFileMarker(val psiFile: PsiFile) : SourceMarkProvider { } } - open fun clearSourceMarks() { + open suspend fun clearSourceMarks() { val removed = sourceMarks.removeIf { - it.dispose(false) + runBlocking { + it.disposeSuspend(false) + } true } if (removed) refresh() diff --git a/marker/src/main/kotlin/spp/jetbrains/marker/source/mark/api/ClassSourceMark.kt b/marker/src/main/kotlin/spp/jetbrains/marker/source/mark/api/ClassSourceMark.kt index 0e60ae834..2984ae701 100644 --- a/marker/src/main/kotlin/spp/jetbrains/marker/source/mark/api/ClassSourceMark.kt +++ b/marker/src/main/kotlin/spp/jetbrains/marker/source/mark/api/ClassSourceMark.kt @@ -84,13 +84,13 @@ abstract class ClassSourceMark( false } - override fun apply(sourceMarkComponent: SourceMarkComponent, addToMarker: Boolean) { + override fun apply(sourceMarkComponent: SourceMarkComponent, addToMarker: Boolean, editor: Editor?) { this.sourceMarkComponent = sourceMarkComponent - super.apply(addToMarker) + super.apply(addToMarker, editor) } - override fun apply(addToMarker: Boolean) { - apply(configuration.componentProvider.getComponent(this), addToMarker) + override fun apply(addToMarker: Boolean, editor: Editor?) { + apply(configuration.componentProvider.getComponent(this), addToMarker, editor) } override fun dispose(removeFromMarker: Boolean, assertRemoval: Boolean) { @@ -99,6 +99,12 @@ abstract class ClassSourceMark( super.dispose(removeFromMarker, assertRemoval) } + override suspend fun disposeSuspend(removeFromMarker: Boolean, assertRemoval: Boolean) { + psiClass.nameIdentifier?.putUserData(SourceKey.GutterMark, null) + psiClass.nameIdentifier?.putUserData(SourceKey.InlayMark, null) + super.disposeSuspend(removeFromMarker, assertRemoval) + } + private val userData = HashMap() override fun getUserData(key: SourceKey): T? = userData[key] as T? override fun putUserData(key: SourceKey, value: T?) { diff --git a/marker/src/main/kotlin/spp/jetbrains/marker/source/mark/api/ExpressionSourceMark.kt b/marker/src/main/kotlin/spp/jetbrains/marker/source/mark/api/ExpressionSourceMark.kt index 5aa39f836..c1d0b7ef1 100644 --- a/marker/src/main/kotlin/spp/jetbrains/marker/source/mark/api/ExpressionSourceMark.kt +++ b/marker/src/main/kotlin/spp/jetbrains/marker/source/mark/api/ExpressionSourceMark.kt @@ -80,13 +80,13 @@ abstract class ExpressionSourceMark( } @Synchronized - override fun apply(sourceMarkComponent: SourceMarkComponent, addToMarker: Boolean) { + override fun apply(sourceMarkComponent: SourceMarkComponent, addToMarker: Boolean, editor: Editor?) { this.sourceMarkComponent = sourceMarkComponent - super.apply(addToMarker) + super.apply(addToMarker, editor) } - override fun apply(addToMarker: Boolean) { - apply(configuration.componentProvider.getComponent(this), addToMarker) + override fun apply(addToMarker: Boolean, editor: Editor?) { + apply(configuration.componentProvider.getComponent(this), addToMarker, editor) } override fun dispose(removeFromMarker: Boolean, assertRemoval: Boolean) { @@ -98,6 +98,15 @@ abstract class ExpressionSourceMark( super.dispose(removeFromMarker, assertRemoval) } + override suspend fun disposeSuspend(removeFromMarker: Boolean, assertRemoval: Boolean) { + when (this) { + is GutterMark -> getPsiElement().putUserData(SourceKey.GutterMark, null) + is InlayMark -> getPsiElement().putUserData(SourceKey.InlayMark, null) + else -> throw IllegalStateException("ExpressionSourceMark is not a GutterMark or InlayMark") + } + super.disposeSuspend(removeFromMarker, assertRemoval) + } + fun getParentSourceMark(): SourceMark? { return SourceMarker.getSourceMark( artifactQualifiedName.copy( diff --git a/marker/src/main/kotlin/spp/jetbrains/marker/source/mark/api/MethodSourceMark.kt b/marker/src/main/kotlin/spp/jetbrains/marker/source/mark/api/MethodSourceMark.kt index 0c45d39f5..4f7ef34af 100644 --- a/marker/src/main/kotlin/spp/jetbrains/marker/source/mark/api/MethodSourceMark.kt +++ b/marker/src/main/kotlin/spp/jetbrains/marker/source/mark/api/MethodSourceMark.kt @@ -85,13 +85,13 @@ abstract class MethodSourceMark( } @Synchronized - override fun apply(sourceMarkComponent: SourceMarkComponent, addToMarker: Boolean) { + override fun apply(sourceMarkComponent: SourceMarkComponent, addToMarker: Boolean, editor: Editor?) { this.sourceMarkComponent = sourceMarkComponent - super.apply(addToMarker) + super.apply(addToMarker, editor) } - override fun apply(addToMarker: Boolean) { - apply(configuration.componentProvider.getComponent(this), addToMarker) + override fun apply(addToMarker: Boolean, editor: Editor?) { + apply(configuration.componentProvider.getComponent(this), addToMarker, editor) } override fun dispose(removeFromMarker: Boolean, assertRemoval: Boolean) { @@ -100,6 +100,12 @@ abstract class MethodSourceMark( super.dispose(removeFromMarker, assertRemoval) } + override suspend fun disposeSuspend(removeFromMarker: Boolean, assertRemoval: Boolean) { + psiMethod.nameIdentifier?.putUserData(SourceKey.GutterMark, null) + psiMethod.nameIdentifier?.putUserData(SourceKey.InlayMark, null) + super.disposeSuspend(removeFromMarker, assertRemoval) + } + private val userData = HashMap() override fun getUserData(key: SourceKey): T? = userData[key] as T? override fun putUserData(key: SourceKey, value: T?) { diff --git a/marker/src/main/kotlin/spp/jetbrains/marker/source/mark/api/SourceMark.kt b/marker/src/main/kotlin/spp/jetbrains/marker/source/mark/api/SourceMark.kt index 3e0223798..3ebe97238 100755 --- a/marker/src/main/kotlin/spp/jetbrains/marker/source/mark/api/SourceMark.kt +++ b/marker/src/main/kotlin/spp/jetbrains/marker/source/mark/api/SourceMark.kt @@ -40,6 +40,7 @@ import com.intellij.ui.awt.RelativePoint import com.intellij.util.ui.JBUI import kotlinx.coroutines.GlobalScope import kotlinx.coroutines.launch +import kotlinx.coroutines.runBlocking import org.slf4j.LoggerFactory import spp.jetbrains.marker.SourceMarker import spp.jetbrains.marker.plugin.SourceInlayComponentProvider @@ -119,8 +120,8 @@ interface SourceMark : JBPopupListener, MouseMotionListener, VisibleAreaListener fun setVisible(visible: Boolean) fun canApply(): Boolean = configuration.applySourceMarkFilter.test(this) - fun apply(sourceMarkComponent: SourceMarkComponent, addToMarker: Boolean = true) - fun apply(addToMarker: Boolean = true) { + fun apply(sourceMarkComponent: SourceMarkComponent, addToMarker: Boolean = true, editor: Editor? = null) + fun apply(addToMarker: Boolean = true, editor: Editor? = null) { SourceMarker.getGlobalSourceMarkEventListeners().forEach(::addEventListener) if (addToMarker) { @@ -143,12 +144,12 @@ interface SourceMark : JBPopupListener, MouseMotionListener, VisibleAreaListener } } else if (this is InlayMark) { if (configuration.showComponentInlay) { - val editor = FileEditorManager.getInstance(project).selectedTextEditor - if (editor == null) { + val selectedEditor = editor ?: FileEditorManager.getInstance(project).selectedTextEditor + if (selectedEditor == null) { TODO() } else { - val provider = SourceInlayComponentProvider.from(editor) - val viewport = (editor as? EditorImpl)?.scrollPane?.viewport!! + val provider = SourceInlayComponentProvider.from(selectedEditor) + val viewport = (selectedEditor as? EditorImpl)?.scrollPane?.viewport!! var displayLineIndex = lineNumber - 1 if (this is ExpressionInlayMark) { if (showAboveExpression) { @@ -232,6 +233,24 @@ interface SourceMark : JBPopupListener, MouseMotionListener, VisibleAreaListener } } + suspend fun disposeSuspend(removeFromMarker: Boolean = true, assertRemoval: Boolean = true) { + if (this is InlayMark) { + configuration.inlayRef?.get()?.dispose() + configuration.inlayRef = null + } + closePopup() + + if (removeFromMarker) { + if (assertRemoval) { + check(sourceFileMarker.removeSourceMark(this, autoRefresh = true, autoDispose = false)) + } else { + sourceFileMarker.removeSourceMark(this, autoRefresh = true, autoDispose = false) + } + } + triggerEventSuspend(SourceMarkEvent(this, SourceMarkEventCode.MARK_REMOVED)) + clearEventListeners() + } + fun getUserData(key: SourceKey): T? fun putUserData(key: SourceKey, value: T?) fun hasUserData(): Boolean @@ -261,6 +280,22 @@ interface SourceMark : JBPopupListener, MouseMotionListener, VisibleAreaListener } } + suspend fun triggerEventSuspend(event: SourceMarkEvent) { + //sync listeners + getEventListeners() + .filterIsInstance() + .forEach { it.handleEvent(event) } + + //async listeners + runBlocking { + getEventListeners().forEach { + if (it !is SynchronousSourceMarkEventListener) { + it.handleEvent(event) + } + } + } + } + fun closePopup() { if (openedMarks.remove(this)) { log.trace("Closing popup") diff --git a/marker/src/main/kotlin/spp/jetbrains/marker/source/mark/inlay/config/InlayMarkVirtualText.kt b/marker/src/main/kotlin/spp/jetbrains/marker/source/mark/inlay/config/InlayMarkVirtualText.kt index bf2b2b536..e11b1d5db 100644 --- a/marker/src/main/kotlin/spp/jetbrains/marker/source/mark/inlay/config/InlayMarkVirtualText.kt +++ b/marker/src/main/kotlin/spp/jetbrains/marker/source/mark/inlay/config/InlayMarkVirtualText.kt @@ -23,6 +23,7 @@ import com.intellij.openapi.editor.markup.TextAttributes import spp.jetbrains.marker.source.mark.api.event.SourceMarkEvent import spp.jetbrains.marker.source.mark.inlay.InlayMark import spp.jetbrains.marker.source.mark.inlay.event.InlayMarkEventCode +import java.awt.Font import java.awt.Point import javax.swing.Icon @@ -47,6 +48,8 @@ open class InlayMarkVirtualText { var showBeforeAnnotationsWhenBlock: Boolean = true var spacingTillMethodText = 0 var autoAddingSpacingTillMethodText = true + var font: Font? = null + var xOffset: Int = 0 constructor(inlayMark: InlayMark, virtualText: String) { this.inlayMark = inlayMark diff --git a/plugin/src/main/java/spp/jetbrains/sourcemarker/ControlBar.java b/plugin/src/main/java/spp/jetbrains/sourcemarker/ControlBar.java index 3e868fa28..d9293b89e 100644 --- a/plugin/src/main/java/spp/jetbrains/sourcemarker/ControlBar.java +++ b/plugin/src/main/java/spp/jetbrains/sourcemarker/ControlBar.java @@ -6,6 +6,7 @@ import com.intellij.util.ui.UIUtil; import info.debatty.java.stringsimilarity.JaroWinkler; import net.miginfocom.swing.MigLayout; +import spp.jetbrains.marker.source.mark.api.ExpressionSourceMark; import spp.jetbrains.marker.source.mark.inlay.InlayMark; import spp.jetbrains.sourcemarker.command.AutocompleteFieldRow; import spp.jetbrains.sourcemarker.command.ControlBarController; @@ -24,6 +25,7 @@ import java.util.function.Function; import java.util.stream.Collectors; +import static spp.jetbrains.sourcemarker.PluginBundle.message; import static spp.jetbrains.sourcemarker.PluginUI.*; import static spp.jetbrains.sourcemarker.status.util.ViewUtils.addRecursiveMouseListener; @@ -197,7 +199,7 @@ private void initComponents() { location = className + "." + shortFuncName; } textField1 = new AutocompleteField( - "Location: " + location + "#" + inlayMark.getLineNumber(), + message("location") + ": " + location + "#" + inlayMark.getLineNumber(), availableCommands, lookup, inlayMark.getArtifactQualifiedName(), true, true, SELECT_COLOR_RED); textField1.setCellRenderer(new ControlBarCellRenderer(textField1)); label2 = new JLabel(); @@ -224,7 +226,7 @@ private void initComponents() { textField1.setBorder(new CompoundBorder( new LineBorder(UIUtil.getBoundsColor(), 1, true), new EmptyBorder(2, 6, 0, 0))); - textField1.setFont(ROBOTO_LIGHT_PLAIN_17); + textField1.setFont(BIG_FONT); textField1.setMinimumSize(new Dimension(0, 27)); add(textField1, "cell 1 0"); diff --git a/plugin/src/main/java/spp/jetbrains/sourcemarker/PluginIcons.java b/plugin/src/main/java/spp/jetbrains/sourcemarker/PluginIcons.java index adf1e15d6..500bc613a 100644 --- a/plugin/src/main/java/spp/jetbrains/sourcemarker/PluginIcons.java +++ b/plugin/src/main/java/spp/jetbrains/sourcemarker/PluginIcons.java @@ -14,15 +14,15 @@ public interface PluginIcons { Icon closePressed = IconLoader.getIcon("/icons/closeIconPressed.svg", PluginIcons.class); Icon clock = IconLoader.getIcon("/icons/clock.svg", PluginIcons.class); - Icon alignLeft = IconLoader.getIcon("/icons/align-left.svg", PluginIcons.class); + Icon logConfig = IconLoader.getIcon("/icons/log-config.svg", PluginIcons.class); Icon angleDown = IconLoader.getIcon("/icons/angle-down.svg", PluginIcons.class); - Icon eye = IconLoader.getIcon("/icons/eye.svg", PluginIcons.class); + Icon breakpointConfig = IconLoader.getIcon("/icons/breakpoint-config.svg", PluginIcons.class); Icon eyeSlash = IconLoader.getIcon("/icons/eye-slash.svg", PluginIcons.class); - Icon analytics = IconLoader.getIcon("/icons/analytics.svg", PluginIcons.class); + Icon meterConfig = IconLoader.getIcon("/icons/meter-config.svg", PluginIcons.class); - Icon mapMarkedAlt = IconLoader.getIcon("/icons/map-marked-alt.svg", PluginIcons.class); + Icon spanConfig = IconLoader.getIcon("/icons/span-config.svg", PluginIcons.class); Icon config = IconLoader.getIcon("/icons/configIcon.svg", PluginIcons.class); Icon configHovered = IconLoader.getIcon("/icons/configIconHovered.svg", PluginIcons.class); @@ -66,6 +66,12 @@ interface Command { Icon viewTracesUnSelected = IconLoader.getIcon("/icons/command/view-traces_unselected.svg", PluginIcons.class); Icon viewLogsSelected = IconLoader.getIcon("/icons/command/view-logs_selected.svg", PluginIcons.class); Icon viewLogsUnSelected = IconLoader.getIcon("/icons/command/view-logs_unselected.svg", PluginIcons.class); + + Icon quickStatsSelected = IconLoader.getIcon("/icons/command/quick-stats_selected.svg", PluginIcons.class); + Icon quickStatsUnSelected = IconLoader.getIcon("/icons/command/quick-stats_unselected.svg", PluginIcons.class); + + Icon watchLogSelected = IconLoader.getIcon("/icons/command/watch-log_selected.svg", PluginIcons.class); + Icon watchLogUnSelected = IconLoader.getIcon("/icons/command/watch-log_unselected.svg", PluginIcons.class); } interface Instrument { diff --git a/plugin/src/main/java/spp/jetbrains/sourcemarker/PluginUI.java b/plugin/src/main/java/spp/jetbrains/sourcemarker/PluginUI.java index 002648e61..2019372ba 100644 --- a/plugin/src/main/java/spp/jetbrains/sourcemarker/PluginUI.java +++ b/plugin/src/main/java/spp/jetbrains/sourcemarker/PluginUI.java @@ -1,5 +1,7 @@ package spp.jetbrains.sourcemarker; +import com.intellij.DynamicBundle; +import com.intellij.ui.Gray; import com.intellij.ui.JBColor; import com.intellij.util.ui.UIUtil; @@ -9,49 +11,64 @@ public class PluginUI { - public static final LineBorder PANEL_BORDER = new LineBorder(new Color(85, 85, 85)); + public static final LineBorder PANEL_BORDER = new LineBorder(Gray._85); - public static Font ROBOTO_PLAIN_15; - public static Font ROBOTO_PLAIN_11; public static Font ROBOTO_LIGHT_BOLD_14; - public static Font ROBOTO_LIGHT_PLAIN_14; - public static Font ROBOTO_LIGHT_PLAIN_15; - public static Font ROBOTO_LIGHT_PLAIN_16; - public static Font ROBOTO_LIGHT_PLAIN_17; + private static Font ROBOTO_LIGHT_PLAIN_14; + private static Font ROBOTO_LIGHT_PLAIN_15; + private static Font ROBOTO_LIGHT_PLAIN_16; + private static Font ROBOTO_LIGHT_PLAIN_17; + private static Font MICROSOFT_YAHEI_PLAIN_13; + public static Font MICROSOFT_YAHEI_PLAIN_14; + private static Font MICROSOFT_YAHEI_PLAIN_15; + private static Font MICROSOFT_YAHEI_PLAIN_16; static { try { - Font ROBOTO = Font.createFont(Font.TRUETYPE_FONT, PluginUI.class.getResourceAsStream("/fonts/Roboto-Regular.ttf")); Font ROBOTO_LIGHT = Font.createFont(Font.TRUETYPE_FONT, PluginUI.class.getResourceAsStream("/fonts/Roboto-Light.ttf")); - - ROBOTO_PLAIN_15 = ROBOTO.deriveFont(Font.PLAIN).deriveFont(15f); - ROBOTO_PLAIN_11 = ROBOTO.deriveFont(Font.PLAIN).deriveFont(11f); ROBOTO_LIGHT_BOLD_14 = ROBOTO_LIGHT.deriveFont(Font.BOLD).deriveFont(14f); ROBOTO_LIGHT_PLAIN_14 = ROBOTO_LIGHT.deriveFont(Font.PLAIN).deriveFont(14f); ROBOTO_LIGHT_PLAIN_15 = ROBOTO_LIGHT.deriveFont(Font.PLAIN).deriveFont(15f); ROBOTO_LIGHT_PLAIN_16 = ROBOTO_LIGHT.deriveFont(Font.PLAIN).deriveFont(16f); ROBOTO_LIGHT_PLAIN_17 = ROBOTO_LIGHT.deriveFont(Font.PLAIN).deriveFont(17f); + + Font YAHEI = Font.createFont(Font.TRUETYPE_FONT, PluginUI.class.getResourceAsStream("/fonts/chinese.msyh.ttf")); + MICROSOFT_YAHEI_PLAIN_13 = YAHEI.deriveFont(Font.PLAIN).deriveFont(13f); + MICROSOFT_YAHEI_PLAIN_14 = YAHEI.deriveFont(Font.PLAIN).deriveFont(14f); + MICROSOFT_YAHEI_PLAIN_15 = YAHEI.deriveFont(Font.PLAIN).deriveFont(15f); + MICROSOFT_YAHEI_PLAIN_16 = YAHEI.deriveFont(Font.PLAIN).deriveFont(16f); } catch (FontFormatException | IOException e) { e.printStackTrace(); } } - public static final Color PANEL_BACKGROUND_COLOR = new Color(37, 37, 37); + public static final Font BIG_FONT = (DynamicBundle.getLocale().getLanguage().equals("zh")) ? MICROSOFT_YAHEI_PLAIN_16 : ROBOTO_LIGHT_PLAIN_17; + public static final Font SMALL_FONT = (DynamicBundle.getLocale().getLanguage().equals("zh")) ? MICROSOFT_YAHEI_PLAIN_15 : ROBOTO_LIGHT_PLAIN_16; + public static final Font SMALLER_FONT = (DynamicBundle.getLocale().getLanguage().equals("zh")) ? MICROSOFT_YAHEI_PLAIN_14 : ROBOTO_LIGHT_PLAIN_15; + public static final Font SMALLEST_FONT = (DynamicBundle.getLocale().getLanguage().equals("zh")) ? MICROSOFT_YAHEI_PLAIN_13 : ROBOTO_LIGHT_PLAIN_14; + public static final Color PANEL_BACKGROUND_COLOR = Gray._37; public static final Color LABEL_FOREGROUND_COLOR = new Color(152, 118, 170); public static final Color LABEL_FOREGROUND_COLOR1 = new Color(106, 135, 89); public static final Color EXPIRY_FOREGROUND_COLOR = Color.decode("#BBBBBB"); public static final Color SELECT_COLOR_RED = Color.decode("#e1483b"); public static final Color COMPLETE_COLOR_PURPLE = Color.decode("#9876AA"); - public static final JBColor STATUS_BAR_TXT_BG_COLOR = new JBColor(Color.white, new Color(37, 37, 37)); - public static final JBColor AUTO_COMPLETE_HIGHLIGHT_COLOR = new JBColor(new Color(10, 108, 161), new Color(25, 25, 25)); - public static final JBColor CONTROL_BAR_CMD_FOREGROUND = new JBColor(Color.black, Color.gray); - public static final JBColor DFLT_BGND_COLOR = new JBColor(new Color(242, 242, 242), new Color(50, 50, 50)); - public static final JBColor CNFG_PANEL_BGND_COLOR = new JBColor(new Color(242, 242, 242), new Color(37, 37, 37)); - public static final JBColor CNFG_PANEL_FOCUS_COLOR = new JBColor(new Color(10, 108, 161), new Color(0, 0, 0)); - public static final JBColor BGND_FOCUS_COLOR = new JBColor(new Color(10, 108, 161), new Color(25, 25, 25)); + public static final JBColor STATUS_BAR_TXT_BG_COLOR = new JBColor(JBColor.WHITE, Gray._37); + public static final JBColor CONTROL_BAR_CMD_FOREGROUND = new JBColor(JBColor.BLACK, JBColor.GRAY); + public static final JBColor DFLT_BGND_COLOR = new JBColor(Gray._242, Gray._50); + public static final JBColor CNFG_PANEL_BGND_COLOR = new JBColor(Gray._242, Gray._37); + public static final JBColor BGND_FOCUS_COLOR = new JBColor(Gray._175, Gray._25); + public static final JBColor COMMAND_TYPE_COLOR = new JBColor(JBColor.BLACK, Gray._125); + public static final JBColor COMMAND_HIGHLIGHT_COLOR = new JBColor(SELECT_COLOR_RED, Color.decode("#E6E6E6")); + + public static String getCommandTypeColor() { + return "#" + Integer.toHexString(COMMAND_TYPE_COLOR.getRGB()).substring(2); + } + + public static String getCommandHighlightColor() { + return "#" + Integer.toHexString(COMMAND_HIGHLIGHT_COLOR.getRGB()).substring(2); + } public static Color getEditCompleteColor() { return UIUtil.getWindowColor();//Color.decode("#2B2B2B"); } - } diff --git a/plugin/src/main/java/spp/jetbrains/sourcemarker/element/LiveControlBarRow.java b/plugin/src/main/java/spp/jetbrains/sourcemarker/element/LiveControlBarRow.java index 72edad976..199587ef5 100644 --- a/plugin/src/main/java/spp/jetbrains/sourcemarker/element/LiveControlBarRow.java +++ b/plugin/src/main/java/spp/jetbrains/sourcemarker/element/LiveControlBarRow.java @@ -22,12 +22,13 @@ public void setCommandName(String commandName, String input) { String selectHex = "#" + Integer.toHexString(SELECT_COLOR_RED.getRGB()).substring(2); String defaultHex = "#" + Integer.toHexString(CONTROL_BAR_CMD_FOREGROUND.getRGB()).substring(2); + int minIndex = 0; Map matches = new HashMap<>(); - Set inputWords = new HashSet<>(Arrays.asList(input.toLowerCase().split(" "))); - for (String inputWord : inputWords) { - int startIndex = commandName.toLowerCase().indexOf(inputWord); + for (String inputWord : input.toLowerCase().split(" ")) { + int startIndex = commandName.toLowerCase().indexOf(inputWord, minIndex); if (startIndex > -1) { matches.put(startIndex, inputWord.length()); + minIndex = startIndex + inputWord.length(); } } @@ -36,7 +37,7 @@ public void setCommandName(String commandName, String input) { String updatedCommand = commandName; for (Map.Entry entry : matches.entrySet()) { String colored = colorMatchingString(updatedCommand, selectHex, entry.getKey() + diff, entry.getValue()); - diff = colored.length() - updatedCommand.length(); + diff += colored.length() - updatedCommand.length(); updatedCommand = colored; } commandName = updatedCommand; @@ -49,7 +50,7 @@ private String colorMatchingString(String commandName, String selectHex, int sta int endIndex = startIndex + length; StringBuilder sb = new StringBuilder(commandName.substring(0, startIndex)); sb.append(""); - sb.append(commandName.substring(startIndex, endIndex)); + sb.append(commandName, startIndex, endIndex); sb.append(""); sb.append(commandName.substring(endIndex)); commandName = sb.toString(); @@ -108,19 +109,18 @@ private void initComponents() { //---- commandLabel ---- commandLabel.setBackground(null); commandLabel.setEditable(false); - commandLabel.setFont(ROBOTO_PLAIN_15); - commandLabel.setText("Manual Tracing \u279b Watched Variables \u279b Scope: Local"); + commandLabel.setFont(SMALLER_FONT.deriveFont(Font.BOLD)); commandLabel.setContentType("text/html"); commandLabel.setMaximumSize(new Dimension(2147483647, 12)); + commandLabel.putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES, true); panel1.add(commandLabel, cc.xy(1, 1)); //---- descriptionLabel ---- - descriptionLabel.setText("Manual Tracing \u279b Watched Variables \u279b Scope: Local"); descriptionLabel.setBackground(null); - descriptionLabel.setFont(ROBOTO_PLAIN_11); - descriptionLabel.setForeground(Color.gray); + descriptionLabel.setFont(SMALLER_FONT); descriptionLabel.setContentType("text/html"); descriptionLabel.setEditable(false); + descriptionLabel.putClientProperty(JEditorPane.HONOR_DISPLAY_PROPERTIES, true); panel1.add(descriptionLabel, new CellConstraints(1, 2, 1, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(-7, 0, 0, 0))); } add(panel1, new CellConstraints(1, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(3, 10, 0, 0))); diff --git a/plugin/src/main/java/spp/jetbrains/sourcemarker/settings/LiveBreakpointConfigurationPanel.java b/plugin/src/main/java/spp/jetbrains/sourcemarker/settings/LiveBreakpointConfigurationPanel.java index a9e065b7b..819103327 100644 --- a/plugin/src/main/java/spp/jetbrains/sourcemarker/settings/LiveBreakpointConfigurationPanel.java +++ b/plugin/src/main/java/spp/jetbrains/sourcemarker/settings/LiveBreakpointConfigurationPanel.java @@ -8,7 +8,9 @@ import java.awt.*; import java.util.Objects; +import static spp.jetbrains.sourcemarker.PluginBundle.message; import static spp.jetbrains.sourcemarker.PluginUI.DFLT_BGND_COLOR; +import static spp.jetbrains.sourcemarker.PluginUI.SMALLER_FONT; public class LiveBreakpointConfigurationPanel extends JPanel { @@ -88,7 +90,7 @@ public String getRateLimitStep() { public void setRateLimitStep(String step) { this.rateLimitStep = step; - rateLimitStepCombobox.setSelectedItem(step); + rateLimitStepCombobox.setSelectedItem(message(step)); } public boolean isChanged() { @@ -149,8 +151,8 @@ private void initComponents() { "[]")); //---- label3 ---- - label3.setText("Expiration Date"); - label3.setFont(PluginUI.ROBOTO_LIGHT_PLAIN_15); + label3.setText(message("expiration_date")); + label3.setFont(SMALLER_FONT); panel3.add(label3, "cell 0 0"); //======== panel1 ======== @@ -171,46 +173,46 @@ private void initComponents() { "[]")); //---- expiration15MinButton ---- - expiration15MinButton.setText("15 Minutes"); + expiration15MinButton.setText("15 " + message("minutes")); expiration15MinButton.setSelected(true); expiration15MinButton.setBackground(null); - expiration15MinButton.setFont(PluginUI.ROBOTO_LIGHT_PLAIN_15); + expiration15MinButton.setFont(SMALLER_FONT); panel1.add(expiration15MinButton, "cell 0 0"); //---- expiration30MinButton ---- - expiration30MinButton.setText("30 Minutes"); + expiration30MinButton.setText("30 " + message("minutes")); expiration30MinButton.setBackground(null); - expiration30MinButton.setFont(PluginUI.ROBOTO_LIGHT_PLAIN_15); + expiration30MinButton.setFont(SMALLER_FONT); panel1.add(expiration30MinButton, "cell 1 0"); //---- expiration1HrButton ---- - expiration1HrButton.setText("1 Hour"); + expiration1HrButton.setText("1 " + message("hour")); expiration1HrButton.setBackground(null); - expiration1HrButton.setFont(PluginUI.ROBOTO_LIGHT_PLAIN_15); + expiration1HrButton.setFont(SMALLER_FONT); panel1.add(expiration1HrButton, "cell 2 0"); //---- expiration3HrsButton ---- - expiration3HrsButton.setText("3 Hours"); + expiration3HrsButton.setText("3 " + message("hours")); expiration3HrsButton.setBackground(null); - expiration3HrsButton.setFont(PluginUI.ROBOTO_LIGHT_PLAIN_15); + expiration3HrsButton.setFont(SMALLER_FONT); panel1.add(expiration3HrsButton, "cell 3 0"); //---- expiration6HrsButton ---- - expiration6HrsButton.setText("6 Hours"); + expiration6HrsButton.setText("6 " + message("hours")); expiration6HrsButton.setBackground(null); - expiration6HrsButton.setFont(PluginUI.ROBOTO_LIGHT_PLAIN_15); + expiration6HrsButton.setFont(SMALLER_FONT); panel1.add(expiration6HrsButton, "cell 4 0"); //---- expiration12HrsButton ---- - expiration12HrsButton.setText("12 Hours"); + expiration12HrsButton.setText("12 " + message("hours")); expiration12HrsButton.setBackground(null); - expiration12HrsButton.setFont(PluginUI.ROBOTO_LIGHT_PLAIN_15); + expiration12HrsButton.setFont(SMALLER_FONT); panel1.add(expiration12HrsButton, "cell 5 0"); //---- expiration24HrsButton ---- - expiration24HrsButton.setText("24 Hours"); + expiration24HrsButton.setText("24 " + message("hours")); expiration24HrsButton.setBackground(null); - expiration24HrsButton.setFont(PluginUI.ROBOTO_LIGHT_PLAIN_15); + expiration24HrsButton.setFont(SMALLER_FONT); panel1.add(expiration24HrsButton, "cell 6 0"); } panel3.add(panel1, "cell 0 1 3 1"); @@ -234,8 +236,8 @@ private void initComponents() { "[grow]")); //---- label6 ---- - label6.setText("Hit Throttle"); - label6.setFont(PluginUI.ROBOTO_LIGHT_PLAIN_15); + label6.setText(message("hit_throttle")); + label6.setFont(SMALLER_FONT); panel5.add(label6, "cell 0 0"); //======== panel2 ======== @@ -256,14 +258,14 @@ private void initComponents() { panel2.add(rateLimitCountSpinner, "cell 0 0"); //---- label7 ---- - label7.setText("per"); + label7.setText(message("per")); panel2.add(label7, "cell 1 0"); //---- rateLimitStepCombobox ---- rateLimitStepCombobox.setModel(new DefaultComboBoxModel<>(new String[] { - "second", - "minute", - "hour" + message("second"), + message("minute"), + message("hour") })); panel2.add(rateLimitStepCombobox, "cell 2 0"); } diff --git a/plugin/src/main/java/spp/jetbrains/sourcemarker/settings/LiveLogConfigurationPanel.java b/plugin/src/main/java/spp/jetbrains/sourcemarker/settings/LiveLogConfigurationPanel.java index c3114b324..5358a8545 100644 --- a/plugin/src/main/java/spp/jetbrains/sourcemarker/settings/LiveLogConfigurationPanel.java +++ b/plugin/src/main/java/spp/jetbrains/sourcemarker/settings/LiveLogConfigurationPanel.java @@ -23,8 +23,9 @@ import java.util.Objects; import static spp.jetbrains.marker.SourceMarker.conditionParser; +import static spp.jetbrains.sourcemarker.PluginBundle.message; import static spp.jetbrains.sourcemarker.PluginUI.DFLT_BGND_COLOR; -import static spp.jetbrains.sourcemarker.PluginUI.ROBOTO_LIGHT_PLAIN_15; +import static spp.jetbrains.sourcemarker.PluginUI.SMALLER_FONT; import static spp.jetbrains.sourcemarker.activities.PluginSourceMarkerStartupActivity.INTELLIJ_PRODUCT_CODES; import static spp.jetbrains.sourcemarker.activities.PluginSourceMarkerStartupActivity.PYCHARM_PRODUCT_CODES; @@ -177,7 +178,7 @@ public String getRateLimitStep() { public void setRateLimitStep(String step) { this.rateLimitStep = step; - rateLimitStepCombobox.setSelectedItem(step); + rateLimitStepCombobox.setSelectedItem(message(step)); } public boolean isChanged() { @@ -250,8 +251,8 @@ private void initComponents() { "[]")); //---- lblCondition ---- - lblCondition.setText("Condtion"); - lblCondition.setFont(ROBOTO_LIGHT_PLAIN_15); + lblCondition.setText(message("condition")); + lblCondition.setFont(SMALLER_FONT); panel4.add(lblCondition, "cell 0 0"); //======== conditionPanel ======== @@ -280,8 +281,8 @@ private void initComponents() { "[grow]")); //---- lblHint ---- - lblHint.setText("Hit Limit"); - lblHint.setFont(ROBOTO_LIGHT_PLAIN_15); + lblHint.setText(message("hit_limit")); + lblHint.setFont(SMALLER_FONT); panel6.add(lblHint, "cell 0 0"); //---- hitLimitSpinner ---- @@ -306,8 +307,8 @@ private void initComponents() { "[]")); //---- lblExpirationDate ---- - lblExpirationDate.setText("Expiration Date"); - lblExpirationDate.setFont(ROBOTO_LIGHT_PLAIN_15); + lblExpirationDate.setText(message("expiration_date")); + lblExpirationDate.setFont(SMALLER_FONT); panel3.add(lblExpirationDate, "cell 0 0"); //======== panel1 ======== @@ -328,46 +329,46 @@ private void initComponents() { "[]")); //---- expiration15MinButton ---- - expiration15MinButton.setText("15 Minutes"); + expiration15MinButton.setText("15 " + message("minutes")); expiration15MinButton.setSelected(true); expiration15MinButton.setBackground(null); - expiration15MinButton.setFont(ROBOTO_LIGHT_PLAIN_15); + expiration15MinButton.setFont(SMALLER_FONT); panel1.add(expiration15MinButton, "cell 0 0"); //---- expiration30MinButton ---- - expiration30MinButton.setText("30 Minutes"); + expiration30MinButton.setText("30 " + message("minutes")); expiration30MinButton.setBackground(null); - expiration30MinButton.setFont(ROBOTO_LIGHT_PLAIN_15); + expiration30MinButton.setFont(SMALLER_FONT); panel1.add(expiration30MinButton, "cell 1 0"); //---- expiration1HrButton ---- - expiration1HrButton.setText("1 Hour"); + expiration1HrButton.setText("1 " + message("hour")); expiration1HrButton.setBackground(null); - expiration1HrButton.setFont(ROBOTO_LIGHT_PLAIN_15); + expiration1HrButton.setFont(SMALLER_FONT); panel1.add(expiration1HrButton, "cell 2 0"); //---- expiration3HrsButton ---- - expiration3HrsButton.setText("3 Hours"); + expiration3HrsButton.setText("3 " + message("hours")); expiration3HrsButton.setBackground(null); - expiration3HrsButton.setFont(ROBOTO_LIGHT_PLAIN_15); + expiration3HrsButton.setFont(SMALLER_FONT); panel1.add(expiration3HrsButton, "cell 3 0"); //---- expiration6HrsButton ---- - expiration6HrsButton.setText("6 Hours"); + expiration6HrsButton.setText("6 " + message("hours")); expiration6HrsButton.setBackground(null); - expiration6HrsButton.setFont(ROBOTO_LIGHT_PLAIN_15); + expiration6HrsButton.setFont(SMALLER_FONT); panel1.add(expiration6HrsButton, "cell 4 0"); //---- expiration12HrsButton ---- - expiration12HrsButton.setText("12 Hours"); + expiration12HrsButton.setText("12 " + message("hours")); expiration12HrsButton.setBackground(null); - expiration12HrsButton.setFont(ROBOTO_LIGHT_PLAIN_15); + expiration12HrsButton.setFont(SMALLER_FONT); panel1.add(expiration12HrsButton, "cell 5 0"); //---- expiration24HrsButton ---- - expiration24HrsButton.setText("24 Hours"); + expiration24HrsButton.setText("24 " + message("hours")); expiration24HrsButton.setBackground(null); - expiration24HrsButton.setFont(ROBOTO_LIGHT_PLAIN_15); + expiration24HrsButton.setFont(SMALLER_FONT); panel1.add(expiration24HrsButton, "cell 6 0"); } panel3.add(panel1, "cell 0 1 3 1"); @@ -391,8 +392,8 @@ private void initComponents() { "[grow]")); //---- label6 ---- - label6.setText("Hit Throttle"); - label6.setFont(ROBOTO_LIGHT_PLAIN_15); + label6.setText(message("hit_throttle")); + label6.setFont(SMALLER_FONT); panel5.add(label6, "cell 0 0"); //======== panel2 ======== @@ -413,14 +414,14 @@ private void initComponents() { panel2.add(rateLimitCountSpinner, "cell 0 0"); //---- label7 ---- - label7.setText("per"); + label7.setText(message("per")); panel2.add(label7, "cell 1 0"); //---- rateLimitStepCombobox ---- rateLimitStepCombobox.setModel(new DefaultComboBoxModel<>(new String[] { - "second", - "minute", - "hour" + message("second"), + message("minute"), + message("hour") })); panel2.add(rateLimitStepCombobox, "cell 2 0"); } diff --git a/plugin/src/main/java/spp/jetbrains/sourcemarker/settings/LiveMeterConfigurationPanel.java b/plugin/src/main/java/spp/jetbrains/sourcemarker/settings/LiveMeterConfigurationPanel.java index 448b79b38..6f1231a30 100644 --- a/plugin/src/main/java/spp/jetbrains/sourcemarker/settings/LiveMeterConfigurationPanel.java +++ b/plugin/src/main/java/spp/jetbrains/sourcemarker/settings/LiveMeterConfigurationPanel.java @@ -23,8 +23,9 @@ import java.util.Objects; import static spp.jetbrains.marker.SourceMarker.conditionParser; +import static spp.jetbrains.sourcemarker.PluginBundle.message; import static spp.jetbrains.sourcemarker.PluginUI.DFLT_BGND_COLOR; -import static spp.jetbrains.sourcemarker.PluginUI.ROBOTO_LIGHT_PLAIN_15; +import static spp.jetbrains.sourcemarker.PluginUI.SMALLER_FONT; import static spp.jetbrains.sourcemarker.activities.PluginSourceMarkerStartupActivity.INTELLIJ_PRODUCT_CODES; import static spp.jetbrains.sourcemarker.activities.PluginSourceMarkerStartupActivity.PYCHARM_PRODUCT_CODES; @@ -202,8 +203,8 @@ private void initComponents() { "[]")); //---- label1 ---- - label1.setText("Condtion"); - label1.setFont(ROBOTO_LIGHT_PLAIN_15); + label1.setText(message("condition")); + label1.setFont(SMALLER_FONT); panel4.add(label1, "cell 0 0"); //======== conditionPanel ======== @@ -230,8 +231,8 @@ private void initComponents() { "[]")); //---- label3 ---- - label3.setText("Expiration Date"); - label3.setFont(ROBOTO_LIGHT_PLAIN_15); + label3.setText(message("expiration_date")); + label3.setFont(SMALLER_FONT); panel3.add(label3, "cell 0 0"); //======== panel1 ======== @@ -254,52 +255,52 @@ private void initComponents() { "[]")); //---- expirationNeverButton ---- - expirationNeverButton.setText("Never"); + expirationNeverButton.setText(message("never")); expirationNeverButton.setBackground(null); - expirationNeverButton.setFont(ROBOTO_LIGHT_PLAIN_15); + expirationNeverButton.setFont(SMALLER_FONT); expirationNeverButton.setSelected(true); panel1.add(expirationNeverButton, "cell 0 0,alignx center,growx 0"); //---- expiration15MinButton ---- - expiration15MinButton.setText("15 Minutes"); + expiration15MinButton.setText("15 " + message("minutes")); expiration15MinButton.setBackground(null); - expiration15MinButton.setFont(ROBOTO_LIGHT_PLAIN_15); + expiration15MinButton.setFont(SMALLER_FONT); panel1.add(expiration15MinButton, "cell 1 0,alignx center,growx 0"); //---- expiration30MinButton ---- - expiration30MinButton.setText("30 Minutes"); + expiration30MinButton.setText("30 " + message("minutes")); expiration30MinButton.setBackground(null); - expiration30MinButton.setFont(ROBOTO_LIGHT_PLAIN_15); + expiration30MinButton.setFont(SMALLER_FONT); panel1.add(expiration30MinButton, "cell 2 0,alignx center,growx 0"); //---- expiration1HrButton ---- - expiration1HrButton.setText("1 Hour"); + expiration1HrButton.setText("1 " + message("hour")); expiration1HrButton.setBackground(null); - expiration1HrButton.setFont(ROBOTO_LIGHT_PLAIN_15); + expiration1HrButton.setFont(SMALLER_FONT); panel1.add(expiration1HrButton, "cell 3 0,alignx center,growx 0"); //---- expiration3HrsButton ---- - expiration3HrsButton.setText("3 Hours"); + expiration3HrsButton.setText("3 " + message("hours")); expiration3HrsButton.setBackground(null); - expiration3HrsButton.setFont(ROBOTO_LIGHT_PLAIN_15); + expiration3HrsButton.setFont(SMALLER_FONT); panel1.add(expiration3HrsButton, "cell 4 0,alignx center,growx 0"); //---- expiration6HrsButton ---- - expiration6HrsButton.setText("6 Hours"); + expiration6HrsButton.setText("6 " + message("hours")); expiration6HrsButton.setBackground(null); - expiration6HrsButton.setFont(ROBOTO_LIGHT_PLAIN_15); + expiration6HrsButton.setFont(SMALLER_FONT); panel1.add(expiration6HrsButton, "cell 5 0,alignx center,growx 0"); //---- expiration12HrsButton ---- - expiration12HrsButton.setText("12 Hours"); + expiration12HrsButton.setText("12 " + message("hours")); expiration12HrsButton.setBackground(null); - expiration12HrsButton.setFont(ROBOTO_LIGHT_PLAIN_15); + expiration12HrsButton.setFont(SMALLER_FONT); panel1.add(expiration12HrsButton, "cell 6 0,alignx center,growx 0"); //---- expiration24HrsButton ---- - expiration24HrsButton.setText("24 Hours"); + expiration24HrsButton.setText("24 " + message("hours")); expiration24HrsButton.setBackground(null); - expiration24HrsButton.setFont(ROBOTO_LIGHT_PLAIN_15); + expiration24HrsButton.setFont(SMALLER_FONT); panel1.add(expiration24HrsButton, "cell 7 0,alignx center,growx 0"); } panel3.add(panel1, "cell 0 1 3 1"); diff --git a/plugin/src/main/java/spp/jetbrains/sourcemarker/status/BreakpointStatusBar.java b/plugin/src/main/java/spp/jetbrains/sourcemarker/status/BreakpointStatusBar.java index a5c7ddf29..bf4e4a2f8 100644 --- a/plugin/src/main/java/spp/jetbrains/sourcemarker/status/BreakpointStatusBar.java +++ b/plugin/src/main/java/spp/jetbrains/sourcemarker/status/BreakpointStatusBar.java @@ -52,6 +52,7 @@ import java.util.stream.Collectors; import static spp.jetbrains.marker.SourceMarker.conditionParser; +import static spp.jetbrains.sourcemarker.PluginBundle.message; import static spp.jetbrains.sourcemarker.PluginUI.*; import static spp.jetbrains.sourcemarker.status.util.ViewUtils.addRecursiveMouseListener; import static spp.protocol.marshall.ProtocolMarshaller.deserializeLiveInstrumentRemoved; @@ -69,7 +70,7 @@ public class BreakpointStatusBar extends JPanel implements StatusBar, VisibleAre private boolean disposed = false; private final List scopeVars; private final Function> lookup; - private final String placeHolderText = "Breakpoint Condition"; + private final String placeHolderText = message("breakpoint_condition"); private LiveBreakpoint liveBreakpoint; private LiveBreakpointStatusPanel statusPanel; private JPanel wrapper; @@ -78,8 +79,8 @@ public class BreakpointStatusBar extends JPanel implements StatusBar, VisibleAre private boolean expanded = false; private final ListTableModel commandModel = new ListTableModel<>( new ColumnInfo[]{ - new BreakpointHitColumnInfo("Breakpoint Data"), - new BreakpointHitColumnInfo("Time") + new BreakpointHitColumnInfo(message("breakpoint_data")), + new BreakpointHitColumnInfo(message("time")) }, new ArrayList<>(), 0, SortOrder.DESCENDING); @@ -178,10 +179,10 @@ private void setupAsActive() { LiveInstrumentRemoved removed = deserializeLiveInstrumentRemoved(new JsonObject(event.getData())); if (removed.getCause() == null) { - statusPanel.setStatus("Complete", COMPLETE_COLOR_PURPLE); + statusPanel.setStatus(message("complete"), COMPLETE_COLOR_PURPLE); } else { commandModel.insertRow(0, event); - statusPanel.setStatus("Error", SELECT_COLOR_RED); + statusPanel.setStatus(message("error"), SELECT_COLOR_RED); } } }); @@ -360,7 +361,7 @@ public void mouseReleased(MouseEvent e) { @Override public void mouseMoved(MouseEvent e) { if (configDropdownLabel.isVisible()) { - configPanel.setBackground(CNFG_PANEL_FOCUS_COLOR); + configPanel.setBackground(BGND_FOCUS_COLOR); } } }); @@ -534,7 +535,7 @@ private void initComponents() { "[grow]")); //---- configLabel ---- - configLabel.setIcon(PluginIcons.eye); + configLabel.setIcon(PluginIcons.breakpointConfig); configPanel.add(configLabel, "cell 0 0"); //---- configDropdownLabel ---- @@ -559,14 +560,14 @@ private void initComponents() { breakpointConditionField.setBorder(new CompoundBorder( new LineBorder(UIUtil.getBoundsColor(), 1, true), new EmptyBorder(2, 6, 0, 0))); - breakpointConditionField.setFont(ROBOTO_LIGHT_PLAIN_17); + breakpointConditionField.setFont(BIG_FONT); breakpointConditionField.setMinimumSize(new Dimension(0, 27)); mainPanel.add(breakpointConditionField, "cell 0 0"); //---- label1 ---- - label1.setText("Hit Limit"); + label1.setText(message("hit_limit")); label1.setForeground(Color.gray); - label1.setFont(ROBOTO_LIGHT_PLAIN_15); + label1.setFont(SMALLER_FONT); mainPanel.add(label1, "cell 1 0"); //---- hitLimitSpinner ---- @@ -576,7 +577,7 @@ private void initComponents() { //---- timeLabel ---- timeLabel.setIcon(PluginIcons.clock); - timeLabel.setFont(ROBOTO_LIGHT_PLAIN_14); + timeLabel.setFont(SMALLEST_FONT); timeLabel.setIconTextGap(8); timeLabel.setVisible(false); mainPanel.add(timeLabel, "cell 1 0,gapx null 8"); diff --git a/plugin/src/main/java/spp/jetbrains/sourcemarker/status/LiveBreakpointStatusPanel.java b/plugin/src/main/java/spp/jetbrains/sourcemarker/status/LiveBreakpointStatusPanel.java index b89311e38..b47585c5f 100644 --- a/plugin/src/main/java/spp/jetbrains/sourcemarker/status/LiveBreakpointStatusPanel.java +++ b/plugin/src/main/java/spp/jetbrains/sourcemarker/status/LiveBreakpointStatusPanel.java @@ -3,7 +3,6 @@ import com.codahale.metrics.Meter; import com.jgoodies.forms.factories.FormFactory; import com.jgoodies.forms.layout.*; -import spp.jetbrains.sourcemarker.PluginUI; import spp.protocol.utils.TimeUtilsKt; import javax.swing.*; @@ -12,7 +11,11 @@ import java.util.concurrent.ScheduledExecutorService; import java.util.concurrent.TimeUnit; -import static spp.jetbrains.sourcemarker.PluginUI.*; +import static spp.jetbrains.sourcemarker.PluginBundle.message; +import static spp.jetbrains.sourcemarker.PluginUI.EXPIRY_FOREGROUND_COLOR; +import static spp.jetbrains.sourcemarker.PluginUI.LABEL_FOREGROUND_COLOR1; +import static spp.jetbrains.sourcemarker.PluginUI.SELECT_COLOR_RED; +import static spp.jetbrains.sourcemarker.PluginUI.SMALLER_FONT; public class LiveBreakpointStatusPanel extends JPanel { @@ -84,10 +87,10 @@ private void updateExpiresLabel(long expiresTime) { long sec = diffSec % 60; if (min > 0) { expiresValueLabel.setForeground(EXPIRY_FOREGROUND_COLOR); - expiresValueLabel.setText(min + "min " + sec + "s"); + expiresValueLabel.setText(min + message("min") + " " + sec + message("sec_letter")); } else { expiresValueLabel.setForeground(SELECT_COLOR_RED); - expiresValueLabel.setText(sec + "s"); + expiresValueLabel.setText(sec + message("sec_letter")); } } @@ -108,7 +111,7 @@ private void initComponents() { //======== this ======== //setBorder(PluginUI.PANEL_BORDER); - setFont(ROBOTO_LIGHT_PLAIN_15); + setFont(SMALLER_FONT); setLayout(new FormLayout( "default:grow", "fill:default:grow")); @@ -116,7 +119,7 @@ private void initComponents() { //======== panel1 ======== { panel1.setBackground(null); - panel1.setFont(ROBOTO_LIGHT_PLAIN_15); + panel1.setFont(SMALLER_FONT); panel1.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, @@ -140,13 +143,13 @@ private void initComponents() { RowSpec.decodeSpecs("fill:default:grow"))); //---- statusLabel ---- - statusLabel.setText("Status"); - statusLabel.setFont(ROBOTO_LIGHT_PLAIN_15); + statusLabel.setText(message("status")); + statusLabel.setFont(SMALLER_FONT); panel1.add(statusLabel, cc.xy(1, 1)); //---- statusValueLabel ---- - statusValueLabel.setText("Active"); - statusValueLabel.setFont(PluginUI.ROBOTO_LIGHT_PLAIN_16); + statusValueLabel.setText(message("active")); + statusValueLabel.setFont(SMALLER_FONT.deriveFont(Font.BOLD)); statusValueLabel.setForeground(LABEL_FOREGROUND_COLOR1); panel1.add(statusValueLabel, cc.xy(3, 1)); @@ -159,33 +162,33 @@ private void initComponents() { panel1.add(separator1, new CellConstraints(5, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(5, 0, 5, 0))); //---- hitsLabel ---- - hitsLabel.setText("Hits"); - hitsLabel.setFont(ROBOTO_LIGHT_PLAIN_15); + hitsLabel.setText(message("hits")); + hitsLabel.setFont(SMALLER_FONT); panel1.add(hitsLabel, cc.xy(7, 1)); //---- hitsValueLabel ---- - hitsValueLabel.setText("n/a"); - hitsValueLabel.setFont(PluginUI.ROBOTO_LIGHT_PLAIN_16); + hitsValueLabel.setText(message("not_available")); + hitsValueLabel.setFont(SMALLER_FONT.deriveFont(Font.BOLD)); panel1.add(hitsValueLabel, cc.xy(9, 1)); //---- rateLabel ---- - rateLabel.setText("Rate"); - rateLabel.setFont(ROBOTO_LIGHT_PLAIN_15); + rateLabel.setText(message("rate")); + rateLabel.setFont(SMALLER_FONT); panel1.add(rateLabel, cc.xy(11, 1)); //---- rateValueLabel ---- - rateValueLabel.setText("n/a"); - rateValueLabel.setFont(PluginUI.ROBOTO_LIGHT_PLAIN_16); + rateValueLabel.setText(message("not_available")); + rateValueLabel.setFont(SMALLER_FONT.deriveFont(Font.BOLD)); panel1.add(rateValueLabel, cc.xy(13, 1)); //---- expiresLabel ---- - expiresLabel.setText("Expires"); - expiresLabel.setFont(ROBOTO_LIGHT_PLAIN_15); + expiresLabel.setText(message("expires")); + expiresLabel.setFont(SMALLER_FONT); panel1.add(expiresLabel, cc.xy(15, 1)); //---- expiresValueLabel ---- - expiresValueLabel.setText("n/a"); - expiresValueLabel.setFont(PluginUI.ROBOTO_LIGHT_PLAIN_16); + expiresValueLabel.setText(message("not_available")); + expiresValueLabel.setFont(SMALLER_FONT.deriveFont(Font.BOLD)); panel1.add(expiresValueLabel, cc.xy(17, 1)); } add(panel1, new CellConstraints(1, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(2, 4, 2, 2))); diff --git a/plugin/src/main/java/spp/jetbrains/sourcemarker/status/LiveMeterStatusPanel.java b/plugin/src/main/java/spp/jetbrains/sourcemarker/status/LiveMeterStatusPanel.java index 33e5ad017..c87bec0ae 100644 --- a/plugin/src/main/java/spp/jetbrains/sourcemarker/status/LiveMeterStatusPanel.java +++ b/plugin/src/main/java/spp/jetbrains/sourcemarker/status/LiveMeterStatusPanel.java @@ -5,10 +5,10 @@ import com.jgoodies.forms.layout.*; import io.vertx.core.json.Json; import io.vertx.core.json.JsonObject; +import org.apache.commons.lang.WordUtils; import org.jetbrains.annotations.NotNull; import spp.jetbrains.marker.source.mark.gutter.GutterMark; import spp.jetbrains.sourcemarker.PluginIcons; -import spp.jetbrains.sourcemarker.PluginUI; import spp.jetbrains.sourcemarker.service.InstrumentEventListener; import spp.jetbrains.sourcemarker.service.ViewEventListener; import spp.protocol.instrument.LiveMeter; @@ -23,8 +23,8 @@ import java.awt.event.MouseAdapter; import java.awt.event.MouseEvent; -import static spp.jetbrains.sourcemarker.PluginUI.LABEL_FOREGROUND_COLOR; -import static spp.jetbrains.sourcemarker.PluginUI.ROBOTO_LIGHT_PLAIN_15; +import static spp.jetbrains.sourcemarker.PluginBundle.message; +import static spp.jetbrains.sourcemarker.PluginUI.*; import static spp.jetbrains.sourcemarker.status.util.ViewUtils.addRecursiveMouseListener; import static spp.protocol.SourceServices.Instance.INSTANCE; @@ -54,7 +54,7 @@ public LiveMeterStatusPanel(LiveMeter liveMeter, GutterMark gutterMark) { String meterType = liveMeter.getMeterType().name().toLowerCase(); meterType = meterType.substring(0, 1).toUpperCase() + meterType.substring(1); - meterTypeValueLabel.setText(meterType); + meterTypeValueLabel.setText(message(meterType.toLowerCase())); if (liveMeter.getMeterType() == MeterType.GAUGE) { minuteLabel.setText("Value"); @@ -151,7 +151,7 @@ private void initComponents() { //======== this ======== setBorder(new EtchedBorder()); - setFont(ROBOTO_LIGHT_PLAIN_15); + setFont(SMALLER_FONT); setMinimumSize(new Dimension(385, 70)); setPreferredSize(new Dimension(385, 70)); setLayout(new FormLayout( @@ -168,7 +168,7 @@ private void initComponents() { //======== panel1 ======== { panel1.setBackground(null); - panel1.setFont(ROBOTO_LIGHT_PLAIN_15); + panel1.setFont(SMALLER_FONT); panel1.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, @@ -188,8 +188,8 @@ private void initComponents() { RowSpec.decodeSpecs("fill:default:grow"))); //---- meterTypeValueLabel ---- - meterTypeValueLabel.setText("Count"); - meterTypeValueLabel.setFont(PluginUI.ROBOTO_LIGHT_PLAIN_16); + meterTypeValueLabel.setText(message("count")); + meterTypeValueLabel.setFont(SMALL_FONT); meterTypeValueLabel.setForeground(LABEL_FOREGROUND_COLOR); meterTypeValueLabel.setMinimumSize(new Dimension(46, 25)); panel1.add(meterTypeValueLabel, cc.xy(1, 1)); @@ -203,23 +203,23 @@ private void initComponents() { panel1.add(separator1, new CellConstraints(3, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.DEFAULT, new Insets(5, 0, 5, 0))); //---- minuteLabel ---- - minuteLabel.setText("Minute"); - minuteLabel.setFont(ROBOTO_LIGHT_PLAIN_15); + minuteLabel.setText(WordUtils.capitalize(message("minute"))); + minuteLabel.setFont(SMALLER_FONT); panel1.add(minuteLabel, cc.xy(5, 1)); //---- minuteValueLabel ---- - minuteValueLabel.setText("n/a"); - minuteValueLabel.setFont(PluginUI.ROBOTO_LIGHT_PLAIN_16); + minuteValueLabel.setText(message("not_available")); + minuteValueLabel.setFont(SMALL_FONT); panel1.add(minuteValueLabel, cc.xy(7, 1)); //---- hourLabel ---- - hourLabel.setText("Hour"); - hourLabel.setFont(ROBOTO_LIGHT_PLAIN_15); + hourLabel.setText(WordUtils.capitalize(message("hour"))); + hourLabel.setFont(SMALLER_FONT); panel1.add(hourLabel, cc.xy(9, 1)); //---- hourValueLabel ---- - hourValueLabel.setText("n/a"); - hourValueLabel.setFont(PluginUI.ROBOTO_LIGHT_PLAIN_16); + hourValueLabel.setText(message("not_available")); + hourValueLabel.setFont(SMALL_FONT); panel1.add(hourValueLabel, cc.xy(11, 1)); //======== panel3 ======== @@ -234,13 +234,13 @@ private void initComponents() { RowSpec.decodeSpecs("fill:default:grow"))); //---- dayLabel ---- - dayLabel.setText("Day"); - dayLabel.setFont(ROBOTO_LIGHT_PLAIN_15); + dayLabel.setText(WordUtils.capitalize(message("day"))); + dayLabel.setFont(SMALLER_FONT); panel3.add(dayLabel, cc.xy(1, 1)); //---- dayValueLabel ---- - dayValueLabel.setText("n/a"); - dayValueLabel.setFont(PluginUI.ROBOTO_LIGHT_PLAIN_16); + dayValueLabel.setText(message("not_available")); + dayValueLabel.setFont(SMALL_FONT); panel3.add(dayValueLabel, cc.xy(3, 1)); } panel1.add(panel3, cc.xy(13, 1)); diff --git a/plugin/src/main/java/spp/jetbrains/sourcemarker/status/LogStatusBar.java b/plugin/src/main/java/spp/jetbrains/sourcemarker/status/LogStatusBar.java index 6078d8dca..33b176a8b 100644 --- a/plugin/src/main/java/spp/jetbrains/sourcemarker/status/LogStatusBar.java +++ b/plugin/src/main/java/spp/jetbrains/sourcemarker/status/LogStatusBar.java @@ -71,14 +71,8 @@ import java.util.stream.Collectors; import static spp.jetbrains.marker.SourceMarker.conditionParser; -import static spp.jetbrains.sourcemarker.PluginUI.CNFG_PANEL_BGND_COLOR; -import static spp.jetbrains.sourcemarker.PluginUI.CNFG_PANEL_FOCUS_COLOR; -import static spp.jetbrains.sourcemarker.PluginUI.COMPLETE_COLOR_PURPLE; -import static spp.jetbrains.sourcemarker.PluginUI.DFLT_BGND_COLOR; -import static spp.jetbrains.sourcemarker.PluginUI.ROBOTO_LIGHT_PLAIN_14; -import static spp.jetbrains.sourcemarker.PluginUI.ROBOTO_LIGHT_PLAIN_17; -import static spp.jetbrains.sourcemarker.PluginUI.SELECT_COLOR_RED; -import static spp.jetbrains.sourcemarker.PluginUI.STATUS_BAR_TXT_BG_COLOR; +import static spp.jetbrains.sourcemarker.PluginBundle.message; +import static spp.jetbrains.sourcemarker.PluginUI.*; import static spp.jetbrains.sourcemarker.status.util.ViewUtils.addRecursiveMouseListener; import static spp.protocol.SourceServices.Instance.INSTANCE; import static spp.protocol.instrument.event.LiveInstrumentEventType.LOG_HIT; @@ -90,16 +84,16 @@ public class LogStatusBar extends JPanel implements StatusBar, VisibleAreaListen private static final DateTimeFormatter TIME_FORMATTER = DateTimeFormatter.ofPattern("hh:mm:ss a") .withZone(ZoneId.systemDefault()); - private static final String WAITING_FOR_LIVE_LOG_DATA = "Waiting for live log data..."; - private static final String MESSAGE = "Message"; - private static final String TIME = "Time"; + private static final String WAITING_FOR_LIVE_LOG_DATA = message("waiting_for_live_log_data"); + private static final String MESSAGE = message("message"); + private static final String TIME = message("time"); private static final String QUOTE_CURLY_BRACES = Pattern.quote("{}"); private final InlayMark inlayMark; private final LiveSourceLocation sourceLocation; private final List scopeVars; private final Function> lookup; - private final String placeHolderText = "Input log message (use $ for variables)"; + private final String placeHolderText = message("input_log_message"); private final boolean watchExpression; private EditorImpl editor; private LiveLog liveLog; @@ -472,8 +466,8 @@ public void focusGained(FocusEvent e) { @Override public void focusLost(FocusEvent e) { - if (!liveLogTextField.getEditMode() || - (liveLogTextField.getEditMode() && !liveLogTextField.isShowingSaveButton())) { + if (!liveLogTextField.getEditMode() || (liveLogTextField.getEditMode() && + (!liveLogTextField.isShowingSaveButton() && !liveLogTextField.getText().isEmpty()))) { liveLogTextField.setEditMode(false); removeActiveDecorations(); @@ -543,7 +537,7 @@ public void mouseReleased(MouseEvent e) { configPanel.addMouseMotionListener(new MouseAdapter() { @Override public void mouseMoved(MouseEvent e) { - if (!watchExpression && !errored && !removed) configPanel.setBackground(CNFG_PANEL_FOCUS_COLOR); + if (!watchExpression && !errored && !removed) configPanel.setBackground(BGND_FOCUS_COLOR); } }); @@ -759,7 +753,7 @@ private void initComponents() { "[grow]")); //---- configLabel ---- - configLabel.setIcon(PluginIcons.alignLeft); + configLabel.setIcon(PluginIcons.logConfig); configPanel.add(configLabel, "cell 0 0"); //---- configDropdownLabel ---- @@ -770,7 +764,7 @@ private void initComponents() { //---- timeLabel ---- timeLabel.setIcon(PluginIcons.clock); - timeLabel.setFont(ROBOTO_LIGHT_PLAIN_14); + timeLabel.setFont(SMALLEST_FONT); timeLabel.setIconTextGap(8); timeLabel.setVisible(false); add(timeLabel, "cell 1 0,gapx null 8"); @@ -788,7 +782,7 @@ private void initComponents() { liveLogTextField.setBorder(new CompoundBorder( new LineBorder(UIUtil.getBoundsColor(), 1, true), new EmptyBorder(2, 6, 0, 0))); - liveLogTextField.setFont(ROBOTO_LIGHT_PLAIN_17); + liveLogTextField.setFont(BIG_FONT); liveLogTextField.setMinimumSize(new Dimension(0, 27)); add(liveLogTextField, "cell 2 0"); diff --git a/plugin/src/main/java/spp/jetbrains/sourcemarker/status/MeterStatusBar.java b/plugin/src/main/java/spp/jetbrains/sourcemarker/status/MeterStatusBar.java index 4942e5fbb..5654a9897 100644 --- a/plugin/src/main/java/spp/jetbrains/sourcemarker/status/MeterStatusBar.java +++ b/plugin/src/main/java/spp/jetbrains/sourcemarker/status/MeterStatusBar.java @@ -44,6 +44,7 @@ import java.util.concurrent.atomic.AtomicLong; import static spp.jetbrains.marker.SourceMarker.conditionParser; +import static spp.jetbrains.sourcemarker.PluginBundle.message; import static spp.jetbrains.sourcemarker.PluginUI.*; import static spp.jetbrains.sourcemarker.status.util.ViewUtils.addRecursiveMouseListener; import static spp.protocol.marshall.ProtocolMarshaller.deserializeLiveInstrumentRemoved; @@ -58,7 +59,7 @@ public class MeterStatusBar extends JPanel implements StatusBar, VisibleAreaList private JWindow popup; private LiveMeterConfigurationPanel configurationPanel; private boolean disposed = false; - private final String placeHolderText = "Meter Description"; + private final String placeHolderText = message("meter_description"); private LiveMeter liveMeter; private LiveBreakpointStatusPanel statusPanel; private JPanel wrapper; @@ -67,8 +68,8 @@ public class MeterStatusBar extends JPanel implements StatusBar, VisibleAreaList private boolean expanded = false; private final ListTableModel commandModel = new ListTableModel<>( new ColumnInfo[]{ - new BreakpointHitColumnInfo("Meter Data"), - new BreakpointHitColumnInfo("Time") + new BreakpointHitColumnInfo(message("meter_data")), + new BreakpointHitColumnInfo(message("time")) }, new ArrayList<>(), 0, SortOrder.DESCENDING); @@ -131,10 +132,10 @@ private void setupAsActive() { LiveInstrumentRemoved removed = deserializeLiveInstrumentRemoved(new JsonObject(event.getData())); if (removed.getCause() == null) { - statusPanel.setStatus("Complete", COMPLETE_COLOR_PURPLE); + statusPanel.setStatus(message("complete"), COMPLETE_COLOR_PURPLE); } else { commandModel.insertRow(0, event); - statusPanel.setStatus("Error", SELECT_COLOR_RED); + statusPanel.setStatus(message("error"), SELECT_COLOR_RED); } } }); @@ -284,7 +285,7 @@ public void mouseReleased(MouseEvent e) { @Override public void mouseMoved(MouseEvent e) { if (configDropdownLabel.isVisible()) { - configPanel.setBackground(CNFG_PANEL_FOCUS_COLOR); + configPanel.setBackground(BGND_FOCUS_COLOR); } } }); @@ -361,7 +362,7 @@ private void saveLiveMeter() { LiveMeter instrument = new LiveMeter( meterNameField.getText(), - MeterType.valueOf(meterTypeComboBox.getSelectedItem().toString().toUpperCase()), + MeterType.values()[meterTypeComboBox.getSelectedIndex()], new MetricValue(MetricValueType.NUMBER, "1"), sourceLocation, condition, @@ -457,7 +458,7 @@ private void initComponents() { "[grow]")); //---- configLabel ---- - configLabel.setIcon(PluginIcons.analytics); + configLabel.setIcon(PluginIcons.meterConfig); configPanel.add(configLabel, "cell 0 0"); //---- configDropdownLabel ---- @@ -482,19 +483,19 @@ private void initComponents() { meterNameField.setBorder(new CompoundBorder( new LineBorder(UIUtil.getBoundsColor(), 1, true), new EmptyBorder(2, 6, 0, 0))); - meterNameField.setFont(ROBOTO_LIGHT_PLAIN_17); + meterNameField.setFont(BIG_FONT); meterNameField.setMinimumSize(new Dimension(0, 27)); mainPanel.add(meterNameField, "cell 0 0"); //---- label1 ---- - label1.setText("Type"); + label1.setText(message("type")); label1.setForeground(Color.gray); - label1.setFont(ROBOTO_LIGHT_PLAIN_15); + label1.setFont(SMALLER_FONT); mainPanel.add(label1, "cell 1 0"); //---- meterTypeComboBox ---- meterTypeComboBox.setModel(new DefaultComboBoxModel<>(new String[] { - "Count", + message("count"), // "Gauge", // "Histogram" })); @@ -502,7 +503,7 @@ private void initComponents() { //---- timeLabel ---- timeLabel.setIcon(PluginIcons.clock); - timeLabel.setFont(ROBOTO_LIGHT_PLAIN_14); + timeLabel.setFont(SMALLEST_FONT); timeLabel.setIconTextGap(8); timeLabel.setVisible(false); mainPanel.add(timeLabel, "cell 1 0,gapx null 8"); diff --git a/plugin/src/main/java/spp/jetbrains/sourcemarker/status/SpanStatusBar.java b/plugin/src/main/java/spp/jetbrains/sourcemarker/status/SpanStatusBar.java index a516a104a..c8dabd8e6 100644 --- a/plugin/src/main/java/spp/jetbrains/sourcemarker/status/SpanStatusBar.java +++ b/plugin/src/main/java/spp/jetbrains/sourcemarker/status/SpanStatusBar.java @@ -41,6 +41,7 @@ import java.util.concurrent.atomic.AtomicLong; import static spp.jetbrains.marker.SourceMarker.conditionParser; +import static spp.jetbrains.sourcemarker.PluginBundle.message; import static spp.jetbrains.sourcemarker.PluginUI.*; import static spp.jetbrains.sourcemarker.status.util.ViewUtils.addRecursiveMouseListener; import static spp.protocol.marshall.ProtocolMarshaller.deserializeLiveInstrumentRemoved; @@ -55,7 +56,7 @@ public class SpanStatusBar extends JPanel implements StatusBar, VisibleAreaListe private JWindow popup; private LiveMeterConfigurationPanel configurationPanel; private boolean disposed = false; - private final String placeHolderText = "Operation Name"; + private final String placeHolderText = message("operation_name"); private LiveSpan liveSpan; private LiveBreakpointStatusPanel statusPanel; private JPanel wrapper; @@ -64,8 +65,8 @@ public class SpanStatusBar extends JPanel implements StatusBar, VisibleAreaListe private boolean expanded = false; private final ListTableModel commandModel = new ListTableModel<>( new ColumnInfo[]{ - new BreakpointHitColumnInfo("Meter Data"), - new BreakpointHitColumnInfo("Time") + new BreakpointHitColumnInfo(message("meter_data")), + new BreakpointHitColumnInfo(message("time")) }, new ArrayList<>(), 0, SortOrder.DESCENDING); @@ -271,7 +272,7 @@ public void mouseReleased(MouseEvent e) { @Override public void mouseMoved(MouseEvent e) { if (configDropdownLabel.isVisible()) { - configPanel.setBackground(CNFG_PANEL_FOCUS_COLOR); + configPanel.setBackground(BGND_FOCUS_COLOR); } } }); @@ -436,7 +437,7 @@ private void initComponents() { "[grow]")); //---- configLabel ---- - configLabel.setIcon(PluginIcons.mapMarkedAlt); + configLabel.setIcon(PluginIcons.spanConfig); configPanel.add(configLabel, "cell 0 0"); //---- configDropdownLabel ---- @@ -461,13 +462,13 @@ private void initComponents() { spanOperationNameField.setBorder(new CompoundBorder( new LineBorder(UIUtil.getBoundsColor(), 1, true), new EmptyBorder(2, 6, 0, 0))); - spanOperationNameField.setFont(ROBOTO_LIGHT_PLAIN_17); + spanOperationNameField.setFont(BIG_FONT); spanOperationNameField.setMinimumSize(new Dimension(0, 27)); mainPanel.add(spanOperationNameField, "cell 0 0 2 1"); //---- timeLabel ---- timeLabel.setIcon(PluginIcons.clock); - timeLabel.setFont(ROBOTO_LIGHT_PLAIN_14); + timeLabel.setFont(SMALLEST_FONT); timeLabel.setIconTextGap(8); timeLabel.setVisible(false); mainPanel.add(timeLabel, "cell 1 0,gapx null 8"); diff --git a/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/PluginBundle.kt b/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/PluginBundle.kt index 1563cbab0..e94854a94 100644 --- a/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/PluginBundle.kt +++ b/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/PluginBundle.kt @@ -18,8 +18,10 @@ package spp.jetbrains.sourcemarker import com.intellij.AbstractBundle +import com.intellij.DynamicBundle import org.jetbrains.annotations.NonNls import org.jetbrains.annotations.PropertyKey +import java.util.* @NonNls private const val BUNDLE = "messages.PluginBundle" @@ -32,7 +34,14 @@ private const val BUNDLE = "messages.PluginBundle" */ object PluginBundle : AbstractBundle(BUNDLE) { + //todo: shouldn't need to manually load bundle. + val LOCALE_BUNDLE: ResourceBundle by lazy { + ResourceBundle.getBundle(BUNDLE, DynamicBundle.getLocale(), PluginBundle::class.java.classLoader) + } + @Suppress("SpreadOperator") @JvmStatic - fun message(@PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any) = getMessage(key, *params) + fun message(@PropertyKey(resourceBundle = BUNDLE) key: String, vararg params: Any): String { + return LOCALE_BUNDLE.getString(key) ?: getMessage(key, *params) + } } diff --git a/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/SourceMarkerPlugin.kt b/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/SourceMarkerPlugin.kt index f98dc1360..0a612c165 100644 --- a/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/SourceMarkerPlugin.kt +++ b/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/SourceMarkerPlugin.kt @@ -55,6 +55,7 @@ import org.apache.commons.text.CaseUtils import org.slf4j.LoggerFactory import spp.jetbrains.marker.SourceMarker import spp.jetbrains.marker.jvm.* +import spp.jetbrains.marker.plugin.SourceInlayHintProvider import spp.jetbrains.marker.py.PythonArtifactCreationService import spp.jetbrains.marker.py.PythonArtifactNamingService import spp.jetbrains.marker.py.PythonArtifactScopeService @@ -326,18 +327,13 @@ object SourceMarkerPlugin { } private suspend fun restartIfNecessary() { - val clearMarkers = Promise.promise() - ApplicationManager.getApplication().runReadAction { - if (SourceMarker.enabled) { - SourceMarker.clearAvailableSourceFileMarkers() - SourceMarker.clearGlobalSourceMarkEventListeners() - } - clearMarkers.complete() + if (SourceMarker.enabled) { + SourceMarker.clearAvailableSourceFileMarkers() + SourceMarker.clearGlobalSourceMarkEventListeners() } deploymentIds.forEach { vertx.undeploy(it).await() } deploymentIds.clear() - clearMarkers.future().await() TCPServiceDiscoveryBackend.socket?.close()?.await() TCPServiceDiscoveryBackend.socket = null @@ -450,11 +446,12 @@ object SourceMarkerPlugin { } private suspend fun initUI(config: SourceMarkerConfig) { - vertx.deployVerticle(PortalController(config)).await() + deploymentIds.add(vertx.deployVerticle(PortalController(config)).await()) } private fun initMarker(config: SourceMarkerConfig, project: Project) { log.info("Initializing marker") + SourceMarker.addGlobalSourceMarkEventListener(SourceInlayHintProvider.EVENT_LISTENER) SourceMarker.addGlobalSourceMarkEventListener(PluginSourceMarkEventListener()) SourceMarker.addGlobalSourceMarkEventListener(ActivityQuickStatsIndicator(config)) diff --git a/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/command/LiveControlCommand.kt b/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/command/LiveControlCommand.kt index db7ad7f54..cf77d4ff3 100644 --- a/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/command/LiveControlCommand.kt +++ b/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/command/LiveControlCommand.kt @@ -17,7 +17,10 @@ */ package spp.jetbrains.sourcemarker.command +import spp.jetbrains.sourcemarker.PluginBundle.message import spp.jetbrains.sourcemarker.PluginIcons +import spp.jetbrains.sourcemarker.PluginUI.getCommandHighlightColor +import spp.jetbrains.sourcemarker.PluginUI.getCommandTypeColor import javax.swing.Icon /** @@ -29,112 +32,112 @@ import javax.swing.Icon @Suppress("unused", "MaxLineLength") enum class LiveControlCommand( val command: String, - private val description: String, + private val description: () -> String, val selectedIcon: Icon? = null, val unselectedIcon: Icon? = null ) : AutocompleteFieldRow { VIEW_OVERVIEW( - "View Overview", - "Live View ➛ Overview ➛ Scope: Class", + message("view_overview"), + { "" + message("live_view") + " ➛ " + message("overview") + " ➛ " + message("scope") + ": " + message("class") + "" }, PluginIcons.Command.viewOverviewSelected, PluginIcons.Command.viewOverviewUnSelected ), VIEW_ACTIVITY( - "View Activity", - "Live View ➛ Activity ➛ Scope: Method", + message("view_activity"), + { "" + message("live_view") + " ➛ " + message("activity") + " ➛ " + message("scope") + ": " + message("method") + "" }, PluginIcons.Command.viewActivitySelected, PluginIcons.Command.viewActivityUnSelected ), VIEW_TRACES( - "View Traces", - "Live View ➛ Traces ➛ Scope: Method", + message("view_traces"), + { "" + message("live_view") + " ➛ " + message("traces") + " ➛ " + message("scope") + ": " + message("method") + "" }, PluginIcons.Command.viewTracesSelected, PluginIcons.Command.viewTracesUnSelected ), VIEW_LOGS( - "View Logs", - "Live View ➛ Logs ➛ Scope: Method", + message("view_logs"), + { "" + message("live_view") + " ➛ " + message("logs") + " ➛ " + message("scope") + ": " + message("method") + "" }, PluginIcons.Command.viewLogsSelected, PluginIcons.Command.viewLogsUnSelected ), SHOW_QUICK_STATS( - "Show Quick Stats", - "Live View ➛ Quick Stats ➛ Scope: Endpoint", - PluginIcons.Command.viewActivitySelected, - PluginIcons.Command.viewActivityUnSelected + message("show_quick_stats"), + { "" + message("live_view") + " ➛ " + message("quick_stats") + " ➛ " + message("scope") + ": " + message("endpoint") + "" }, + PluginIcons.Command.quickStatsSelected, + PluginIcons.Command.quickStatsUnSelected ), HIDE_QUICK_STATS( - "Hide Quick Stats", - "Live View ➛ Quick Stats ➛ Scope: Endpoint", - PluginIcons.Command.viewActivitySelected, - PluginIcons.Command.viewActivityUnSelected + message("hide_quick_stats"), + { "" + message("live_view") + " ➛ " + message("quick_stats") + " ➛ " + message("scope") + ": " + message("endpoint") + "" }, + PluginIcons.Command.quickStatsSelected, + PluginIcons.Command.quickStatsUnSelected ), WATCH_LOG( - "Watch Log", - "Live View ➛ Log ➛ Scope: Expression", - PluginIcons.Command.viewLogsSelected, - PluginIcons.Command.viewLogsUnSelected - ), - WATCH_VARIABLE( - "watch", - "Manual Tracing ➛ Watched Variables ➛ Scope: Local / Add *variable* to watched variables" - ), - TRACE_METHOD( - "trace", - "Add method to distributed tracing system" - ), + message("watch_log"), + { "" + message("live_view") + " ➛ " + message("log") + " ➛ " + message("scope") + ": " + message("Expression") + "" }, + PluginIcons.Command.watchLogSelected, + PluginIcons.Command.watchLogUnSelected + ), +// WATCH_VARIABLE( +// "watch", +// "Manual Tracing ➛ Watched Variables ➛ Scope: Local / Add *variable* to watched variables" +// ), +// TRACE_METHOD( +// "trace", +// "Add method to distributed tracing system" +// ), ADD_LIVE_BREAKPOINT( - "Add Breakpoint", - "Live Instrument ➛ Add ➛ Location: On line *lineNumber*", + message("add_breakpoint"), + { "" + message("live_instrument") + " ➛ " + message("add") + " ➛ " + message("location") +": "+ message("on_line") + " *lineNumber*" }, PluginIcons.Command.liveBreakpointSelected, PluginIcons.Command.liveBreakpointUnSelected ), ADD_LIVE_LOG( - "Add Log", - "Live Instrument ➛ Add ➛ Location: On line *lineNumber*", + message("add_log"), + { "" + message("live_instrument") + " ➛ " + message("add") + " ➛ " + message("location") + ": "+ message("on_line") + " *lineNumber*" }, PluginIcons.Command.liveLogSelected, PluginIcons.Command.liveLogUnSelected ), ADD_LIVE_METER( - "Add Meter", - "Live Instrument ➛ Add ➛ Location: On line *lineNumber*", + message("add_meter"), + { "" + message("live_instrument") + " ➛ " + message("add") + " ➛ " + message("location") + ": " + message("on_line") + " *lineNumber*" }, PluginIcons.Command.liveMeterSelected, PluginIcons.Command.liveMeterUnSelected ), ADD_LIVE_SPAN( - "Add Span", - "Live Instrument ➛ Add ➛ Location: On method *methodName*", + message("add_span"), + { "" + message("live_instrument") + " ➛ " + message("add") + " ➛ " + message("location") + ": " + message("on_method") + " *methodName*" }, PluginIcons.Command.liveSpanSelected, PluginIcons.Command.liveSpanUnSelected ), CLEAR_LIVE_INSTRUMENTS( - "Clear Instruments", - "Live Instrument ➛ Clear All", + message("clear_instruments"), + { "" + message("live_instrument") + " ➛ " + message("clear_all") + "" }, PluginIcons.Command.clearInstrumentSelected, PluginIcons.Command.clearInstrumentUnSelected ), CLEAR_LIVE_BREAKPOINTS( - "Clear Breakpoints", - "Clear all self-created live breakpoints", + message("clear_breakpoints"), + { "Clear all self-created live breakpoints" }, PluginIcons.Command.clearInstrumentSelected, PluginIcons.Command.clearInstrumentUnSelected ), CLEAR_LIVE_LOGS( - "Clear Logs", - "Clear all self-created live logs", + message("clear_logs"), + { "Clear all self-created live logs" }, PluginIcons.Command.clearInstrumentSelected, PluginIcons.Command.clearInstrumentUnSelected ), CLEAR_LIVE_METERS( - "Clear Meters", - "Clear all self-created live meters", + message("clear_meters"), + { "Clear all self-created live meters" }, PluginIcons.Command.clearInstrumentSelected, PluginIcons.Command.clearInstrumentUnSelected ), CLEAR_LIVE_SPANS( - "Clear Spans", - "Clear all self-created live spans", + message("clear_spans"), + { "Clear all self-created live spans" }, PluginIcons.Command.clearInstrumentSelected, PluginIcons.Command.clearInstrumentUnSelected ); @@ -144,7 +147,7 @@ enum class LiveControlCommand( } override fun getDescription(): String? { - return description + return description.invoke() } override fun getIcon(): Icon? { diff --git a/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/portal/PortalController.kt b/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/portal/PortalController.kt index 698812541..f41d837aa 100644 --- a/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/portal/PortalController.kt +++ b/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/portal/PortalController.kt @@ -36,9 +36,7 @@ import spp.jetbrains.sourcemarker.command.LiveControlCommand import spp.jetbrains.sourcemarker.command.LiveControlCommand.* import spp.jetbrains.sourcemarker.mark.SourceMarkKeys import spp.jetbrains.sourcemarker.settings.SourceMarkerConfig -import spp.protocol.artifact.ArtifactQualifiedName import spp.protocol.marshall.KSerializers -import spp.protocol.marshall.LocalMessageCodec import javax.swing.UIManager class PortalController(private val markerConfig: SourceMarkerConfig) : CoroutineVerticle() { diff --git a/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/portal/PortalEventListener.kt b/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/portal/PortalEventListener.kt index 97ce93ea9..cb8a2d5a4 100644 --- a/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/portal/PortalEventListener.kt +++ b/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/portal/PortalEventListener.kt @@ -42,6 +42,7 @@ import spp.jetbrains.marker.source.mark.api.MethodSourceMark import spp.jetbrains.marker.source.mark.api.SourceMark import spp.jetbrains.marker.source.mark.api.component.jcef.SourceMarkJcefComponent import spp.jetbrains.marker.source.mark.api.event.SourceMarkEventCode +import spp.jetbrains.marker.source.mark.gutter.MethodGutterMark import spp.jetbrains.monitor.skywalking.SkywalkingClient import spp.jetbrains.monitor.skywalking.average import spp.jetbrains.monitor.skywalking.bridge.EndpointMetricsBridge @@ -222,10 +223,10 @@ class PortalEventListener( if (hostTranslations) { vertx.eventBus().consumer(GetPortalTranslations) { val map = HashMap() - val keys = PluginBundle.resourceBundle.keys + val keys = PluginBundle.LOCALE_BUNDLE.keys while (keys.hasMoreElements()) { val key = keys.nextElement() - map[key] = PluginBundle.resourceBundle.getString(key) + map[key] = PluginBundle.LOCALE_BUNDLE.getString(key) } it.reply(JsonObject.mapFrom(map)) } @@ -499,31 +500,32 @@ class PortalEventListener( ), vertx ) vertx.eventBus().send(ArtifactTracesUpdated, traceResult) - autoResolveEndpointNamesIfNecessary(traceResult, portal) + + if (markerConfig.autoResolveEndpointNames) { + autoResolveEndpointNames(traceResult, portal) + } } } } - private suspend fun autoResolveEndpointNamesIfNecessary(traceResult: TraceResult, portal: SourcePortal) { - if (markerConfig.autoResolveEndpointNames) { - //todo: only try to auto resolve endpoint names with dynamic ids - //todo: support multiple operationsNames/traceIds - traceResult.traces.forEach { - if (!portal.tracesView.resolvedEndpointNames.containsKey(it.traceIds[0])) { - val traceStack = EndpointTracesBridge.getTraceStack(it.traceIds[0], vertx) - val entrySpan: TraceSpan? = traceStack.traceSpans.firstOrNull { it.type == "Entry" } - if (entrySpan != null) { - val url = entrySpan.tags["url"] - val httpMethod = entrySpan.tags["http.method"] - if (url != null && httpMethod != null) { - val updatedEndpointName = "$httpMethod:${URI(url).path}" - vertx.eventBus().send( - TraceSpanUpdated, entrySpan.copy( - endpointName = updatedEndpointName, - artifactQualifiedName = portal.viewingArtifact - ) + private suspend fun autoResolveEndpointNames(traceResult: TraceResult, portal: SourcePortal) { + //todo: only try to auto resolve endpoint names with dynamic ids + //todo: support multiple operationsNames/traceIds + traceResult.traces.forEach { + if (!portal.tracesView.resolvedEndpointNames.containsKey(it.traceIds[0])) { + val traceStack = EndpointTracesBridge.getTraceStack(it.traceIds[0], vertx) + val entrySpan: TraceSpan? = traceStack.traceSpans.firstOrNull { it.type == "Entry" } + if (entrySpan != null) { + val url = entrySpan.tags["url"] + val httpMethod = entrySpan.tags["http.method"] + if (url != null && httpMethod != null) { + val updatedEndpointName = "$httpMethod:${URI(url).path}" + vertx.eventBus().send( + TraceSpanUpdated, entrySpan.copy( + endpointName = updatedEndpointName, + artifactQualifiedName = portal.viewingArtifact ) - } + ) } } } @@ -572,7 +574,7 @@ class PortalEventListener( } private suspend fun refreshOverview(fileMarker: SourceFileMarker, portal: SourcePortal) { - val endpointMarks = fileMarker.getSourceMarks().filterIsInstance().filter { + val endpointMarks = fileMarker.getSourceMarks().filterIsInstance().filter { it.getUserData(ENDPOINT_DETECTOR)!!.getOrFindEndpointId(it) != null } @@ -732,22 +734,24 @@ class PortalEventListener( ) vertx.eventBus().send(ArtifactTracesUpdated, traceResult) - //S++ adds trace meta to avoid additional query for auto-resolve endpoints - val url = trace.meta["url"] - val httpMethod = trace.meta["http.method"] - val entrySpanJson = trace.meta["entrySpan"] - if (url != null && httpMethod != null && entrySpanJson != null) { - val updatedEndpointName = "$httpMethod:${URI(url).path}" - val entrySpan = Json.decodeValue(entrySpanJson, TraceSpan::class.java) - vertx.eventBus().send( - TraceSpanUpdated, entrySpan.copy( - endpointName = updatedEndpointName, - artifactQualifiedName = event.artifactQualifiedName + if (markerConfig.autoResolveEndpointNames) { + //S++ adds trace meta to avoid additional query for auto-resolve endpoints + val url = trace.meta["url"] + val httpMethod = trace.meta["http.method"] + val entrySpanJson = trace.meta["entrySpan"] + if (url != null && httpMethod != null && entrySpanJson != null) { + val updatedEndpointName = "$httpMethod:${URI(url).path}" + val entrySpan = Json.decodeValue(entrySpanJson, TraceSpan::class.java) + vertx.eventBus().send( + TraceSpanUpdated, entrySpan.copy( + endpointName = updatedEndpointName, + artifactQualifiedName = event.artifactQualifiedName + ) ) - ) - } else { - launch(vertx.dispatcher()) { - autoResolveEndpointNamesIfNecessary(traceResult, portal) + } else { + launch(vertx.dispatcher()) { + autoResolveEndpointNames(traceResult, portal) + } } } } diff --git a/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/service/LiveInstrumentManager.kt b/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/service/LiveInstrumentManager.kt index f07e554bc..abbb6bc90 100644 --- a/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/service/LiveInstrumentManager.kt +++ b/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/service/LiveInstrumentManager.kt @@ -33,7 +33,6 @@ import spp.jetbrains.sourcemarker.service.discover.TCPServiceDiscoveryBackend import spp.jetbrains.sourcemarker.mark.SourceMarkKeys import spp.jetbrains.sourcemarker.mark.SourceMarkSearch import spp.jetbrains.sourcemarker.service.instrument.breakpoint.BreakpointHitWindowService -import spp.jetbrains.sourcemarker.service.instrument.breakpoint.BreakpointTriggerListener import spp.jetbrains.sourcemarker.settings.SourceMarkerConfig import spp.jetbrains.sourcemarker.status.LiveStatusManager import spp.protocol.SourceServices.Instance @@ -67,7 +66,6 @@ class LiveInstrumentManager( val json = JWT.parse(pluginConfig.serviceToken) developer = json.getJsonObject("payload").getString("developer_id") } - EditorFactory.getInstance().eventMulticaster.addEditorMouseListener(BreakpointTriggerListener, project) vertx.eventBus().consumer(toLiveInstrumentSubscriberAddress(developer)) { val liveEvent = Json.decodeValue(it.body().toString(), LiveInstrumentEvent::class.java) diff --git a/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/service/instrument/breakpoint/BreakpointHitWindowService.kt b/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/service/instrument/breakpoint/BreakpointHitWindowService.kt index cd67906e0..da6f1a65f 100644 --- a/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/service/instrument/breakpoint/BreakpointHitWindowService.kt +++ b/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/service/instrument/breakpoint/BreakpointHitWindowService.kt @@ -34,6 +34,7 @@ import spp.jetbrains.sourcemarker.icons.SourceMarkerIcons.LIVE_BREAKPOINT_DISABL import spp.jetbrains.sourcemarker.service.instrument.breakpoint.LiveBreakpointConstants.LIVE_BREAKPOINT_NAME import spp.jetbrains.sourcemarker.service.instrument.breakpoint.ui.BreakpointHitWindow import spp.jetbrains.sourcemarker.service.instrument.breakpoint.ui.EventsWindow +import spp.protocol.artifact.exception.LiveStackTraceElement import spp.protocol.instrument.event.LiveBreakpointHit /** @@ -113,9 +114,14 @@ class BreakpointHitWindowService(private val project: Project) : Disposable { fun showBreakpointHit(hit: LiveBreakpointHit, showExecutionPoint: Boolean = true) { if (showExecutionPoint) removeExecutionShower() breakpointWindow = BreakpointHitWindow(project, executionPointHighlighter, showExecutionPoint) - breakpointWindow.showFrames(hit.stackTrace, hit.stackTrace.first()) + + //grab first non-skywalking frame and add real variables from skywalking frame + val firstFrame: LiveStackTraceElement = hit.stackTrace.getElements(true).first() + .apply { variables.addAll(hit.stackTrace.first().variables) } + + breakpointWindow.showFrames(hit.stackTrace, firstFrame) val content = ContentFactory.SERVICE.getInstance().createContent( - breakpointWindow.layoutComponent, hit.stackTrace.first().source + " at #0", false + breakpointWindow.layoutComponent, firstFrame.source + " at #0", false ) content.setDisposer(breakpointWindow) breakpointWindow.content = content @@ -129,7 +135,7 @@ class BreakpointHitWindowService(private val project: Project) : Disposable { } } - fun removeExecutionShower() { + private fun removeExecutionShower() { executionPointHighlighter.hide() } diff --git a/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/service/instrument/breakpoint/BreakpointTriggerListener.kt b/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/service/instrument/breakpoint/BreakpointTriggerListener.kt deleted file mode 100644 index 3efed3459..000000000 --- a/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/service/instrument/breakpoint/BreakpointTriggerListener.kt +++ /dev/null @@ -1,36 +0,0 @@ -/* - * Source++, the open-source live coding platform. - * Copyright (C) 2022 CodeBrig, Inc. - * - * This program is free software: you can redistribute it and/or modify - * it under the terms of the GNU Affero General Public License as published - * by the Free Software Foundation, either version 3 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU Affero General Public License for more details. - * - * You should have received a copy of the GNU Affero General Public License - * along with this program. If not, see . - */ -package spp.jetbrains.sourcemarker.service.instrument.breakpoint - -import com.intellij.openapi.editor.event.EditorMouseEvent -import com.intellij.openapi.editor.event.EditorMouseListener - -/** - * todo: description. - * - * @since 0.3.0 - * @author [Brandon Fergerson](mailto:bfergerson@apache.org) - */ -object BreakpointTriggerListener : EditorMouseListener { - - var shiftHeld = false - - override fun mousePressed(event: EditorMouseEvent) { - shiftHeld = event.mouseEvent.isShiftDown - } -} diff --git a/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/status/util/AutocompleteField.kt b/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/status/util/AutocompleteField.kt index ce7067e5f..8bf6f71ef 100644 --- a/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/status/util/AutocompleteField.kt +++ b/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/status/util/AutocompleteField.kt @@ -100,10 +100,10 @@ class AutocompleteField( } }) - list.font = ROBOTO_LIGHT_PLAIN_14 + list.font = SMALLEST_FONT list.setCellRenderer(AutoCompleteCellRenderer(artifactQualifiedName)) - list.setBackground(AUTO_COMPLETE_HIGHLIGHT_COLOR) + list.setBackground(BGND_FOCUS_COLOR) list.setBorder(JBUI.Borders.empty()) val scroll: JScrollPane = object : JScrollPane(list) { override fun getPreferredSize(): Dimension { diff --git a/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/status/util/ControlBarCellRenderer.kt b/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/status/util/ControlBarCellRenderer.kt index a56920ae1..233d143cd 100644 --- a/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/status/util/ControlBarCellRenderer.kt +++ b/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/status/util/ControlBarCellRenderer.kt @@ -17,8 +17,7 @@ */ package spp.jetbrains.sourcemarker.status.util -import spp.jetbrains.sourcemarker.PluginUI -import spp.jetbrains.sourcemarker.command.AutocompleteFieldRow +import spp.jetbrains.sourcemarker.PluginUI.BGND_FOCUS_COLOR import spp.jetbrains.sourcemarker.command.LiveControlCommand import spp.jetbrains.sourcemarker.element.LiveControlBarRow import spp.protocol.artifact.ArtifactNameUtils.getShortFunctionSignature @@ -40,7 +39,7 @@ class ControlBarCellRenderer(private val autocompleteField: AutocompleteField) : override fun getListCellRendererComponent( list: JList<*>, value: Any, index: Int, isSelected: Boolean, cellHasFocus: Boolean ): Component { - val entry = value as AutocompleteFieldRow + val entry = value as LiveControlCommand val row = LiveControlBarRow() row.setCommandName(entry.getText(), autocompleteField.text) row.setCommandIcon(entry.getIcon()) @@ -59,10 +58,8 @@ class ControlBarCellRenderer(private val autocompleteField: AutocompleteField) : } if (isSelected) { - row.background = PluginUI.AUTO_COMPLETE_HIGHLIGHT_COLOR - if (entry is LiveControlCommand) { - row.setCommandIcon(entry.selectedIcon) - } + row.background = BGND_FOCUS_COLOR + row.setCommandIcon(entry.selectedIcon) } return row } diff --git a/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/view/ActivityQuickStatsIndicator.kt b/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/view/ActivityQuickStatsIndicator.kt index 69ebe9af8..2b1006e02 100644 --- a/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/view/ActivityQuickStatsIndicator.kt +++ b/plugin/src/main/kotlin/spp/jetbrains/sourcemarker/view/ActivityQuickStatsIndicator.kt @@ -17,6 +17,7 @@ */ package spp.jetbrains.sourcemarker.view +import com.intellij.DynamicBundle import com.intellij.openapi.application.ApplicationManager import com.intellij.ui.JBColor import io.vertx.core.json.Json @@ -41,6 +42,8 @@ import spp.jetbrains.monitor.skywalking.bridge.EndpointMetricsBridge import spp.jetbrains.monitor.skywalking.model.GetEndpointMetrics import spp.jetbrains.monitor.skywalking.model.ZonedDuration import spp.jetbrains.monitor.skywalking.toProtocol +import spp.jetbrains.sourcemarker.PluginBundle.message +import spp.jetbrains.sourcemarker.PluginUI import spp.jetbrains.sourcemarker.SourceMarkerPlugin.vertx import spp.jetbrains.sourcemarker.command.LiveControlCommand.HIDE_QUICK_STATS import spp.jetbrains.sourcemarker.command.LiveControlCommand.SHOW_QUICK_STATS @@ -120,6 +123,10 @@ class ActivityQuickStatsIndicator(val config: SourceMarkerConfig) : SourceMarkEv inlay.putUserData(SHOWING_QUICK_STATS, true) inlay.configuration.virtualText = InlayMarkVirtualText(inlay, formatMetricResult(metricResult)) inlay.configuration.virtualText!!.textAttributes.foregroundColor = inlayForegroundColor + if (DynamicBundle.getLocale().language == "zh") { + inlay.configuration.virtualText!!.font = PluginUI.MICROSOFT_YAHEI_PLAIN_14 + inlay.configuration.virtualText!!.xOffset = 15 + } inlay.configuration.activateOnMouseClick = false inlay.apply(true) @@ -160,12 +167,12 @@ class ActivityQuickStatsIndicator(val config: SourceMarkerConfig) : SourceMarkEv private fun formatMetricResult(result: ArtifactMetricResult): String { val sb = StringBuilder() val resp = result.artifactMetrics.find { it.metricType == MetricType.Throughput_Average }!! - val respValue = (resp.values.last() / 60.0).fromPerSecondToPrettyFrequency() - sb.append(resp.metricType.simpleName).append(": ").append(respValue).append(" | ") + val respValue = (resp.values.last() / 60.0).fromPerSecondToPrettyFrequency({ message(it) }) + sb.append(message(resp.metricType.simpleName)).append(": ").append(respValue).append(" | ") val cpm = result.artifactMetrics.find { it.metricType == MetricType.ResponseTime_Average }!! - sb.append(cpm.metricType.simpleName).append(": ").append(cpm.values.last().toInt()).append("ms | ") + sb.append(message(cpm.metricType.simpleName)).append(": ").append(cpm.values.last().toInt()).append(message("ms")).append(" | ") val sla = result.artifactMetrics.find { it.metricType == MetricType.ServiceLevelAgreement_Average }!! - sb.append(sla.metricType.simpleName).append(": ").append(sla.values.last().toDouble() / 100.0).append("%") + sb.append(message(sla.metricType.simpleName)).append(": ").append(sla.values.last().toDouble() / 100.0).append("%") return "/#/ " + sb.toString() + " \\#\\" } @@ -182,12 +189,12 @@ class ActivityQuickStatsIndicator(val config: SourceMarkerConfig) : SourceMarkEv val metricType = MetricType.realValueOf(metric.getJsonObject("meta").getString("metricsName")) if (metricType == MetricType.Throughput_Average) { - value = (metric.getNumber("value").toDouble() / 60.0).fromPerSecondToPrettyFrequency() + value = (metric.getNumber("value").toDouble() / 60.0).fromPerSecondToPrettyFrequency({ message(it) }) } if (metricType == MetricType.ResponseTime_Average) { - value += "ms" + value += message("ms") } - sb.append("${metricType.simpleName}: $value") + sb.append("${message(metricType.simpleName)}: $value") if (i < metrics.size() - 1) { sb.append(" | ") } diff --git a/plugin/src/main/resources/fonts/chinese.msyh.ttf b/plugin/src/main/resources/fonts/chinese.msyh.ttf new file mode 100644 index 000000000..a6be13226 Binary files /dev/null and b/plugin/src/main/resources/fonts/chinese.msyh.ttf differ diff --git a/plugin/src/main/resources/icons/breakpoint-config.svg b/plugin/src/main/resources/icons/breakpoint-config.svg new file mode 100644 index 000000000..0f3939372 --- /dev/null +++ b/plugin/src/main/resources/icons/breakpoint-config.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugin/src/main/resources/icons/breakpoint-config_dark.svg b/plugin/src/main/resources/icons/breakpoint-config_dark.svg new file mode 100644 index 000000000..8db5a635e --- /dev/null +++ b/plugin/src/main/resources/icons/breakpoint-config_dark.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/clear-instruments_selected.svg b/plugin/src/main/resources/icons/command/clear-instruments_selected.svg index c3cae685d..8ebc22009 100644 --- a/plugin/src/main/resources/icons/command/clear-instruments_selected.svg +++ b/plugin/src/main/resources/icons/command/clear-instruments_selected.svg @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/clear-instruments_selected_dark.svg b/plugin/src/main/resources/icons/command/clear-instruments_selected_dark.svg index 1ee7325a8..0f39f47ea 100644 --- a/plugin/src/main/resources/icons/command/clear-instruments_selected_dark.svg +++ b/plugin/src/main/resources/icons/command/clear-instruments_selected_dark.svg @@ -1,4 +1,4 @@ + d="M135.2 17.69C140.6 6.848 151.7 0 163.8 0H284.2C296.3 0 307.4 6.848 312.8 17.69L320 32H416C433.7 32 448 46.33 448 64C448 81.67 433.7 96 416 96H32C14.33 96 0 81.67 0 64C0 46.33 14.33 32 32 32H128L135.2 17.69zM394.8 466.1C393.2 492.3 372.3 512 346.9 512H101.1C75.75 512 54.77 492.3 53.19 466.1L31.1 128H416L394.8 466.1z"/> \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/clear-instruments_unselected.svg b/plugin/src/main/resources/icons/command/clear-instruments_unselected.svg index 1ee7325a8..0f39f47ea 100644 --- a/plugin/src/main/resources/icons/command/clear-instruments_unselected.svg +++ b/plugin/src/main/resources/icons/command/clear-instruments_unselected.svg @@ -1,4 +1,4 @@ + d="M135.2 17.69C140.6 6.848 151.7 0 163.8 0H284.2C296.3 0 307.4 6.848 312.8 17.69L320 32H416C433.7 32 448 46.33 448 64C448 81.67 433.7 96 416 96H32C14.33 96 0 81.67 0 64C0 46.33 14.33 32 32 32H128L135.2 17.69zM394.8 466.1C393.2 492.3 372.3 512 346.9 512H101.1C75.75 512 54.77 492.3 53.19 466.1L31.1 128H416L394.8 466.1z"/> \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/clear-instruments_unselected_dark.svg b/plugin/src/main/resources/icons/command/clear-instruments_unselected_dark.svg index 8a0b4f495..7ddf86aa2 100644 --- a/plugin/src/main/resources/icons/command/clear-instruments_unselected_dark.svg +++ b/plugin/src/main/resources/icons/command/clear-instruments_unselected_dark.svg @@ -1,4 +1,4 @@ + d="M135.2 17.69C140.6 6.848 151.7 0 163.8 0H284.2C296.3 0 307.4 6.848 312.8 17.69L320 32H416C433.7 32 448 46.33 448 64C448 81.67 433.7 96 416 96H32C14.33 96 0 81.67 0 64C0 46.33 14.33 32 32 32H128L135.2 17.69zM394.8 466.1C393.2 492.3 372.3 512 346.9 512H101.1C75.75 512 54.77 492.3 53.19 466.1L31.1 128H416L394.8 466.1z"/> \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/live-breakpoint_selected.svg b/plugin/src/main/resources/icons/command/live-breakpoint_selected.svg index 0061c217c..46f87ddf6 100644 --- a/plugin/src/main/resources/icons/command/live-breakpoint_selected.svg +++ b/plugin/src/main/resources/icons/command/live-breakpoint_selected.svg @@ -1,3 +1,3 @@ - - + + \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/live-breakpoint_selected_dark.svg b/plugin/src/main/resources/icons/command/live-breakpoint_selected_dark.svg index 28da7d614..c39b28729 100644 --- a/plugin/src/main/resources/icons/command/live-breakpoint_selected_dark.svg +++ b/plugin/src/main/resources/icons/command/live-breakpoint_selected_dark.svg @@ -1,4 +1,4 @@ - + + d="M224 256C224 238.3 238.3 224 256 224C273.7 224 288 238.3 288 256C288 273.7 273.7 288 256 288C238.3 288 224 273.7 224 256zM256 0C273.7 0 288 14.33 288 32V42.35C381.7 56.27 455.7 130.3 469.6 224H480C497.7 224 512 238.3 512 256C512 273.7 497.7 288 480 288H469.6C455.7 381.7 381.7 455.7 288 469.6V480C288 497.7 273.7 512 256 512C238.3 512 224 497.7 224 480V469.6C130.3 455.7 56.27 381.7 42.35 288H32C14.33 288 0 273.7 0 256C0 238.3 14.33 224 32 224H42.35C56.27 130.3 130.3 56.27 224 42.35V32C224 14.33 238.3 0 256 0V0zM224 404.6V384C224 366.3 238.3 352 256 352C273.7 352 288 366.3 288 384V404.6C346.3 392.1 392.1 346.3 404.6 288H384C366.3 288 352 273.7 352 256C352 238.3 366.3 224 384 224H404.6C392.1 165.7 346.3 119.9 288 107.4V128C288 145.7 273.7 160 256 160C238.3 160 224 145.7 224 128V107.4C165.7 119.9 119.9 165.7 107.4 224H128C145.7 224 160 238.3 160 256C160 273.7 145.7 288 128 288H107.4C119.9 346.3 165.7 392.1 224 404.6z"/> \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/live-breakpoint_unselected.svg b/plugin/src/main/resources/icons/command/live-breakpoint_unselected.svg index 28da7d614..c39b28729 100644 --- a/plugin/src/main/resources/icons/command/live-breakpoint_unselected.svg +++ b/plugin/src/main/resources/icons/command/live-breakpoint_unselected.svg @@ -1,4 +1,4 @@ - + + d="M224 256C224 238.3 238.3 224 256 224C273.7 224 288 238.3 288 256C288 273.7 273.7 288 256 288C238.3 288 224 273.7 224 256zM256 0C273.7 0 288 14.33 288 32V42.35C381.7 56.27 455.7 130.3 469.6 224H480C497.7 224 512 238.3 512 256C512 273.7 497.7 288 480 288H469.6C455.7 381.7 381.7 455.7 288 469.6V480C288 497.7 273.7 512 256 512C238.3 512 224 497.7 224 480V469.6C130.3 455.7 56.27 381.7 42.35 288H32C14.33 288 0 273.7 0 256C0 238.3 14.33 224 32 224H42.35C56.27 130.3 130.3 56.27 224 42.35V32C224 14.33 238.3 0 256 0V0zM224 404.6V384C224 366.3 238.3 352 256 352C273.7 352 288 366.3 288 384V404.6C346.3 392.1 392.1 346.3 404.6 288H384C366.3 288 352 273.7 352 256C352 238.3 366.3 224 384 224H404.6C392.1 165.7 346.3 119.9 288 107.4V128C288 145.7 273.7 160 256 160C238.3 160 224 145.7 224 128V107.4C165.7 119.9 119.9 165.7 107.4 224H128C145.7 224 160 238.3 160 256C160 273.7 145.7 288 128 288H107.4C119.9 346.3 165.7 392.1 224 404.6z"/> \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/live-breakpoint_unselected_dark.svg b/plugin/src/main/resources/icons/command/live-breakpoint_unselected_dark.svg index 9d7b75121..229eae6e8 100644 --- a/plugin/src/main/resources/icons/command/live-breakpoint_unselected_dark.svg +++ b/plugin/src/main/resources/icons/command/live-breakpoint_unselected_dark.svg @@ -1,4 +1,4 @@ - + + d="M224 256C224 238.3 238.3 224 256 224C273.7 224 288 238.3 288 256C288 273.7 273.7 288 256 288C238.3 288 224 273.7 224 256zM256 0C273.7 0 288 14.33 288 32V42.35C381.7 56.27 455.7 130.3 469.6 224H480C497.7 224 512 238.3 512 256C512 273.7 497.7 288 480 288H469.6C455.7 381.7 381.7 455.7 288 469.6V480C288 497.7 273.7 512 256 512C238.3 512 224 497.7 224 480V469.6C130.3 455.7 56.27 381.7 42.35 288H32C14.33 288 0 273.7 0 256C0 238.3 14.33 224 32 224H42.35C56.27 130.3 130.3 56.27 224 42.35V32C224 14.33 238.3 0 256 0V0zM224 404.6V384C224 366.3 238.3 352 256 352C273.7 352 288 366.3 288 384V404.6C346.3 392.1 392.1 346.3 404.6 288H384C366.3 288 352 273.7 352 256C352 238.3 366.3 224 384 224H404.6C392.1 165.7 346.3 119.9 288 107.4V128C288 145.7 273.7 160 256 160C238.3 160 224 145.7 224 128V107.4C165.7 119.9 119.9 165.7 107.4 224H128C145.7 224 160 238.3 160 256C160 273.7 145.7 288 128 288H107.4C119.9 346.3 165.7 392.1 224 404.6z"/> \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/live-log_selected.svg b/plugin/src/main/resources/icons/command/live-log_selected.svg index 3b5df4105..aa6240678 100644 --- a/plugin/src/main/resources/icons/command/live-log_selected.svg +++ b/plugin/src/main/resources/icons/command/live-log_selected.svg @@ -1,3 +1,3 @@ - - + + \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/live-log_selected_dark.svg b/plugin/src/main/resources/icons/command/live-log_selected_dark.svg index ad7688eea..ee10fa191 100644 --- a/plugin/src/main/resources/icons/command/live-log_selected_dark.svg +++ b/plugin/src/main/resources/icons/command/live-log_selected_dark.svg @@ -1,4 +1,4 @@ - + + d="M256 480c0 17.69-14.33 31.1-32 31.1c-38.41 0-72.52-17.35-96-44.23c-23.48 26.88-57.59 44.23-96 44.23c-17.67 0-32-14.31-32-31.1s14.33-32 32-32c35.3 0 64-28.72 64-64V288H64C46.33 288 32 273.7 32 256s14.33-32 32-32h32V128c0-35.28-28.7-64-64-64C14.33 64 0 49.69 0 32s14.33-32 32-32c38.41 0 72.52 17.35 96 44.23c23.48-26.88 57.59-44.23 96-44.23c17.67 0 32 14.31 32 32s-14.33 32-32 32c-35.3 0-64 28.72-64 64v96h32c17.67 0 32 14.31 32 32s-14.33 32-32 32h-32v96c0 35.28 28.7 64 64 64C241.7 448 256 462.3 256 480z"/> \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/live-log_unselected.svg b/plugin/src/main/resources/icons/command/live-log_unselected.svg index ad7688eea..ee10fa191 100644 --- a/plugin/src/main/resources/icons/command/live-log_unselected.svg +++ b/plugin/src/main/resources/icons/command/live-log_unselected.svg @@ -1,4 +1,4 @@ - + + d="M256 480c0 17.69-14.33 31.1-32 31.1c-38.41 0-72.52-17.35-96-44.23c-23.48 26.88-57.59 44.23-96 44.23c-17.67 0-32-14.31-32-31.1s14.33-32 32-32c35.3 0 64-28.72 64-64V288H64C46.33 288 32 273.7 32 256s14.33-32 32-32h32V128c0-35.28-28.7-64-64-64C14.33 64 0 49.69 0 32s14.33-32 32-32c38.41 0 72.52 17.35 96 44.23c23.48-26.88 57.59-44.23 96-44.23c17.67 0 32 14.31 32 32s-14.33 32-32 32c-35.3 0-64 28.72-64 64v96h32c17.67 0 32 14.31 32 32s-14.33 32-32 32h-32v96c0 35.28 28.7 64 64 64C241.7 448 256 462.3 256 480z"/> \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/live-log_unselected_dark.svg b/plugin/src/main/resources/icons/command/live-log_unselected_dark.svg index c3458933a..6c7fb09b2 100644 --- a/plugin/src/main/resources/icons/command/live-log_unselected_dark.svg +++ b/plugin/src/main/resources/icons/command/live-log_unselected_dark.svg @@ -1,4 +1,4 @@ - + + d="M256 480c0 17.69-14.33 31.1-32 31.1c-38.41 0-72.52-17.35-96-44.23c-23.48 26.88-57.59 44.23-96 44.23c-17.67 0-32-14.31-32-31.1s14.33-32 32-32c35.3 0 64-28.72 64-64V288H64C46.33 288 32 273.7 32 256s14.33-32 32-32h32V128c0-35.28-28.7-64-64-64C14.33 64 0 49.69 0 32s14.33-32 32-32c38.41 0 72.52 17.35 96 44.23c23.48-26.88 57.59-44.23 96-44.23c17.67 0 32 14.31 32 32s-14.33 32-32 32c-35.3 0-64 28.72-64 64v96h32c17.67 0 32 14.31 32 32s-14.33 32-32 32h-32v96c0 35.28 28.7 64 64 64C241.7 448 256 462.3 256 480z"/> \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/live-meter_selected.svg b/plugin/src/main/resources/icons/command/live-meter_selected.svg index afa77e18f..8ebaaca2c 100644 --- a/plugin/src/main/resources/icons/command/live-meter_selected.svg +++ b/plugin/src/main/resources/icons/command/live-meter_selected.svg @@ -1,3 +1,3 @@ - - + + \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/live-meter_selected_dark.svg b/plugin/src/main/resources/icons/command/live-meter_selected_dark.svg index 9a7aea555..950cee245 100644 --- a/plugin/src/main/resources/icons/command/live-meter_selected_dark.svg +++ b/plugin/src/main/resources/icons/command/live-meter_selected_dark.svg @@ -1,4 +1,4 @@ - + + d="M237.6 183.3c13.03-11.95 13.9-32.22 1.969-45.27L151.6 41.94c-12.12-13.26-35.06-13.26-47.19 0l-87.1 96.09C4.475 151.1 5.35 171.3 18.38 183.3c13.02 11.95 33.27 11.04 45.22-1.969L96 145.9v302c0 17.7 14.33 32.03 31.1 32.03s32-14.33 32-32.03V145.9L192.4 181.3c6.312 6.883 14.94 10.38 23.61 10.38C223.7 191.7 231.5 188.9 237.6 183.3zM357.7 201.1l-7.682 8.004c-10.72 11.16-10.34 28.88 .8125 39.56c5.406 5.219 12.41 7.812 19.38 7.812c7.344 0 14.72-2.875 20.19-8.625c69.61-72.53 89.6-85.39 89.6-127.8c0-48.6-39.4-88-88-88s-88 39.4-88 88C303.1 156.4 326.1 187.7 357.7 201.1zM392 96c13.23 0 24 10.77 24 24S405.2 144 392 144S368 133.2 368 120S378.8 96 392 96zM416 416.4v-96.02c0-11.19-5.844-21.53-15.38-27.34c-9.531-5.781-21.41-6.188-31.34-1.062l-32 16.59c-15.69 8.125-21.81 27.44-13.69 43.13C329.3 362.8 340.4 369 352 369v47.41c-17.69 0-32 14.31-32 32s14.31 32 32 32h64c17.69 0 32-14.31 32-32S433.7 416.4 416 416.4z"/> \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/live-meter_unselected.svg b/plugin/src/main/resources/icons/command/live-meter_unselected.svg index 9a7aea555..950cee245 100644 --- a/plugin/src/main/resources/icons/command/live-meter_unselected.svg +++ b/plugin/src/main/resources/icons/command/live-meter_unselected.svg @@ -1,4 +1,4 @@ - + + d="M237.6 183.3c13.03-11.95 13.9-32.22 1.969-45.27L151.6 41.94c-12.12-13.26-35.06-13.26-47.19 0l-87.1 96.09C4.475 151.1 5.35 171.3 18.38 183.3c13.02 11.95 33.27 11.04 45.22-1.969L96 145.9v302c0 17.7 14.33 32.03 31.1 32.03s32-14.33 32-32.03V145.9L192.4 181.3c6.312 6.883 14.94 10.38 23.61 10.38C223.7 191.7 231.5 188.9 237.6 183.3zM357.7 201.1l-7.682 8.004c-10.72 11.16-10.34 28.88 .8125 39.56c5.406 5.219 12.41 7.812 19.38 7.812c7.344 0 14.72-2.875 20.19-8.625c69.61-72.53 89.6-85.39 89.6-127.8c0-48.6-39.4-88-88-88s-88 39.4-88 88C303.1 156.4 326.1 187.7 357.7 201.1zM392 96c13.23 0 24 10.77 24 24S405.2 144 392 144S368 133.2 368 120S378.8 96 392 96zM416 416.4v-96.02c0-11.19-5.844-21.53-15.38-27.34c-9.531-5.781-21.41-6.188-31.34-1.062l-32 16.59c-15.69 8.125-21.81 27.44-13.69 43.13C329.3 362.8 340.4 369 352 369v47.41c-17.69 0-32 14.31-32 32s14.31 32 32 32h64c17.69 0 32-14.31 32-32S433.7 416.4 416 416.4z"/> \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/live-meter_unselected_dark.svg b/plugin/src/main/resources/icons/command/live-meter_unselected_dark.svg index 7028a5481..4218a86ed 100644 --- a/plugin/src/main/resources/icons/command/live-meter_unselected_dark.svg +++ b/plugin/src/main/resources/icons/command/live-meter_unselected_dark.svg @@ -1,4 +1,4 @@ - + + d="M237.6 183.3c13.03-11.95 13.9-32.22 1.969-45.27L151.6 41.94c-12.12-13.26-35.06-13.26-47.19 0l-87.1 96.09C4.475 151.1 5.35 171.3 18.38 183.3c13.02 11.95 33.27 11.04 45.22-1.969L96 145.9v302c0 17.7 14.33 32.03 31.1 32.03s32-14.33 32-32.03V145.9L192.4 181.3c6.312 6.883 14.94 10.38 23.61 10.38C223.7 191.7 231.5 188.9 237.6 183.3zM357.7 201.1l-7.682 8.004c-10.72 11.16-10.34 28.88 .8125 39.56c5.406 5.219 12.41 7.812 19.38 7.812c7.344 0 14.72-2.875 20.19-8.625c69.61-72.53 89.6-85.39 89.6-127.8c0-48.6-39.4-88-88-88s-88 39.4-88 88C303.1 156.4 326.1 187.7 357.7 201.1zM392 96c13.23 0 24 10.77 24 24S405.2 144 392 144S368 133.2 368 120S378.8 96 392 96zM416 416.4v-96.02c0-11.19-5.844-21.53-15.38-27.34c-9.531-5.781-21.41-6.188-31.34-1.062l-32 16.59c-15.69 8.125-21.81 27.44-13.69 43.13C329.3 362.8 340.4 369 352 369v47.41c-17.69 0-32 14.31-32 32s14.31 32 32 32h64c17.69 0 32-14.31 32-32S433.7 416.4 416 416.4z"/> \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/live-span_selected.svg b/plugin/src/main/resources/icons/command/live-span_selected.svg index 63750a645..93db602eb 100644 --- a/plugin/src/main/resources/icons/command/live-span_selected.svg +++ b/plugin/src/main/resources/icons/command/live-span_selected.svg @@ -1,3 +1,3 @@ - + \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/live-span_selected_dark.svg b/plugin/src/main/resources/icons/command/live-span_selected_dark.svg index 69a2506e8..534285413 100644 --- a/plugin/src/main/resources/icons/command/live-span_selected_dark.svg +++ b/plugin/src/main/resources/icons/command/live-span_selected_dark.svg @@ -1,4 +1,4 @@ + d="M352 176C369.7 176 384 190.3 384 208C384 225.7 369.7 240 352 240H320V448H368C421 448 464 405 464 352V345.9L456.1 352.1C447.6 362.3 432.4 362.3 423 352.1C413.7 343.6 413.7 328.4 423 319L479 263C488.4 253.7 503.6 253.7 512.1 263L568.1 319C578.3 328.4 578.3 343.6 568.1 352.1C559.6 362.3 544.4 362.3 535 352.1L528 345.9V352C528 440.4 456.4 512 368 512H208C119.6 512 48 440.4 48 352V345.9L40.97 352.1C31.6 362.3 16.4 362.3 7.029 352.1C-2.343 343.6-2.343 328.4 7.029 319L63.03 263C72.4 253.7 87.6 253.7 96.97 263L152.1 319C162.3 328.4 162.3 343.6 152.1 352.1C143.6 362.3 128.4 362.3 119 352.1L112 345.9V352C112 405 154.1 448 208 448H256V240H224C206.3 240 192 225.7 192 208C192 190.3 206.3 176 224 176H234.9C209 158.8 192 129.4 192 96C192 42.98 234.1 0 288 0C341 0 384 42.98 384 96C384 129.4 366.1 158.8 341.1 176H352zM288 128C305.7 128 320 113.7 320 96C320 78.33 305.7 64 288 64C270.3 64 256 78.33 256 96C256 113.7 270.3 128 288 128z"/> \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/live-span_unselected.svg b/plugin/src/main/resources/icons/command/live-span_unselected.svg index 69a2506e8..534285413 100644 --- a/plugin/src/main/resources/icons/command/live-span_unselected.svg +++ b/plugin/src/main/resources/icons/command/live-span_unselected.svg @@ -1,4 +1,4 @@ + d="M352 176C369.7 176 384 190.3 384 208C384 225.7 369.7 240 352 240H320V448H368C421 448 464 405 464 352V345.9L456.1 352.1C447.6 362.3 432.4 362.3 423 352.1C413.7 343.6 413.7 328.4 423 319L479 263C488.4 253.7 503.6 253.7 512.1 263L568.1 319C578.3 328.4 578.3 343.6 568.1 352.1C559.6 362.3 544.4 362.3 535 352.1L528 345.9V352C528 440.4 456.4 512 368 512H208C119.6 512 48 440.4 48 352V345.9L40.97 352.1C31.6 362.3 16.4 362.3 7.029 352.1C-2.343 343.6-2.343 328.4 7.029 319L63.03 263C72.4 253.7 87.6 253.7 96.97 263L152.1 319C162.3 328.4 162.3 343.6 152.1 352.1C143.6 362.3 128.4 362.3 119 352.1L112 345.9V352C112 405 154.1 448 208 448H256V240H224C206.3 240 192 225.7 192 208C192 190.3 206.3 176 224 176H234.9C209 158.8 192 129.4 192 96C192 42.98 234.1 0 288 0C341 0 384 42.98 384 96C384 129.4 366.1 158.8 341.1 176H352zM288 128C305.7 128 320 113.7 320 96C320 78.33 305.7 64 288 64C270.3 64 256 78.33 256 96C256 113.7 270.3 128 288 128z"/> \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/live-span_unselected_dark.svg b/plugin/src/main/resources/icons/command/live-span_unselected_dark.svg index 241d63356..c6f79439d 100644 --- a/plugin/src/main/resources/icons/command/live-span_unselected_dark.svg +++ b/plugin/src/main/resources/icons/command/live-span_unselected_dark.svg @@ -1,4 +1,4 @@ + d="M352 176C369.7 176 384 190.3 384 208C384 225.7 369.7 240 352 240H320V448H368C421 448 464 405 464 352V345.9L456.1 352.1C447.6 362.3 432.4 362.3 423 352.1C413.7 343.6 413.7 328.4 423 319L479 263C488.4 253.7 503.6 253.7 512.1 263L568.1 319C578.3 328.4 578.3 343.6 568.1 352.1C559.6 362.3 544.4 362.3 535 352.1L528 345.9V352C528 440.4 456.4 512 368 512H208C119.6 512 48 440.4 48 352V345.9L40.97 352.1C31.6 362.3 16.4 362.3 7.029 352.1C-2.343 343.6-2.343 328.4 7.029 319L63.03 263C72.4 253.7 87.6 253.7 96.97 263L152.1 319C162.3 328.4 162.3 343.6 152.1 352.1C143.6 362.3 128.4 362.3 119 352.1L112 345.9V352C112 405 154.1 448 208 448H256V240H224C206.3 240 192 225.7 192 208C192 190.3 206.3 176 224 176H234.9C209 158.8 192 129.4 192 96C192 42.98 234.1 0 288 0C341 0 384 42.98 384 96C384 129.4 366.1 158.8 341.1 176H352zM288 128C305.7 128 320 113.7 320 96C320 78.33 305.7 64 288 64C270.3 64 256 78.33 256 96C256 113.7 270.3 128 288 128z"/> \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/quick-stats_selected.svg b/plugin/src/main/resources/icons/command/quick-stats_selected.svg new file mode 100644 index 000000000..a25698191 --- /dev/null +++ b/plugin/src/main/resources/icons/command/quick-stats_selected.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/quick-stats_selected_dark.svg b/plugin/src/main/resources/icons/command/quick-stats_selected_dark.svg new file mode 100644 index 000000000..27a7e3c57 --- /dev/null +++ b/plugin/src/main/resources/icons/command/quick-stats_selected_dark.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/quick-stats_unselected.svg b/plugin/src/main/resources/icons/command/quick-stats_unselected.svg new file mode 100644 index 000000000..27a7e3c57 --- /dev/null +++ b/plugin/src/main/resources/icons/command/quick-stats_unselected.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/quick-stats_unselected_dark.svg b/plugin/src/main/resources/icons/command/quick-stats_unselected_dark.svg new file mode 100644 index 000000000..95c7a30ed --- /dev/null +++ b/plugin/src/main/resources/icons/command/quick-stats_unselected_dark.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/view-activity_selected.svg b/plugin/src/main/resources/icons/command/view-activity_selected.svg index 6adc8a969..5d738c6f1 100644 --- a/plugin/src/main/resources/icons/command/view-activity_selected.svg +++ b/plugin/src/main/resources/icons/command/view-activity_selected.svg @@ -1,3 +1,3 @@ - - + + \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/view-activity_selected_dark.svg b/plugin/src/main/resources/icons/command/view-activity_selected_dark.svg index f97cc9537..592b322c6 100644 --- a/plugin/src/main/resources/icons/command/view-activity_selected_dark.svg +++ b/plugin/src/main/resources/icons/command/view-activity_selected_dark.svg @@ -1,4 +1,4 @@ - + + d="M64 400C64 408.8 71.16 416 80 416H480C497.7 416 512 430.3 512 448C512 465.7 497.7 480 480 480H80C35.82 480 0 444.2 0 400V64C0 46.33 14.33 32 32 32C49.67 32 64 46.33 64 64V400zM128 320V236C128 228.3 130.8 220.8 135.9 214.1L215.3 124.2C228.3 109.4 251.4 109.7 263.1 124.8L303.2 171.8C312.2 182.7 328.6 183.4 338.6 173.4L359.6 152.4C372.7 139.3 394.4 140.1 406.5 154.2L472.3 231C477.3 236.8 480 244.2 480 251.8V320C480 337.7 465.7 352 448 352H159.1C142.3 352 127.1 337.7 127.1 320L128 320z"/> \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/view-activity_unselected.svg b/plugin/src/main/resources/icons/command/view-activity_unselected.svg index f97cc9537..592b322c6 100644 --- a/plugin/src/main/resources/icons/command/view-activity_unselected.svg +++ b/plugin/src/main/resources/icons/command/view-activity_unselected.svg @@ -1,4 +1,4 @@ - + + d="M64 400C64 408.8 71.16 416 80 416H480C497.7 416 512 430.3 512 448C512 465.7 497.7 480 480 480H80C35.82 480 0 444.2 0 400V64C0 46.33 14.33 32 32 32C49.67 32 64 46.33 64 64V400zM128 320V236C128 228.3 130.8 220.8 135.9 214.1L215.3 124.2C228.3 109.4 251.4 109.7 263.1 124.8L303.2 171.8C312.2 182.7 328.6 183.4 338.6 173.4L359.6 152.4C372.7 139.3 394.4 140.1 406.5 154.2L472.3 231C477.3 236.8 480 244.2 480 251.8V320C480 337.7 465.7 352 448 352H159.1C142.3 352 127.1 337.7 127.1 320L128 320z"/> \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/view-activity_unselected_dark.svg b/plugin/src/main/resources/icons/command/view-activity_unselected_dark.svg index 41066cf57..feb6bc5d9 100644 --- a/plugin/src/main/resources/icons/command/view-activity_unselected_dark.svg +++ b/plugin/src/main/resources/icons/command/view-activity_unselected_dark.svg @@ -1,4 +1,4 @@ - + + d="M64 400C64 408.8 71.16 416 80 416H480C497.7 416 512 430.3 512 448C512 465.7 497.7 480 480 480H80C35.82 480 0 444.2 0 400V64C0 46.33 14.33 32 32 32C49.67 32 64 46.33 64 64V400zM128 320V236C128 228.3 130.8 220.8 135.9 214.1L215.3 124.2C228.3 109.4 251.4 109.7 263.1 124.8L303.2 171.8C312.2 182.7 328.6 183.4 338.6 173.4L359.6 152.4C372.7 139.3 394.4 140.1 406.5 154.2L472.3 231C477.3 236.8 480 244.2 480 251.8V320C480 337.7 465.7 352 448 352H159.1C142.3 352 127.1 337.7 127.1 320L128 320z"/> \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/view-logs_selected.svg b/plugin/src/main/resources/icons/command/view-logs_selected.svg index 94f606a58..ee32b8b78 100644 --- a/plugin/src/main/resources/icons/command/view-logs_selected.svg +++ b/plugin/src/main/resources/icons/command/view-logs_selected.svg @@ -1,3 +1,3 @@ - - + + \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/view-logs_selected_dark.svg b/plugin/src/main/resources/icons/command/view-logs_selected_dark.svg index c74de2467..e84279088 100644 --- a/plugin/src/main/resources/icons/command/view-logs_selected_dark.svg +++ b/plugin/src/main/resources/icons/command/view-logs_selected_dark.svg @@ -1,4 +1,4 @@ - + + d="M0 96C0 78.33 14.33 64 32 64H416C433.7 64 448 78.33 448 96C448 113.7 433.7 128 416 128H32C14.33 128 0 113.7 0 96zM64 256C64 238.3 78.33 224 96 224H480C497.7 224 512 238.3 512 256C512 273.7 497.7 288 480 288H96C78.33 288 64 273.7 64 256zM416 448H32C14.33 448 0 433.7 0 416C0 398.3 14.33 384 32 384H416C433.7 384 448 398.3 448 416C448 433.7 433.7 448 416 448z"/> \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/view-logs_unselected.svg b/plugin/src/main/resources/icons/command/view-logs_unselected.svg index c74de2467..e84279088 100644 --- a/plugin/src/main/resources/icons/command/view-logs_unselected.svg +++ b/plugin/src/main/resources/icons/command/view-logs_unselected.svg @@ -1,4 +1,4 @@ - + + d="M0 96C0 78.33 14.33 64 32 64H416C433.7 64 448 78.33 448 96C448 113.7 433.7 128 416 128H32C14.33 128 0 113.7 0 96zM64 256C64 238.3 78.33 224 96 224H480C497.7 224 512 238.3 512 256C512 273.7 497.7 288 480 288H96C78.33 288 64 273.7 64 256zM416 448H32C14.33 448 0 433.7 0 416C0 398.3 14.33 384 32 384H416C433.7 384 448 398.3 448 416C448 433.7 433.7 448 416 448z"/> \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/view-logs_unselected_dark.svg b/plugin/src/main/resources/icons/command/view-logs_unselected_dark.svg index bf86d1fa1..342ce2585 100644 --- a/plugin/src/main/resources/icons/command/view-logs_unselected_dark.svg +++ b/plugin/src/main/resources/icons/command/view-logs_unselected_dark.svg @@ -1,4 +1,4 @@ - + + d="M0 96C0 78.33 14.33 64 32 64H416C433.7 64 448 78.33 448 96C448 113.7 433.7 128 416 128H32C14.33 128 0 113.7 0 96zM64 256C64 238.3 78.33 224 96 224H480C497.7 224 512 238.3 512 256C512 273.7 497.7 288 480 288H96C78.33 288 64 273.7 64 256zM416 448H32C14.33 448 0 433.7 0 416C0 398.3 14.33 384 32 384H416C433.7 384 448 398.3 448 416C448 433.7 433.7 448 416 448z"/> \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/view-overview_selected.svg b/plugin/src/main/resources/icons/command/view-overview_selected.svg index f59ce4c54..6025a534e 100644 --- a/plugin/src/main/resources/icons/command/view-overview_selected.svg +++ b/plugin/src/main/resources/icons/command/view-overview_selected.svg @@ -1,3 +1,3 @@ - - + + \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/view-overview_selected_dark.svg b/plugin/src/main/resources/icons/command/view-overview_selected_dark.svg index 07980cc68..1a28076ee 100644 --- a/plugin/src/main/resources/icons/command/view-overview_selected_dark.svg +++ b/plugin/src/main/resources/icons/command/view-overview_selected_dark.svg @@ -1,4 +1,4 @@ - + + d="M352 256C352 278.2 350.8 299.6 348.7 320H163.3C161.2 299.6 159.1 278.2 159.1 256C159.1 233.8 161.2 212.4 163.3 192H348.7C350.8 212.4 352 233.8 352 256zM503.9 192C509.2 212.5 512 233.9 512 256C512 278.1 509.2 299.5 503.9 320H380.8C382.9 299.4 384 277.1 384 256C384 234 382.9 212.6 380.8 192H503.9zM493.4 160H376.7C366.7 96.14 346.9 42.62 321.4 8.442C399.8 29.09 463.4 85.94 493.4 160zM344.3 160H167.7C173.8 123.6 183.2 91.38 194.7 65.35C205.2 41.74 216.9 24.61 228.2 13.81C239.4 3.178 248.7 0 256 0C263.3 0 272.6 3.178 283.8 13.81C295.1 24.61 306.8 41.74 317.3 65.35C328.8 91.38 338.2 123.6 344.3 160H344.3zM18.61 160C48.59 85.94 112.2 29.09 190.6 8.442C165.1 42.62 145.3 96.14 135.3 160H18.61zM131.2 192C129.1 212.6 127.1 234 127.1 256C127.1 277.1 129.1 299.4 131.2 320H8.065C2.8 299.5 0 278.1 0 256C0 233.9 2.8 212.5 8.065 192H131.2zM194.7 446.6C183.2 420.6 173.8 388.4 167.7 352H344.3C338.2 388.4 328.8 420.6 317.3 446.6C306.8 470.3 295.1 487.4 283.8 498.2C272.6 508.8 263.3 512 255.1 512C248.7 512 239.4 508.8 228.2 498.2C216.9 487.4 205.2 470.3 194.7 446.6H194.7zM190.6 503.6C112.2 482.9 48.59 426.1 18.61 352H135.3C145.3 415.9 165.1 469.4 190.6 503.6V503.6zM321.4 503.6C346.9 469.4 366.7 415.9 376.7 352H493.4C463.4 426.1 399.8 482.9 321.4 503.6V503.6z"/> \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/view-overview_unselected.svg b/plugin/src/main/resources/icons/command/view-overview_unselected.svg index 07980cc68..1a28076ee 100644 --- a/plugin/src/main/resources/icons/command/view-overview_unselected.svg +++ b/plugin/src/main/resources/icons/command/view-overview_unselected.svg @@ -1,4 +1,4 @@ - + + d="M352 256C352 278.2 350.8 299.6 348.7 320H163.3C161.2 299.6 159.1 278.2 159.1 256C159.1 233.8 161.2 212.4 163.3 192H348.7C350.8 212.4 352 233.8 352 256zM503.9 192C509.2 212.5 512 233.9 512 256C512 278.1 509.2 299.5 503.9 320H380.8C382.9 299.4 384 277.1 384 256C384 234 382.9 212.6 380.8 192H503.9zM493.4 160H376.7C366.7 96.14 346.9 42.62 321.4 8.442C399.8 29.09 463.4 85.94 493.4 160zM344.3 160H167.7C173.8 123.6 183.2 91.38 194.7 65.35C205.2 41.74 216.9 24.61 228.2 13.81C239.4 3.178 248.7 0 256 0C263.3 0 272.6 3.178 283.8 13.81C295.1 24.61 306.8 41.74 317.3 65.35C328.8 91.38 338.2 123.6 344.3 160H344.3zM18.61 160C48.59 85.94 112.2 29.09 190.6 8.442C165.1 42.62 145.3 96.14 135.3 160H18.61zM131.2 192C129.1 212.6 127.1 234 127.1 256C127.1 277.1 129.1 299.4 131.2 320H8.065C2.8 299.5 0 278.1 0 256C0 233.9 2.8 212.5 8.065 192H131.2zM194.7 446.6C183.2 420.6 173.8 388.4 167.7 352H344.3C338.2 388.4 328.8 420.6 317.3 446.6C306.8 470.3 295.1 487.4 283.8 498.2C272.6 508.8 263.3 512 255.1 512C248.7 512 239.4 508.8 228.2 498.2C216.9 487.4 205.2 470.3 194.7 446.6H194.7zM190.6 503.6C112.2 482.9 48.59 426.1 18.61 352H135.3C145.3 415.9 165.1 469.4 190.6 503.6V503.6zM321.4 503.6C346.9 469.4 366.7 415.9 376.7 352H493.4C463.4 426.1 399.8 482.9 321.4 503.6V503.6z"/> \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/view-overview_unselected_dark.svg b/plugin/src/main/resources/icons/command/view-overview_unselected_dark.svg index 21a5d25ff..60e64fa4b 100644 --- a/plugin/src/main/resources/icons/command/view-overview_unselected_dark.svg +++ b/plugin/src/main/resources/icons/command/view-overview_unselected_dark.svg @@ -1,4 +1,4 @@ - + + d="M352 256C352 278.2 350.8 299.6 348.7 320H163.3C161.2 299.6 159.1 278.2 159.1 256C159.1 233.8 161.2 212.4 163.3 192H348.7C350.8 212.4 352 233.8 352 256zM503.9 192C509.2 212.5 512 233.9 512 256C512 278.1 509.2 299.5 503.9 320H380.8C382.9 299.4 384 277.1 384 256C384 234 382.9 212.6 380.8 192H503.9zM493.4 160H376.7C366.7 96.14 346.9 42.62 321.4 8.442C399.8 29.09 463.4 85.94 493.4 160zM344.3 160H167.7C173.8 123.6 183.2 91.38 194.7 65.35C205.2 41.74 216.9 24.61 228.2 13.81C239.4 3.178 248.7 0 256 0C263.3 0 272.6 3.178 283.8 13.81C295.1 24.61 306.8 41.74 317.3 65.35C328.8 91.38 338.2 123.6 344.3 160H344.3zM18.61 160C48.59 85.94 112.2 29.09 190.6 8.442C165.1 42.62 145.3 96.14 135.3 160H18.61zM131.2 192C129.1 212.6 127.1 234 127.1 256C127.1 277.1 129.1 299.4 131.2 320H8.065C2.8 299.5 0 278.1 0 256C0 233.9 2.8 212.5 8.065 192H131.2zM194.7 446.6C183.2 420.6 173.8 388.4 167.7 352H344.3C338.2 388.4 328.8 420.6 317.3 446.6C306.8 470.3 295.1 487.4 283.8 498.2C272.6 508.8 263.3 512 255.1 512C248.7 512 239.4 508.8 228.2 498.2C216.9 487.4 205.2 470.3 194.7 446.6H194.7zM190.6 503.6C112.2 482.9 48.59 426.1 18.61 352H135.3C145.3 415.9 165.1 469.4 190.6 503.6V503.6zM321.4 503.6C346.9 469.4 366.7 415.9 376.7 352H493.4C463.4 426.1 399.8 482.9 321.4 503.6V503.6z"/> \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/view-traces_selected.svg b/plugin/src/main/resources/icons/command/view-traces_selected.svg index bd18b8e60..d65f2aed7 100644 --- a/plugin/src/main/resources/icons/command/view-traces_selected.svg +++ b/plugin/src/main/resources/icons/command/view-traces_selected.svg @@ -1,3 +1,3 @@ - - + + \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/view-traces_selected_dark.svg b/plugin/src/main/resources/icons/command/view-traces_selected_dark.svg index 174c2822c..df9b78ede 100644 --- a/plugin/src/main/resources/icons/command/view-traces_selected_dark.svg +++ b/plugin/src/main/resources/icons/command/view-traces_selected_dark.svg @@ -1,4 +1,4 @@ - + + d="M414.8 40.79L286.8 488.8C281.9 505.8 264.2 515.6 247.2 510.8C230.2 505.9 220.4 488.2 225.2 471.2L353.2 23.21C358.1 6.216 375.8-3.624 392.8 1.232C409.8 6.087 419.6 23.8 414.8 40.79H414.8zM518.6 121.4L630.6 233.4C643.1 245.9 643.1 266.1 630.6 278.6L518.6 390.6C506.1 403.1 485.9 403.1 473.4 390.6C460.9 378.1 460.9 357.9 473.4 345.4L562.7 256L473.4 166.6C460.9 154.1 460.9 133.9 473.4 121.4C485.9 108.9 506.1 108.9 518.6 121.4V121.4zM166.6 166.6L77.25 256L166.6 345.4C179.1 357.9 179.1 378.1 166.6 390.6C154.1 403.1 133.9 403.1 121.4 390.6L9.372 278.6C-3.124 266.1-3.124 245.9 9.372 233.4L121.4 121.4C133.9 108.9 154.1 108.9 166.6 121.4C179.1 133.9 179.1 154.1 166.6 166.6V166.6z"/> \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/view-traces_unselected.svg b/plugin/src/main/resources/icons/command/view-traces_unselected.svg index 174c2822c..df9b78ede 100644 --- a/plugin/src/main/resources/icons/command/view-traces_unselected.svg +++ b/plugin/src/main/resources/icons/command/view-traces_unselected.svg @@ -1,4 +1,4 @@ - + + d="M414.8 40.79L286.8 488.8C281.9 505.8 264.2 515.6 247.2 510.8C230.2 505.9 220.4 488.2 225.2 471.2L353.2 23.21C358.1 6.216 375.8-3.624 392.8 1.232C409.8 6.087 419.6 23.8 414.8 40.79H414.8zM518.6 121.4L630.6 233.4C643.1 245.9 643.1 266.1 630.6 278.6L518.6 390.6C506.1 403.1 485.9 403.1 473.4 390.6C460.9 378.1 460.9 357.9 473.4 345.4L562.7 256L473.4 166.6C460.9 154.1 460.9 133.9 473.4 121.4C485.9 108.9 506.1 108.9 518.6 121.4V121.4zM166.6 166.6L77.25 256L166.6 345.4C179.1 357.9 179.1 378.1 166.6 390.6C154.1 403.1 133.9 403.1 121.4 390.6L9.372 278.6C-3.124 266.1-3.124 245.9 9.372 233.4L121.4 121.4C133.9 108.9 154.1 108.9 166.6 121.4C179.1 133.9 179.1 154.1 166.6 166.6V166.6z"/> \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/view-traces_unselected_dark.svg b/plugin/src/main/resources/icons/command/view-traces_unselected_dark.svg index d3100c591..595420b71 100644 --- a/plugin/src/main/resources/icons/command/view-traces_unselected_dark.svg +++ b/plugin/src/main/resources/icons/command/view-traces_unselected_dark.svg @@ -1,4 +1,4 @@ - + + d="M414.8 40.79L286.8 488.8C281.9 505.8 264.2 515.6 247.2 510.8C230.2 505.9 220.4 488.2 225.2 471.2L353.2 23.21C358.1 6.216 375.8-3.624 392.8 1.232C409.8 6.087 419.6 23.8 414.8 40.79H414.8zM518.6 121.4L630.6 233.4C643.1 245.9 643.1 266.1 630.6 278.6L518.6 390.6C506.1 403.1 485.9 403.1 473.4 390.6C460.9 378.1 460.9 357.9 473.4 345.4L562.7 256L473.4 166.6C460.9 154.1 460.9 133.9 473.4 121.4C485.9 108.9 506.1 108.9 518.6 121.4V121.4zM166.6 166.6L77.25 256L166.6 345.4C179.1 357.9 179.1 378.1 166.6 390.6C154.1 403.1 133.9 403.1 121.4 390.6L9.372 278.6C-3.124 266.1-3.124 245.9 9.372 233.4L121.4 121.4C133.9 108.9 154.1 108.9 166.6 121.4C179.1 133.9 179.1 154.1 166.6 166.6V166.6z"/> \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/watch-log_selected.svg b/plugin/src/main/resources/icons/command/watch-log_selected.svg new file mode 100644 index 000000000..6c7e0f5f2 --- /dev/null +++ b/plugin/src/main/resources/icons/command/watch-log_selected.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/watch-log_selected_dark.svg b/plugin/src/main/resources/icons/command/watch-log_selected_dark.svg new file mode 100644 index 000000000..5ff01b7b9 --- /dev/null +++ b/plugin/src/main/resources/icons/command/watch-log_selected_dark.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/watch-log_unselected.svg b/plugin/src/main/resources/icons/command/watch-log_unselected.svg new file mode 100644 index 000000000..5ff01b7b9 --- /dev/null +++ b/plugin/src/main/resources/icons/command/watch-log_unselected.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/plugin/src/main/resources/icons/command/watch-log_unselected_dark.svg b/plugin/src/main/resources/icons/command/watch-log_unselected_dark.svg new file mode 100644 index 000000000..11b560153 --- /dev/null +++ b/plugin/src/main/resources/icons/command/watch-log_unselected_dark.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/plugin/src/main/resources/icons/log-config.svg b/plugin/src/main/resources/icons/log-config.svg new file mode 100644 index 000000000..0ac35dcfd --- /dev/null +++ b/plugin/src/main/resources/icons/log-config.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugin/src/main/resources/icons/log-config_dark.svg b/plugin/src/main/resources/icons/log-config_dark.svg new file mode 100644 index 000000000..b183bf750 --- /dev/null +++ b/plugin/src/main/resources/icons/log-config_dark.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/plugin/src/main/resources/icons/meter-config.svg b/plugin/src/main/resources/icons/meter-config.svg new file mode 100644 index 000000000..b855c8273 --- /dev/null +++ b/plugin/src/main/resources/icons/meter-config.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugin/src/main/resources/icons/meter-config_dark.svg b/plugin/src/main/resources/icons/meter-config_dark.svg new file mode 100644 index 000000000..395cebea1 --- /dev/null +++ b/plugin/src/main/resources/icons/meter-config_dark.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/plugin/src/main/resources/icons/span-config.svg b/plugin/src/main/resources/icons/span-config.svg new file mode 100644 index 000000000..b03a183c3 --- /dev/null +++ b/plugin/src/main/resources/icons/span-config.svg @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/plugin/src/main/resources/icons/span-config_dark.svg b/plugin/src/main/resources/icons/span-config_dark.svg new file mode 100644 index 000000000..0e96001cb --- /dev/null +++ b/plugin/src/main/resources/icons/span-config_dark.svg @@ -0,0 +1,4 @@ + + + \ No newline at end of file diff --git a/plugin/src/main/resources/messages/PluginBundle.properties b/plugin/src/main/resources/messages/PluginBundle.properties index de2aa3a8e..a5299da3c 100644 --- a/plugin/src/main/resources/messages/PluginBundle.properties +++ b/plugin/src/main/resources/messages/PluginBundle.properties @@ -45,4 +45,97 @@ git.issue.title=[auto-generated:{0}] {1} git.issue.text=Created issue {1}. Thanks for your feedback, please comment (to further discuss with us) if possible! git.issue.duplicate.text=A similar issue was already reported (#{1}). Thanks for your feedback! access_token=Access Token -auto_display_endpoint_quick_stats=Auto-display endpoint quick stats \ No newline at end of file +auto_display_endpoint_quick_stats=Auto-display endpoint quick stats +waiting_for_live_log_data=Waiting for live log data... +live_view=Live View +view_activity=View Activity +view_overview=View Overview +view_traces=View Traces +view_logs=View Logs +show_quick_stats=Show Quick Stats +hide_quick_stats=Hide Quick Stats +watch_log=Watch Log +add_breakpoint=Add Breakpoint +add_log=Add Log +add_meter=Add Meter +add_span=Add Span +clear_instruments=Clear Instruments +clear_breakpoints=Clear Breakpoints +clear_logs=Clear Logs +clear_meters=Clear Meters +clear_spans=Clear Spans +live_instrument=Live Instrument +location=Location +add=Add +min=min +sec=sec +mins=mins +secs=secs +hrs=hrs +ms=ms +dys=dys +AVG\ SLA=AVG SLA +AVG\ RESP\ TIME=AVG RESP TIME +AVG\ THROUGHPUT=AVG THROUGHPUT +MIN=MIN +MS=MS +Operation=Operation +Occurred=Occurred +Exec=Exec +Level=Level +Latest=Latest +Slowest=Slowest +Failed=Failed +INFO=INFO +WARN=WARN +m\ ago=m ago +s\ ago=s ago +d\ ago=d ago +h\ ago=h ago +w\ ago=w ago +Logs=Logs +Expression=Expression +scope=Scope +clear_all=Clear All +quick_stats=Quick Stats +endpoint=Endpoint +log=Log +overview=Overview +traces=Traces +activity=Activity +logs=Logs +class=Class +method=Method +on_method=On method +on_line=On line +breakpoint_condition=Breakpoint Condition +time=Time +breakpoint_data=Breakpoint Data +complete=Complete +error=Error +message=Message +input_log_message=Input log message (use $ for variables) +status=Status +active=Active +hits=Hits +not_available=n/a +rate=Rate +expires=Expires +hit_limit=Hit Limit +expiration_date=Expiration Date +minutes=Minutes +hour=Hour +hours=Hours +second=second +minute=minute +per=per +hit_throttle=Hit Throttle +condition=Condition +never=Never +meter_description=Meter Description +meter_data=Meter Data +type=Type +count=Count +operation_name=Operation Name +sec_letter=s +day=Day \ No newline at end of file diff --git a/plugin/src/main/resources/messages/PluginBundle_zh.properties b/plugin/src/main/resources/messages/PluginBundle_zh.properties index d92b9f888..cfe8325ac 100644 --- a/plugin/src/main/resources/messages/PluginBundle_zh.properties +++ b/plugin/src/main/resources/messages/PluginBundle_zh.properties @@ -18,9 +18,9 @@ Entry\ method=进入方法 Auto-subscribe=自动订阅 Name=名称 Type=类型 -Throughput=通量 +Throughput=吞吐量 Response=响应 -SLA=生菜 +SLA=服务水平协议 Latest\ Traces=最新痕迹 Slowest\ Traces=最慢的痕迹 @@ -44,4 +44,97 @@ git.issue.title=[auto-generated:{0}] {1} git.issue.text=已创建的问题 {1}. 感谢您的反馈,如果可能,请发表评论(与我们进一步讨论)! git.issue.duplicate.text=已经报告了类似的问题 (#{1}). 感谢您的反馈意见! access_token=访问令牌 -auto_display_endpoint_quick_stats=自动显示端点快速统计 \ No newline at end of file +auto_display_endpoint_quick_stats=自动显示端点快速统计 +waiting_for_live_log_data=正在等待实时日志数据... +live_view=实时取景 +view_activity=查看活动 +view_overview=查看概览 +view_traces=查看痕迹 +view_logs=查看记录 +show_quick_stats=显示快速统计 +hide_quick_stats=隐藏快速统计 +watch_log=观看日志 +add_breakpoint=添加断点 +add_log=添加记录 +add_meter=添加计量器 +add_span=添加跨度 +clear_instruments=清晰的仪器 +clear_breakpoints=清除断点 +clear_logs=清除记录 +clear_meters=清除仪表 +clear_spans=清晰的跨度 +live_instrument=现场乐器 +location=地点 +add=添加 +min=分钟 +sec=秒 +mins=分钟 +secs=秒 +hrs=个小时 +ms=毫秒 +dys=天 +AVG\ SLA=平均服务水平协议 +AVG\ RESP\ TIME=平均响应时间 +AVG\ THROUGHPUT=平均吞吐量 +MIN=分钟 +MS=毫秒 +Operation=手术 +Occurred=发生了 +Exec=时间 +Level=级别 +Latest=最新的 +Slowest=最慢的 +Failed=失败的 +INFO=信息 +WARN=警告 +w\ ago=周前 +m\ ago=分钟前 +s\ ago=秒前 +d\ ago=天前 +h\ ago=小时前 +Logs=记录 +Expression=表达式 +scope=范围 +clear_all=清除所有 +quick_stats=快速统计 +endpoint=端点 +log=记录 +overview=概述 +traces=痕迹 +activity=活动 +logs=记录 +class=源码类 +method=源代码方法 +on_method=论源代码方法 +on_line=在线 +breakpoint_condition=断点条件 +time=时间 +breakpoint_data=断点数据 +complete=完毕 +error=误差 +message=信息 +input_log_message=输入日志消息(使用 $ 表示变量) +status=状态 +active=活性 +hits=命中 +not_available=无法使用 +rate=率 +expires=过期 +hit_limit=命中限制 +expiration_date=截止日期 +minutes=分钟 +hour=小时 +hours=小时 +second=秒 +minute=分钟 +per=每 +hit_throttle=节流阀 +condition=条件 +never=决不 +meter_description=仪表说明 +meter_data=仪表数据 +type=类 +count=数 +operation_name=操作名称 +sec_letter=秒 +day=日 \ No newline at end of file