-
Notifications
You must be signed in to change notification settings - Fork 380
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
4996: REPL: Replace custom command history implementation with default one r=ortem a=dima74 Default implementation additionally provides action to see list of all commands Co-authored-by: Dmitry Murzin <diraria@yandex.ru>
- Loading branch information
Showing
9 changed files
with
47 additions
and
142 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
99 changes: 0 additions & 99 deletions
99
src/main/kotlin/org/rust/ide/console/HistoryKeyListener.kt
This file was deleted.
Oops, something went wrong.
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
19 changes: 19 additions & 0 deletions
19
src/main/kotlin/org/rust/ide/console/RsConsoleHistoryModelProvider.kt
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,19 @@ | ||
/* | ||
* Use of this source code is governed by the MIT license that can be | ||
* found in the LICENSE file. | ||
*/ | ||
package org.rust.ide.console | ||
|
||
import com.intellij.execution.console.ConsoleHistoryModel | ||
import com.intellij.execution.console.ConsoleHistoryModelProvider | ||
import com.intellij.execution.console.LanguageConsoleView | ||
|
||
class RsConsoleHistoryModelProvider : ConsoleHistoryModelProvider { | ||
override fun createModel(persistenceId: String, consoleView: LanguageConsoleView): ConsoleHistoryModel? { | ||
return if (consoleView is RsConsoleView) { | ||
com.intellij.execution.console.createModel(persistenceId, consoleView) | ||
} else { | ||
null | ||
} | ||
} | ||
} |
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,15 @@ | ||
/* | ||
* Use of this source code is governed by the MIT license that can be | ||
* found in the LICENSE file. | ||
*/ | ||
package org.rust.ide.console | ||
|
||
import com.intellij.execution.console.ConsoleRootType | ||
import com.intellij.ide.scratch.RootType | ||
|
||
class RsConsoleRootType internal constructor() : ConsoleRootType("rs", "Rust Consoles") { | ||
companion object { | ||
val instance: RsConsoleRootType | ||
get() = RootType.findByClass(RsConsoleRootType::class.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
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