@@ -54,42 +54,42 @@ public class JavaTextArea extends JEditTextArea {
5454 protected MouseListener [] mouseListeners ; // cached mouselisteners, these are wrapped by MouseHandler
5555
5656 // contains line background colors
57- protected Map <Integer , Color > lineColors = new HashMap <Integer , Color >();
57+ protected Map <Integer , Color > lineColors = new HashMap <Integer , Color >();
5858
5959 // [px] space added to the left and right of gutter chars
6060 protected int gutterPadding ; // = 3;
6161 protected Color gutterBgColor ; // = new Color(252, 252, 252); // gutter background color
6262 protected Color gutterLineColor ; // = new Color(233, 233, 233); // color of vertical separation line
6363
6464 /// the text marker for highlighting breakpoints in the gutter
65- public String breakpointMarker = "<>" ;
65+ public String breakpointMarker = "<>" ;
6666 /// the text marker for highlighting the current line in the gutter
67- public String currentLineMarker = "->" ;
67+ public String currentLineMarker = "->" ;
6868
6969 /// maps line index to gutter text
70- protected Map <Integer , String > gutterText = new HashMap <Integer , String >();
70+ protected Map <Integer , String > gutterText = new HashMap <Integer , String >();
7171
7272 /// maps line index to gutter text color
73- protected Map <Integer , Color > gutterTextColors = new HashMap <Integer , Color >();
73+ protected Map <Integer , Color > gutterTextColors = new HashMap <Integer , Color >();
7474
7575 protected ErrorCheckerService errorCheckerService ;
76-
77-
76+
77+
7878
7979 protected JavaTextAreaPainter getCustomPainter () {
8080 return (JavaTextAreaPainter ) painter ;
8181 }
82-
83-
82+
83+
8484 //public JavaTextArea(TextAreaDefaults defaults, InputHandler inputHandler, JavaEditor editor) {
8585 //public JavaTextArea(JavaEditor editor) {
8686 public JavaTextArea (TextAreaDefaults defaults , JavaEditor editor ) {
8787 super (defaults , new JavaInputHandler (editor ));
8888 //super(defaults, inputHandler);
8989 this .editor = editor ;
9090
91- // removed all this since we have the createPainter() method and we
92- // won't have to remove/re-add the custom painter object [fry 150122]
91+ // removed all this since we have the createPainter() method and we
92+ // won't have to remove/re-add the custom painter object [fry 150122]
9393// // replace the painter:
9494// // first save listeners, these are package-private in JEditTextArea, so not accessible
9595// ComponentListener[] componentListeners = painter.getComponentListeners();
@@ -134,12 +134,12 @@ public JavaTextArea(TextAreaDefaults defaults, JavaEditor editor) {
134134 interactiveMode = false ;
135135 addPrevListeners ();
136136 }
137-
138-
137+
138+
139139 protected JavaTextAreaPainter createPainter (final TextAreaDefaults defaults ) {
140140 return new JavaTextAreaPainter (this , defaults );
141141 }
142-
142+
143143
144144 /**
145145 * Sets ErrorCheckerService and loads theme for TextArea(XQMode)
@@ -153,7 +153,7 @@ public void setECSandThemeforTextArea(ErrorCheckerService ecs,
153153 getCustomPainter ().setECSandTheme (ecs , mode );
154154 }
155155
156-
156+
157157 /**
158158 * Handles KeyEvents for TextArea (code completion begins from here).
159159 */
@@ -167,8 +167,8 @@ public void processKeyEvent(KeyEvent evt) {
167167 return ;
168168 }
169169 }
170-
171- } else if (evt .getKeyCode () == KeyEvent .VK_ENTER &&
170+
171+ } else if (evt .getKeyCode () == KeyEvent .VK_ENTER &&
172172 evt .getID () == KeyEvent .KEY_PRESSED ) {
173173 if (suggestion != null ) {
174174 if (suggestion .isVisible ()) {
@@ -223,14 +223,14 @@ public void processKeyEvent(KeyEvent evt) {
223223 if (!editor .hasJavaTabs ()) {
224224 if (evt .getID () == KeyEvent .KEY_TYPED ) {
225225 processCompletionKeys (evt );
226-
226+
227227 } else if (Base .isMacOS () && evt .getID () == KeyEvent .KEY_RELEASED ) {
228228 processControlSpace (evt );
229229 }
230230 }
231231 }
232-
233-
232+
233+
234234 // #2699 - Special case for OS X, where Ctrl-Space is not detected as Key_Typed -_-
235235 private void processControlSpace (final KeyEvent event ) {
236236 if (event .getKeyCode () == KeyEvent .VK_SPACE && event .isControlDown ()) {
@@ -248,7 +248,7 @@ protected Object doInBackground() throws Exception {
248248 }
249249 }
250250
251-
251+
252252 private void processCompletionKeys (final KeyEvent event ) {
253253 char keyChar = event .getKeyChar ();
254254 if (keyChar == KeyEvent .VK_ENTER ||
@@ -292,7 +292,7 @@ protected Object doInBackground() throws Exception {
292292 }
293293 }
294294
295-
295+
296296 /** Kickstart auto-complete suggestions */
297297 private void prepareSuggestions (final KeyEvent evt ){
298298 SwingWorker <Object , Object > worker = new SwingWorker <Object , Object >() {
@@ -309,7 +309,7 @@ protected Object doInBackground() throws Exception {
309309 worker .execute ();
310310 }
311311
312-
312+
313313 /**
314314 * Retrieves the word on which the mouse pointer is present
315315 * @param evt - the MouseEvent which triggered this method
@@ -503,7 +503,7 @@ else if (s.charAt(x1) == ']') {
503503
504504 }
505505
506-
506+
507507// /**
508508// * Retrieve the total width of the gutter area.
509509// * @return gutter width in pixels
@@ -519,7 +519,7 @@ else if (s.charAt(x1) == ']') {
519519// return textWidth + 2 * gutterPadding;
520520// }
521521//
522- //
522+ //
523523// /**
524524// * Retrieve the width of margins applied to the left and right of the gutter
525525// * text.
@@ -533,7 +533,7 @@ else if (s.charAt(x1) == ']') {
533533// return gutterPadding;
534534// }
535535
536-
536+
537537 /**
538538 * Set the gutter text of a specific line.
539539 *
@@ -547,7 +547,7 @@ public void setGutterText(int lineIdx, String text) {
547547 painter .invalidateLine (lineIdx );
548548 }
549549
550-
550+
551551 /**
552552 * Set the gutter text and color of a specific line.
553553 *
@@ -562,7 +562,7 @@ public void setGutterText(int lineIdx, String text, Color textColor) {
562562 gutterTextColors .put (lineIdx , textColor );
563563 setGutterText (lineIdx , text );
564564 }
565-
565+
566566
567567 /**
568568 * Clear the gutter text of a specific line.
@@ -575,7 +575,7 @@ public void clearGutterText(int lineIdx) {
575575 painter .invalidateLine (lineIdx );
576576 }
577577
578-
578+
579579 /**
580580 * Clear all gutter text.
581581 */
@@ -597,7 +597,7 @@ public String getGutterText(int lineIdx) {
597597 return gutterText .get (lineIdx );
598598 }
599599
600-
600+
601601 /**
602602 * Retrieve the gutter text color for a specific line.
603603 *
@@ -609,7 +609,7 @@ public Color getGutterTextColor(int lineIdx) {
609609 return gutterTextColors .get (lineIdx );
610610 }
611611
612-
612+
613613 /**
614614 * Set the background color of a line.
615615 *
@@ -634,7 +634,7 @@ public void clearLineBgColor(int lineIdx) {
634634 painter .invalidateLine (lineIdx );
635635 }
636636
637-
637+
638638 /**
639639 * Clear all line background colors.
640640 */
@@ -645,7 +645,7 @@ public void clearLineBgColors() {
645645 lineColors .clear ();
646646 }
647647
648-
648+
649649 /**
650650 * Get a lines background color.
651651 *
@@ -657,7 +657,7 @@ public Color getLineBgColor(int lineIdx) {
657657 return lineColors .get (lineIdx );
658658 }
659659
660-
660+
661661 /**
662662 * Convert a character offset to a horizontal pixel position inside the text
663663 * area. Overridden to take gutter width into account.
@@ -673,7 +673,7 @@ public int _offsetToX(int line, int offset) {
673673 return super ._offsetToX (line , offset ) + Editor .LEFT_GUTTER ;
674674 }
675675
676-
676+
677677 /**
678678 * Convert a horizontal pixel position to a character offset. Overridden to
679679 * take gutter width into account.
@@ -689,7 +689,7 @@ public int xToOffset(int line, int x) {
689689 return super .xToOffset (line , x - Editor .LEFT_GUTTER );
690690 }
691691
692-
692+
693693 /**
694694 * Custom mouse handler. Implements double clicking in the gutter area to
695695 * toggle breakpoints, sets default cursor (instead of text cursor) in the
@@ -796,7 +796,7 @@ public void run() {
796796 }
797797 */
798798
799-
799+
800800 /**
801801 * Calculates location of caret and displays the suggestion popup at the location.
802802 *
@@ -805,7 +805,7 @@ public void run() {
805805 */
806806 protected void showSuggestion (DefaultListModel <CompletionCandidate > listModel , String subWord ) {
807807 hideSuggestion ();
808-
808+
809809 if (listModel .size () == 0 ) {
810810 Base .log ("TextArea: No suggestions to show." );
811811
@@ -826,13 +826,13 @@ protected void showSuggestion(DefaultListModel<CompletionCandidate> listModel, S
826826 if (subWord .length () < 2 ) {
827827 return ;
828828 }
829- suggestion = new CompletionPanel (this , position , subWord ,
829+ suggestion = new CompletionPanel (this , position , subWord ,
830830 listModel , location , editor );
831831 requestFocusInWindow ();
832832 }
833833 }
834834
835-
835+
836836 /** Hides suggestion popup */
837837 public void hideSuggestion () {
838838 if (suggestion != null ) {
0 commit comments