Skip to content

Commit baa8e8c

Browse files
committed
delete unnecessary remote environment checks
1 parent c1b9d17 commit baa8e8c

File tree

12 files changed

+12
-629
lines changed

12 files changed

+12
-629
lines changed

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/QOpenPanelAction.kt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,15 @@ import software.aws.toolkits.telemetry.UiTelemetry
1717

1818
class QOpenPanelAction : AnAction(message("action.q.openchat.text"), null, AwsIcons.Logos.AWS_Q) {
1919
override fun actionPerformed(e: AnActionEvent) {
20-
if (isRunningOnRemoteBackend()) return
2120
val project = e.getRequiredData(CommonDataKeys.PROJECT)
2221
UiTelemetry.click(project, "q_openChat")
2322
ToolWindowManager.getInstance(project).getToolWindow(AMAZON_Q_WINDOW_ID)?.activate(null, true)
2423
if (e.getData(runScanKey) == true) {
2524
AmazonQToolWindow.openScanTab(project)
2625
}
2726
}
27+
28+
override fun update(e: AnActionEvent) {
29+
e.presentation.isEnabled = e.getData(CommonDataKeys.PROJECT) != null
30+
}
2831
}

plugins/amazonq/chat/jetbrains-community/src/software/aws/toolkits/jetbrains/services/amazonq/toolwindow/AmazonQPanel.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ class AmazonQPanel(private val parent: Disposable) {
6767
if (!JBCefApp.isSupported()) {
6868
// Fallback to an alternative browser-less solution
6969
if (isRunningOnRemoteBackend()) {
70-
webviewContainer.add(JBTextArea("Amazon Q chat is not supported in remote dev environment."))
70+
webviewContainer.add(JBTextArea("Amazon Q chat is not supported in this remote dev environment because it lacks JCEF webview support."))
7171
} else {
7272
webviewContainer.add(JBTextArea("JCEF not supported"))
7373
}

plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/CodeModernizerManager.kt

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -133,14 +133,6 @@ class CodeModernizerManager(private val project: Project) : PersistentStateCompo
133133

134134
fun validate(project: Project, transformationType: CodeTransformType): ValidationResult {
135135
fun validateCore(project: Project): ValidationResult {
136-
if (isRunningOnRemoteBackend()) {
137-
return ValidationResult(
138-
false,
139-
InvalidTelemetryReason(
140-
CodeTransformPreValidationError.RemoteRunProject,
141-
)
142-
)
143-
}
144136
if (!isCodeTransformAvailable(project)) {
145137
return ValidationResult(
146138
false,

plugins/amazonq/codetransform/jetbrains-community/src/software/aws/toolkits/jetbrains/services/codemodernizer/plan/CodeModernizerPlanEditorProvider.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ class CodeModernizerPlanEditorProvider : FileEditorProvider, DumbAware {
3131
val MIGRATION_PLAN_KEY = Key.create<TransformationPlan>("TRANSFORMATION_PLAN")
3232
val MODULE_NAME_KEY = Key.create<String>("MODULE_NAME")
3333
val JAVA_VERSION = Key.create<String>("JAVA_VERSION")
34+
3435
fun openEditor(project: Project, plan: TransformationPlan, module: String?, javaVersionNumber: String) {
35-
if (isRunningOnRemoteBackend()) return
3636
val virtualFile = CodeModernizerPlanVirtualFile()
3737
virtualFile.putUserData(MIGRATION_PLAN_KEY, plan)
3838
virtualFile.putUserData(MODULE_NAME_KEY, module)

0 commit comments

Comments
 (0)