Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[xtext-dev] Content Assist in Xtend

Hi,

I've just committed the first shot at the xtend interface for content assist. There's a new plug-in, so make sure you update your WS using the team project set.

Xtend content assist is always generated but disabled by default. To enable it, override the IContentAssistInvocationHandler service for your language as done in /org.eclipse.xtext.ui.common.tests/src/org/eclipse/xtext/testlanguages/ ContentAssistTestLanguageUiConfig.java

Currently, I use very bad pattern in the ui.common.tests to recycle the tests from the Java impl. I haven't introduced a service in the generator yet, as it would collide with the Java CA. We should find a common solution here.

Some more observations:
- In Xtend, dealing with a JavaMetamodel and an EmfRegistryMetamodel for ecore in parallel causes a lot of casting errors. You can work around that by delegating some calls to Java to perform the casts e.g. from ecore::EObject to org.eclipse.emf.ecore.EObject. Reordering the metamodels in the ExecutionContext didn't help either. Maybe we find a better solution.

- Overriding a service in the configuration looks horrible compared to the initial deifnition. Maybe we should improve the syntax here.

- org .eclipse .xtext .ui .common .editor .contentassist .impl.AbstractProposalProvider.completeAssignment(Assignment, IContentAssistContext) sometimes produces strange method names when the default alias is used. Someone has to investigate.

Best regards
Jan

--
Dr. Jan Köhnlein
Senior Software Architekt

Telefon: +49 (0) 431 / 5606-337
Mobile: +49 (0) 163 / 3979 776
Telefax: +49 (0) 431 / 5606-339

http://www.itemis.de
jan.koehnlein@xxxxxxxxx

itemis AG
Schauenburgerstr. 116
24118 Kiel

Rechtlicher Hinweis:

Amtsgericht Dortmund, HRB 20621

Vorstand: Wolfgang Neuhaus, Jens Wagener, Dr. Georg Pietrek

Aufsichtsrat: Prof. Dr. Burkhart Igel (Vors.) Stephan Grollmann, Michael Neuhaus




Back to the top