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

(-)core/startup/src/org/netbeans/core/startup/Bundle.properties (+2 lines)
Lines 132-137 Link Here
132
MSG_problem_package_not_loaded_or_old=The package {0} was not loaded or was an outdated version.
132
MSG_problem_package_not_loaded_or_old=The package {0} was not loaded or was an outdated version.
133
MSG_warning=Warning
133
MSG_warning=Warning
134
MSG_info=Information
134
MSG_info=Information
135
MSG_continue=Continue
136
MSG_exit=Exit
135
137
136
# NbEvents
138
# NbEvents
137
MSG_start_load_boot_modules=Loading core...
139
MSG_start_load_boot_modules=Loading core...
(-)core/startup/src/org/netbeans/core/startup/Main.java (-1 / +1 lines)
Lines 407-413 Link Here
407
  
407
  
408
    /** Return splash screen.
408
    /** Return splash screen.
409
    */
409
    */
410
    protected Splash.SplashOutput getSplash() {
410
    final static Splash.SplashOutput getSplash() {
411
        return splash;
411
        return splash;
412
    }
412
    }
413
  
413
  
(-)core/startup/src/org/netbeans/core/startup/NbEvents.java (-2 / +45 lines)
Lines 15-24 Link Here
15
15
16
// May use core, GUI, ad nauseum.
16
// May use core, GUI, ad nauseum.
17
17
18
import java.awt.Component;
18
import java.io.File;
19
import java.io.File;
19
import java.text.Collator;
20
import java.text.Collator;
20
import java.util.*;
21
import java.util.*;
21
import javax.swing.JOptionPane;
22
import javax.swing.JOptionPane;
23
import org.netbeans.core.startup.Splash.SplashOutput;
22
import org.openide.ErrorManager;
24
import org.openide.ErrorManager;
23
import org.openide.filesystems.FileObject;
25
import org.openide.filesystems.FileObject;
24
import org.openide.modules.SpecificationVersion;
26
import org.openide.modules.SpecificationVersion;
Lines 268-286 Link Here
268
        }
270
        }
269
    }
271
    }
270
    private static final class Notifier implements Runnable {
272
    private static final class Notifier implements Runnable {
273
        private static int questions;
274
        
271
        private boolean warn;
275
        private boolean warn;
272
        private String text;
276
        private String text;
273
        private static RequestProcessor RP = new RequestProcessor("Notify About Module System"); // NOI18N
277
        private static RequestProcessor RP = new RequestProcessor("Notify About Module System"); // NOI18N
278
        private volatile boolean shown;
279
        private Object[] options;
280
        private Object value;
274
        
281
        
275
        public Notifier(String text, boolean type) {
282
        public Notifier(String text, boolean type) {
276
            this.warn = type;
283
            this.warn = type;
277
            this.text = text;
284
            this.text = text;
278
            RP.post(this, 0, Thread.MIN_PRIORITY);
285
            //this.options = options;
286
            RequestProcessor.Task t = RP.post(this, 0, Thread.MIN_PRIORITY);
287
            
288
            if (questions++ == 0) {
289
                this.options = new String[] {
290
                    NbBundle.getMessage(Notifier.class, "MSG_continue"),
291
                    NbBundle.getMessage(Notifier.class, "MSG_exit"),
292
                };
293
            }
294
            
295
            if (options != null) {
296
                try {
297
                    t.waitFinished(10000);
298
                } catch (InterruptedException ex) {
299
                    // ok, this is not a problem
300
                }
301
                if (shown) {
302
                    t.waitFinished();
303
                }
304
            }
305
        }
306
        
307
        public Object getOption() {
308
            return value;
279
        }
309
        }
280
        public void run() {
310
        public void run() {
311
            shown = true;
312
            
281
            int type = warn ? JOptionPane.WARNING_MESSAGE : JOptionPane.INFORMATION_MESSAGE;
313
            int type = warn ? JOptionPane.WARNING_MESSAGE : JOptionPane.INFORMATION_MESSAGE;
282
            String msg = NbBundle.getMessage(Notifier.class, warn ? "MSG_warning" : "MSG_info"); // NOI18N
314
            String msg = NbBundle.getMessage(Notifier.class, warn ? "MSG_warning" : "MSG_info"); // NOI18N
283
            JOptionPane.showMessageDialog(null, text, msg, type);
315
316
            Splash.SplashOutput out = org.netbeans.core.startup.Main.getSplash();
317
            Component c = out == null ? null : out.getComponent();
318
            
319
            if (options == null) {
320
                JOptionPane.showMessageDialog(null, text, msg, type);
321
            } else {
322
                int ret = JOptionPane.showOptionDialog(c, text, msg, 0, type, null, options, options[0]);
323
                if (ret == 1) {
324
                    TopSecurityManager.exit(1);
325
                }
326
            }
284
        }
327
        }
285
    }
328
    }
286
329
(-)core/startup/src/org/netbeans/core/startup/Splash.java (+11 lines)
Lines 15-20 Link Here
15
15
16
import java.awt.BorderLayout;
16
import java.awt.BorderLayout;
17
import java.awt.Color;
17
import java.awt.Color;
18
import java.awt.Component;
18
import java.awt.Dimension;
19
import java.awt.Dimension;
19
import java.awt.EventQueue;
20
import java.awt.EventQueue;
20
import java.awt.Font;
21
import java.awt.Font;
Lines 105-110 Link Here
105
        public void addAndSetMaxSteps(int steps);
106
        public void addAndSetMaxSteps(int steps);
106
        
107
        
107
        public void increment(int steps);
108
        public void increment(int steps);
109
        
110
        public Component getComponent();
108
    }
111
    }
109
112
110
    /** This interface is used only internally in this class.
113
    /** This interface is used only internally in this class.
Lines 525-530 Link Here
525
        public void addAndSetMaxSteps(int steps) {
532
        public void addAndSetMaxSteps(int steps) {
526
            splashComponent.addAndSetMaxSteps(steps);
533
            splashComponent.addAndSetMaxSteps(steps);
527
        }
534
        }
535
536
        public Component getComponent() {
537
            return this;
538
        }
528
        
539
        
529
    }
540
    }
530
541
Lines 595-600 Link Here
595
        }
606
        }
596
        
607
        
597
        public void addAndSetMaxSteps(int steps) {
608
        public void addAndSetMaxSteps(int steps) {
609
        }
610
611
        public Component getComponent() {
612
            return this;
598
        }
613
        }
599
        
614
        
600
    }
615
    }

Return to bug 66960