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 17:47 Go to next message
Josef Pohl is currently offline Josef Pohl
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 04:26 Go to previous messageGo to next message
Joao S is currently offline Joao S
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 04:27]

Report message to a moderator

Re: Search within a diagram [message #843594 is a reply to message #841936] Fri, 13 April 2012 03:22 Go to previous messageGo to next message
Michael Wenz is currently offline Michael Wenz
Messages: 1571
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 11:05 Go to previous messageGo to next message
Josef Pohl is currently offline Josef Pohl
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 09:28 Go to previous messageGo to next message
Joao S is currently offline Joao S
Messages: 51
Registered: January 2011
Member
No Message Body

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

Report message to a moderator

Re: Search within a diagram [message #850716 is a reply to message #847608] Fri, 20 April 2012 04:58 Go to previous message
Michael Wenz is currently offline Michael Wenz
Messages: 1571
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: Wed Jul 23 05:52:30 EDT 2014

Powered by FUDForum. Page generated in 0.02995 seconds