Providing Search Functionality in GEF [message #116248] |
Mon, 09 February 2004 14:06  |
Eclipse User |
|
|
|
Hi,
I am trying to provide a search fn. in GEF. Using GEF i have created a
tool via which one can build arbitrary model diagrams(similar to UML).Now
i was thinking,given a model element name in the search dialog,the whole
model is "parsed" and the relevant matches are shown in the search view.On
click of a search entry the corresponding elemnt gets highlighted in the
GEF Editor and outline view.
My problem is with creating the search markers. The IMarker interaface is
expecting IResource,and only way u can create a marker is
resource.newMarker() and also the IMarker interface has keys like
CHAR_STAR,CHAR_END etc which has no meaning in my case.I dont have
IResource too.[Probably i should get the handle to the file in which i
have stored my model and use it???].But what i would really like to do is
attach teh marker to my model objects rather than the file.Any ideas????
Mark
|
|
|
|
|
Re: Providing Search Functionality in GEF [message #116955 is a reply to message #116742] |
Wed, 11 February 2004 03:56  |
Eclipse User |
|
|
|
Thanks to both of u,
SO what i have done is i have done is i have
created my properties and attached them to the Marker.
And this marker i have attached to IFile.No need to attach them
to arbitrary objects in my model
Thats it.
Rgds,
Gunnar Wagenknecht wrote:
> AnotherNeatGuy wrote:
> > My problem is with creating the search markers. The IMarker
> > interaface is expecting IResource,and only way u can create a marker
> > is resource.newMarker()
> If your model doesn't map to resources (files) then you should follow the
> documentation (JavaDoc/Developer Guides) and attach the marker to the
> workspace root (which is a resource).
> > and also the IMarker interface has keys like
> > CHAR_STAR,CHAR_END etc which has no meaning in my case.
> Add your own properties for a unique model id or something similar.
> Cu, Gunnar
|
|
|
Powered by
FUDForum. Page generated in 0.03381 seconds