Skip to content

Commit b7e3d29

Browse files
authored
Fix not being able to open files in editor on double click in s3 buckets (aws#4759)
* Fix inability to open files on double click in s3 bucket * Added changelog * addressed feedback
1 parent 9970775 commit b7e3d29

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"type" : "bugfix",
3+
"description" : "Fix inability to open files on double click and open context menu on right click in the S3 bucket viewer"
4+
}

plugins/toolkit/jetbrains-core/src/software/aws/toolkits/jetbrains/services/s3/editor/S3TreeTable.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ class S3TreeTable(
155155
// Do not set up Drag and Drop when in test mode since AWT is not enabled
156156
if (!ApplicationManager.getApplication().isUnitTestMode) {
157157
// Associate the drop target listener with this instance which will allow uploading by drag and drop
158-
DropTarget(this, dropTargetListener)
158+
DropTarget(tree, dropTargetListener)
159159
}
160160
TreeSpeedSearch.installOn(
161161
tree,
@@ -170,9 +170,9 @@ class S3TreeTable(
170170
}
171171
}
172172
)
173-
loadMoreListener.installOn(this)
174-
openFileListener.installOn(this)
175-
super.addKeyListener(keyListener)
173+
loadMoreListener.installOn(tree)
174+
openFileListener.installOn(tree)
175+
tree.addKeyListener(keyListener)
176176
}
177177

178178
fun refresh() {

plugins/toolkit/jetbrains-core/src/software/aws/toolkits/jetbrains/services/s3/editor/S3ViewerPanel.kt

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ class S3ViewerPanel(private val disposable: Disposable, private val project: Pro
115115
treeTable.tree.setCellRenderer(treeRenderer)
116116
val tableRenderer = DefaultTableCellRenderer().also { it.horizontalAlignment = SwingConstants.LEFT }
117117
treeTable.setDefaultRenderer(Any::class.java, tableRenderer)
118-
119118
return treeTable
120119
}
121120

@@ -131,11 +130,7 @@ class S3ViewerPanel(private val disposable: Disposable, private val project: Pro
131130
val actionManager = ActionManager.getInstance()
132131
val group = actionManager.getAction("aws.toolkit.s3viewer.contextMenu") as ActionGroup
133132

134-
PopupHandler.installPopupHandler(
135-
treeTable,
136-
group,
137-
ACTION_PLACE,
138-
)
133+
PopupHandler.installPopupMenu(treeTable.tree, group, ACTION_PLACE)
139134
}
140135

141136
private companion object {

0 commit comments

Comments
 (0)