generated from JetBrains/intellij-platform-plugin-template
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
9 changed files
with
103 additions
and
57 deletions.
There are no files selected for viewing
31 changes: 31 additions & 0 deletions
31
src/main/java/rife/bld/idea/console/BldConsoleClearAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/* | ||
* Copyright 2024 Geert Bevin (gbevin[remove] at uwyn dot com) | ||
* Licensed under the Apache License, Version 2.0 (the "License") | ||
*/ | ||
package rife.bld.idea.console; | ||
|
||
import com.intellij.icons.AllIcons; | ||
import com.intellij.ide.IdeBundle; | ||
import com.intellij.openapi.actionSystem.ActionUpdateThread; | ||
import com.intellij.openapi.actionSystem.AnActionEvent; | ||
import com.intellij.openapi.project.DumbAwareAction; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
class BldConsoleClearAction extends DumbAwareAction { | ||
public BldConsoleClearAction() { | ||
super(IdeBundle.message("terminal.action.ClearBuffer.text"), null, AllIcons.Actions.GC); | ||
} | ||
|
||
@Override | ||
public void actionPerformed(AnActionEvent e) { | ||
var project = e.getProject(); | ||
if (project != null) { | ||
BldConsoleManager.getConsole(project).clear(); | ||
} | ||
} | ||
|
||
@Override | ||
public @NotNull ActionUpdateThread getActionUpdateThread() { | ||
return ActionUpdateThread.BGT; | ||
} | ||
} |
46 changes: 46 additions & 0 deletions
46
src/main/java/rife/bld/idea/console/BldConsoleStopAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
/* | ||
* Copyright 2024 Geert Bevin (gbevin[remove] at uwyn dot com) | ||
* Licensed under the Apache License, Version 2.0 (the "License") | ||
*/ | ||
package rife.bld.idea.console; | ||
|
||
import com.intellij.execution.ui.ConsoleViewContentType; | ||
import com.intellij.icons.AllIcons; | ||
import com.intellij.ide.IdeBundle; | ||
import com.intellij.openapi.actionSystem.ActionUpdateThread; | ||
import com.intellij.openapi.actionSystem.AnActionEvent; | ||
import com.intellij.openapi.project.DumbAwareAction; | ||
import org.jetbrains.annotations.NotNull; | ||
import rife.bld.idea.execution.BldExecution; | ||
import rife.bld.idea.utils.BldBundle; | ||
|
||
class BldConsoleStopAction extends DumbAwareAction { | ||
public BldConsoleStopAction() { | ||
super(IdeBundle.message("action.stop"), null, AllIcons.Actions.Suspend); | ||
} | ||
|
||
@Override | ||
public void actionPerformed(AnActionEvent e) { | ||
var project = e.getProject(); | ||
if (project != null) { | ||
BldExecution.getInstance(project).terminateBldProcess(); | ||
BldConsoleManager.getConsole(project).print(BldBundle.message("bld.command.terminated"), ConsoleViewContentType.ERROR_OUTPUT); | ||
} | ||
} | ||
|
||
@Override | ||
public void update(AnActionEvent event) { | ||
// Make the action only clickable when there is an active bld process | ||
var presentation = event.getPresentation(); | ||
var project = event.getProject(); | ||
if (project == null) { | ||
return; | ||
} | ||
presentation.setEnabled(BldExecution.getInstance(project).hasActiveBldProcess()); | ||
} | ||
|
||
@Override | ||
public @NotNull ActionUpdateThread getActionUpdateThread() { | ||
return ActionUpdateThread.BGT; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
src/main/java/rife/bld/idea/project/BldProjectClearCacheAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
src/main/java/rife/bld/idea/project/BldProjectEditMainAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
src/main/java/rife/bld/idea/project/BldProjectEditPropertiesAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
src/main/java/rife/bld/idea/project/BldProjectOfflineAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 4 additions & 0 deletions
4
src/main/java/rife/bld/idea/project/BldProjectRefreshAction.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters