Search in sources :

Example 6 with DebugModel

use of freemarker.debug.DebugModel in project freemarker by apache.

the class RmiDebugModelImpl method get.

public DebugModel[] get(String[] keys) throws TemplateModelException, RemoteException {
    DebugModel[] dm = new DebugModel[keys.length];
    TemplateHashModel h = (TemplateHashModel) model;
    for (int i = 0; i < keys.length; i++) {
        dm[i] = getDebugModel(h.get(keys[i]));
    }
    return dm;
}
Also used : DebugModel(freemarker.debug.DebugModel) TemplateHashModel(freemarker.template.TemplateHashModel)

Example 7 with DebugModel

use of freemarker.debug.DebugModel in project freemarker by apache.

the class RmiDebugModelImpl method getCollection.

public DebugModel[] getCollection() throws TemplateModelException, RemoteException {
    List list = new ArrayList();
    TemplateModelIterator i = ((TemplateCollectionModel) model).iterator();
    while (i.hasNext()) {
        list.add(getDebugModel(i.next()));
    }
    return (DebugModel[]) list.toArray(new DebugModel[list.size()]);
}
Also used : DebugModel(freemarker.debug.DebugModel) TemplateModelIterator(freemarker.template.TemplateModelIterator) ArrayList(java.util.ArrayList) ArrayList(java.util.ArrayList) List(java.util.List) TemplateCollectionModel(freemarker.template.TemplateCollectionModel)

Aggregations

DebugModel (freemarker.debug.DebugModel)7 TemplateModelException (freemarker.template.TemplateModelException)4 RemoteException (java.rmi.RemoteException)4 DebugException (org.eclipse.debug.core.DebugException)4 ArrayList (java.util.ArrayList)2 TemplateCollectionModel (freemarker.template.TemplateCollectionModel)1 TemplateHashModel (freemarker.template.TemplateHashModel)1 TemplateModelIterator (freemarker.template.TemplateModelIterator)1 TemplateSequenceModel (freemarker.template.TemplateSequenceModel)1 List (java.util.List)1 IVariable (org.eclipse.debug.core.model.IVariable)1