}
public Set<String> getTMLpaths(IFile file, String medium) {
Set<String> resources = new HashSet<String>();
IContainer design = new WGADesignStructureHelper(file).getDesignRoot();
if (design != null) {
String expression = "SELECT * FROM references WHERE Project = ? AND FileType = ? AND Medium = ? AND Path Like ?";
PreparedStatement st = null;
ResultSet rs = null;
try {
st = _conn.prepareStatement(expression);
st.setString(1, file.getProject().getName());
st.setString(2, "tml");
st.setString(3, medium);
st.setString(4, design.getProjectRelativePath() + "/tml/%");
rs = st.executeQuery();
while (rs.next()) {
String resource = rs.getString("Path");
if (!resource.endsWith("/")) {
resource += "/";
}
resource += rs.getString("File");
resources.add(resource);
}
} catch (SQLException e) {
Plugin.getDefault().logError("Unable to lookup tml paths for project '" + file.getProject().getName() + "' and designRoot '" + design.getLocation().toString() + "'.", e);
} finally {
cleanupSQLResources(st, rs);
}
}