aboutsummaryrefslogtreecommitdiff
path: root/.vim/autoload/neomake/makers/ft/java/classpath.py
blob: 5a7ea8d937fb91fc6575a220c94a4be325fe6e57 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
import os
from xml.etree.ElementTree import *


def ReadClasspathFile(fn):
    cp = []
    for a in parse(fn).findall('classpathentry'):
        kind = a.get('kind')
        if kind == 'src' and 'output' in a.keys():
            cp.append(os.path.abspath(a.get('output')))
        elif kind == 'lib' and 'path' in a.keys():
            cp.append(os.path.abspath(a.get('path')))
        elif kind == 'output' and 'path' in a.keys():
            cp.append(os.path.abspath(a.get('path')))
    return cp