Bug 450046 - [Xbase] ITypeProvider must be provided by types "language"
Summary: [Xbase] ITypeProvider must be provided by types "language"
Status: NEW
Alias: None
Product: TMF
Classification: Modeling
Component: Xtext (show other bugs)
Version: 2.4.0   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 453047
Blocks:
  Show dependency tree
 
Reported: 2014-11-05 03:19 EST by Sven Efftinge CLA
Modified: 2015-01-05 05:22 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sven Efftinge CLA 2014-11-05 03:19:37 EST
Currently an IJvmTypeProvider is instantiated and registered in the resource set by the first language that asks for it. So it depends on the module of that particular language what concrete implementations are used within that object tree. Some languages have subclassed certain types, e.g. Xcore has subclasses the WorkingCopyOwnerProvider, in order to adjust the bahvior.

This doesn't work, as the type provider is shared between all languages, so we need to have one implementation that works for everyone, coming from some shared module.
Comment 1 Sven Efftinge CLA 2014-11-24 10:18:52 EST
This somewhat depends on bug #453047, as for Xtend the implementation is specialised such that when not in the editor the compiled Java version is loaded. We cannot make this strategy the default for any language, because other languages (e.g. Xcore) also need link against other non-JVM information.
Comment 2 Sebastian Zarnekow CLA 2015-01-05 05:22:30 EST
The registration of the ITypeProvider could be centralized within Eclipse but it would require an additional central registry in standalone mode to mimic the shared state contributions. Currently we don't have a serious issue due to the demand-registration of the ITypeProvider. After an offline discussion, we decided to de-schedule this refactoring for 2.8

I generalized the last customization in Xtend to make it applicable for all Xtext languages: https://git.eclipse.org/r/38960