Skip to content

Commit 2daca21

Browse files
Perform clean code of bundles/org.eclipse.jface.text
1 parent 895ca2e commit 2daca21

File tree

111 files changed

+3266
-1823
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

111 files changed

+3266
-1823
lines changed

bundles/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionSummary.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,11 +82,11 @@ public void run() {
8282
}
8383

8484

85-
private ProjectionViewer fProjectionViewer;
86-
private IAnnotationAccess fAnnotationAccess;
85+
private final ProjectionViewer fProjectionViewer;
86+
private final IAnnotationAccess fAnnotationAccess;
8787
private List<String> fConfiguredAnnotationTypes;
8888

89-
private Object fLock= new Object();
89+
private final Object fLock= new Object();
9090
private IProgressMonitor fProgressMonitor;
9191
private volatile Summarizer fSummarizer;
9292

bundles/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionSupport.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,9 @@ public void projectionDisabled() {
143143
}
144144
}
145145

146-
private ProjectionViewer fViewer;
147-
private IAnnotationAccess fAnnotationAccess;
148-
private ISharedTextColors fSharedTextColors;
146+
private final ProjectionViewer fViewer;
147+
private final IAnnotationAccess fAnnotationAccess;
148+
private final ISharedTextColors fSharedTextColors;
149149
private List<String> fSummarizableTypes;
150150
private IInformationControlCreator fInformationControlCreator;
151151
private IInformationControlCreator fInformationPresenterControlCreator;

bundles/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/ProjectionViewer.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ private void processModelChanged(IAnnotationModel model, AnnotationModelEvent ev
133133
*/
134134
private class ReplaceVisibleDocumentExecutor implements IDocumentListener {
135135

136-
private IDocument fSlaveDocument;
136+
private final IDocument fSlaveDocument;
137137
private IDocument fExecutionTrigger;
138138

139139
/**
@@ -280,7 +280,7 @@ private void computeExpectedExecutionCosts() {
280280
/** The projection annotation model used by this viewer. */
281281
private ProjectionAnnotationModel fProjectionAnnotationModel;
282282
/** The annotation model listener */
283-
private IAnnotationModelListener fAnnotationModelListener= new AnnotationModelListener();
283+
private final IAnnotationModelListener fAnnotationModelListener= new AnnotationModelListener();
284284
/** The projection summary. */
285285
private ProjectionSummary fProjectionSummary;
286286
/** Indication that an annotation world change has not yet been processed. */
@@ -290,9 +290,9 @@ private void computeExpectedExecutionCosts() {
290290
/** The list of projection listeners. */
291291
private List<IProjectionListener> fProjectionListeners;
292292
/** Internal lock for protecting the list of pending requests */
293-
private Object fLock= new Object();
293+
private final Object fLock= new Object();
294294
/** The list of pending requests */
295-
private List<AnnotationModelEvent> fPendingRequests= new ArrayList<>();
295+
private final List<AnnotationModelEvent> fPendingRequests= new ArrayList<>();
296296
/** The replace-visible-document execution trigger */
297297
private IDocument fReplaceVisibleDocumentExecutionTrigger;
298298
/** <code>true</code> if projection was on the last time we switched to segmented mode. */

bundles/org.eclipse.jface.text/projection/org/eclipse/jface/text/source/projection/SourceViewerInformationControl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class SourceViewerInformationControl implements IInformationControl, IInformatio
6666
/** The text font (do not dispose!) */
6767
private Font fTextFont;
6868
/** The control's source viewer */
69-
private SourceViewer fViewer;
69+
private final SourceViewer fViewer;
7070
/** The optional status field. */
7171
private Label fStatusField;
7272
/** The separator for the optional status field. */

bundles/org.eclipse.jface.text/src/org/eclipse/jface/contentassist/AbstractControlContentAssistSubjectAdapter.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,11 +58,11 @@ public abstract class AbstractControlContentAssistSubjectAdapter implements ICon
5858
/**
5959
* VerifyKeyListeners for the control.
6060
*/
61-
private List<VerifyKeyListener> fVerifyKeyListeners;
61+
private final List<VerifyKeyListener> fVerifyKeyListeners;
6262
/**
6363
* KeyListeners for the control.
6464
*/
65-
private Set<KeyListener> fKeyListeners;
65+
private final Set<KeyListener> fKeyListeners;
6666
/**
6767
* The Listener installed on the control which passes events to
6868
* {@link #fVerifyKeyListeners fVerifyKeyListeners} and {@link #fKeyListeners}.

bundles/org.eclipse.jface.text/src/org/eclipse/jface/contentassist/ComboContentAssistSubjectAdapter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ private class InternalDocument extends Document {
6060
/**
6161
* Updates this document with changes in {@link #fCombo}.
6262
*/
63-
private ModifyListener fModifyListener;
63+
private final ModifyListener fModifyListener;
6464

6565
private InternalDocument() {
6666
super(fCombo.getText());
@@ -80,8 +80,8 @@ public void replace(int pos, int length, String text) throws BadLocationExceptio
8080
/**
8181
* The combo widget.
8282
*/
83-
private Combo fCombo;
84-
private HashMap<SelectionListener, Listener> fModifyListeners;
83+
private final Combo fCombo;
84+
private final HashMap<SelectionListener, Listener> fModifyListeners;
8585

8686
/**
8787
* Creates a content assist subject control adapter for the given combo.

bundles/org.eclipse.jface.text/src/org/eclipse/jface/contentassist/SubjectControlContextInformationValidator.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
public final class SubjectControlContextInformationValidator implements ISubjectControlContextInformationValidator {
3333

3434
/** The content assist processor. */
35-
private IContentAssistProcessor fProcessor;
35+
private final IContentAssistProcessor fProcessor;
3636
/** The context information to be validated. */
3737
private IContextInformation fContextInformation;
3838
/** The content assist subject control. */

bundles/org.eclipse.jface.text/src/org/eclipse/jface/contentassist/TextContentAssistSubjectAdapter.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ private class InternalDocument extends Document {
5050
/**
5151
* Updates this document with changes in this adapter's text widget.
5252
*/
53-
private ModifyListener fModifyListener;
53+
private final ModifyListener fModifyListener;
5454

5555
private InternalDocument() {
5656
super(fText.getText());
@@ -68,9 +68,9 @@ public void replace(int pos, int length, String text) throws BadLocationExceptio
6868
}
6969

7070
/** The text. */
71-
private Text fText;
71+
private final Text fText;
7272
/** The modify listeners. */
73-
private HashMap<SelectionListener, Listener> fModifyListeners= new HashMap<>();
73+
private final HashMap<SelectionListener, Listener> fModifyListeners= new HashMap<>();
7474

7575
/**
7676
* Creates a content assist subject control adapter for the given text widget.

bundles/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/TableOwnerDrawSupport.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ public class TableOwnerDrawSupport implements Listener {
3636
private static final String STYLED_RANGES_KEY= "styled_ranges"; //$NON-NLS-1$
3737

3838
// shared text layout
39-
private TextLayout fSharedLayout;
39+
private final TextLayout fSharedLayout;
4040

4141
private int fDeltaOfLastMeasure;
4242

bundles/org.eclipse.jface.text/src/org/eclipse/jface/internal/text/html/BrowserInformationControl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ public static boolean isAvailable(Composite parent) {
161161
* The listeners to be notified when the input changed.
162162
* @since 3.4
163163
*/
164-
private ListenerList<IInputChangedListener> fInputChangeListeners= new ListenerList<>(ListenerList.IDENTITY);
164+
private final ListenerList<IInputChangedListener> fInputChangeListeners= new ListenerList<>(ListenerList.IDENTITY);
165165

166166
/**
167167
* The symbolic name of the font used for size computations, or <code>null</code> to use dialog font.

0 commit comments

Comments
 (0)