use of org.erlide.engine.model.root.SourcePathProvider in project erlide_eclipse by erlang.
the class ParserDB method create.
public static void create() {
final Runnable x = new Runnable() {
@Override
public void run() {
ParserDB.running = true;
try {
ParserDB.db = new ParserDB();
// out = new PrintStream(
// new File("/home/qvladum/parserDB.txt"));
ParserDB.out = System.out;
final IErlModel model = ErlangEngine.getInstance().getModel();
final Collection<SourcePathProvider> sourcePathProviders = SourcePathUtils.getSourcePathProviders();
final long time = System.currentTimeMillis();
ParserDB.db.run(model, sourcePathProviders, false);
System.out.println(" took " + (System.currentTimeMillis() - time) / 1000);
} catch (final Exception e) {
ErlLogger.error(e);
}
ParserDB.running = false;
}
};
if (!ParserDB.running) {
new Thread(x).start();
}
}
use of org.erlide.engine.model.root.SourcePathProvider in project erlide_eclipse by erlang.
the class ParserDB method getTestSourcePaths.
public List<String> getTestSourcePaths(final Collection<SourcePathProvider> sourcePathProviders, final Collection<IErlProject> projects) {
final List<String> spaths = Lists.newArrayList();
for (final IErlProject project : projects) {
final Set<IPath> paths = Sets.newHashSet();
for (final SourcePathProvider provider : sourcePathProviders) {
final IProject resource = (IProject) project.getResource();
paths.addAll(provider.getSourcePathsForModel(resource));
}
for (final IPath path : paths) {
spaths.add(path.toPortableString());
}
}
Collections.sort(spaths);
return spaths;
}
use of org.erlide.engine.model.root.SourcePathProvider in project erlide_eclipse by erlang.
the class SourcePathUtils method getExtraSourcePathsGeneric.
private static Collection<IPath> getExtraSourcePathsGeneric(final IProject project, final SPPMethod method) {
final List<IPath> result = Lists.newArrayList();
Collection<SourcePathProvider> spps;
try {
spps = SourcePathUtils.getSourcePathProviders();
for (final SourcePathProvider spp : spps) {
method.setTarget(spp);
final Collection<IPath> paths = method.call(project);
result.addAll(paths);
}
} catch (final Exception e) {
ErlLogger.error(e);
}
return result;
}
Aggregations