Commit cf93281f authored by Kristof Szabados's avatar Kristof Szabados
Browse files

added changes left from yesterday's commit


Signed-off-by: Kristof Szabados's avatarkristof <Kristof.Szabados@ericsson.com>
parent 035f2765
......@@ -157,8 +157,7 @@ public class CheckCodeSmells extends AbstractHandler {
if (!onTheFlyEnabled) {
final ProjectSourceParser projectSourceParser = GlobalParser.getProjectSourceParser(project);
for (final IFile file : files.get(project)) {
final String actualModuleName = projectSourceParser.containedModule(file);
final Module module = projectSourceParser.getModuleByName(actualModuleName);
final Module module = projectSourceParser.containedModule(file);
if (module != null) {
progress.subTask("Analyzing module " + module.getName());
MarkerHandler handler;
......
......@@ -57,7 +57,7 @@ public class FolderNameCluster extends PathCluster {
* The cluster to add the file to
*/
protected void checkFile(final IFile file, final Set<NodeDescriptor> cluster) {
final String name = parser.containedModule(file);
final String name = parser.containedModuleName(file);
if (name == null) {
return;
}
......
......@@ -47,7 +47,7 @@ public class LinkedFileCluster extends ModuleLocationCluster {
* The file to search
*/
protected void checkFile(final IFile file) {
final String name = parser.containedModule(file);
final String name = parser.containedModuleName(file);
if (name == null) {
return;
}
......
......@@ -32,7 +32,7 @@ public class ModuleLocationCluster extends FolderNameCluster {
@Override
protected void checkFile(final IFile file, final Set<NodeDescriptor> cluster) {
final String name = parser.containedModule(file);
final String name = parser.containedModuleName(file);
if (name == null) {
return;
}
......
......@@ -149,8 +149,7 @@ public final class OrganizeImports {
TextFileChange change = new TextFileChange(file.getName(), file);
ProjectSourceParser projectSourceParser = GlobalParser.getProjectSourceParser(file.getProject());
String actualModuleName = projectSourceParser.containedModule(file);
Module actualModule = projectSourceParser.getModuleByName(actualModuleName);
Module actualModule = projectSourceParser.containedModule(file);
if (!(actualModule instanceof TTCN3Module)) {
ErrorReporter.logError("The module is not a TTCN-3 module");
......@@ -205,7 +204,7 @@ public final class OrganizeImports {
if (missLoc != null) {
final IFile file = (IFile) missLoc.getFile();
final ProjectSourceParser parser = GlobalParser.getProjectSourceParser(file.getProject());
final Module addMod = parser.getModuleByName(parser.containedModule(file));
final Module addMod = parser.containedModule(file);
final String importName = addMod.getIdentifier().getTtcnName();
if (!importNamesAdded.contains(importName)) {
StringBuilder impText = new StringBuilder("import from ").append(importName).append(" all;");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment