Search in sources :

Example 6 with ParamValue

use of org.eclipse.jst.j2ee.common.ParamValue in project liferay-ide by liferay.

the class NewVaadinPortletClassDataModelProvider method getInitParams.

@Override
protected Object getInitParams() {
    List<ParamValue> initParams = new ArrayList<>();
    if (getStringProperty(VAADIN_PORTLET_CLASS).equals(QUALIFIED_VAADIN_PORTLET)) {
        ParamValue paramValue = CommonFactory.eINSTANCE.createParamValue();
        paramValue.setName("application");
        String pkg = getDataModel().getStringProperty(JAVA_PACKAGE);
        String cls = getDataModel().getStringProperty(CLASS_NAME);
        String qualifiedApplicationClass = (pkg == null || StringPool.EMPTY.equals(pkg)) ? cls : pkg + "." + cls;
        paramValue.setValue(qualifiedApplicationClass);
        initParams.add(paramValue);
    }
    return initParams;
}
Also used : ArrayList(java.util.ArrayList) ParamValue(org.eclipse.jst.j2ee.common.ParamValue)

Aggregations

ParamValue (org.eclipse.jst.j2ee.common.ParamValue)6 ArrayList (java.util.ArrayList)4 List (java.util.List)3 CoreException (org.eclipse.core.runtime.CoreException)2 ILiferayPortal (com.liferay.ide.core.ILiferayPortal)1 ILiferayProject (com.liferay.ide.core.ILiferayProject)1 ByteArrayInputStream (java.io.ByteArrayInputStream)1 ExecutionException (org.eclipse.core.commands.ExecutionException)1 IFile (org.eclipse.core.resources.IFile)1 JavaModelException (org.eclipse.jdt.core.JavaModelException)1 Document (org.eclipse.jface.text.Document)1 DocumentTemplateContext (org.eclipse.jface.text.templates.DocumentTemplateContext)1 Template (org.eclipse.jface.text.templates.Template)1 TemplateBuffer (org.eclipse.jface.text.templates.TemplateBuffer)1 TemplateContext (org.eclipse.jface.text.templates.TemplateContext)1 IDataModel (org.eclipse.wst.common.frameworks.datamodel.IDataModel)1 FormatProcessorXML (org.eclipse.wst.xml.core.internal.provisional.format.FormatProcessorXML)1 Version (org.osgi.framework.Version)1 Element (org.w3c.dom.Element)1 Node (org.w3c.dom.Node)1