Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Graphiti » Search within a diagram
Search within a diagram [message #841936] Wed, 11 April 2012 21:47 Go to next message
Josef Pohl is currently offline Josef PohlFriend
Messages: 82
Registered: January 2012
Member
Hi there,

I was wondering if anyone had experience with searching (for text) within a diagram?

In particular, I was wondering if it is more efficient to search on the diagram or the model files?

Are there methods to recenter the canvas and select the result of a search (in the simple case of a single result, for instance)?

Thanks,
Joe
Re: Search within a diagram [message #842369 is a reply to message #841936] Thu, 12 April 2012 08:26 Go to previous messageGo to next message
Joao S is currently offline Joao SFriend
Messages: 51
Registered: January 2011
Member
Hello Josef,

I had to do something like that some time ago. I´ve ended up by searching on the model files using this : http://wiki.eclipse.org/EMF_Search

To select the result of a searh in the diagram I guess I would take a look at setSelectionProvider method in IWorkbenchSite.

Joao

[Updated on: Thu, 12 April 2012 08:27]

Report message to a moderator

Re: Search within a diagram [message #843594 is a reply to message #841936] Fri, 13 April 2012 07:22 Go to previous messageGo to next message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
I have no experience with searching, but I can suggest to use
DiagramEditor.selectPictogramElements(PE[]) for bringing the focus on the
search result.

Michael
Re: Search within a diagram [message #843978 is a reply to message #843594] Fri, 13 April 2012 15:05 Go to previous messageGo to next message
Josef Pohl is currently offline Josef PohlFriend
Messages: 82
Registered: January 2012
Member
Thank you Joao and Michael, This looks to point me in the right direction.

Joe
Re: Search within a diagram [message #847608 is a reply to message #843594] Tue, 17 April 2012 13:28 Go to previous messageGo to next message
Joao S is currently offline Joao SFriend
Messages: 51
Registered: January 2011
Member
No Message Body

[Updated on: Tue, 17 April 2012 13:59]

Report message to a moderator

Re: Search within a diagram [message #850716 is a reply to message #847608] Fri, 20 April 2012 08:58 Go to previous message
Michael Wenz is currently offline Michael WenzFriend
Messages: 1931
Registered: July 2009
Location: Walldorf, Germany
Senior Member
Hm, an instant idea would be that the PE you pass is no longer valid (has
been reloaded as part of an editor refresh or reload)?

Michael
Previous Topic:Suggestion for 0.9 (sample/tutorial)
Next Topic:Read-Only Graphiti Diagrams
Goto Forum:
  


Current Time: Thu Mar 28 15:34:43 GMT 2024

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

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

Back to the top