Search in sources :

Example 6 with ContextValue

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

the class FreemarkerMultiPageEditor method reloadContextValues.

public void reloadContextValues() {
    try {
        contextValuesTable.removeAll();
        ContextValue[] values = ConfigurationManager.getInstance(vEditor.getFile().getProject()).getContextValues(vEditor.getFile(), false);
        for (int i = 0; i < values.length; i++) {
            TableItem item = new TableItem(contextValuesTable, SWT.NULL);
            String[] arr = { values[i].name, values[i].objClass.getName() };
            item.setText(arr);
        }
        editContextValueButton.setEnabled(false);
        deleteContextValueButton.setEnabled(false);
    } catch (Exception e) {
        Plugin.log(e);
    }
    contextValuesTable.redraw();
}
Also used : ContextValue(org.jboss.ide.eclipse.freemarker.configuration.ContextValue) TableItem(org.eclipse.swt.widgets.TableItem) PartInitException(org.eclipse.ui.PartInitException)

Aggregations

ContextValue (org.jboss.ide.eclipse.freemarker.configuration.ContextValue)6 Map (java.util.Map)2 TableItem (org.eclipse.swt.widgets.TableItem)2 Method (java.lang.reflect.Method)1 ParameterizedType (java.lang.reflect.ParameterizedType)1 Type (java.lang.reflect.Type)1 HashMap (java.util.HashMap)1 List (java.util.List)1 IProject (org.eclipse.core.resources.IProject)1 JavaModelException (org.eclipse.jdt.core.JavaModelException)1 BadLocationException (org.eclipse.jface.text.BadLocationException)1 CompletionProposal (org.eclipse.jface.text.contentassist.CompletionProposal)1 ICompletionProposal (org.eclipse.jface.text.contentassist.ICompletionProposal)1 PartInitException (org.eclipse.ui.PartInitException)1 ConfigurationManager (org.jboss.ide.eclipse.freemarker.configuration.ConfigurationManager)1 CompletionDirective (org.jboss.ide.eclipse.freemarker.model.CompletionDirective)1 CompletionInterpolation (org.jboss.ide.eclipse.freemarker.model.CompletionInterpolation)1 CompletionMacroInstance (org.jboss.ide.eclipse.freemarker.model.CompletionMacroInstance)1 Item (org.jboss.ide.eclipse.freemarker.model.Item)1 ItemSet (org.jboss.ide.eclipse.freemarker.model.ItemSet)1