Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Find references across languages?
Find references across languages? [message #1108124] Fri, 13 September 2013 11:22 Go to next message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1827
Registered: July 2009
Senior Member
Hi,

Playing around with Ctrl-Shift-G (Find References) many expected references were missing from the search result. Looking closer it seemed that all references from another DSL into the current file were missing.

Is this supposed to work?
Is there s.t. I need to configure for this to work?

Some of these references are directly resolved via imports, others are handled by custom code in my scope provider. Should search find all these?

thanks,
Stephan

PS: This is in Xtext 2.4.3
Re: Find references across languages? [message #1110010 is a reply to message #1108124] Mon, 16 September 2013 08:30 Go to previous messageGo to next message
Jan Koehnlein is currently offline Jan KoehnleinFriend
Messages: 760
Registered: July 2009
Location: Hamburg
Senior Member
All references, also those across languages, should appear. Are you
using Xbase?

References are collected during indexing. Did you have any build
problems? Did you disable the automatic build? Maybe a clean build
solves the problem. Do all projects have the Xtext nature?

I've also seen people deactivating the BuilderIntegrationFragment in
their languages' workflows. That also disables indexing.

Am 13.09.13 13:22, schrieb Stephan Herrmann:
> Hi,
>
> Playing around with Ctrl-Shift-G (Find References) many expected
> references were missing from the search result. Looking closer it seemed
> that all references from another DSL into the current file were missing.
>
> Is this supposed to work?
> Is there s.t. I need to configure for this to work?
>
> Some of these references are directly resolved via imports, others are
> handled by custom code in my scope provider. Should search find all these?
>
> thanks,
> Stephan
>
> PS: This is in Xtext 2.4.3


--
Need professional support for Eclipse Modeling?
Go visit: http://xtext.itemis.com


---
Get professional support from the Xtext committers at www.typefox.io
Re: Find references across languages? [message #1110417 is a reply to message #1110010] Mon, 16 September 2013 21:45 Go to previous message
Stephan Herrmann is currently offline Stephan HerrmannFriend
Messages: 1827
Registered: July 2009
Senior Member
Hi Jan,

Quote:
Are you using Xbase? ...

References are collected during indexing. Did you have any build problems? Did you disable the automatic build? ...

I've also seen people deactivating the BuilderIntegrationFragment in their languages' workflows. That also disables indexing.


no to all.

Quote:
Maybe a clean build solves the problem.


the good news: right now I see all expected search results, the bad news: I can only guess that some intermediate clean build fixed this.

Knowing that it should work, I'll keep an eye on it, and if the problem comes back, I'll try a clean build to fix.


Thanks,
Stephan

PS: on a mildly related note: trying to associate icons to search results, I tried all steps mentioned in the help document, but only this approach helped for the cross-language scenario:
	@Override
	public Object image(IReferenceDescription referenceDescription) {
		EReference ref = referenceDescription.getEReference();
		if (ref == MyPackage.eINSTANCE.getMyElem_SomeFeature())
			return "TgtElem.gif";
		// more like this ...
		return super.image(referenceDescription);
	}

Is that indicating some malfunctioning, or could the help document be outdated in this respect?

Also the label text is constantly "<unnamed>" where the help document mentions that the indexed name be used by default.

Within one of the involved languages things appear to work, mh..
Previous Topic:Xtext editor for lightweight markup language
Next Topic:uniqueness check restricted to certain (model) resources
Goto Forum:
  


Current Time: Sun Jul 05 20:58:06 GMT 2020

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

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

Back to the top