~ubuntu-branches/ubuntu/utopic/eclipse-linuxtools/utopic

« back to all changes in this revision

Viewing changes to changelog/org.eclipse.linuxtools.changelog.core/src/org/eclipse/linuxtools/internal/changelog/core/editors/ChangeLogFormattingStrategy.java

  • Committer: Package Import Robot
  • Author(s): Jakub Adam
  • Date: 2014-05-12 18:11:40 UTC
  • mfrom: (3.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20140512181140-w237r3vsah1tmybz
Tags: 2.2.1-1
* New upstream release.
* Refreshed d/patches.
* Removed eclipse-cdt-valgrind-remote package, all its functionality
  is now provided by eclipse-cdt-profiling-framework-remote.
* Added remove-license-feature.patch.
* Bump Standards-Version to 3.9.5.
* Enable eclipse-changelog package.
* Enable eclipse-rpm-editor package.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
 
21
21
public class ChangeLogFormattingStrategy implements IFormattingStrategy {
22
22
 
23
 
        private final String NEW_LINE_CHAR = "\n";
24
 
 
25
 
        private final String WHITE_SPACE_CHAR = " ";
26
 
 
27
 
        private final String TAB_SPACE_CHAR = "\t";
28
 
 
 
23
        private static final String NEW_LINE_CHAR = "\n";
 
24
 
 
25
        private static final String WHITE_SPACE_CHAR = " ";
 
26
 
 
27
        private static final String TAB_SPACE_CHAR = "\t";
 
28
 
 
29
        @Override
29
30
        public String format(String content, boolean isLineStart,
30
31
                        String indentation, int[] positions) {
31
32
 
97
98
                                // insert name
98
99
                                cword = candidateWords.nextToken();
99
100
                                while (!isEmail(cword)) {
100
 
                                        
 
101
 
101
102
                                        if (!cword.equals(WHITE_SPACE_CHAR) && !cword.equals(TAB_SPACE_CHAR) && !cword.equals(NEW_LINE_CHAR)) {
102
 
                                                formattedWords.add(WHITE_SPACE_CHAR + cword);   
 
103
                                                formattedWords.add(WHITE_SPACE_CHAR + cword);
103
104
                                        }
104
 
                                        
105
 
                                        
 
105
 
 
106
 
106
107
                                        cword = candidateWords.nextToken();
107
108
                                }
108
109
 
220
221
                }
221
222
                return false;
222
223
        }
223
 
        
 
224
 
224
225
        private boolean isEmail(String inputStr) {
225
226
                return inputStr.startsWith("<") && inputStr.endsWith(">");
226
227
        }
229
230
                return inputStr.equals("*");
230
231
        }
231
232
 
 
233
        @Override
232
234
        public void formatterStarts(String initialIndentation) {
233
235
 
234
236
        }
235
237
 
 
238
        @Override
236
239
        public void formatterStops() {
237
240
 
238
241
        }