Package org.openide.cookies

Examples of org.openide.cookies.EditorCookie.open()


            Exceptions.printStackTrace(ex);
        }
        if (dobj != null) {
            EditorCookie ec = (EditorCookie) dobj.getLookup().lookup(EditorCookie.class);
            if (ec != null) {
                ec.open();
                Line.Set lineSet = ec.getLineSet();
                int index = lineNumber-1;
                assert !lineSet.getLines().isEmpty();
                /* Go to last line of file if issue line does not exist */
                if(lineSet.getLines().size() <= index) {
View Full Code Here


        try {
            DataObject dob = DataObject.find(file);
            EditorCookie ed = dob.getLookup().lookup(EditorCookie.class);
            if (ed != null && file == dob.getPrimaryFile()) {
                if (lineNum == -1) {
                    ed.open();
                } else {
                    ed.openDocument();
                    try {
                        Line l = ed.getLineSet().getOriginal(lineNum - 1);
                        if (! l.isDeleted()) {
View Full Code Here

                        if (! l.isDeleted()) {
                            l.show(Line.ShowOpenType.REUSE, Line.ShowVisibilityType.FOCUS);
                        }
                    } catch (IndexOutOfBoundsException ioobe) {
                        // Probably harmless. Bogus line number.
                        ed.open();
                    }
                }
//                attachAllInFile(ed, this);
            } else {
                Toolkit.getDefaultToolkit().beep();
View Full Code Here

        if (fileObject != null && offset >= 0) {
            if (offset == 0) {
                try {
                    DataObject dataObject = DataObject.find(fileObject);
                    EditorCookie ec = dataObject.getLookup().lookup(EditorCookie.class);
                    ec.open();
                } catch (DataObjectNotFoundException ex) {
                    Exceptions.printStackTrace(ex);
                }
            } else {
                UiUtils.open(fileObject, offset);
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.