Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Go to method declaration from spec does not recognize math and boolean operators #12

Open
Nzsquall opened this issue Jun 22, 2016 · 5 comments

Comments

@Nzsquall
Copy link

Nzsquall commented Jun 22, 2016

There seems to be a problem that I can't jump to method declaration from the spec to its associated fixture classes, if the argument was made of math, or boolean operator.

For example in the fixture classes, I have a method signature as below:
fooBar (String var1)

When I used this method from the spec, I use this:
fooBar(#someVar + #anotherVar)

The plug in fails to associate this method with its fixture classes.

Another example is:
fooBar (String var1, String var2)

I used this method from the spec as:
fooBar (#someVar, getArrayList()[0])

Where getArrayList() is defined in the fixture classes and return type as ArrayList.

Is it possible to fix this in the next release version?

Thanks
Eric

@idegtiarenko
Copy link
Member

Hello Eric,

As for the resolving method - there is a bug while determining type of getArrayList()[0]. Due to the bug type is determined to ArrayList instead of String. This will be definitely fixed in next release.

As for the math and boolean operators - it is not implemented yet. This will involve a lot of work for writing grammar and type derivation while usage. So I could not promise this feature next release..

I am planning to release in the beginning of July, but I will provide snapshot version with type derivation fixed here.

Thanks,
Eugene

@idegtiarenko
Copy link
Member

Hello Eric,

I did couple of updates to type resolver system related to resolving generics type, better handling arrays and brackets (math and boolean operations are not included yet), could you please test if IdeaConcordionSupport-0.9-SNAPSHOT.zip works fine ? Please let me know if current version seems to be slower then before.

Thanks,
Eugene

@Nzsquall
Copy link
Author

Hi Eugene,

Thanks for the quick fix, working like a charm for that one now.

I will let you know if I observe any slower performance.

Thanks
Eric

@Nzsquall Nzsquall changed the title Go to method declaration from spec does not recognize java expression Go to method declaration from spec does not recognize math and boolean operators Jun 28, 2016
@Nzsquall
Copy link
Author

Another small issue I notice as below.

In the fixture class I have this method
fooBar() that returns a multi level HashMap.

The following expresssion in the spec are flagged as error by the IDE:
c:assertTrue="fooBar().keyLevel1.keyLevel2.equals('some string')"

Where the value for this key keyLevel2 in the map returned are type String.

Not too worry about this one actually but I am wondering if this is something that can be fixed quickly?

I supposed you won't really know before run time what type of the value that map key corresponds to?

Thanks
Eric

@idegtiarenko
Copy link
Member

Hello,

I was unable to reproduce last issue.
image

Types are deducted from generics.

Thanks,
Ievgen

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants