Comments (4)
Do you mean com.jediterm.terminal.TerminalColor#myColorSupplier
by providers/lambdas?
For example, here is now com.jediterm.terminal.ui.settings.UserSettingsProvider#getDefaultStyle
is implemented in IntelliJ:
@Override
public TextStyle getDefaultStyle() {
return new TextStyle(new TerminalColor(() -> AwtTransformers.fromAwtColor(myUiSettingsManager.getDefaultForeground())),
new TerminalColor(() -> AwtTransformers.fromAwtColor(myUiSettingsManager.getDefaultBackground())));
}
So, everything works even if UserSettingsProvider#getDefaultStyle
is called only once.
I agree with you there is some inconsistency. Probably, these methods should be called only once and dynamic colors should be supported via implementing Supplier<Color>
.
from jediterm.
@pskowronek I tried to optimize it a bit in af3a61a, but generally, UserSettingsProvider#getSelectionColor()
and UserSettingsProvider#getFoundPatternColor()
could be called multiple times to support switching between different UI themes. I'd recommend to implement some caching in your UserSettingsProvider
if these methods are expensive.
from jediterm.
Thanks! However, hmm, how does it differ from UserSettingsProvider#getDefaultStyle()
- it is called once and probably providers/lambdas are called multiple times (which is fine), but UserSettingsProvider#getSelectionColor()
is/was (need to check your change) called multiple of times even though they also return 'providers'.
from jediterm.
Do you mean
com.jediterm.terminal.TerminalColor#myColorSupplier
by providers/lambdas? For example, here is nowcom.jediterm.terminal.ui.settings.UserSettingsProvider#getDefaultStyle
is implemented in IntelliJ:
yes, I haven't had a code in front of me.
So, everything works even if
UserSettingsProvider#getDefaultStyle
is called only once. I agree with you there is some inconsistency. Probably, these methods should be called only once and dynamic colors should be supported via implementingSupplier<Color>
.
Yes, that was my thought.
from jediterm.
Related Issues (20)
- spewing ^[[?6c control characters when running nano with TERM=linux HOT 1
- Requesting new release HOT 2
- x11
- The cursor sometimes disappears
- The cursor is gone
- Ensure TerminalKeyHandler checks if key event isn't consumed HOT 2
- Set the TERMINAL_EMULATOR environment variable HOT 2
- Add support for CSI U/Kitty protocol
- use escape sequence to change cursor shape inside zsh causes character under the cursor becomes invisible
- Any way to set current working directory? HOT 3
- Broken terminal when launched from iTerm and powerlevel10k's transient prompt HOT 4
- How can I set the background color to be transparent? HOT 1
- How to close a JediTerm Widget and it's running OS process correctly? HOT 7
- Would you like to provide a demo? HOT 1
- Can I get the out without a ui page? HOT 13
- Clearing the buffer causes "Attempt to get line out of bounds" errors HOT 1
- Soft terminal reset clears screen content
- Please set the Java Tool chain in core/build.gradle HOT 6
- BASH 4.2 vs. Jeditterm 3.36 and newer HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jediterm.