blob: 6261cef75852ed3c5d57970abb0d4788ef536873 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2016, 2017 Obeo.
* 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:
* Obeo - initial API and implementation
*******************************************************************************/
package org.eclipse.eef.core.ext.widgets.reference.internal;
import org.eclipse.eef.EEFWidgetDescription;
import org.eclipse.eef.core.api.EditingContextAdapter;
import org.eclipse.eef.core.api.controllers.AbstractEEFOnClickController;
import org.eclipse.eef.ext.widgets.reference.eefextwidgetsreference.EEFExtReferenceDescription;
import org.eclipse.sirius.common.interpreter.api.IInterpreter;
import org.eclipse.sirius.common.interpreter.api.IVariableManager;
/**
* The controller of the EEF Extension reference widget.
*
* @author sbegaudeau
*/
public class EEFExtReferenceController extends AbstractEEFOnClickController {
/**
* The description.
*/
private final EEFExtReferenceDescription description;
/**
* The constructor.
*
* @param description
* The description
* @param variableManager
* The variable manager
* @param interpreter
* The interpreter
* @param editingContextAdapter
* The editing context adapter
*/
public EEFExtReferenceController(EEFExtReferenceDescription description, IVariableManager variableManager, IInterpreter interpreter,
EditingContextAdapter editingContextAdapter) {
super(variableManager, interpreter, editingContextAdapter);
this.description = description;
}
/**
* {@inheritDoc}
*
* @see org.eclipse.eef.core.api.controllers.AbstractEEFWidgetController#getDescription()
*/
@Override
protected EEFWidgetDescription getDescription() {
return this.description;
}
/**
* {@inheritDoc}
*
* @see org.eclipse.eef.core.api.controllers.AbstractEEFOnClickController#getOnClickExpression()
*/
@Override
protected String getOnClickExpression() {
return this.description.getOnClickExpression();
}
}