| /** |
| * Copyright (c) 2011, 2016 - 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: |
| * Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation |
| * |
| * |
| * This copyright notice shows up in the generated Java code |
| */ |
| package org.eclipse.osbp.xtext.strategy.ui.contentassist; |
| |
| import com.google.inject.Inject; |
| import org.eclipse.emf.ecore.EObject; |
| import org.eclipse.osbp.xtext.basic.ui.contentassist.BasicDSLProposalProviderHelper; |
| import org.eclipse.osbp.xtext.strategy.ui.contentassist.AbstractStrategyDSLProposalProvider; |
| 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; |
| |
| /** |
| * see http://www.eclipse.org/Xtext/documentation.html#contentAssist on how to customize content assistant |
| */ |
| @SuppressWarnings("all") |
| public class StrategyDSLProposalProvider extends AbstractStrategyDSLProposalProvider { |
| @Inject |
| private TerminalsProposalProvider provider; |
| |
| @Inject |
| private BasicDSLProposalProviderHelper providerHelper; |
| |
| /** |
| * This override will enable 1 length non letter characters as keyword. |
| */ |
| protected boolean isKeywordWorthyToPropose(final Keyword keyword) { |
| return true; |
| } |
| |
| public void complete_QualifiedName(final EObject model, final RuleCall ruleCall, final ContentAssistContext context, final ICompletionProposalAcceptor acceptor) { |
| this.providerHelper.complete_PackageName(model, ruleCall, context, acceptor, this); |
| } |
| |
| public void complete_ID(final EObject model, final RuleCall ruleCall, final ContentAssistContext context, final ICompletionProposalAcceptor acceptor) { |
| this.provider.complete_ID(model, ruleCall, context, acceptor); |
| } |
| } |