Skip to content

Commit 1ce3b16

Browse files
committed
refactor(ui): remove commented-out undo button code
Clean up unused and commented-out code related to the undo button functionality in the action buttons creation.
1 parent cf0e478 commit 1ce3b16

File tree

1 file changed

+0
-17
lines changed

1 file changed

+0
-17
lines changed

core/src/main/kotlin/cc/unitmesh/devti/sketch/ui/patch/SingleFileDiffSketch.kt

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -129,23 +129,6 @@ class SingleFileDiffSketch(
129129
}
130130

131131
private fun createActionButtons(): List<JButton> {
132-
// val undoManager = UndoManager.getInstance(myProject)
133-
// val fileEditor = FileEditorManager.getInstance(myProject).getSelectedEditor(currentFile)
134-
135-
// val rollback = JButton("Undo").apply {
136-
// icon = AllIcons.Actions.Rollback
137-
// toolTipText = AutoDevBundle.message("sketch.patch.action.rollback.tooltip")
138-
// isEnabled = undoManager.isUndoAvailable(fileEditor)
139-
//
140-
// addMouseListener(object : MouseAdapter() {
141-
// override fun mouseClicked(e: MouseEvent?) {
142-
// if (undoManager.isUndoAvailable(fileEditor)) {
143-
// undoManager.undo(fileEditor)
144-
// }
145-
// }
146-
// })
147-
// }
148-
149132
val viewButton = JButton("View").apply {
150133
icon = AllIcons.Actions.ListChanges
151134
toolTipText = AutoDevBundle.message("sketch.patch.action.viewDiff.tooltip")

0 commit comments

Comments
 (0)