<commit_before>/*
 * generated by Xtext
 */
package org.xtext.xrobot.dsl.ui.contentassist

/**
 * see http://www.eclipse.org/Xtext/documentation.html#contentAssist on how to customize content assistant
 */
class XRobotDSLProposalProvider extends AbstractXRobotDSLProposalProvider {
}<commit_msg>fix content assist after 'on' (thanks Sebastian!) https://github.com/JanKoehnlein/XRobot/issues/19<commit_after>/*
 * generated by Xtext
 */
package org.xtext.xrobot.dsl.ui.contentassist

import org.eclipse.emf.ecore.EObject
import org.eclipse.xtext.Assignment
import org.eclipse.xtext.ui.editor.contentassist.ContentAssistContext
import org.eclipse.xtext.ui.editor.contentassist.ICompletionProposalAcceptor
import org.eclipse.xtext.xbase.XExpression
import org.eclipse.xtext.xbase.typesystem.IExpressionScope
import org.xtext.xrobot.dsl.xRobotDSL.Mode
import org.xtext.xrobot.dsl.xRobotDSL.Program

/**
 * see http://www.eclipse.org/Xtext/documentation.html#contentAssist on how to customize content assistant
 */
class XRobotDSLProposalProvider extends AbstractXRobotDSLProposalProvider {
	
	override completeMode_Condition(EObject model, Assignment assignment, ContentAssistContext context, ICompletionProposalAcceptor acceptor) {
		if (model instanceof Mode) {
			createLocalVariableAndImplicitProposals(model.action, IExpressionScope.Anchor.BEFORE, context, acceptor);
		} else if (model instanceof Program && context.previousModel instanceof XExpression && context.prefix.length > 0) {
			createLocalVariableAndImplicitProposals(context.previousModel, IExpressionScope.Anchor.BEFORE, context, acceptor);
		}
	}
}
{'fraction_non_alphanumeric': 0.09423434593924365, 'fraction_numerical': 0.0018598884066955983, 'mean_word_length': 6.173333333333333, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 1, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '22921', 'n_tokens_mistral': 507, 'n_tokens_neox': 487, 'n_words': 90}