createNodes(nodes, d, getLastSelectedDisplay().getParentDisplay());
last = getLastSelectedDisplay(); if (last == null) createNodes(nodes, d, null); else  createNodes(nodes, d, last.getParentDisplay());
    public void refreshClassification(ImageData[] images, Set categories, int m)    {        switch (model.getState()) {            case NEW:            case READY:                   break;            default:                new IllegalStateException("This method can only be invoked " +                        "in the NEW or READY state.");        }        if (categories == null)            throw new IllegalArgumentException("Categories shouln't be null.");        if (images == null)            throw new IllegalArgumentException("No image.");        if (images.length == 0)            throw new IllegalArgumentException("No image.");        if (m != Classifier.CLASSIFY_MODE &&             m != Classifier.DECLASSIFY_MODE)            throw new IllegalArgumentException("Classification mode not " +                    "supported.");        ImageData img;        ClassificationVisitor visitor;        List nodes;        long userID = model.getUserID();        long groupID = model.getRootGroupID();        TreeImageDisplay d;        int editorType = model.getBrowserType();        for (int i = 0; i < images.length; i++) {            img = images[i];            visitor = new ClassificationVisitor(this, img, categories);            accept(visitor, TreeImageDisplayVisitor.TREEIMAGE_NODE_ONLY);            nodes = visitor.getFoundNodes();            d = TreeViewerTranslator.transformDataObject(img, userID, groupID);            if (editorType == CATEGORY_EXPLORER) {                if (m == Classifier.CLASSIFY_MODE) {                    createNodes(nodes, d,                             getLastSelectedDisplay().getParentDisplay());                }                else removeNodes(nodes);            } else if (editorType == PROJECT_EXPLORER ||                     editorType == IMAGES_EXPLORER)                view.updateNodes(nodes, img);        }    }