Package org.openide.util

Examples of org.openide.util.Lookup.lookup()


    private static TextMarkupLookup getHighlightLookup(BlackboardArtifact artifact, Content content) {
        if (artifact.getArtifactTypeID() != BlackboardArtifact.ARTIFACT_TYPE.TSK_KEYWORD_HIT.getTypeID()) {
            return null;
        }
        Lookup lookup = Lookup.getDefault();
        TextMarkupLookup highlightFactory = lookup.lookup(TextMarkupLookup.class);
        try {
            List<BlackboardAttribute> attributes = artifact.getAttributes();
            String keyword = null;
            String regexp = null;
            for (BlackboardAttribute att : attributes) {
View Full Code Here


            return;
        }
               
        // Make sure the node is of the correct type.
        Lookup lookup = selectedNode.getLookup();
        Content content = lookup.lookup(Content.class);
        if (content == null) {
            return;
        }
       
        startNewTask(new SelectedNodeChangedTask(selectedNode));
View Full Code Here

            // Get the lookup for the node for access to its underlying content and
            // blackboard artifact, if any.
            Lookup lookup = selectedNode.getLookup();
           
            // Get the content.
            Content content = lookup.lookup(Content.class);
            if (content == null) {
                return new ViewUpdate(getArtifactContentStrings().size(), currentPage, ERROR_TEXT);
            }
           
            // Get all of the blackboard artifacts associated with the content. These are what this
View Full Code Here

            }

            // If the node has an underlying blackboard artifact, show it. If not,
            // show the first artifact.
            int index = 0;
            BlackboardArtifact artifact = lookup.lookup(BlackboardArtifact.class);
            if (artifact != null) {
                index = artifacts.indexOf(artifact);
                if (index == -1) {
                    index = 0;
                } else {
View Full Code Here

            resetComponent();
            return;
        }

        Lookup lookup = selectedNode.getLookup();
        Content content = lookup.lookup(Content.class);
        if (content != null) {
            this.setDataView(content, 0);
            return;
        } else {
            StringContent scontent = selectedNode.getLookup().lookup(StringContent.class);
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.