~ubuntu-branches/ubuntu/wily/eclipse-linuxtools/wily

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Jakub Adam, Jakub Adam, tony mancill
  • Date: 2014-10-11 11:44:05 UTC
  • mfrom: (1.2.4)
  • Revision ID: package-import@ubuntu.com-20141011114405-yazjvxfzzhmi5sgj
Tags: 3.1.0-1
[ Jakub Adam ]
* New upstream release (Closes: #761524).
* Refreshed d/patches.
* Don't build removed feature org.eclipse.linuxtools.tools.launch
  - merged into org.eclipse.linuxtools.profiling.
* Use javac target 1.7.
* Build new feature org.eclipse.linuxtools.dataviewers.feature
  - required by Valgrind integration.
* Build-depend on eclipse-remote-services-api and eclipse-cdt-autotools.
* Bump Standards-Version to 3.9.6.
* Override incompatible-java-bytecode-format - linuxtools needs Java 7.
* Remove unused codeless-jar override.

[ tony mancill ]
* Tweak short package description to make lintian happy.

Show diffs side-by-side

added added

removed removed

Lines of Context:
20
20
import org.eclipse.jface.text.rules.Token;
21
21
 
22
22
public class GNUPartitionScanner extends RuleBasedPartitionScanner {
23
 
        // We partition into sections we want to parse from the beginning every time
24
 
        // a change occurs within the area.  In this case, we are only interested in
25
 
        // email entries which are surrounded by < and > and source entries which
26
 
        // have one or more file names which may extend across lines.
27
 
        public static final String CHANGELOG_EMAIL = "changelog_email"; //$NON-NLS-1$
28
 
        public static final String CHANGELOG_SRC_ENTRY = "changelog_src_entry"; //$NON-NLS-1$
29
 
        public static final String[] CHANGELOG_PARTITION_TYPES= 
30
 
                new String[] { CHANGELOG_EMAIL, CHANGELOG_SRC_ENTRY };
31
 
        
32
 
        /**
33
 
         * Creates the partitioner and sets up the appropriate rules.
34
 
         */
35
 
        public GNUPartitionScanner() {
36
 
                super();
37
 
                
38
 
                List<IPredicateRule> rules= new ArrayList<IPredicateRule>();
39
 
                Token email = new Token(CHANGELOG_EMAIL);
40
 
                Token srcEntry = new Token(CHANGELOG_SRC_ENTRY);
41
 
                
42
 
                rules.add(new SingleLineRule("<", ">", email, '\\'));
43
 
                rules.add(new MultiLineRule("* ", ":", srcEntry, '\\', true));
44
 
                
45
 
                IPredicateRule[] result= new IPredicateRule[rules.size()];
46
 
                rules.toArray(result);
47
 
                setPredicateRules(result);
48
 
        }
49
 
        
 
23
    // We partition into sections we want to parse from the beginning every time
 
24
    // a change occurs within the area.  In this case, we are only interested in
 
25
    // email entries which are surrounded by < and > and source entries which
 
26
    // have one or more file names which may extend across lines.
 
27
    public static final String CHANGELOG_EMAIL = "changelog_email"; //$NON-NLS-1$
 
28
    public static final String CHANGELOG_SRC_ENTRY = "changelog_src_entry"; //$NON-NLS-1$
 
29
    public static final String[] CHANGELOG_PARTITION_TYPES=
 
30
        new String[] { CHANGELOG_EMAIL, CHANGELOG_SRC_ENTRY };
 
31
 
 
32
    /**
 
33
     * Creates the partitioner and sets up the appropriate rules.
 
34
     */
 
35
    public GNUPartitionScanner() {
 
36
        super();
 
37
 
 
38
        List<IPredicateRule> rules= new ArrayList<>();
 
39
        Token email = new Token(CHANGELOG_EMAIL);
 
40
        Token srcEntry = new Token(CHANGELOG_SRC_ENTRY);
 
41
 
 
42
        rules.add(new SingleLineRule("<", ">", email, '\\'));
 
43
        rules.add(new MultiLineRule("* ", ":", srcEntry, '\\', true));
 
44
 
 
45
        IPredicateRule[] result= new IPredicateRule[rules.size()];
 
46
        rules.toArray(result);
 
47
        setPredicateRules(result);
 
48
    }
 
49
 
50
50
}