Buggy code:
public class XpandContentAssistProcessor extends AbstractExtXptContentAssistProcessor { public XpandContentAssistProcessor ( final IEditorPart editor ) { } @ Override protected ICompletionProposal [ ] internalComputeCompletionProposals ( final ITextViewer viewer , final int documentOffset ) { try { final String txt = viewer . getDocument ( ) . get ( ) . substring ( 0 , documentOffset ) ; XpandDefinition [ ] defs = new XpandDefinition [ 0 ] ; final IFile file = getFile ( ) ; final IXpandResource tpl = ( ( IXpandResource ) ( Activator . getExtXptModelManager ( ) . findExtXptResource ( file ) ) ) ; if ( tpl != null ) { defs = tpl . getDefinitions ( ) ; } <START_BUG> XpandExecutionContext ctx = XpandEditorPlugin . getExecutionContext ( getJavaProject ( ) ) ; <END_BUG> final Partition p = FastAnalyzer . computePartition ( txt ) ; if ( p == ( Partition . COMMENT ) ) { return new ICompletionProposal [ 0 ] ; } List < Object > proposals = new ArrayList < Object > ( ) ; final ProposalFactory f = new XpandProposalFactoryEclipseImpl ( documentOffset ) ; if ( p == ( Partition . TYPE_DECLARATION ) ) { ctx = FastAnalyzer . computeExecutionContext ( txt , ctx , defs ) ; proposals = new TypeProposalComputer ( ) . computeProposals ( txt , ctx , f ) ; } else if ( p == ( Partition . EXPRESSION ) ) { ctx = FastAnalyzer . computeExecutionContext ( txt , ctx , defs ) ; final String expression = txt . substring ( txt . lastIndexOf ( LT_CHAR ) ) ; proposals . addAll ( new ExpressionProposalComputer ( ) . computeProposals ( expression , ctx , f ) ) ; proposals . addAll ( new KeywordProposalComputer ( ) . computeProposals ( txt , ctx , f ) ) ; } else if ( p == ( XpandPartition . EXPAND_STATEMENT ) ) { ctx = FastAnalyzer . computeExecutionContext ( txt , ctx , defs ) ; proposals . addAll ( new ExpandProposalComputer ( ) . computeProposals ( txt , ctx , f ) ) ; proposals . add ( new org . eclipse . jface . text . contentassist . CompletionProposal ( ( ( XpandTokens . LT ) + ( XpandTokens . RT ) ) , documentOffset , 0 , 1 ) ) ; } else if ( p == ( Partition . NAMESPACE_IMPORT ) ) { ctx = FastAnalyzer . computeExecutionContext ( txt , ctx , defs ) ; proposals . addAll ( new NamespaceProposalComputer ( ) . computeProposals ( txt , ctx , f ) ) ; } else if ( p == ( Partition . EXTENSION_IMPORT ) ) { IXtendXpandProject project = Activator . getExtXptModelManager ( ) . findProject ( getFile ( ) ) ; IXtendXpandResource [ ] resources = project . getAllRegisteredResources ( ) ; Set < String > extensionNames = new HashSet < String > ( ) ; for ( IXtendXpandResource resource : resources ) { if ( resource instanceof XtendFile ) { extensionNames . add ( resource . getFullyQualifiedName ( ) ) ; } } List < Object > extensionProposals = new ExtensionImportProposalComputer ( ) . computeProposals ( txt , ctx , f , extensionNames ) ; proposals . addAll ( extensionProposals ) ; } else if ( p == ( Partition . DEFAULT ) ) { ctx = FastAnalyzer . computeExecutionContext ( txt , ctx , defs ) ; proposals . addAll ( new StatementProposalComputer ( ) . computeProposals ( txt , ctx , f ) ) ; proposals . add ( new org . eclipse . jface . text . contentassist . CompletionProposal ( ( ( XpandTokens . LT ) + ( XpandTokens . RT ) ) , documentOffset , 0 , 1 ) ) ; } Collections . sort ( proposals , new ProposalComparator ( ) ) ; return proposals . toArray ( new ICompletionProposal [ proposals . size ( ) ] ) ; } catch ( final Exception e ) { XpandLog . logError ( e ) ; } return null ; } public IContextInformation [ ] computeContextInformation ( final ITextViewer viewer , final int documentOffset ) { } public char [ ] getCompletionProposalAutoActivationCharacters ( ) { } public char [ ] getContextInformationAutoActivationCharacters ( ) { } public String getErrorMessage ( ) { } public IContextInformationValidator getContextInformationValidator ( ) { } }

Fix:
XpandExecutionContext ctx = ( ( XpandExecutionContext ) ( Activator . getExecutionContext ( getJavaProject ( ) ) ) ) ;