This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

View | Details | Raw Unified | Return to bug 56277
Collapse All | Expand All

(-)src/org/openide/text/EditorSupportLineSet.java (-2 / +4 lines)
Lines 13-24 Link Here
13
13
14
package org.openide.text;
14
package org.openide.text;
15
15
16
import org.openide.util.WeakListeners;
17
import java.io.*;
18
import java.util.*;
16
import java.util.*;
19
import javax.swing.event.*;
17
import javax.swing.event.*;
20
import javax.swing.text.StyledDocument;
18
import javax.swing.text.StyledDocument;
21
import javax.swing.text.Position;
19
import javax.swing.text.Position;
20
import org.openide.util.Utilities;
22
21
23
/** Line set for an EditorSupport.
22
/** Line set for an EditorSupport.
24
*
23
*
Lines 78-83 Link Here
78
            CloneableEditorSupport.Pane editor = support.openAt(pos, column);
77
            CloneableEditorSupport.Pane editor = support.openAt(pos, column);
79
78
80
            if (kind == SHOW_GOTO) {
79
            if (kind == SHOW_GOTO) {
80
                editor.getComponent ().requestActive();
81
            } else if (kind == SHOW_TOFRONT ) {
82
                Utilities.toFront( editor.getComponent() );
81
                editor.getComponent ().requestActive();
83
                editor.getComponent ().requestActive();
82
            }
84
            }
83
        }
85
        }
(-)src/org/openide/text/Line.java (+7 lines)
Lines 79-84 Link Here
79
     */
79
     */
80
    public final static int SHOW_GOTO     = 2;
80
    public final static int SHOW_GOTO     = 2;
81
81
82
    /** Same as SHOW_GOTO except that the Window Manager attempts to front the 
83
     * editor window (i.e. make it the top most window).
84
     * @see #show(int) <code>show</code>
85
     * @see java.awt.Window#toFront()
86
     */
87
    public final static int SHOW_TOFRONT     = 3;
88
82
    /** Instance of null implementation of Line.Part */
89
    /** Instance of null implementation of Line.Part */
83
    static final private Line.Part nullPart = new Line.NullPart();
90
    static final private Line.Part nullPart = new Line.NullPart();
84
91
(-)src/org/openide/util/Utilities.java (-6 / +16 lines)
Lines 17-25 Link Here
17
import java.awt.event.KeyEvent;
17
import java.awt.event.KeyEvent;
18
import java.awt.event.ActionListener;
18
import java.awt.event.ActionListener;
19
import java.awt.event.ActionEvent;
19
import java.awt.event.ActionEvent;
20
import java.awt.event.FocusListener;
21
import java.beans.PropertyChangeListener;
22
import java.beans.VetoableChangeListener;
23
import java.util.*;
20
import java.util.*;
24
import java.util.List;
21
import java.util.List;
25
import java.lang.reflect.*;
22
import java.lang.reflect.*;
Lines 35-47 Link Here
35
import javax.swing.Action;
32
import javax.swing.Action;
36
import javax.swing.JMenuItem;
33
import javax.swing.JMenuItem;
37
import javax.swing.KeyStroke;
34
import javax.swing.KeyStroke;
35
import javax.swing.SwingUtilities;
38
import javax.swing.Timer;
36
import javax.swing.Timer;
39
import javax.swing.event.ChangeListener;
40
import javax.swing.event.DocumentListener;
41
37
42
38
43
import org.openide.ErrorManager;
39
import org.openide.ErrorManager;
44
import org.openide.util.ContextAwareAction;
40
45
41
46
/** Otherwise uncategorized useful static methods.
42
/** Otherwise uncategorized useful static methods.
47
*
43
*
Lines 2520-2524 Link Here
2520
            // not a file: URL
2516
            // not a file: URL
2521
            return null;
2517
            return null;
2522
        }
2518
        }
2519
    }
2520
    
2521
    public static void toFront( Component component ) {
2522
        Window parentWindow = SwingUtilities.getWindowAncestor( component );
2523
         // be defensive, although w probably will always be non-null here
2524
         if( null != parentWindow ) {
2525
            if( parentWindow instanceof Frame ) {
2526
                Frame parentFrame = (Frame)parentWindow;
2527
                int state = parentFrame.getExtendedState();
2528
                if( (state & Frame.ICONIFIED) > 0 )
2529
                    parentFrame.setExtendedState( state & ~Frame.ICONIFIED );
2530
            }
2531
            parentWindow.toFront();
2532
        }                
2523
    }
2533
    }
2524
}
2534
}

Return to bug 56277