Finding references in EMF generated Editor [message #1765407] |
Fri, 09 June 2017 09:16 |
Jan-Patrick Osterloh Messages: 6 Registered: September 2014 |
Junior Member |
|
|
Hi,
I have an ecore model A, for which I generate the edit and editor plug-ins. I use that to specify my model. In the model, there are multiple objects with references to other objects. I know that I can find the instance of a reference in the properties view via the "Locate Value" button, but is there also the other way around, i.e. how can I locate all references of an object in other objects?
I cannot find a menu for that, maybe someone can help? I find it also interesting, that in the generated editor, the "Find/Replace" in the Edit menu is disabled. Can I somehow enable that, so I can maybe find references with that?
Best regards
Jan-Patrick
|
|
|
|
|
Re: Finding references in EMF generated Editor [message #1765447 is a reply to message #1765444] |
Fri, 09 June 2017 15:21 |
Ed Merks Messages: 33218 Registered: July 2009 |
Senior Member |
|
|
As far as I know, there isn't such a view for showing usages. Perhaps an extension to the search results view, but I have no experience with that.
The other part of my answer was related to find and replace support. In particular, org.eclipse.oomph.internal.ui.FindAndReplaceTarget.FindAndReplaceTarget(IWorkbenchPart) in the org.eclipse.oomph.ui plugin. It can be added to an EMF generated editor like this public Object getAdapter(Class adapter)
{
Object result = FindAndReplaceTarget.getAdapter(adapter, this);
if (result != null)
{
return result;
}
The Oomph project has quite a few cool extension to EMF. E.g., much improved drag and drop support, and improved use of the system clipboard to support copy and paste even between VMs, for examples.
You can see, for example, how Find and Replace work in the Setup Editor by doing Navigate -> Open Setup -> User in your IDE (since Mars they all have Oomph installed), and then using Ctrl-F. It even searches in the values of properties and highlights the matches in the Properties view.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.08362 seconds