}
@Override public Map<String,String> createReplacements(String action, Lookup lookup) {
FileObject f = lookup.lookup(FileObject.class);
if (f == null) {
SingleMethod m = lookup.lookup(SingleMethod.class);
if (m != null) {
f = m.getFile();
}
}
if (f != null && "text/x-scala".equals(f.getMIMEType())) {
for (SourceGroup g : ProjectUtils.getSources(project).getSourceGroups(ScalaSourcesImpl.TYPE_SCALA)) {
String relPath = FileUtil.getRelativePath(g.getRootFolder(), f);