forked from JetBrains/jediterm
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Provide action to create new terminal widget + some refactoring
When tab is moved to IntelliJ editor pane we want be able to create a new widget detached from the terminal tabs.
- Loading branch information
1 parent
bd47ce5
commit 3fe7cea
Showing
9 changed files
with
136 additions
and
105 deletions.
There are no files selected for viewing
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
26 changes: 26 additions & 0 deletions
26
terminal/src/com/jediterm/terminal/TabbedTerminalWidget.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,26 @@ | ||
package com.jediterm.terminal; | ||
|
||
import com.jediterm.terminal.ui.*; | ||
import com.jediterm.terminal.ui.settings.TabbedSettingsProvider; | ||
import org.jetbrains.annotations.NotNull; | ||
|
||
import java.util.function.Function; | ||
|
||
/** | ||
* @author traff | ||
*/ | ||
public class TabbedTerminalWidget extends AbstractTabbedTerminalWidget<JediTermWidget> { | ||
public TabbedTerminalWidget(@NotNull TabbedSettingsProvider settingsProvider, @NotNull Function<AbstractTabbedTerminalWidget, JediTermWidget> createNewSessionAction) { | ||
super(settingsProvider, createNewSessionAction::apply); | ||
} | ||
|
||
@Override | ||
public JediTermWidget createInnerTerminalWidget() { | ||
return new JediTermWidget(getSettingsProvider()); | ||
} | ||
|
||
@Override | ||
protected AbstractTabs<JediTermWidget> createTabbedPane() { | ||
return new TerminalTabsImpl(); | ||
} | ||
} |
Oops, something went wrong.