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 270396
Collapse All | Expand All

(-)a/dlight.nativeexecution/src/org/netbeans/modules/nativeexecution/pty/IOConnector.java (-4 / +13 lines)
Lines 87-93 Link Here
87
            String tty = PtySupport.getTTY(process);
87
            String tty = PtySupport.getTTY(process);
88
            if (tty != null) {
88
            if (tty != null) {
89
                try {
89
                try {
90
                    IONotifier.addPropertyChangeListener(io, new ResizeListener(process.getExecutionEnvironment(), tty));
90
                    ResizeListener resizeListener = new ResizeListener(io, process.getExecutionEnvironment(), tty);
91
                    IONotifier.addPropertyChangeListener(io, resizeListener);
91
                } catch (CancellationException ex) {
92
                } catch (CancellationException ex) {
92
                    // TODO:CancellationException error processing
93
                    // TODO:CancellationException error processing
93
                } catch (IOException ex) {
94
                } catch (IOException ex) {
Lines 118-124 Link Here
118
119
119
        if (IOResizable.isSupported(io)) {
120
        if (IOResizable.isSupported(io)) {
120
            try {
121
            try {
121
                IONotifier.addPropertyChangeListener(io, new ResizeListener(pty.getEnv(), pty.getSlaveName()));
122
                ResizeListener resizeListener = new ResizeListener(io, pty.getEnv(), pty.getSlaveName());
123
                IONotifier.addPropertyChangeListener(io, resizeListener);
122
            } catch (IOException ex) {
124
            } catch (IOException ex) {
123
                Exceptions.printStackTrace(ex);
125
                Exceptions.printStackTrace(ex);
124
            } catch (CancellationException ex) {
126
            } catch (CancellationException ex) {
Lines 133-144 Link Here
133
135
134
        private final Object lock = new Object();
136
        private final Object lock = new Object();
135
137
138
        private final InputOutput io;
139
136
        private Task task = null;
140
        private Task task = null;
137
        private Dimension cells;
141
        private Dimension cells;
138
        private Dimension pixels;
142
        private Dimension pixels;
139
        private final boolean pxlsAware;
143
        private final boolean pxlsAware;
140
144
141
        ResizeListener(final ExecutionEnvironment env, final String tty) throws IOException, CancellationException {
145
        ResizeListener(InputOutput io, final ExecutionEnvironment env, final String tty) throws IOException, CancellationException {
146
            this.io = io;
147
142
            final HostInfo hinfo = HostInfoUtils.getHostInfo(env);
148
            final HostInfo hinfo = HostInfoUtils.getHostInfo(env);
143
149
144
            if (OSFamily.SUNOS.equals(hinfo.getOSFamily())) {
150
            if (OSFamily.SUNOS.equals(hinfo.getOSFamily())) {
Lines 180-185 Link Here
180
                            : String.format("cols %d rows %d", c.width, c.height); // NOI18N
186
                            : String.format("cols %d rows %d", c.width, c.height); // NOI18N
181
187
182
                    SttySupport.apply(env, tty, cmd);
188
                    SttySupport.apply(env, tty, cmd);
189
190
                    IOTerm.updateScreen(ResizeListener.this.io);
183
                }
191
                }
184
            }, true);
192
            }, true);
185
        }
193
        }
Lines 204-210 Link Here
204
                        this.pixels = new Dimension(newPixels);
212
                        this.pixels = new Dimension(newPixels);
205
                    }
213
                    }
206
214
207
                    task.schedule(0);
215
                    // 1s delay helps us to ignore tons of events when resizing (i.e. continiusly, using mouse).ы
216
                    task.schedule(1000);
208
                }
217
                }
209
            }
218
            }
210
        }
219
        }
(-)a/terminal.nb/nbproject/project.properties (-1 / +1 lines)
Lines 35-39 Link Here
35
# made subject to such option by the copyright holder.
35
# made subject to such option by the copyright holder.
36
#
36
#
37
# Contributor(s):
37
# Contributor(s):
38
javac.source=1.7
38
javac.source=1.8
39
javac.compilerargs=-Xlint -Xlint:-serial
39
javac.compilerargs=-Xlint -Xlint:-serial
(-)a/terminal.nb/src/org/netbeans/modules/terminal/ioprovider/TerminalInputOutput.java (-2 / +11 lines)
Lines 524-531 Link Here
524
                setFocusTaken(true);
524
                setFocusTaken(true);
525
            }
525
            }
526
        }
526
        }
527
     
527
528
        
528
        @Override
529
        protected void updateScreen() {
530
            SwingUtilities.invokeLater(() -> {
531
                Term term = term();
532
533
                if (term != null) {
534
                    term.setRowsColumns(200, 200);
535
                }
536
            });
537
        }
529
    }
538
    }
530
539
531
    private class MyIONotifier extends IONotifier {
540
    private class MyIONotifier extends IONotifier {
(-)a/terminal/src/org/netbeans/modules/terminal/api/IOTerm.java (+10 lines)
Lines 156-161 Link Here
156
        }
156
        }
157
	iot.requestFocus();
157
	iot.requestFocus();
158
    }
158
    }
159
    
160
    public static void updateScreen(InputOutput io) {
161
        IOTerm iot = find(io);
162
        if (iot == null) {
163
            return;
164
        }
165
        iot.updateScreen();
166
    }
159
167
160
    /**
168
    /**
161
     * Connect an I/O stream pair or triple to this Term.
169
     * Connect an I/O stream pair or triple to this Term.
Lines 178-181 Link Here
178
    abstract protected void setReadOnly(boolean isReadOnly);
186
    abstract protected void setReadOnly(boolean isReadOnly);
179
    
187
    
180
    abstract protected void requestFocus();
188
    abstract protected void requestFocus();
189
190
    abstract protected void updateScreen();
181
}
191
}

Return to bug 270396