Skip to content

Commit 69a1d26

Browse files
eclipse-platform-botakurtakov
authored andcommitted
Perform clean code of bundles/org.eclipse.ui.genericeditor
1 parent 9dd5324 commit 69a1d26

34 files changed

+105
-89
lines changed

bundles/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/AnnotationHoverDelegate.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,16 +42,19 @@ protected boolean isIncluded(Annotation annotation) {
4242
return false;
4343
}
4444
AnnotationPreference preference= EditorsUI.getAnnotationPreferenceLookup().getAnnotationPreference(annotation);
45-
if (preference == null)
45+
if (preference == null) {
4646
return false;
47+
}
4748
String key= preference.getTextPreferenceKey();
4849
if (key != null) {
49-
if (!EditorsUI.getPreferenceStore().getBoolean(key))
50+
if (!EditorsUI.getPreferenceStore().getBoolean(key)) {
5051
return false;
52+
}
5153
} else {
5254
key= preference.getHighlightPreferenceKey();
53-
if (key == null || !EditorsUI.getPreferenceStore().getBoolean(key))
55+
if (key == null || !EditorsUI.getPreferenceStore().getBoolean(key)) {
5456
return false;
57+
}
5558
}
5659
return true;
5760
}

bundles/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/AutoEditStrategyRegistry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ public class AutoEditStrategyRegistry {
4040

4141
private static final String EXTENSION_POINT_ID = GenericEditorPlugin.BUNDLE_ID + ".autoEditStrategies"; //$NON-NLS-1$
4242

43-
private Map<IConfigurationElement, GenericContentTypeRelatedExtension<IAutoEditStrategy>> extensions = new LinkedHashMap<>();
43+
private final Map<IConfigurationElement, GenericContentTypeRelatedExtension<IAutoEditStrategy>> extensions = new LinkedHashMap<>();
4444
private boolean outOfSync = true;
4545

4646
/**

bundles/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/CharacterPairMatcherRegistry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ public class CharacterPairMatcherRegistry {
3737

3838
private static final String EXTENSION_POINT_ID = GenericEditorPlugin.BUNDLE_ID + ".characterPairMatchers"; //$NON-NLS-1$
3939

40-
private Map<IConfigurationElement, GenericContentTypeRelatedExtension<ICharacterPairMatcher>> extensions = new HashMap<>();
40+
private final Map<IConfigurationElement, GenericContentTypeRelatedExtension<ICharacterPairMatcher>> extensions = new HashMap<>();
4141
private boolean outOfSync = true;
4242

4343
/**

bundles/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/CompositeContentAssistProcessor.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@
3333
*/
3434
public class CompositeContentAssistProcessor implements IContentAssistProcessorExtension, IContentAssistProcessor {
3535

36-
private List<IContentAssistProcessor> fContentAssistProcessors;
36+
private final List<IContentAssistProcessor> fContentAssistProcessors;
3737

3838
/**
3939
* Constructor
40-
*
40+
*
4141
* @param contentAssistProcessors the children that will actually populate the
4242
* output of this content assist processor.
4343
*/

bundles/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/CompositeQuickAssistProcessor.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
*/
3232
public class CompositeQuickAssistProcessor implements IQuickAssistProcessor {
3333

34-
private List<IQuickAssistProcessor> fProcessors;
34+
private final List<IQuickAssistProcessor> fProcessors;
3535

3636
public CompositeQuickAssistProcessor(List<IQuickAssistProcessor> processors) {
3737
this.fProcessors = processors;

bundles/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/CompositeReconciler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
import org.eclipse.jface.text.reconciler.IReconcilingStrategy;
2626

2727
public class CompositeReconciler implements IReconciler, IReconcilerExtension {
28-
private List<IReconciler> fReconcilers;
28+
private final List<IReconciler> fReconcilers;
2929

3030
public CompositeReconciler(List<IReconciler> reconcilers) {
3131
fReconcilers = reconcilers.stream().filter(Objects::nonNull).collect(Collectors.toList());

bundles/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/CompositeReconcilerStrategy.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626

2727
public class CompositeReconcilerStrategy
2828
implements IReconcilingStrategy, IReconcilingStrategyExtension, ITextViewerLifecycle {
29-
private List<IReconcilingStrategy> fReconcilingStrategies;
29+
private final List<IReconcilingStrategy> fReconcilingStrategies;
3030

3131
public CompositeReconcilerStrategy(List<IReconcilingStrategy> strategies) {
3232
this.fReconcilingStrategies = strategies;

bundles/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/ContentAssistProcessorRegistry.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public class ContentAssistProcessorRegistry {
4949

5050
static class ContentAssistProcessorDelegate implements IContentAssistProcessor {
5151
private final IContentAssistProcessor delegate;
52-
private IContentType targetContentType;
52+
private final IContentType targetContentType;
5353

5454
public ContentAssistProcessorDelegate(IContentAssistProcessor delegate, IContentType targetContentType) {
5555
this.delegate = delegate;
@@ -128,7 +128,7 @@ public IContextInformationValidator getContextInformationValidator() {
128128
}
129129
}
130130

131-
private Map<IConfigurationElement, GenericContentTypeRelatedExtension<IContentAssistProcessor>> extensions = new LinkedHashMap<>();
131+
private final Map<IConfigurationElement, GenericContentTypeRelatedExtension<IContentAssistProcessor>> extensions = new LinkedHashMap<>();
132132
private boolean outOfSync = true;
133133

134134
/**

bundles/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/ContentTypeRelatedExtensionTracker.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,11 +34,11 @@
3434
*/
3535
final class ContentTypeRelatedExtensionTracker<T> implements ServiceTrackerCustomizer<T, LazyServiceSupplier<T>> {
3636

37-
private BundleContext bundleContext;
38-
private ServiceTracker<T, LazyServiceSupplier<T>> serviceTracker;
37+
private final BundleContext bundleContext;
38+
private final ServiceTracker<T, LazyServiceSupplier<T>> serviceTracker;
3939
private Consumer<LazyServiceSupplier<T>> addAction;
4040
private Consumer<LazyServiceSupplier<T>> removeAction;
41-
private Display display;
41+
private final Display display;
4242

4343
ContentTypeRelatedExtensionTracker(BundleContext bundleContext, Class<T> serviceType, Display display) {
4444
this.bundleContext = bundleContext;
@@ -89,8 +89,8 @@ public Collection<LazyServiceSupplier<T>> getTracked() {
8989
}
9090

9191
public static final class LazyServiceSupplier<S> implements Supplier<S> {
92-
private ServiceReference<S> reference;
93-
private BundleContext bundleContext;
92+
private final ServiceReference<S> reference;
93+
private final BundleContext bundleContext;
9494
private boolean disposed;
9595
private S serviceObject;
9696
private IContentType contentType;

bundles/org.eclipse.ui.genericeditor/src/org/eclipse/ui/internal/genericeditor/DefaultWordHighlightReconciler.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919

2020
public class DefaultWordHighlightReconciler extends Reconciler {
2121

22-
private DefaultWordHighlightStrategy fStrategy;
22+
private final DefaultWordHighlightStrategy fStrategy;
2323

2424
public DefaultWordHighlightReconciler() {
2525
fStrategy = new DefaultWordHighlightStrategy();

0 commit comments

Comments
 (0)