blob: 16670d3b892ac3b7b911ce3260b4e4440f27549f [file] [log] [blame]
/**
* Copyright (c) 2011, 2015 - Lunifera GmbH (Gross Enzersdorf, Austria), Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Florian Pirchner - Initial implementation
*/
package org.eclipse.osbp.dsl.entity.xtext.ui.contentassist;
import org.eclipse.emf.ecore.EObject;
import org.eclipse.osbp.dsl.entity.xtext.services.EntityGrammarGrammarAccess;
import org.eclipse.xtext.Keyword;
import org.eclipse.xtext.RuleCall;
import org.eclipse.xtext.common.ui.contentassist.TerminalsProposalProvider;
import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext;
import org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor;
import com.google.inject.Inject;
/**
* see
* http://www.eclipse.org/Xtext/documentation/latest/xtext.html#contentAssist on
* how to customize content assistant
*/
@SuppressWarnings("restriction")
public class EntityGrammarProposalProvider extends AbstractEntityGrammarProposalProvider {
@Inject
TerminalsProposalProvider provider;
@Inject
private EntityGrammarGrammarAccess xcoreGrammarAccess;
protected boolean isKeywordWorthyToPropose(Keyword keyword) {
return true;
}
// ------------- delegates to TerminalsProposalProvider ------------------
public void complete_TRANSLATABLEID(EObject model, RuleCall ruleCall, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
provider.complete_ID(model, ruleCall, context, acceptor);
}
public void complete_TRANSLATABLESTRING(EObject model, RuleCall ruleCall, ContentAssistContext context,
ICompletionProposalAcceptor acceptor) {
provider.complete_STRING(model, ruleCall, context, acceptor);
}
}