KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > netbeans > modules > tasklist > checkstyle > DeleteSpaceSuggestionPerformer


1 /*
2  *
3  * InsertSpaceSuggestionPerformer.java
4  *
5  * Created on 8 January 2006, 22:28
6  *
7  */

8
9 package org.netbeans.modules.tasklist.checkstyle;
10
11 import javax.swing.text.BadLocationException JavaDoc;
12 import javax.swing.text.Document JavaDoc;
13
14 /**
15  * @version $Id: DeleteSpaceSuggestionPerformer.java,v 1.1 2006/01/16 10:42:17 hair Exp $
16  * @author <a HREF="mailto:mick@wever.org">Michael Semb Wever</a>
17  */

18 public final class DeleteSpaceSuggestionPerformer extends AbstractSuggestionPerformer{
19     
20     /** Creates a new instance of InsertSpaceSuggestionPerformer */
21     public DeleteSpaceSuggestionPerformer(
22             final Document JavaDoc doc,
23             final int lineno,
24             final int column) {
25         super(doc,lineno,column);
26     }
27
28     protected void performImpl(final int docPosition) throws BadLocationException JavaDoc {
29         while( doc.getText(docPosition,1).charAt(0) == ' ' ){
30             doc.remove(docPosition,1);
31         }
32     }
33     
34 }
35
Popular Tags