Package net.sourceforge.processdash.ui.snippet

Examples of net.sourceforge.processdash.ui.snippet.SnippetDefinition.matchesContext()


    public boolean test(SnippetInstanceTO snippet) {
        SnippetDefinition defn = snippet.getDefinition();
        if (defn == null) {
            snippet.setStatus(SnippetInvoker.STATUS_NO_DEFINITION);
            return false;
        } else if (!defn.matchesContext(dataContext)) {
            snippet.setStatus(SnippetInvoker.STATUS_CONTEXT_MISMATCH);
            return false;
        }
       
        return true;
View Full Code Here


       
        Set allSnippets = SnippetDefinitionManager.getAllSnippets();
        TreeSet snippets = new TreeSet();
        for (Iterator i = allSnippets.iterator(); i.hasNext();) {
            SnippetDefinition d = (SnippetDefinition) i.next();
            if (!d.shouldHide() && !denied(d, deny) && d.matchesContext(ctx))
                snippets.add(new SnipData(d));
        }
        return snippets;
    }
   
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.