Package org.netbeans.editor

Examples of org.netbeans.editor.WordMatch


        EditorUI editorUI = Utilities.getEditorUI(target);
        Caret caret = target.getCaret();
        int dotPos = caret.getDot();
       
        WordMatch m = editorUI.getWordMatch();


        if(m!=null) {
            String s = null;
            String searchWord="";
            int c=0;
            do {
                c+=1;
                s = m.getMatchWord(dotPos, false);
                if(s!=null && !ret.contains(s))
                {
                    ret.add(s);
                    if (c==1)
                        searchWord=m.getPreviousWord();

                }

            } while(s!=null && m.isFound());

            if (searchWord==null)
                searchWord="";
            do {
                s = m.getMatchWord(dotPos + searchWord.length() + 2, true);
                if(s!=null && !ret.contains(s))
                    if (!s.equalsIgnoreCase(searchWord) && !ret.contains(s))
                       ret.add(s);

            } while(s!=null && m.isFound());
        }
        return ret;
    }
View Full Code Here

TOP

Related Classes of org.netbeans.editor.WordMatch

Copyright © 2018 www.massapicom. 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.