--- a/core.windows/apichanges.xml +++ a/core.windows/apichanges.xml @@ -107,7 +107,20 @@ - + + + + Added default closing option to do nothing when no option is passed. + + + + + + When younow pass no clossing options when you setClosingOptions(new Object[]{}); the dialogue will not close via the ESC key. + + + + Actions to load or save state of windowsystem --- a/core.windows/manifest.mf +++ a/core.windows/manifest.mf @@ -6,5 +6,5 @@ OpenIDE-Module-Recommends: org.netbeans.core.windows.nativeaccess.NativeWindowSystem AutoUpdate-Show-In-Client: false AutoUpdate-Essential-Module: true -OpenIDE-Module-Specification-Version: 2.27 +OpenIDE-Module-Specification-Version: 2.28 --- a/core.windows/src/org/netbeans/core/windows/services/NbPresenter.java +++ a/core.windows/src/org/netbeans/core/windows/services/NbPresenter.java @@ -124,8 +124,8 @@ * @author Ian Formanek, Jaroslav Tulach */ class NbPresenter extends JDialog -implements PropertyChangeListener, WindowListener, Mutex.Action, Comparator { - + implements PropertyChangeListener, WindowListener, Mutex.Action, Comparator { + /** variable holding current modal dialog in the system */ public static NbPresenter currentModalDialog; private static final ChangeSupport cs = new ChangeSupport(NbPresenter.class); @@ -150,7 +150,7 @@ stdHelpButton.setDefaultCapable(false); stdDetailButton.setDefaultCapable(false); Mnemonics.setLocalizedText (stdHelpButton, NbBundle.getBundle(NbPresenter.class).getString("HELP_OPTION_CAPTION")); // NOI18N - + /** Initilizes accessible contexts */ initAccessibility(); } @@ -181,7 +181,7 @@ private transient boolean haveCalledInitializeButtons = false; static final Logger LOG = Logger.getLogger(NbPresenter.class.getName()); - + static final long serialVersionUID =-4508637164126678997L; /** Creates a new Dialog from specified NotifyDescriptor, @@ -192,7 +192,7 @@ super(owner, d.getTitle(), modal); // modal initialize(d); } - + /** Creates a new Dialog from specified NotifyDescriptor, * with given dialog owner. * @param d The NotifyDescriptor to create the dialog from @@ -201,45 +201,45 @@ super(owner, d.getTitle(), modal); // modal initialize(d); } - + boolean isLeaf () { return leaf; } - + private void initAccessibility(){ - + ResourceBundle bundle; bundle = NbBundle.getBundle(NbPresenter.class); - + stdYesButton.getAccessibleContext().setAccessibleName(bundle.getString("ACS_YES_OPTION_NAME")); // NOI18N stdYesButton.getAccessibleContext().setAccessibleDescription(bundle.getString("ACS_YES_OPTION_DESC")); // NOI18N - + stdNoButton.getAccessibleContext().setAccessibleName(bundle.getString("ACS_NO_OPTION_NAME")); // NOI18N stdNoButton.getAccessibleContext().setAccessibleDescription(bundle.getString("ACS_NO_OPTION_DESC")); // NOI18N - + stdOKButton.getAccessibleContext().setAccessibleName(bundle.getString("ACS_OK_OPTION_NAME")); // NOI18N stdOKButton.getAccessibleContext().setAccessibleDescription(bundle.getString("ACS_OK_OPTION_DESC")); // NOI18N - + stdCancelButton.getAccessibleContext().setAccessibleName(bundle.getString("ACS_CANCEL_OPTION_NAME")); // NOI18N stdCancelButton.getAccessibleContext().setAccessibleDescription(bundle.getString("ACS_CANCEL_OPTION_DESC")); // NOI18N - + stdClosedButton.getAccessibleContext().setAccessibleName(bundle.getString("ACS_CLOSED_OPTION_NAME")); // NOI18N stdClosedButton.getAccessibleContext().setAccessibleDescription(bundle.getString("ACS_CLOSED_OPTION_DESC")); // NOI18N - + stdHelpButton.getAccessibleContext().setAccessibleName(bundle.getString("ACS_HELP_OPTION_NAME")); // NOI18N stdHelpButton.getAccessibleContext().setAccessibleDescription(bundle.getString("ACS_HELP_OPTION_DESC")); // NOI18N - + stdDetailButton.getAccessibleContext().setAccessibleName(bundle.getString("ACS_HELP_OPTION_NAME")); // NOI18N stdDetailButton.getAccessibleContext().setAccessibleDescription(bundle.getString("ACS_HELP_OPTION_DESC")); // NOI18N } - + private void initialize(NotifyDescriptor d) { //Optimization related to jdk bug 4393857 - on pre 1.5 jdk's an //extra repaint is caused by the search for an opaque component up //to the component root. Post 1.5, root pane will automatically be //opaque. getRootPane().setOpaque(true); - + if (d instanceof WizardDescriptor) { // #81938: wizard close button shouln't work during finish progress setDefaultCloseOperation (WindowConstants.DO_NOTHING_ON_CLOSE); @@ -247,13 +247,13 @@ // #55273: Dialogs created by DialogDisplayer are not disposed after close setDefaultCloseOperation (WindowConstants.DISPOSE_ON_CLOSE); } - + descriptor = d; buttonListener = new ButtonListener(); // set leaf by DialogDescriptor, NotifyDescriptor is leaf as default leaf = d instanceof DialogDescriptor ? ((DialogDescriptor)d).isLeaf () : true; - + getRootPane().getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put( KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0), ESCAPE_COMMAND); getRootPane().getActionMap().put(ESCAPE_COMMAND, new EscapeAction()); @@ -273,18 +273,18 @@ * request first. */ private void requestFocusForMessage() { Component comp = currentMessage; - + if(comp == null) { return; } - + if(!(comp instanceof JComponent) || !((JComponent)comp).requestDefaultFocus()) { - + comp.requestFocus(); } } - + private void initializeMessage() { Object newMessage = descriptor.getMessage(); // replace only if old and new messages are different @@ -302,7 +302,7 @@ } Dimension prefSize = currentMessage.getPreferredSize(); final Rectangle screenBounds = Utilities.getUsableScreenBounds(); - + if (prefSize.width > screenBounds.width - 100 || prefSize.height > screenBounds.height- 100 ) { @@ -323,7 +323,7 @@ } else { toAdd = currentMessage; } - + if (! (descriptor instanceof WizardDescriptor) && descriptor.getNotificationLineSupport () != null) { JPanel enlargedToAdd = new JPanel (new BorderLayout ()); enlargedToAdd.add (toAdd, BorderLayout.CENTER); @@ -389,7 +389,7 @@ isJava17 = javaVersion.startsWith("1.7") || javaRuntimeName.startsWith("OpenJDK"); // NOI18N return isJava17; } - + private static final class FixedHeightLabel extends JLabel { private static final int ESTIMATED_HEIGHT = 16; @@ -423,20 +423,20 @@ private void initializePresenter() { if (currentMessage != null) return; - + initializeMessage(); - + updateHelp(); - + initializeButtons(); haveCalledInitializeButtons = true; - + descriptor.addPropertyChangeListener(this); addWindowListener(this); - + initializeClosingOptions (); } - + /** Descriptor can be cached and reused. We need to remove listeners * from descriptor, buttons and disconnect componets from container hierarchy. */ @@ -452,7 +452,7 @@ public void addNotify() { super.addNotify(); initializePresenter(); - + hack.activate(); } @@ -460,7 +460,7 @@ public void removeNotify() { super.removeNotify(); uninitializePresenter(); - + } /** Creates option pane message. @@ -469,7 +469,7 @@ Object msg = descriptor.getMessage(); boolean override = true; String strMsg = null, strMsgLower; - + if (msg instanceof String) { msg = ((String) msg).replace("\t", " "); // NOI18N msg = ((String) msg).replace("\r", ""); // NOI18N @@ -488,13 +488,13 @@ if (override) { // initialize component (override max char count per line in a message) optionPane = new JOptionPane( - msg, - descriptor.getMessageType(), - 0, // options type - null, // icon - new Object[0], // options - null // value - ) { + msg, + descriptor.getMessageType(), + 0, // options type + null, // icon + new Object[0], // options + null // value + ) { @Override public int getMaxCharactersPerLineCount() { return 100; @@ -503,15 +503,15 @@ } else { //Do not override JOptionPane.getMaxCharactersPerLineCount for html text optionPane = new JOptionPane( - msg, - descriptor.getMessageType(), - 0, // options type - null, // icon - new Object[0], // options - null // value - ); + msg, + descriptor.getMessageType(), + 0, // options type + null, // icon + new Object[0], // options + null // value + ); } - + if (UIManager.getLookAndFeel().getClass() == MetalLookAndFeel.class || UIManager.getLookAndFeel().getClass() == BasicLookAndFeel.class) { optionPane.setUI(new javax.swing.plaf.basic.BasicOptionPaneUI() { @@ -571,29 +571,32 @@ modifyListener(currentSecondaryButtons[i], buttonListener, false); } } - + getContentPane().remove(currentButtonsPanel); currentButtonsPanel = null; } } - + private void initializeClosingOptions (boolean init) { Object[] options = getClosingOptions (); - + if (options == null) return ; + if (options.length == 0) { + setDefaultCloseOperation(WindowConstants.DO_NOTHING_ON_CLOSE); + } for (int i = 0; i < options.length; i++) { modifyListener (options[i], buttonListener, init); } } - + private void initializeClosingOptions () { initializeClosingOptions (true); } - + private void uninitializeClosingOptions () { initializeClosingOptions (false); } - + /** * On Aqua look and feel, options should be sorted such that the default * button is always rightmost, and 'yes' options appear to thr right of @@ -607,34 +610,34 @@ } else { result = 0; } - + if (isDefaultButton) { result++; } return result; } - + protected final void initializeButtons() { // ----------------------------------------------------------------------------- // If there were any buttons previously, remove them and removeActionListener from them - + Component focusOwner = KeyboardFocusManager.getCurrentKeyboardFocusManager ().getFocusOwner (); boolean dontShowHelp = Constants.DO_NOT_SHOW_HELP_IN_DIALOGS || ( descriptor instanceof WizardDescriptor && ( Boolean.FALSE.equals (((WizardDescriptor)descriptor).getProperty (WizardDescriptor.PROP_HELP_DISPLAYED)) )); // NOI18N boolean helpButtonShown = stdHelpButton.isShowing() || ( descriptor instanceof WizardDescriptor && !dontShowHelp ); - - + + uninitializeButtons(); - + Object[] primaryOptions = descriptor.getOptions(); Object[] secondaryOptions = descriptor.getAdditionalOptions(); currentAlign = getOptionsAlign(); - + // ----------------------------------------------------------------------------- // Obtain main (primary) and additional (secondary) buttons - + currentPrimaryButtons = null; currentSecondaryButtons = null; @@ -644,7 +647,7 @@ //No mac dialogs with buttons on side currentAlign = DialogDescriptor.BOTTOM_ALIGN; } - + // explicitly provided options (AKA buttons) // JST: The following line causes only problems, // I hope that my change will not cause additional ones ;-) @@ -720,9 +723,9 @@ break; } } - + // Automatically add a help button if needed. - + if (!dontShowHelp && (currentHelp != null || helpButtonShown)) { if (currentPrimaryButtons == null) currentPrimaryButtons = new Component[] { }; Component[] cPB2 = new Component[currentPrimaryButtons.length + 1]; @@ -738,7 +741,7 @@ stdHelpButton.setEnabled(currentHelp != null); } - + if ((secondaryOptions != null) && (secondaryOptions.length != 0)) { currentSecondaryButtons = new Component [secondaryOptions.length]; Arrays.sort (secondaryOptions, this); @@ -766,19 +769,19 @@ } } } - + // ----------------------------------------------------------------------------- // Create panels for main (primary) and additional (secondary) buttons and add to content pane - + if (currentAlign == DialogDescriptor.BOTTOM_ALIGN || currentAlign == -1) { - + JPanel panelForPrimary = null; JPanel panelForSecondary = null; - + if (currentPrimaryButtons != null) { panelForPrimary = new JPanel(); - + if (currentAlign == -1) { panelForPrimary.setLayout(new org.openide.awt.EqualFlowLayout()); } else { @@ -789,7 +792,7 @@ panelForPrimary.add(currentPrimaryButtons[i]); } } - + if (currentSecondaryButtons != null) { panelForSecondary = new JPanel(); panelForSecondary.setLayout(new org.openide.awt.EqualFlowLayout(FlowLayout.LEFT)); @@ -798,7 +801,7 @@ panelForSecondary.add(currentSecondaryButtons[i]); } } - + // both primary and secondary buttons are used if ((panelForPrimary != null) && (panelForSecondary != null)) { currentButtonsPanel = new JPanel(); @@ -810,7 +813,7 @@ } else { currentButtonsPanel = panelForSecondary; } - + // add final button panel to the dialog if ((currentButtonsPanel != null)&&(currentButtonsPanel.getComponentCount() != 0)) { if (currentButtonsPanel.getBorder() == null) { @@ -818,7 +821,7 @@ } getContentPane().add(currentButtonsPanel, BorderLayout.SOUTH); } - + } else if (currentAlign == DialogDescriptor.RIGHT_ALIGN) { currentButtonsPanel = new JPanel(); currentButtonsPanel.setLayout(new GridBagLayout()); @@ -827,21 +830,21 @@ gbc.weightx = 1.0f; gbc.insets = new Insets(5, 4, 2, 5); gbc.fill = GridBagConstraints.HORIZONTAL; - + if (currentPrimaryButtons != null) { for (int i = 0; i < currentPrimaryButtons.length; i++) { modifyListener(currentPrimaryButtons[i], buttonListener, true); // add button listener currentButtonsPanel.add(currentPrimaryButtons[i], gbc); } } - + GridBagConstraints padding = new GridBagConstraints(); padding.gridwidth = GridBagConstraints.REMAINDER; padding.weightx = 1.0f; padding.weighty = 1.0f; padding.fill = GridBagConstraints.BOTH; currentButtonsPanel.add(new JPanel(), padding); - + gbc.insets = new Insets(2, 4, 5, 5); if (currentSecondaryButtons != null) { for (int i = 0; i < currentSecondaryButtons.length; i++) { @@ -849,7 +852,7 @@ currentButtonsPanel.add(currentSecondaryButtons[i], gbc); } } - + // add final button panel to the dialog if (currentButtonsPanel != null) { if (currentButtonsPanel.getBorder() == null) { @@ -857,18 +860,18 @@ } getContentPane().add(currentButtonsPanel, BorderLayout.EAST); } - + } updateDefaultButton(); - - + + Component fo = KeyboardFocusManager.getCurrentKeyboardFocusManager ().getFocusOwner (); - + if (fo != focusOwner && focusOwner != null) { focusOwner.requestFocus(); } } - + /** Checks default button and updates it */ private void updateDefaultButton() { @@ -924,22 +927,22 @@ // no default capable button found getRootPane().setDefaultButton(null); } - + private void updateNotificationLine (int msgType, Object o) { String msg = o == null ? null : o.toString (); if (msg != null && msg.trim().length() > 0) { switch (msgType) { case MSG_TYPE_ERROR: prepareMessage(notificationLine, ImageUtilities.loadImageIcon("org/netbeans/core/windows/resources/error.png", false), - nbErrorForeground); + nbErrorForeground); break; case MSG_TYPE_WARNING: prepareMessage(notificationLine, ImageUtilities.loadImageIcon("org/netbeans/core/windows/resources/warning.png", false), - nbWarningForeground); + nbWarningForeground); break; case MSG_TYPE_INFO: prepareMessage(notificationLine, ImageUtilities.loadImageIcon("org/netbeans/core/windows/resources/info.png", false), - nbInfoForeground); + nbInfoForeground); break; default: } @@ -980,12 +983,12 @@ } } } - + private void modifyListener(Object comp, ButtonListener l, boolean add) { // on JButtons attach simply by method call if (comp instanceof JButton) { JButton b = (JButton)comp; - if (add) { + if (add) { List listeners; listeners = Arrays.asList (b.getActionListeners ()); if (!listeners.contains (l)) { @@ -1030,14 +1033,14 @@ } } } - + /** Shows the dialog, used in method show so no inner class is needed. */ private void superShow() { assert SwingUtilities.isEventDispatchThread () : "Invoked super.show() in AWT event thread."; // NOI18N super.show(); } - + @Override @Deprecated public void show() { //Bugfix #29993: Call show() asynchronously for non modal dialogs. @@ -1055,12 +1058,12 @@ } } } - + public Void run() { doShow(); return null; } - + private void doShow () { NbPresenter prev = null; if (isModal()) { @@ -1068,15 +1071,15 @@ currentModalDialog = this; fireChangeEvent(); } - + superShow(); - + if (currentModalDialog != prev) { currentModalDialog = prev; fireChangeEvent(); } } - + public void propertyChange(final java.beans.PropertyChangeEvent evt) { if( !SwingUtilities.isEventDispatchThread() ) { SwingUtilities.invokeLater(new Runnable() { @@ -1087,7 +1090,7 @@ return; } boolean update = false; - + if (DialogDescriptor.PROP_OPTIONS.equals(evt.getPropertyName())) { initializeButtons(); update = true; @@ -1134,7 +1137,7 @@ // XXX: need set update on true? updateNotificationLine (MSG_TYPE_ERROR, evt.getNewValue ()); } - + if (update) { Dimension sz = getSize(); Dimension prefSize = getPreferredSize(); @@ -1147,7 +1150,7 @@ repaint(); } } - + private void updateHelp() { //System.err.println ("Updating help for NbDialog..."); HelpCtx help = getHelpCtx(); @@ -1159,7 +1162,7 @@ help = HelpCtx.findHelp((Component) msg); } if (HelpCtx.DEFAULT_HELP.equals(help)) help = null; - } + } if (! Utilities.compareObjects(currentHelp, help)) { currentHelp = help; if (help != null && help.getHelpID() != null) { @@ -1168,33 +1171,33 @@ } // Refresh button list if it had already been created. if (haveCalledInitializeButtons) initializeButtons(); + } } - } - + /** Options align. */ protected int getOptionsAlign() { return -1; } - + /** Getter for button listener or null */ protected ActionListener getButtonListener() { return null; } - + /** Closing options. */ protected Object[] getClosingOptions() { return null; } - + /** Updates help. */ protected HelpCtx getHelpCtx() { return null; } - + public void windowDeactivated(final java.awt.event.WindowEvent p1) { } @@ -1214,7 +1217,7 @@ } public void windowActivated(final java.awt.event.WindowEvent p1) { } - + // Used by JavaHelp: public static void addChangeListener(ChangeListener l) { cs.addChangeListener(l); @@ -1229,7 +1232,7 @@ } }); } - + private final class EscapeAction extends AbstractAction { public EscapeAction () { @@ -1241,7 +1244,7 @@ } } - + /** Button listener */ private class ButtonListener implements ActionListener, ComponentListener, PropertyChangeListener { @@ -1249,14 +1252,19 @@ public void actionPerformed(ActionEvent evt) { boolean isAqua = "Aqua".equals (UIManager.getLookAndFeel().getID()) || //NOI18N "true".equalsIgnoreCase (System.getProperty ("xtest.looks_as_mac")); - + Object pressedOption = evt.getSource(); // handle ESCAPE if (ESCAPE_COMMAND.equals (evt.getActionCommand ())) { MenuElement[] selPath = MenuSelectionManager.defaultManager().getSelectedPath(); // part of #130919 fix - handle ESC key well in dialogs with menus if (selPath == null || selPath.length == 0) { - pressedOption = NotifyDescriptor.CLOSED_OPTION; + //check if closingOptions is != null && 0 + if (getClosingOptions() != null && getClosingOptions().length == 0) { + pressedOption = WindowConstants.DO_NOTHING_ON_CLOSE; + } else { + pressedOption = NotifyDescriptor.CLOSED_OPTION; + } } else { MenuSelectionManager.defaultManager().clearSelectedPath(); return ; @@ -1267,12 +1275,12 @@ showHelp(currentHelp); return; } - + Object[] options = descriptor.getOptions(); if (isAqua && options != null) { Arrays.sort (options, NbPresenter.this); } - + if ( options != null && currentPrimaryButtons != null && @@ -1287,12 +1295,12 @@ } } } - + options = descriptor.getAdditionalOptions(); if (isAqua && options != null) { Arrays.sort (options, NbPresenter.this); } - + if ( options != null && currentSecondaryButtons != null && @@ -1304,7 +1312,7 @@ } } } - + if (evt.getSource() == stdYesButton) { pressedOption = NotifyDescriptor.YES_OPTION; } else if (evt.getSource() == stdNoButton) { @@ -1319,10 +1327,10 @@ } descriptor.setValue(pressedOption); - + ActionListener al = getButtonListener(); if (al != null) { - + if (pressedOption == evt.getSource()) { al.actionPerformed(evt); } else { @@ -1331,14 +1339,14 @@ )); } } - + Object[] arr = getClosingOptions(); if (arr == null || pressedOption == NotifyDescriptor.CLOSED_OPTION) { // all options should close dispose(); } else { java.util.List l = java.util.Arrays.asList(arr); - + if (l.contains(pressedOption)) { dispose(); } @@ -1349,21 +1357,21 @@ } public void componentResized(final java.awt.event.ComponentEvent p1) { } - + public void componentHidden(final java.awt.event.ComponentEvent p1) { updateDefaultButton(); } - + public void componentMoved(final java.awt.event.ComponentEvent p1) { } - + public void propertyChange(final java.beans.PropertyChangeEvent p1) { if ("enabled".equals(p1.getPropertyName())) { updateDefaultButton(); } } } - + @Override public javax.accessibility.AccessibleContext getAccessibleContext() { if (accessibleContext == null) { @@ -1371,19 +1379,19 @@ } return accessibleContext; } - + private static String getMessageTypeDescription(int messageType) { switch(messageType) { - case NotifyDescriptor.ERROR_MESSAGE: - return NbBundle.getBundle(NbPresenter.class).getString("ACSD_ErrorMessage"); // NOI18N - case NotifyDescriptor.WARNING_MESSAGE: - return NbBundle.getBundle(NbPresenter.class).getString("ACSD_WarningMessage"); // NOI18N - case NotifyDescriptor.QUESTION_MESSAGE: - return NbBundle.getBundle(NbPresenter.class).getString("ACSD_QuestionMessage"); // NOI18N - case NotifyDescriptor.INFORMATION_MESSAGE: - return NbBundle.getBundle(NbPresenter.class).getString("ACSD_InformationMessage"); // NOI18N - case NotifyDescriptor.PLAIN_MESSAGE: - return NbBundle.getBundle(NbPresenter.class).getString("ACSD_PlainMessage"); // NOI18N + case NotifyDescriptor.ERROR_MESSAGE: + return NbBundle.getBundle(NbPresenter.class).getString("ACSD_ErrorMessage"); // NOI18N + case NotifyDescriptor.WARNING_MESSAGE: + return NbBundle.getBundle(NbPresenter.class).getString("ACSD_WarningMessage"); // NOI18N + case NotifyDescriptor.QUESTION_MESSAGE: + return NbBundle.getBundle(NbPresenter.class).getString("ACSD_QuestionMessage"); // NOI18N + case NotifyDescriptor.INFORMATION_MESSAGE: + return NbBundle.getBundle(NbPresenter.class).getString("ACSD_InformationMessage"); // NOI18N + case NotifyDescriptor.PLAIN_MESSAGE: + return NbBundle.getBundle(NbPresenter.class).getString("ACSD_PlainMessage"); // NOI18N } return ""; // NOI18N } @@ -1396,7 +1404,7 @@ return accessibleName; } else { if (currentMessage instanceof javax.accessibility.Accessible - && currentMessage.getAccessibleContext().getAccessibleName() != null) { + && currentMessage.getAccessibleContext().getAccessibleName() != null) { return currentMessage.getAccessibleContext().getAccessibleName(); } else { return super.getAccessibleName(); @@ -1409,11 +1417,11 @@ return accessibleDescription; } else { if (currentMessage instanceof javax.accessibility.Accessible - && currentMessage.getAccessibleContext().getAccessibleDescription() != null) { + && currentMessage.getAccessibleContext().getAccessibleDescription() != null) { return java.text.MessageFormat.format( - getMessageTypeDescription(descriptor.getMessageType()), + getMessageTypeDescription(descriptor.getMessageType()), new Object[] { - currentMessage.getAccessibleContext().getAccessibleDescription() + currentMessage.getAccessibleContext().getAccessibleDescription() } ); } else { @@ -1422,7 +1430,6 @@ } } } - static Field markers; static Method dequeue; static { @@ -1437,20 +1444,20 @@ } } } - + private final class HackTypeAhead implements Runnable { private RequestProcessor.Task task = RequestProcessor.getDefault().create(this); - + public HackTypeAhead() { } - + public void activate() { if (markers != null) { task.schedule(1000); } } - + public void run() { if (!SwingUtilities.isEventDispatchThread()) { SwingUtilities.invokeLater(this); @@ -1480,8 +1487,8 @@ /** Shows a specified HelpCtx in IDE's help window. * XXX would be better to directly depend on org.netbeans.api.javahelp.Help - * @param helpCtx thehelp to be shown - */ + * @param helpCtx thehelp to be shown + */ private static void showHelp(HelpCtx helpCtx) { // Awkward but should work. try {