Skip to main content



      Home
Home » Eclipse Projects » GEF » Providing Search Functionality in GEF
Providing Search Functionality in GEF [message #116248] Mon, 09 February 2004 14:06 Go to next message
Eclipse UserFriend
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 #116285 is a reply to message #116248] Mon, 09 February 2004 22:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: none.us.ibm.com

Try looking at what the jface.text stuff does. I believe they have
something called an IAnnotation(Model?), which does not require an
IResource. I think also that markers are extensible, so you could provide
additional properties if you wanted.

"AnotherNeatGuy" <AnotherNeatGuy@yahoo.com> wrote in message
news:c08lo0$uaa$1@eclipse.org...
> 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 #116742 is a reply to message #116248] Tue, 10 February 2004 01:34 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: g.wagenknecht.intershop.de

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
Re: Providing Search Functionality in GEF [message #116955 is a reply to message #116742] Wed, 11 February 2004 03:56 Go to previous message
Eclipse UserFriend
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
Previous Topic:Fault-Tree Plug-in
Next Topic:creating connections
Goto Forum:
  


Current Time: Sun May 11 16:02:10 EDT 2025

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

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

Back to the top