DSLD pointcuts enclosingCall and enclosingCallName

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

DSLD pointcuts enclosingCall and enclosingCallName

Jonathan Ozik
Hello,

I'm trying to find nested enclosingCall-s using the enclosingCall pointcut (in combination with other conditions) in a DSLD script. The enclosingCall does return multiple MethodCallExpression-s but in an unordered Set. I tried to use the enclosingCall(name("myMethod")) pointcut, since the documentation indicates that it "[r]eturns all enclosing method name/declaring types as an ordered set." but that only returned one of the enclosing method calls. Is what I'm seeing what's expected?

Jonathan
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email


Reply | Threaded
Open this post in threaded view
|

Re: DSLD pointcuts enclosingCall and enclosingCallName

Andrew Eisenberg
Hi Jonathan,

Thanks for the email.  This is indeed not working as expected.  I raise a bug: http://jira.codehaus.org/browse/GRECLIPSE-1623

When an argument is passed in to the pointcut (eg-enclosingCall('foo') ), we only return a single match. I think this is the proper way of handling things.  However, the problem is that when there is no argument (eg- enclosingCall() ), the DSLD engine only returns the first method call, which is not correct.

Also, I see why things are not ordered correctly.

I will have a fix out in the next snapshot build.  I've found the problem and I'm just getting a few regression tests together.


On Thu, May 2, 2013 at 6:07 AM, Jonathan Ozik <[hidden email]> wrote:
Hello,

I'm trying to find nested enclosingCall-s using the enclosingCall pointcut (in combination with other conditions) in a DSLD script. The enclosingCall does return multiple MethodCallExpression-s but in an unordered Set. I tried to use the enclosingCall(name("myMethod")) pointcut, since the documentation indicates that it "[r]eturns all enclosing method name/declaring types as an ordered set." but that only returned one of the enclosing method calls. Is what I'm seeing what's expected?

Jonathan
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email



Reply | Threaded
Open this post in threaded view
|

Re: DSLD pointcuts enclosingCall and enclosingCallName

Jonathan Ozik
Andrew,

Thanks for the explanation (and all your hard work on this!).

Based what you said, I have a question. In the case where the script looks like:
foo {
foo {
// inside
}
}

wouldn't it make sense to show that there are two enclosing "foo" calls when calling enclosingCall('foo') at //inside?
I know it would be convenient for my particular use case.

Jonathan

On May 2, 2013, at 12:34 PM, Andrew Eisenberg <[hidden email]> wrote:

Hi Jonathan,

Thanks for the email.  This is indeed not working as expected.  I raise a bug: http://jira.codehaus.org/browse/GRECLIPSE-1623

When an argument is passed in to the pointcut (eg-enclosingCall('foo') ), we only return a single match. I think this is the proper way of handling things.  However, the problem is that when there is no argument (eg- enclosingCall() ), the DSLD engine only returns the first method call, which is not correct.

Also, I see why things are not ordered correctly.

I will have a fix out in the next snapshot build.  I've found the problem and I'm just getting a few regression tests together.


On Thu, May 2, 2013 at 6:07 AM, Jonathan Ozik <[hidden email]> wrote:
Hello,

I'm trying to find nested enclosingCall-s using the enclosingCall pointcut (in combination with other conditions) in a DSLD script. The enclosingCall does return multiple MethodCallExpression-s but in an unordered Set. I tried to use the enclosingCall(name("myMethod")) pointcut, since the documentation indicates that it "[r]eturns all enclosing method name/declaring types as an ordered set." but that only returned one of the enclosing method calls. Is what I'm seeing what's expected?

Jonathan
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email




Reply | Threaded
Open this post in threaded view
|

Re: DSLD pointcuts enclosingCall and enclosingCallName

Jonathan Ozik
Andrew,

Thank you for taking care of this: http://jira.codehaus.org/browse/GRECLIPSE-1623
I'm understanding that in the snapshot build, all enclosing calls will be returned when using "enclosingCall()" and will have a predictable order. Is that order from innermost to outermost?
Sorry, I'd try it on the snapshot build myself, but I can't for the project I'm on at the moment.

Jonathan

On May 2, 2013, at 1:04 PM, Jonathan Ozik <[hidden email]> wrote:

Andrew,

Thanks for the explanation (and all your hard work on this!).

Based what you said, I have a question. In the case where the script looks like:
foo {
foo {
// inside
}
}

wouldn't it make sense to show that there are two enclosing "foo" calls when calling enclosingCall('foo') at //inside?
I know it would be convenient for my particular use case.

Jonathan

On May 2, 2013, at 12:34 PM, Andrew Eisenberg <[hidden email]> wrote:

Hi Jonathan,

Thanks for the email.  This is indeed not working as expected.  I raise a bug: http://jira.codehaus.org/browse/GRECLIPSE-1623

When an argument is passed in to the pointcut (eg-enclosingCall('foo') ), we only return a single match. I think this is the proper way of handling things.  However, the problem is that when there is no argument (eg- enclosingCall() ), the DSLD engine only returns the first method call, which is not correct.

Also, I see why things are not ordered correctly.

I will have a fix out in the next snapshot build.  I've found the problem and I'm just getting a few regression tests together.


On Thu, May 2, 2013 at 6:07 AM, Jonathan Ozik <[hidden email]> wrote:
Hello,

I'm trying to find nested enclosingCall-s using the enclosingCall pointcut (in combination with other conditions) in a DSLD script. The enclosingCall does return multiple MethodCallExpression-s but in an unordered Set. I tried to use the enclosingCall(name("myMethod")) pointcut, since the documentation indicates that it "[r]eturns all enclosing method name/declaring types as an ordered set." but that only returned one of the enclosing method calls. Is what I'm seeing what's expected?

Jonathan
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





Reply | Threaded
Open this post in threaded view
|

Re: DSLD pointcuts enclosingCall and enclosingCallName

Andrew Eisenberg
It will be from inner-most to outer-most call.


On Thu, May 9, 2013 at 10:17 AM, Jonathan Ozik <[hidden email]> wrote:
Andrew,

Thank you for taking care of this: http://jira.codehaus.org/browse/GRECLIPSE-1623
I'm understanding that in the snapshot build, all enclosing calls will be returned when using "enclosingCall()" and will have a predictable order. Is that order from innermost to outermost?
Sorry, I'd try it on the snapshot build myself, but I can't for the project I'm on at the moment.

Jonathan

On May 2, 2013, at 1:04 PM, Jonathan Ozik <[hidden email]> wrote:

Andrew,

Thanks for the explanation (and all your hard work on this!).

Based what you said, I have a question. In the case where the script looks like:
foo {
foo {
// inside
}
}

wouldn't it make sense to show that there are two enclosing "foo" calls when calling enclosingCall('foo') at //inside?
I know it would be convenient for my particular use case.

Jonathan

On May 2, 2013, at 12:34 PM, Andrew Eisenberg <[hidden email]> wrote:

Hi Jonathan,

Thanks for the email.  This is indeed not working as expected.  I raise a bug: http://jira.codehaus.org/browse/GRECLIPSE-1623

When an argument is passed in to the pointcut (eg-enclosingCall('foo') ), we only return a single match. I think this is the proper way of handling things.  However, the problem is that when there is no argument (eg- enclosingCall() ), the DSLD engine only returns the first method call, which is not correct.

Also, I see why things are not ordered correctly.

I will have a fix out in the next snapshot build.  I've found the problem and I'm just getting a few regression tests together.


On Thu, May 2, 2013 at 6:07 AM, Jonathan Ozik <[hidden email]> wrote:
Hello,

I'm trying to find nested enclosingCall-s using the enclosingCall pointcut (in combination with other conditions) in a DSLD script. The enclosingCall does return multiple MethodCallExpression-s but in an unordered Set. I tried to use the enclosingCall(name("myMethod")) pointcut, since the documentation indicates that it "[r]eturns all enclosing method name/declaring types as an ordered set." but that only returned one of the enclosing method calls. Is what I'm seeing what's expected?

Jonathan
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email






Reply | Threaded
Open this post in threaded view
|

Re: DSLD pointcuts enclosingCall and enclosingCallName

Jonathan Ozik
Great thank you!

On May 9, 2013, at 2:46 PM, Andrew Eisenberg <[hidden email]> wrote:

It will be from inner-most to outer-most call.


On Thu, May 9, 2013 at 10:17 AM, Jonathan Ozik <[hidden email]> wrote:
Andrew,

Thank you for taking care of this: http://jira.codehaus.org/browse/GRECLIPSE-1623
I'm understanding that in the snapshot build, all enclosing calls will be returned when using "enclosingCall()" and will have a predictable order. Is that order from innermost to outermost?
Sorry, I'd try it on the snapshot build myself, but I can't for the project I'm on at the moment.

Jonathan

On May 2, 2013, at 1:04 PM, Jonathan Ozik <[hidden email]> wrote:

Andrew,

Thanks for the explanation (and all your hard work on this!).

Based what you said, I have a question. In the case where the script looks like:
foo {
foo {
// inside
}
}

wouldn't it make sense to show that there are two enclosing "foo" calls when calling enclosingCall('foo') at //inside?
I know it would be convenient for my particular use case.

Jonathan

On May 2, 2013, at 12:34 PM, Andrew Eisenberg <[hidden email]> wrote:

Hi Jonathan,

Thanks for the email.  This is indeed not working as expected.  I raise a bug: http://jira.codehaus.org/browse/GRECLIPSE-1623

When an argument is passed in to the pointcut (eg-enclosingCall('foo') ), we only return a single match. I think this is the proper way of handling things.  However, the problem is that when there is no argument (eg- enclosingCall() ), the DSLD engine only returns the first method call, which is not correct.

Also, I see why things are not ordered correctly.

I will have a fix out in the next snapshot build.  I've found the problem and I'm just getting a few regression tests together.


On Thu, May 2, 2013 at 6:07 AM, Jonathan Ozik <[hidden email]> wrote:
Hello,

I'm trying to find nested enclosingCall-s using the enclosingCall pointcut (in combination with other conditions) in a DSLD script. The enclosingCall does return multiple MethodCallExpression-s but in an unordered Set. I tried to use the enclosingCall(name("myMethod")) pointcut, since the documentation indicates that it "[r]eturns all enclosing method name/declaring types as an ordered set." but that only returned one of the enclosing method calls. Is what I'm seeing what's expected?

Jonathan
---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email