name resolution after importing java sources

I create models from a number of Java sources. If I check the models, I get many errors. However, when I open a model in the editor, some sort of name resolution happens and the error disappears. Since I have many models, opening each one by hand will take a long time. Is there a non-interactive way to make this resolution happen? Why does it not happen automatically?
6 comments
Try to press the Perform Quick Fixes in the Model Checker panel below the errors.
There are quick fixes which are applied automatically if a root node is opened.
0
Mixed results on that. The number of errors went down. However, after rechecking, there are still some errors that are not present when I open the model to look at them, which suggests that some name resolutions are not being performed by the quick fix.
0
I'm not sure if I could give you further help on this issue. But it would be useful if you will provide some of the error messages.
0
Here are two of the error messages:

type java.io.File is not a subtype of java.lang.String

type string is not a subtype of int

These are attached to the parameters in: new File(f, name) in

protected File appendComponent(@NotNull() File f, @NotNull() PathnameComponent c) {
  string name = c.toString();
  return new File(f, name);
}

Looks like the checker is using the wrong constructor.

If I run the checker again, the errors are no longer reported.
0
Another set of error messages:

reference ImproperParentReferenceException (baseMethodDeclaration) is out of search scope

Recursive constructor invocation

The ImproperParentReferenceException constructor actually calls super(). The superclass is IllegalArgumentException.

Seems like there is a problem with constructors.
0
Hi Alan
This also seems to be a bug. I'll be fixing this and the others you've found, soon. Would be great if you filed them to YouTrack. If not, I'll try to dig them from here.
0

Please sign in to leave a comment.