mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-14 18:05:27 +07:00
[editor] IJPL-178729 Clearly specify the difference between line wrap strategy providing APIs
(cherry picked from commit 5bc80e3cc549c5aec688028bfd7b1e6bba070f76) IJ-CR-155626 GitOrigin-RevId: 1b51dc75e76e1fe6bb7a88851795435d887d6bba
This commit is contained in:
committed by
intellij-monorepo-bot
parent
555da56d9f
commit
cb081d54e0
@@ -13,6 +13,12 @@ import org.jetbrains.annotations.NotNull;
|
||||
|
||||
/**
|
||||
* Exposes {@link LineWrapPositionStrategy} implementations to their clients.
|
||||
* <p>
|
||||
* Using this extension, you can specify the line wrapping strategy only for those editors
|
||||
* that are bound to some PSI file with the language.
|
||||
* If you need to specify the strategy for the editor that is not bound to the PSI file,
|
||||
* please use {@link com.intellij.openapi.editor.impl.softwrap.mapping.SoftWrapApplianceManager#setLineWrapPositionStrategy(LineWrapPositionStrategy) SoftWrapApplianceManager#setLineWrapPositionStrategy}
|
||||
* </p>
|
||||
*/
|
||||
public final class LanguageLineWrapPositionStrategy extends LanguageExtension<LineWrapPositionStrategy> {
|
||||
|
||||
@@ -26,6 +32,7 @@ public final class LanguageLineWrapPositionStrategy extends LanguageExtension<Li
|
||||
|
||||
/**
|
||||
* Asks to get wrap position strategy to use for the document managed by the given editor.
|
||||
* The strategy is determined based on the editor's PSI file language.
|
||||
*
|
||||
* @param editor editor that manages document which text should be processed by wrap position strategy
|
||||
* @return line wrap position strategy to use for the lines from the document managed by the given editor
|
||||
|
||||
@@ -469,6 +469,7 @@ public final class SoftWrapApplianceManager implements Dumpable {
|
||||
* By default, line wrap strategy depends on the editor's file language
|
||||
* and can be provided using {@link LanguageLineWrapPositionStrategy}.
|
||||
* This method can be used to specify the strategy for the Editor that is not bound to any particular file.
|
||||
* Note that the strategy set using this method takes precedence over one provided using {@link LanguageLineWrapPositionStrategy}.
|
||||
*/
|
||||
public void setLineWrapPositionStrategy(@NotNull LineWrapPositionStrategy strategy) {
|
||||
myLineWrapPositionStrategy = strategy;
|
||||
|
||||
Reference in New Issue
Block a user