Skip to content

Commit 00c96d9

Browse files
rename constants
1 parent 2ce9817 commit 00c96d9

File tree

4 files changed

+1706
-1447
lines changed

4 files changed

+1706
-1447
lines changed

bundles/org.eclipse.ui.editors/src/org/eclipse/ui/internal/editors/text/TextEditorDefaultsPreferencePage.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -443,7 +443,7 @@ private OverlayPreferenceStore createDialogOverlayStore() {
443443
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_SHOW_CARRIAGE_RETURN));
444444
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_SHOW_LINE_FEED));
445445
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
446-
AbstractDecoratedTextEditorPreferenceConstants.EDITOR_SHOW_ZWSP));
446+
AbstractDecoratedTextEditorPreferenceConstants.EDITOR_SHOW_ZW_CHARACTERS));
447447
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_WHITESPACE_CHARACTER_ALPHA_VALUE));
448448

449449
OverlayPreferenceStore.OverlayKey[] keys= new OverlayPreferenceStore.OverlayKey[overlayKeys.size()];
@@ -568,7 +568,7 @@ protected Control createDialogArea(Composite parent) {
568568
ButtonFactory checkboxFactory = WidgetFactory.button(SWT.CHECK)
569569
.supplyLayoutData(() -> new GridData(SWT.CENTER, SWT.CENTER, false, false)).enabled(false);
570570
checkboxFactory.create(tabularComposite);
571-
preference = new Preference(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_SHOW_ZWSP, "", null); //$NON-NLS-1$
571+
preference = new Preference(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_SHOW_ZW_CHARACTERS, "", null); //$NON-NLS-1$
572572
addCheckBox(tabularComposite, preference, new BooleanDomain(), 0);
573573
checkboxFactory.create(tabularComposite);
574574

@@ -810,7 +810,7 @@ private OverlayPreferenceStore createOverlayStore() {
810810
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_SHOW_CARRIAGE_RETURN));
811811
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_SHOW_LINE_FEED));
812812
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.BOOLEAN,
813-
AbstractDecoratedTextEditorPreferenceConstants.EDITOR_SHOW_ZWSP));
813+
AbstractDecoratedTextEditorPreferenceConstants.EDITOR_SHOW_ZW_CHARACTERS));
814814
overlayKeys.add(new OverlayPreferenceStore.OverlayKey(OverlayPreferenceStore.INT, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_WHITESPACE_CHARACTER_ALPHA_VALUE));
815815

816816
OverlayPreferenceStore.OverlayKey[] keys= new OverlayPreferenceStore.OverlayKey[overlayKeys.size()];

bundles/org.eclipse.ui.editors/src/org/eclipse/ui/texteditor/AbstractDecoratedTextEditorPreferenceConstants.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@ private AbstractDecoratedTextEditorPreferenceConstants() {
517517
* <li>{@link #EDITOR_SHOW_TRAILING_TABS}</li>
518518
* <li>{@link #EDITOR_SHOW_CARRIAGE_RETURN}</li>
519519
* <li>{@link #EDITOR_SHOW_LINE_FEED}</li>
520-
* <li>{@link #EDITOR_SHOW_ZWSP}</li>
520+
* <li>{@link #EDITOR_SHOW_ZW_CHARACTERS}</li>
521521
* <li>{@link #EDITOR_WHITESPACE_CHARACTER_ALPHA_VALUE}</li>
522522
* </ul>
523523
*
@@ -650,16 +650,16 @@ private AbstractDecoratedTextEditorPreferenceConstants() {
650650
public static final String EDITOR_SHOW_LINE_FEED= AbstractTextEditor.PREFERENCE_SHOW_LINE_FEED;
651651

652652
/**
653-
* A named preference that controls the display of ZWSP (zero-with space)
654-
* characters. The value is used only if the value of
653+
* A named preference that controls the display of zero-width characters like
654+
* zero-width space. The value is used only if the value of
655655
* {@link #EDITOR_SHOW_WHITESPACE_CHARACTERS} is <code>true</code>.
656656
* <p>
657657
* Value is of type <code>Boolean</code>.
658658
* </p>
659659
*
660660
* @since 3.?
661661
*/
662-
public static final String EDITOR_SHOW_ZWSP = AbstractTextEditor.PREFERENCE_SHOW_ZWSP;
662+
public static final String EDITOR_SHOW_ZW_CHARACTERS = AbstractTextEditor.PREFERENCE_SHOW_ZW_CHARACTERS;
663663

664664
/**
665665
* A named preference that controls the alpha value of whitespace characters. The value is used
@@ -872,7 +872,7 @@ public static void initializeDefaultValues(IPreferenceStore store) {
872872
store.setDefault(EDITOR_SHOW_TRAILING_TABS, true);
873873
store.setDefault(EDITOR_SHOW_CARRIAGE_RETURN, true);
874874
store.setDefault(EDITOR_SHOW_LINE_FEED, true);
875-
store.setDefault(EDITOR_SHOW_ZWSP, true);
875+
store.setDefault(EDITOR_SHOW_ZW_CHARACTERS, true);
876876
store.setDefault(EDITOR_WHITESPACE_CHARACTER_ALPHA_VALUE, 80);
877877

878878
store.setDefault(EDITOR_TEXT_DRAG_AND_DROP_ENABLED, true);

bundles/org.eclipse.ui.workbench.texteditor/src/org/eclipse/ui/internal/texteditor/codemining/ZeroWidthSpaceLineContentCodeMiningProvider.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public CompletableFuture<List<? extends ICodeMining>> provideCodeMinings(ITextVi
7070

7171
@Override
7272
public void propertyChange(PropertyChangeEvent event) {
73-
if (event.getProperty().equals(AbstractTextEditor.PREFERENCE_SHOW_ZWSP)) {
73+
if (event.getProperty().equals(AbstractTextEditor.PREFERENCE_SHOW_ZW_CHARACTERS)) {
7474
readShowZwspFromStore();
7575
updateCodeMinings();
7676
}
@@ -100,6 +100,6 @@ private ICodeMining createCodeMining(int offset) {
100100
}
101101

102102
private void readShowZwspFromStore() {
103-
showZwsp = store.getBoolean(AbstractTextEditor.PREFERENCE_SHOW_ZWSP);
103+
showZwsp = store.getBoolean(AbstractTextEditor.PREFERENCE_SHOW_ZW_CHARACTERS);
104104
}
105105
}

0 commit comments

Comments
 (0)