Search in sources :

Example 1 with DefaultValue

use of org.eclipse.sapphire.modeling.annotations.DefaultValue in project liferay-ide by liferay.

the class BeforeAfterFilterTypeBinding method init.

@Override
public void init(Property property) {
    super.init(property);
    DefaultValue defaultValue = property.definition().getAnnotation(DefaultValue.class);
    _defaultValueText = defaultValue.text();
}
Also used : DefaultValue(org.eclipse.sapphire.modeling.annotations.DefaultValue)

Example 2 with DefaultValue

use of org.eclipse.sapphire.modeling.annotations.DefaultValue in project liferay-ide by liferay.

the class ScriptPropertyStorage method getName.

@Override
public String getName() {
    Scriptable scriptable = element().nearest(Scriptable.class);
    Value<ScriptLanguageType> languageType = scriptable.getScriptLanguage();
    ScriptLanguageType scriptLanguageType = languageType.content(true);
    if (scriptLanguageType == null) {
        scriptLanguageType = ScriptLanguageType.valueOf(KaleoModelUtil.getDefaultValue(element(), KaleoCore.DEFAULT_SCRIPT_LANGUAGE_KEY, ScriptLanguageType.GROOVY));
    }
    DefaultValue defaultValue = ScriptLanguageType.class.getFields()[scriptLanguageType.ordinal()].getAnnotation(DefaultValue.class);
    return defaultValue.text();
}
Also used : DefaultValue(org.eclipse.sapphire.modeling.annotations.DefaultValue) ScriptLanguageType(com.liferay.ide.kaleo.core.model.ScriptLanguageType) Scriptable(com.liferay.ide.kaleo.core.model.Scriptable)

Aggregations

DefaultValue (org.eclipse.sapphire.modeling.annotations.DefaultValue)2 ScriptLanguageType (com.liferay.ide.kaleo.core.model.ScriptLanguageType)1 Scriptable (com.liferay.ide.kaleo.core.model.Scriptable)1