Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » General (non-technical) » Test » fdg
fdg [message #7047] Wed, 11 July 2007 16:44 Go to next message
Eclipse UserFriend
Originally posted by: dfg.fgd.e

Frederic Fusier wrote:

> Invalid reference (missing in your case) cannot be accurate match. So, they
are reported as inaccurate ones.

> So, in your SearchRequestor, just remove the test
> match.getAccuracy() == SearchMatch.A_ACCURATE
> and then you should print the expected match...

> However, looking at the search pattern you created for your request,
SearchEngine does not need to resolve
> to find matches and so you should always find an accurate match...
> I used your the given code snippet with given Bar class and confirm I always
find the exact match
> even when "Foo" is not declared...

> Are you sure you used this exact code snippet while debugging? If so, set a
breakpoint at SuperTypeReferencePattern
> constructors when field 'mustResolve' is set and you'll get the explanation
why there's a resolution in your case.

Thanks for the reply. Yep, my mistake, apologies.

I just stuck in the string "Foo" for the SearchPattern for the purposes of
this post. What I was actually using was "a.b.c.Foo". When I use "Foo" I
am able to find all classes that extend the class Foo even though the
class Foo does not exist.

However, this does not solve my problem.

Here is my complete example:


I have a class Baz


package x.y.z;

import a.b.c.Foo;

public class Baz extends Foo{
}


which does not compile as the class


a.b.c.Foo


does not exist.


I want to do the following

(1) Find all classes that extend a.b.c.Foo
(2) Update all these classes to extend a.b.c.FooBar that does exist

But I cannot get (1) to work.


I followed your suggestion

> set a breakpoint at SuperTypeReferencePattern constructors when field
>'mustResolve' is set and you'll get the explanation why there's a resolution
> in your case.


and when using "a.b.c.Foo" as the searchPattern 'mustResolve' is indeed
set to true. However it cannot be resolved as it does not exist.

Is there any way around this i.e. is it possible to get the SearchEngine
to return all classes that extend the class a.b.c.Foo even when the class
a.b.c.Foo does not exist?


Thanks,

Máirtín
Re: fdg [message #7072 is a reply to message #7047] Wed, 11 July 2007 16:46 Go to previous message
Eclipse UserFriend
Originally posted by: dgdg.dgd.ie

Frederic Fusier wrote:

> Invalid reference (missing in your case) cannot be accurate match. So, they
> are reported as inaccurate ones.

> So, in your SearchRequestor, just remove the test
> match.getAccuracy() == SearchMatch.A_ACCURATE
> and then you should print the expected match...

> However, looking at the search pattern you created for your request,
> SearchEngine does not need to resolve
> to find matches and so you should always find an accurate match...
> I used your the given code snippet with given Bar class and confirm I always
> find the exact match
> even when "Foo" is not declared...

> Are you sure you used this exact code snippet while debugging? If so, set a
> breakpoint at SuperTypeReferencePattern
> constructors when field 'mustResolve' is set and you'll get the explanation
> why there's a resolution in your case.

Thanks for the reply. Yep, my mistake, apologies.

I just stuck in the string "Foo" for the SearchPattern for the purposes of
this post. What I was actually using was "a.b.c.Foo". When I use "Foo" I
am able to find all classes that extend the class Foo even though the
class Foo does not exist.

However, this does not solve my problem.

Here is my complete example:


I have a class Baz


package x.y.z;

import a.b.c.Foo;

public class Baz extends Foo{
}


which does not compile as the class


a.b.c.Foo


does not exist.


I want to do the following

(1) Find all classes that extend a.b.c.Foo
(2) Update all these classes to extend a.b.c.FooBar that does exist

But I cannot get (1) to work.


I followed your suggestion

> set a breakpoint at SuperTypeReferencePattern constructors when field
>'mustResolve' is set and you'll get the explanation why there's a resolution
> in your case.


and when using "a.b.c.Foo" as the searchPattern 'mustResolve' is indeed
set to true. However it cannot be resolved as it does not exist.

Is there any way around this i.e. is it possible to get the SearchEngine
to return all classes that extend the class a.b.c.Foo even when the class
a.b.c.Foo does not exist?


Thanks,

Máirtín
Re: fdg [message #560898 is a reply to message #7047] Wed, 11 July 2007 16:46 Go to previous message
Eclipse UserFriend
Originally posted by: dgdg.dgd.ie

Frederic Fusier wrote:

> Invalid reference (missing in your case) cannot be accurate match. So, they
> are reported as inaccurate ones.

> So, in your SearchRequestor, just remove the test
> match.getAccuracy() == SearchMatch.A_ACCURATE
> and then you should print the expected match...

> However, looking at the search pattern you created for your request,
> SearchEngine does not need to resolve
> to find matches and so you should always find an accurate match...
> I used your the given code snippet with given Bar class and confirm I always
> find the exact match
> even when "Foo" is not declared...

> Are you sure you used this exact code snippet while debugging? If so, set a
> breakpoint at SuperTypeReferencePattern
> constructors when field 'mustResolve' is set and you'll get the explanation
> why there's a resolution in your case.

Thanks for the reply. Yep, my mistake, apologies.

I just stuck in the string "Foo" for the SearchPattern for the purposes of
this post. What I was actually using was "a.b.c.Foo". When I use "Foo" I
am able to find all classes that extend the class Foo even though the
class Foo does not exist.

However, this does not solve my problem.

Here is my complete example:


I have a class Baz


package x.y.z;

import a.b.c.Foo;

public class Baz extends Foo{
}


which does not compile as the class


a.b.c.Foo


does not exist.


I want to do the following

(1) Find all classes that extend a.b.c.Foo
(2) Update all these classes to extend a.b.c.FooBar that does exist

But I cannot get (1) to work.


I followed your suggestion

> set a breakpoint at SuperTypeReferencePattern constructors when field
>'mustResolve' is set and you'll get the explanation why there's a resolution
> in your case.


and when using "a.b.c.Foo" as the searchPattern 'mustResolve' is indeed
set to true. However it cannot be resolved as it does not exist.

Is there any way around this i.e. is it possible to get the SearchEngine
to return all classes that extend the class a.b.c.Foo even when the class
a.b.c.Foo does not exist?


Thanks,

Máirtín
Previous Topic:fdg
Next Topic:test
Goto Forum:
  


Current Time: Sun Dec 22 05:47:48 GMT 2024

Powered by FUDForum. Page generated in 0.02903 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top