Search in sources :

Example 1 with ConfigurationManager

use of org.jboss.ide.eclipse.freemarker.configuration.ConfigurationManager in project liferay-ide by liferay.

the class FreemarkerEditorHelper method openEditor.

@Override
public void openEditor(ISapphirePart sapphirePart, Element modelElement, ValueProperty valueProperty) {
    IProject project = sapphirePart.adapt(IProject.class);
    ConfigurationManager configManager = ConfigurationManager.getInstance(project);
    ContextValue[] contextValues = { new ContextValue(WorkflowContextConstants.SERVICE_CONTEXT, Map.class, Map.class), new ContextValue(WorkflowContextConstants.WORKFLOW_CONTEXT, Map.class, Map.class), new ContextValue(WorkflowContextConstants.ENTRY_CLASS_NAME, String.class, String.class), new ContextValue(WorkflowContextConstants.GROUP_ID, Long.class, Long.class), new ContextValue(WorkflowContextConstants.ENTRY_TYPE, String.class, String.class), new ContextValue(WorkflowContextConstants.USER_ID, Long.class, Long.class), new ContextValue(WorkflowContextConstants.TASK_COMMENTS, String.class, String.class), new ContextValue(WorkflowContextConstants.COMPANY_ID, Long.class, Long.class), new ContextValue(WorkflowContextConstants.ENTRY_CLASS_PK, Long.class, Long.class), new ContextValue(WorkflowContextConstants.TRANSITION_NAME, String.class, String.class), new ContextValue(WorkflowContextConstants.WORKFLOW_TASK_ASSIGNEES, List.class, List.class) };
    for (ContextValue cv : contextValues) {
        configManager.addContextValue(cv, project);
    }
    super.openEditor(sapphirePart, modelElement, valueProperty);
}
Also used : ContextValue(org.jboss.ide.eclipse.freemarker.configuration.ContextValue) List(java.util.List) ConfigurationManager(org.jboss.ide.eclipse.freemarker.configuration.ConfigurationManager) Map(java.util.Map) IProject(org.eclipse.core.resources.IProject)

Aggregations

List (java.util.List)1 Map (java.util.Map)1 IProject (org.eclipse.core.resources.IProject)1 ConfigurationManager (org.jboss.ide.eclipse.freemarker.configuration.ConfigurationManager)1 ContextValue (org.jboss.ide.eclipse.freemarker.configuration.ContextValue)1