diff -r b660de30f8bd core.ui/src/org/netbeans/core/ui/warmup/Bundle.properties --- a/core.ui/src/org/netbeans/core/ui/warmup/Bundle.properties Mon Apr 19 11:52:24 2010 +0200 +++ b/core.ui/src/org/netbeans/core/ui/warmup/Bundle.properties Mon Apr 19 12:13:57 2010 +0200 @@ -47,9 +47,10 @@ MSG_Refresh=Checking for external changes MSG_Refresh_Suspend=Suspended -MSG_SoDInfo=You seem to have troubles with long refreshes.\n \ -There exist an experimental module Scan On Demand which\n \ -disables automatic refreshes all together and replaces them\n \ -with manual File/Refresh All action.\n \ -Do you want to download the module now? +MSG_SoDInfo=When you switch from another program to the IDE, the IDE scans for \ + changes to your code. You can disable this feature and \ + manually scan your project when you make changes using the Refresh \ + action in the contextual menu or Source/Scan for External Changes action in menu \ +

\ + Disable scanning for external changes? diff -r b660de30f8bd core.ui/src/org/netbeans/core/ui/warmup/MenuWarmUpTask.java --- a/core.ui/src/org/netbeans/core/ui/warmup/MenuWarmUpTask.java Mon Apr 19 11:52:24 2010 +0200 +++ b/core.ui/src/org/netbeans/core/ui/warmup/MenuWarmUpTask.java Mon Apr 19 12:13:57 2010 +0200 @@ -313,22 +313,18 @@ r.setLoggerName(UILOG.getName()); UILOG.log(r); - if (counter >= 3) { - FileObject action = FileUtil.getConfigFile("Actions/System/org-netbeans-modules-autoupdate-ui-actions-PluginManagerAction.instance"); // NOI18N - Object obj = action == null ? null : action.getAttribute("instanceCreate"); // NOI18N - if (obj instanceof Action) { - JEditorPane browser = new JEditorPane(); - browser.setBorder(javax.swing.BorderFactory.createEmptyBorder(8, 8, 0, 8)); - browser.setPreferredSize(new Dimension(300, 150)); - browser.setEditable(false); - browser.setEditorKit(new HTMLEditorKit()); // needed up to nb5.5 - browser.setBackground(new JLabel().getBackground()); - browser.setText(NbBundle.getMessage(MenuWarmUpTask.class, "MSG_SoDInfo")); - Message nd = new Message(browser); - nd.setOptions(new Object[] { Message.YES_OPTION, Message.NO_OPTION }); - if (DialogDisplayer.getDefault().notify(nd) == Message.YES_OPTION) { - ((Action)obj).actionPerformed(new ActionEvent(this, 0, "")); - } + if (counter >= 1) { + JEditorPane browser = new JEditorPane(); + browser.setBorder(javax.swing.BorderFactory.createEmptyBorder(8, 8, 0, 8)); + browser.setPreferredSize(new Dimension(300, 150)); + browser.setEditable(false); + browser.setEditorKit(new HTMLEditorKit()); // needed up to nb5.5 + browser.setBackground(new JLabel().getBackground()); + browser.setText(NbBundle.getMessage(MenuWarmUpTask.class, "MSG_SoDInfo")); + Message nd = new Message(browser); + nd.setOptions(new Object[] { Message.YES_OPTION, Message.NO_OPTION }); + if (DialogDisplayer.getDefault().notify(nd) == Message.YES_OPTION) { + System.setProperty("netbeans.indexing.noFileRefresh", "true"); // NOI18N } } return true; diff -r b660de30f8bd parsing.api/src/org/netbeans/modules/parsing/impl/indexing/ScanForExternalChanges.java --- a/parsing.api/src/org/netbeans/modules/parsing/impl/indexing/ScanForExternalChanges.java Mon Apr 19 11:52:24 2010 +0200 +++ b/parsing.api/src/org/netbeans/modules/parsing/impl/indexing/ScanForExternalChanges.java Mon Apr 19 12:13:57 2010 +0200 @@ -42,6 +42,7 @@ import java.awt.event.ActionEvent; import javax.swing.AbstractAction; import org.netbeans.modules.parsing.api.indexing.IndexingManager; +import org.openide.filesystems.FileUtil; import org.openide.util.NbBundle; /** @@ -54,7 +55,9 @@ super(NbBundle.getMessage(ScanForExternalChanges.class, "ScanForExternalChanges_name")); //NOI18N } + @Override public void actionPerformed(ActionEvent e) { + FileUtil.refreshAll(); RepositoryUpdater.getDefault().refreshAll(false, false, true); } diff -r b660de30f8bd parsing.api/src/org/netbeans/modules/parsing/impl/indexing/errors/ErrorAnnotator.java --- a/parsing.api/src/org/netbeans/modules/parsing/impl/indexing/errors/ErrorAnnotator.java Mon Apr 19 11:52:24 2010 +0200 +++ b/parsing.api/src/org/netbeans/modules/parsing/impl/indexing/errors/ErrorAnnotator.java Mon Apr 19 12:13:57 2010 +0200 @@ -40,6 +40,7 @@ */ package org.netbeans.modules.parsing.impl.indexing.errors; +import org.openide.util.actions.SystemAction; import org.netbeans.api.java.classpath.ClassPath; import java.awt.Image; import java.io.File; @@ -65,6 +66,7 @@ import org.openide.filesystems.FileStateInvalidException; import org.openide.filesystems.FileStatusEvent; import org.openide.filesystems.FileUtil; +import org.openide.util.Exceptions; import org.openide.util.Lookup; import org.openide.util.RequestProcessor; @@ -173,7 +175,16 @@ return null; } + @Override public Action[] actions(Set files) { + if (Boolean.getBoolean("netbeans.indexing.noFileRefresh")) { // NOI18N + try { + Class refresh = Class.forName("org.openide.actions.FileSystemRefreshAction"); // NOI18N + return new Action[]{SystemAction.get(refresh.asSubclass(SystemAction.class))}; + } catch (ClassNotFoundException ex) { + throw new IllegalStateException(ex); + } + } return null; } diff -r b660de30f8bd parsing.api/src/org/netbeans/modules/parsing/impl/layer.xml --- a/parsing.api/src/org/netbeans/modules/parsing/impl/layer.xml Mon Apr 19 11:52:24 2010 +0200 +++ b/parsing.api/src/org/netbeans/modules/parsing/impl/layer.xml Mon Apr 19 12:13:57 2010 +0200 @@ -40,11 +40,16 @@ Version 2 license, then the option applies only if the new code is made subject to such option by the copyright holder. --> - + - + + + + + +