Added option for showing current process name in tab title. - #147
Open
Bitsulia Dmitry (gaudima) wants to merge 12 commits into
Open
Added option for showing current process name in tab title.#147Bitsulia Dmitry (gaudima) wants to merge 12 commits into
Bitsulia Dmitry (gaudima) wants to merge 12 commits into
Conversation
…round process detection on linux
| } | ||
| } | ||
|
|
||
| public static class PtyTabChangeListener implements TabChangeListener { |
Contributor
There was a problem hiding this comment.
This class should be definitely put out of the PtyMain to be used from other entry points, like JediTermMain or JBTerminalWidget in IntelliJ
|
|
||
| public class LinuxProcessMonitor extends ProcessMonitor { | ||
| private class ProcfsStat { | ||
| public int pid = -1; |
Contributor
There was a problem hiding this comment.
Could be package private
| synchronized (lock) { | ||
| if(instance == null) { | ||
| if (UIUtil.isLinux) { | ||
| instance = new LinuxProcessMonitor(); |
Contributor
There was a problem hiding this comment.
macOs implementation is pending
| } else if (UIUtil.isWindows) { | ||
| instance = new WindowsProcessMonitor(); | ||
| } else { | ||
| instance = new ProcessMonitor(); |
Contributor
There was a problem hiding this comment.
Default implementation is very CPU consuming, while it doesn't do anything usefull.
| } | ||
|
|
||
| @Override | ||
| public boolean jobNameAsTabName() { |
Contributor
There was a problem hiding this comment.
I would call this settings showProcessNameInTabTitle
| openSession(terminalWidget); | ||
| return true; | ||
| }); | ||
| widget.setTabChangeListener(new PtyTabChangeListener()); |
Contributor
There was a problem hiding this comment.
Please add the same functionality to JediTermMain standalone version
…g in FreeBSD, but I did no tests
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently works only on linux and windows. Not sure about MacOS and FreeBSD, because procfs seems to be deprecated there.