diff --git a/src/main/kotlin/co/makerflow/intellijplugin/MyIcons.kt b/src/main/kotlin/co/makerflow/intellijplugin/MyIcons.kt index aa0d1d8..53a9d37 100644 --- a/src/main/kotlin/co/makerflow/intellijplugin/MyIcons.kt +++ b/src/main/kotlin/co/makerflow/intellijplugin/MyIcons.kt @@ -6,4 +6,7 @@ class MyIcons { @JvmField val pluginIcon = IconLoader.getIcon("/icons/pluginIcon.svg", javaClass) + + @JvmField + val startTimer = IconLoader.getIcon("/icons/startTimer.svg", javaClass) } diff --git a/src/main/kotlin/co/makerflow/intellijplugin/actions/ToggleFlowModeAction.kt b/src/main/kotlin/co/makerflow/intellijplugin/actions/ToggleFlowModeAction.kt deleted file mode 100644 index 20da6f0..0000000 --- a/src/main/kotlin/co/makerflow/intellijplugin/actions/ToggleFlowModeAction.kt +++ /dev/null @@ -1,44 +0,0 @@ -package co.makerflow.intellijplugin.actions - -import co.makerflow.intellijplugin.services.FlowModeService -import co.makerflow.intellijplugin.services.toFlow -import co.makerflow.intellijplugin.state.FlowState -import com.intellij.openapi.actionSystem.AnAction -import com.intellij.openapi.actionSystem.AnActionEvent -import com.intellij.openapi.application.ApplicationManager -import com.intellij.openapi.components.service -import kotlinx.coroutines.CoroutineScope -import kotlinx.coroutines.Dispatchers -import kotlinx.coroutines.launch - -class ToggleFlowModeAction : AnAction("Toggle Flow Mode", "Begin or end flow mode based on current status", null) { - - private val startFlowModeCoroutineScope = CoroutineScope(Dispatchers.IO) - private val stopFlowModeCoroutineScope = CoroutineScope(Dispatchers.IO) - - override fun actionPerformed(e: AnActionEvent) { - FlowState.instance.processing = true - val flowModeService = service() - if (FlowState.instance.currentFlow == null) { - ApplicationManager.getApplication().invokeLater { - startFlowModeCoroutineScope.launch { - flowModeService.startFlowMode()?.let { flowMode -> - FlowState.instance.currentFlow = flowMode.toFlow() - } - }.invokeOnCompletion { - FlowState.instance.processing = false - } - } - } else { - ApplicationManager.getApplication().invokeLater { - stopFlowModeCoroutineScope.launch { - flowModeService.stopFlowMode() - FlowState.instance.currentFlow = null - }.invokeOnCompletion { - FlowState.instance.processing = false - } - } - } - } - -} diff --git a/src/main/kotlin/co/makerflow/intellijplugin/actions/flowmode/FiftyMinutesFlowModeAction.kt b/src/main/kotlin/co/makerflow/intellijplugin/actions/flowmode/FiftyMinutesFlowModeAction.kt new file mode 100644 index 0000000..25083e7 --- /dev/null +++ b/src/main/kotlin/co/makerflow/intellijplugin/actions/flowmode/FiftyMinutesFlowModeAction.kt @@ -0,0 +1,4 @@ +package co.makerflow.intellijplugin.actions.flowmode + +class FiftyMinutesFlowModeAction : + FlowModeAction("Flow Mode (50 minutes)", "Begin a timed flow mode session for 50 minutes", duration = 50) diff --git a/src/main/kotlin/co/makerflow/intellijplugin/actions/flowmode/FlowModeAction.kt b/src/main/kotlin/co/makerflow/intellijplugin/actions/flowmode/FlowModeAction.kt new file mode 100644 index 0000000..576424a --- /dev/null +++ b/src/main/kotlin/co/makerflow/intellijplugin/actions/flowmode/FlowModeAction.kt @@ -0,0 +1,69 @@ +package co.makerflow.intellijplugin.actions.flowmode + +import co.makerflow.intellijplugin.services.FlowModeService +import co.makerflow.intellijplugin.services.toFlow +import co.makerflow.intellijplugin.state.FlowState +import com.intellij.ide.actions.searcheverywhere.PossibleSlowContributor +import com.intellij.openapi.actionSystem.ActionUpdateThread +import com.intellij.openapi.actionSystem.AnAction +import com.intellij.openapi.actionSystem.AnActionEvent +import com.intellij.openapi.application.ApplicationManager +import com.intellij.openapi.components.service +import kotlinx.coroutines.CoroutineScope +import kotlinx.coroutines.Dispatchers +import kotlinx.coroutines.launch + +abstract class FlowModeAction( + text: String, + description: String, + private val duration: Int? = null +) : + AnAction(text, description, null), PossibleSlowContributor { + private val startFlowModeCoroutineScope = CoroutineScope(Dispatchers.IO) + private val stopFlowModeCoroutineScope = CoroutineScope(Dispatchers.IO) + private fun stopFlowMode() { + FlowState.instance.processing = true + val flowModeService = service() + ApplicationManager.getApplication().invokeLater { + stopFlowModeCoroutineScope.launch { + flowModeService.stopFlowMode() + FlowState.instance.currentFlow = null + }.invokeOnCompletion { + FlowState.instance.processing = false + } + } + } + + private fun startFlowMode() { + FlowState.instance.processing = true + val flowModeService = service() + ApplicationManager.getApplication().invokeLater { + startFlowModeCoroutineScope.launch { + flowModeService.startFlowMode(null, duration)?.let { flowMode -> + FlowState.instance.currentFlow = flowMode.toFlow() + } + }.invokeOnCompletion { + FlowState.instance.processing = false + } + } + } + + override fun actionPerformed(e: AnActionEvent) { + if (FlowState.instance.currentFlow == null) { + startFlowMode() + } else { + stopFlowMode() + } + } + + override fun update(e: AnActionEvent) { + val flowState = FlowState.instance + if (duration != null) { + e.presentation.isEnabled = !flowState.processing && flowState.currentFlow == null + } + } + + override fun getActionUpdateThread(): ActionUpdateThread { + return ActionUpdateThread.BGT + } +} diff --git a/src/main/kotlin/co/makerflow/intellijplugin/actions/flowmode/FlowModeActionGroup.kt b/src/main/kotlin/co/makerflow/intellijplugin/actions/flowmode/FlowModeActionGroup.kt new file mode 100644 index 0000000..e27d851 --- /dev/null +++ b/src/main/kotlin/co/makerflow/intellijplugin/actions/flowmode/FlowModeActionGroup.kt @@ -0,0 +1,105 @@ +package co.makerflow.intellijplugin.actions.flowmode + +import co.makerflow.intellijplugin.state.Flow +import co.makerflow.intellijplugin.state.FlowState +import co.makerflow.intellijplugin.state.FlowStateChangeNotifier +import com.intellij.ide.actions.searcheverywhere.PossibleSlowContributor +import com.intellij.openapi.actionSystem.ActionManager +import com.intellij.openapi.actionSystem.ActionUpdateThread +import com.intellij.openapi.actionSystem.AnAction +import com.intellij.openapi.actionSystem.AnActionEvent +import com.intellij.openapi.actionSystem.DataContext +import com.intellij.openapi.actionSystem.DefaultActionGroup +import com.intellij.openapi.application.ApplicationManager +import com.intellij.util.ui.UIUtil + +const val STOP_FLOW_MODE_DIRECTIVE = "Stop Flow Mode" + +private const val STOP_FLOW_MODE_DESCRIPTION = "Stop the ongoing Flow Mode session" + +class FlowModeActionGroup : DefaultActionGroup(), PossibleSlowContributor { + init { + UIUtil.invokeLaterIfNeeded { + if (FlowState.instance.currentFlow != null) { + updateTemplateForStoppingFlowMode() + } else { + updateTemplateForStartingFlowMode() + } + } + ApplicationManager.getApplication().messageBus.connect() + .subscribe(FlowStateChangeNotifier.FLOW_STATE_CHANGE_TOPIC, object : FlowStateChangeNotifier { + override fun updated(flow: Flow?, processing: Boolean) { + UIUtil.invokeLaterIfNeeded { + if (flow != null) { + updateTemplateForStoppingFlowMode() + updateTimedFlowModeActions() + } else { + updateTemplateForStartingFlowMode() + updateTimedFlowModeActions() + } + } + } + }) + } + + override fun update(e: AnActionEvent) { + if (FlowState.instance.currentFlow != null) { + e.presentation.text = STOP_FLOW_MODE_DIRECTIVE + e.presentation.description = STOP_FLOW_MODE_DESCRIPTION + e.presentation.isEnabled = false + } else { + e.presentation.text = "Choose Flow Mode Session Type" + e.presentation.description = "Choose a Flow Mode type to start a new session" + e.presentation.isEnabled = true + } + } + + override fun getActionUpdateThread(): ActionUpdateThread { + return ActionUpdateThread.BGT + } + + private fun updateTemplateForStoppingFlowMode() { + update(buildActionEvent(this)) + val toggleFlowModeAction = ActionManager.getInstance() + .getAction("co.makerflow.intellijplugin.actions.flowmode.ToggleFlowModeAction") + toggleFlowModeAction.update( + buildActionEvent(toggleFlowModeAction) + ) + } + + private fun updateTemplateForStartingFlowMode() { + update(buildActionEvent(this)) + val toggleFlowModeAction = ActionManager.getInstance() + .getAction("co.makerflow.intellijplugin.actions.flowmode.ToggleFlowModeAction") + toggleFlowModeAction.update( + buildActionEvent(toggleFlowModeAction) + ) + } + + private fun updateTimedFlowModeActions() { + val twentyFiveMinutesFlowModeAction = ActionManager.getInstance() + .getAction("co.makerflow.intellijplugin.actions.flowmode.TwentyFiveMinutesFlowModeAction") + twentyFiveMinutesFlowModeAction.update( + buildActionEvent(twentyFiveMinutesFlowModeAction) + ) + val fiftyMinutesFlowModeAction = ActionManager.getInstance() + .getAction("co.makerflow.intellijplugin.actions.flowmode.FiftyMinutesFlowModeAction") + fiftyMinutesFlowModeAction.update( + buildActionEvent(fiftyMinutesFlowModeAction) + ) + val seventyFiveMinutesFlowModeAction = ActionManager.getInstance() + .getAction("co.makerflow.intellijplugin.actions.flowmode.SeventyFiveMinutesFlowModeAction") + seventyFiveMinutesFlowModeAction.update( + buildActionEvent(seventyFiveMinutesFlowModeAction) + ) + } + + private fun buildActionEvent(action: AnAction) = + AnActionEvent.createFromAnAction( + action, + null, + "", + DataContext.EMPTY_CONTEXT + ) + +} diff --git a/src/main/kotlin/co/makerflow/intellijplugin/actions/flowmode/SeventyFiveMinutesFlowModeAction.kt b/src/main/kotlin/co/makerflow/intellijplugin/actions/flowmode/SeventyFiveMinutesFlowModeAction.kt new file mode 100644 index 0000000..62b8201 --- /dev/null +++ b/src/main/kotlin/co/makerflow/intellijplugin/actions/flowmode/SeventyFiveMinutesFlowModeAction.kt @@ -0,0 +1,8 @@ +package co.makerflow.intellijplugin.actions.flowmode + +class SeventyFiveMinutesFlowModeAction : + FlowModeAction( + "Flow Mode (75 minutes)", + "Begin a timed flow mode session for 75 minutes", + duration = 75 + ) diff --git a/src/main/kotlin/co/makerflow/intellijplugin/actions/flowmode/ToggleFlowModeAction.kt b/src/main/kotlin/co/makerflow/intellijplugin/actions/flowmode/ToggleFlowModeAction.kt new file mode 100644 index 0000000..7c2152a --- /dev/null +++ b/src/main/kotlin/co/makerflow/intellijplugin/actions/flowmode/ToggleFlowModeAction.kt @@ -0,0 +1,24 @@ +package co.makerflow.intellijplugin.actions.flowmode + +import co.makerflow.intellijplugin.state.FlowState +import com.intellij.openapi.actionSystem.AnActionEvent + +private const val START_FLOW_MODE_DIRECTIVE = "Start Flow Mode (Without Timer)" +private const val START_FLOW_MODE_DESCRIPTION = "Begin an untimed Flow Mode session" + +class ToggleFlowModeAction : + FlowModeAction( + START_FLOW_MODE_DIRECTIVE, + START_FLOW_MODE_DESCRIPTION + ) { + override fun update(e: AnActionEvent) { + if (FlowState.instance.currentFlow == null) { + e.presentation.text = START_FLOW_MODE_DIRECTIVE + e.presentation.description = START_FLOW_MODE_DESCRIPTION + } else { + e.presentation.text = STOP_FLOW_MODE_DIRECTIVE + e.presentation.description = "Stop the ongoing Flow Mode session" + } + } + +} diff --git a/src/main/kotlin/co/makerflow/intellijplugin/actions/flowmode/TwentyFiveMinutesFlowModeAction.kt b/src/main/kotlin/co/makerflow/intellijplugin/actions/flowmode/TwentyFiveMinutesFlowModeAction.kt new file mode 100644 index 0000000..e25cfd0 --- /dev/null +++ b/src/main/kotlin/co/makerflow/intellijplugin/actions/flowmode/TwentyFiveMinutesFlowModeAction.kt @@ -0,0 +1,4 @@ +package co.makerflow.intellijplugin.actions.flowmode + +class TwentyFiveMinutesFlowModeAction : + FlowModeAction("Flow Mode (25 minutes)", "Begin a timed flow mode session for 25 minutes", duration = 25) diff --git a/src/main/kotlin/co/makerflow/intellijplugin/listeners/FlowModeStatusBarWidgetClickListener.kt b/src/main/kotlin/co/makerflow/intellijplugin/listeners/FlowModeStatusBarWidgetClickListener.kt deleted file mode 100644 index 574d096..0000000 --- a/src/main/kotlin/co/makerflow/intellijplugin/listeners/FlowModeStatusBarWidgetClickListener.kt +++ /dev/null @@ -1,15 +0,0 @@ -package co.makerflow.intellijplugin.listeners - -import com.intellij.openapi.actionSystem.ActionManager -import com.intellij.openapi.actionSystem.AnAction -import com.intellij.ui.ClickListener -import java.awt.Component -import java.awt.event.MouseEvent - -class FlowModeStatusBarWidgetClickListener(private val component: Component?) : ClickListener() { - override fun onClick(event: MouseEvent, clickCount: Int): Boolean { - val action: AnAction = ActionManager.getInstance().getAction("ToggleFlowMode") - ActionManager.getInstance().tryToExecute(action, event, component, null, true) - return true - } -} diff --git a/src/main/kotlin/co/makerflow/intellijplugin/panels/TasksPanel.kt b/src/main/kotlin/co/makerflow/intellijplugin/panels/TasksPanel.kt index 9a895f5..05078e2 100644 --- a/src/main/kotlin/co/makerflow/intellijplugin/panels/TasksPanel.kt +++ b/src/main/kotlin/co/makerflow/intellijplugin/panels/TasksPanel.kt @@ -324,19 +324,19 @@ class TaskPresentationComponent( try { val flowMode = when (it.selectedItem) { FLOW_MODE_DROPDOWN_WITHOUT_TIMER -> { - flowModeService.startFlowMode(value, time = null) + flowModeService.startFlowMode(value, duration = null) } FLOW_MODE_DROPDOWN_25_MINUTES -> { - flowModeService.startFlowMode(value, time = 25) + flowModeService.startFlowMode(value, duration = 25) } FLOW_MODE_DROPDOWN_50_MINUTES -> { - flowModeService.startFlowMode(value, time = 50) + flowModeService.startFlowMode(value, duration = 50) } FLOW_MODE_DROPDOWN_75_MINUTES -> { - flowModeService.startFlowMode(value, time = 75) + flowModeService.startFlowMode(value, duration = 75) } else -> null diff --git a/src/main/kotlin/co/makerflow/intellijplugin/services/FlowModeService.kt b/src/main/kotlin/co/makerflow/intellijplugin/services/FlowModeService.kt index b45c191..e46213a 100644 --- a/src/main/kotlin/co/makerflow/intellijplugin/services/FlowModeService.kt +++ b/src/main/kotlin/co/makerflow/intellijplugin/services/FlowModeService.kt @@ -25,7 +25,7 @@ class FlowModeService { suspend fun startFlowMode(): FlowMode? { return startFlowMode(null, null) } - suspend fun startFlowMode(todo: TypedTodo?, time: Int?): FlowMode? { + suspend fun startFlowMode(todo: TypedTodo?, duration: Int?): FlowMode? { return coroutineScope { var flowMode: FlowMode? = null @@ -33,7 +33,7 @@ class FlowModeService { val flowModeApi = flowModeApi() val startFlowModeResponse = flowModeApi.startFlowMode("jetbrains", false, - time, + duration, todo?.sourceType?.name, todo?.type, todo?.let { todoUtil.determineTodoId(todo) }) diff --git a/src/main/kotlin/co/makerflow/intellijplugin/status/FlowStatusBarWidget.kt b/src/main/kotlin/co/makerflow/intellijplugin/status/FlowStatusBarWidget.kt index e677640..bc29300 100644 --- a/src/main/kotlin/co/makerflow/intellijplugin/status/FlowStatusBarWidget.kt +++ b/src/main/kotlin/co/makerflow/intellijplugin/status/FlowStatusBarWidget.kt @@ -3,16 +3,18 @@ package co.makerflow.intellijplugin.status import co.makerflow.intellijplugin.state.Flow import co.makerflow.intellijplugin.state.FlowState import co.makerflow.intellijplugin.state.FlowStateChangeNotifier -import com.intellij.ide.DataManager +import com.intellij.openapi.actionSystem.ActionGroup import com.intellij.openapi.actionSystem.ActionManager import com.intellij.openapi.actionSystem.AnAction import com.intellij.openapi.actionSystem.AnActionEvent +import com.intellij.openapi.actionSystem.DataContext import com.intellij.openapi.project.Project +import com.intellij.openapi.ui.popup.JBPopupFactory +import com.intellij.openapi.ui.popup.ListPopup +import com.intellij.openapi.vfs.VirtualFile import com.intellij.openapi.wm.StatusBar import com.intellij.openapi.wm.StatusBarWidget -import com.intellij.openapi.wm.WindowManager -import com.intellij.openapi.wm.impl.status.EditorBasedWidget -import com.intellij.util.Consumer +import com.intellij.openapi.wm.impl.status.EditorBasedStatusBarPopup import com.intellij.util.ui.UIUtil import kotlinx.datetime.TimeZone import kotlinx.datetime.toJavaLocalDateTime @@ -20,20 +22,58 @@ import kotlinx.datetime.toLocalDateTime import org.jetbrains.annotations.NotNull import org.ocpsoft.prettytime.PrettyTime import java.awt.Component -import java.awt.event.MouseEvent -class FlowStatusBarWidget(project: @NotNull Project) : EditorBasedWidget(project), +class FlowStatusBarWidget(project: @NotNull Project) : EditorBasedStatusBarPopup(project, false), StatusBarWidget.TextPresentation { override fun getPresentation(): StatusBarWidget.WidgetPresentation { return this } + override fun getWidgetState(file: VirtualFile?): WidgetState = WidgetState(getTooltipText(), getText(), true) + override fun ID(): String { return "MakerflowFlowStatusBarWidget" } + override fun createInstance(project: Project): StatusBarWidget = FlowStatusBarWidget(project) + + override fun createPopup(context: DataContext): ListPopup? { + if (FlowState.instance.processing) { + return null + } + val actions = mutableListOf() + val actionManager = ActionManager.getInstance() + actions.add( + actionManager.getAction( + "co.makerflow.intellijplugin.actions.flowmode.ToggleFlowModeAction" + ) + ) + if (FlowState.instance.currentFlow == null) { + actions.add( + actionManager.getAction("co.makerflow.intellijplugin.actions.flowmode.TwentyFiveMinutesFlowModeAction") + ) + actions.add( + actionManager.getAction("co.makerflow.intellijplugin.actions.flowmode.FiftyMinutesFlowModeAction") + ) + actions.add( + actionManager.getAction("co.makerflow.intellijplugin.actions.flowmode.SeventyFiveMinutesFlowModeAction") + ) + } + val actionGroup: ActionGroup = object : ActionGroup() { + override fun getChildren(e: AnActionEvent?): Array = actions.toTypedArray() + } + + return JBPopupFactory.getInstance().createActionGroupPopup( + if (FlowState.instance.currentFlow == null) "Start Flow Mode" else "Stop Flow Mode", + actionGroup, + context, + JBPopupFactory.ActionSelectionAid.NUMBERING, + false + ) + } + override fun install(statusBar: StatusBar) { super.install(statusBar) myConnection.subscribe( @@ -41,8 +81,7 @@ class FlowStatusBarWidget(project: @NotNull Project) : EditorBasedWidget(project object : FlowStateChangeNotifier { override fun updated(flow: Flow?, processing: Boolean) { UIUtil.invokeLaterIfNeeded { - val statusBarHere = WindowManager.getInstance().getStatusBar(project) - statusBarHere?.updateWidget(ID()) + updateComponent(getWidgetState(null)) } } } @@ -56,38 +95,23 @@ class FlowStatusBarWidget(project: @NotNull Project) : EditorBasedWidget(project } FlowState.instance.currentFlow != null && !FlowState.instance.processing -> { - val p = PrettyTime() - val startedFromNow = p.format( - FlowState.instance.currentFlow!!.start.toLocalDateTime(TimeZone.currentSystemDefault()) - .toJavaLocalDateTime() - ) - "Flow Mode started $startedFromNow. Click here to stop the current Flow Mode session." + val pair = getTimingInfo() + val startedFromNow = pair.first + val endingIn = pair.second + "Flow Mode started $startedFromNow$endingIn. Click here to stop the current Flow Mode session." } FlowState.instance.currentFlow != null && FlowState.instance.processing -> { - @Suppress("DialogTitleCapitalization") "Stopping Flow Mode..." } else -> { - @Suppress("DialogTitleCapitalization") "Starting Flow Mode..." } } } - override fun getClickConsumer(): Consumer { - return Consumer { mouseEvent: MouseEvent -> - val dataContext = - DataManager.getInstance().getDataContext(mouseEvent.source as Component) - val toggleFlowModeAction: AnAction = ActionManager.getInstance().getAction("ToggleFlowMode") - val actionEvent = AnActionEvent.createFromDataContext("ACTION_PLACE", null, dataContext) - toggleFlowModeAction.actionPerformed(actionEvent) - } - } - - @Suppress("DialogTitleCapitalization") override fun getText(): String { return when { FlowState.instance.currentFlow == null && !FlowState.instance.processing -> { @@ -95,12 +119,10 @@ class FlowStatusBarWidget(project: @NotNull Project) : EditorBasedWidget(project } FlowState.instance.currentFlow != null && !FlowState.instance.processing -> { - val p = PrettyTime() - val startedFromNow = p.format( - FlowState.instance.currentFlow!!.start.toLocalDateTime(TimeZone.currentSystemDefault()) - .toJavaLocalDateTime() - ) - "Flow Mode: Started $startedFromNow" + val pair = getTimingInfo() + val startedFromNow = pair.first + val endingIn = pair.second + "Flow Mode Started: $startedFromNow$endingIn" } FlowState.instance.currentFlow != null && FlowState.instance.processing -> { @@ -113,6 +135,25 @@ class FlowStatusBarWidget(project: @NotNull Project) : EditorBasedWidget(project } } + private fun getTimingInfo(): Pair { + val p = PrettyTime() + val startedFromNow = p.format( + FlowState.instance.currentFlow!!.start.toLocalDateTime(TimeZone.currentSystemDefault()) + .toJavaLocalDateTime() + ) + var endingIn = "" + if (FlowState.instance.currentFlow!!.scheduledEnd != null) { + endingIn = " | Ending: ${ + p.format( + FlowState.instance.currentFlow!!.scheduledEnd!!.toLocalDateTime( + TimeZone.currentSystemDefault() + ).toJavaLocalDateTime() + ) + }" + } + return Pair(startedFromNow, endingIn) + } + override fun getAlignment(): Float { return Component.CENTER_ALIGNMENT } diff --git a/src/main/kotlin/co/makerflow/intellijplugin/status/FlowStatusBarWidgetFactory.kt b/src/main/kotlin/co/makerflow/intellijplugin/status/FlowStatusBarWidgetFactory.kt index 8ca0c00..81a3a29 100644 --- a/src/main/kotlin/co/makerflow/intellijplugin/status/FlowStatusBarWidgetFactory.kt +++ b/src/main/kotlin/co/makerflow/intellijplugin/status/FlowStatusBarWidgetFactory.kt @@ -9,8 +9,7 @@ import com.intellij.openapi.wm.impl.status.widget.StatusBarEditorBasedWidgetFact @Suppress("UnstableApiUsage") class FlowStatusBarWidgetFactory : StatusBarEditorBasedWidgetFactory(), LightEditCompatible { - private val id = "co.makerflow.intellijplugin" - + private val id = "co.makerflow.intellijplugin.FlowStatusBarWidgetFactory" override fun getId(): String { return id } diff --git a/src/main/resources/META-INF/icons/pluginIcon.svg b/src/main/resources/META-INF/icons/pluginIcon.svg new file mode 100644 index 0000000..3281694 --- /dev/null +++ b/src/main/resources/META-INF/icons/pluginIcon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/src/main/resources/META-INF/icons/startTimer.svg b/src/main/resources/META-INF/icons/startTimer.svg new file mode 100644 index 0000000..063b6ce --- /dev/null +++ b/src/main/resources/META-INF/icons/startTimer.svg @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/main/resources/META-INF/icons/startTimer_dark.svg b/src/main/resources/META-INF/icons/startTimer_dark.svg new file mode 100644 index 0000000..29dd9d9 --- /dev/null +++ b/src/main/resources/META-INF/icons/startTimer_dark.svg @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/main/resources/META-INF/plugin.xml b/src/main/resources/META-INF/plugin.xml index 0484821..9aac5c4 100644 --- a/src/main/resources/META-INF/plugin.xml +++ b/src/main/resources/META-INF/plugin.xml @@ -22,15 +22,30 @@ - + - - + + + + + +