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

(-)a/core.ui/src/org/netbeans/core/ui/warmup/Bundle.properties (-5 / +6 lines)
Lines 47-55 Link Here
47
47
48
MSG_Refresh=Checking for external changes
48
MSG_Refresh=Checking for external changes
49
MSG_Refresh_Suspend=Suspended
49
MSG_Refresh_Suspend=Suspended
50
MSG_SoDInfo=<html>You seem to have troubles with long refreshes.\n \
50
MSG_SoDInfo=<html>When you switch from another program to the IDE, the IDE scans for \
51
There exist an experimental module <b>Scan On Demand</b> which\n \
51
 changes to your code. You can disable this feature and \
52
disables automatic refreshes all together and replaces them\n \
52
 manually scan your project when you make changes using the Refresh \
53
with manual <em>File/Refresh All</em> action.\n \
53
 action in the contextual menu or Source/Scan for External Changes action in menu \
54
Do you want to download the module now?
54
 <p> \
55
 Disable scanning for external changes?
55
56
(-)a/core.ui/src/org/netbeans/core/ui/warmup/MenuWarmUpTask.java (-16 / +12 lines)
Lines 313-334 Link Here
313
            r.setLoggerName(UILOG.getName());
313
            r.setLoggerName(UILOG.getName());
314
            UILOG.log(r);
314
            UILOG.log(r);
315
315
316
            if (counter >= 3) {
316
            if (counter >= 1) {
317
                FileObject action = FileUtil.getConfigFile("Actions/System/org-netbeans-modules-autoupdate-ui-actions-PluginManagerAction.instance"); // NOI18N
317
                JEditorPane browser = new JEditorPane();
318
                Object obj = action == null ? null : action.getAttribute("instanceCreate"); // NOI18N
318
                browser.setBorder(javax.swing.BorderFactory.createEmptyBorder(8, 8, 0, 8));
319
                if (obj instanceof Action) {
319
                browser.setPreferredSize(new Dimension(300, 150));
320
                    JEditorPane browser = new JEditorPane();
320
                browser.setEditable(false);
321
                    browser.setBorder(javax.swing.BorderFactory.createEmptyBorder(8, 8, 0, 8));
321
                browser.setEditorKit(new HTMLEditorKit()); // needed up to nb5.5
322
                    browser.setPreferredSize(new Dimension(300, 150));
322
                browser.setBackground(new JLabel().getBackground());
323
                    browser.setEditable(false);
323
                browser.setText(NbBundle.getMessage(MenuWarmUpTask.class, "MSG_SoDInfo"));
324
                    browser.setEditorKit(new HTMLEditorKit()); // needed up to nb5.5
324
                Message nd = new Message(browser);
325
                    browser.setBackground(new JLabel().getBackground());
325
                nd.setOptions(new Object[] { Message.YES_OPTION, Message.NO_OPTION });
326
                    browser.setText(NbBundle.getMessage(MenuWarmUpTask.class, "MSG_SoDInfo"));
326
                if (DialogDisplayer.getDefault().notify(nd) == Message.YES_OPTION) {
327
                    Message nd = new Message(browser);
327
                    System.setProperty("netbeans.indexing.noFileRefresh", "true"); // NOI18N
328
                    nd.setOptions(new Object[] { Message.YES_OPTION, Message.NO_OPTION });
329
                    if (DialogDisplayer.getDefault().notify(nd) == Message.YES_OPTION) {
330
                        ((Action)obj).actionPerformed(new ActionEvent(this, 0, ""));
331
                    }
332
                }
328
                }
333
            }
329
            }
334
            return true;
330
            return true;
(-)a/parsing.api/src/org/netbeans/modules/parsing/impl/indexing/ScanForExternalChanges.java (+3 lines)
Lines 42-47 Link Here
42
import java.awt.event.ActionEvent;
42
import java.awt.event.ActionEvent;
43
import javax.swing.AbstractAction;
43
import javax.swing.AbstractAction;
44
import org.netbeans.modules.parsing.api.indexing.IndexingManager;
44
import org.netbeans.modules.parsing.api.indexing.IndexingManager;
45
import org.openide.filesystems.FileUtil;
45
import org.openide.util.NbBundle;
46
import org.openide.util.NbBundle;
46
47
47
/**
48
/**
Lines 54-60 Link Here
54
        super(NbBundle.getMessage(ScanForExternalChanges.class, "ScanForExternalChanges_name")); //NOI18N
55
        super(NbBundle.getMessage(ScanForExternalChanges.class, "ScanForExternalChanges_name")); //NOI18N
55
    }
56
    }
56
57
58
    @Override
57
    public void actionPerformed(ActionEvent e) {
59
    public void actionPerformed(ActionEvent e) {
60
        FileUtil.refreshAll();
58
        RepositoryUpdater.getDefault().refreshAll(false, false, true);
61
        RepositoryUpdater.getDefault().refreshAll(false, false, true);
59
    }
62
    }
60
63
(-)a/parsing.api/src/org/netbeans/modules/parsing/impl/indexing/errors/ErrorAnnotator.java (+11 lines)
Lines 40-45 Link Here
40
 */
40
 */
41
package org.netbeans.modules.parsing.impl.indexing.errors;
41
package org.netbeans.modules.parsing.impl.indexing.errors;
42
42
43
import org.openide.util.actions.SystemAction;
43
import org.netbeans.api.java.classpath.ClassPath;
44
import org.netbeans.api.java.classpath.ClassPath;
44
import java.awt.Image;
45
import java.awt.Image;
45
import java.io.File;
46
import java.io.File;
Lines 65-70 Link Here
65
import org.openide.filesystems.FileStateInvalidException;
66
import org.openide.filesystems.FileStateInvalidException;
66
import org.openide.filesystems.FileStatusEvent;
67
import org.openide.filesystems.FileStatusEvent;
67
import org.openide.filesystems.FileUtil;
68
import org.openide.filesystems.FileUtil;
69
import org.openide.util.Exceptions;
68
import org.openide.util.Lookup;
70
import org.openide.util.Lookup;
69
import org.openide.util.RequestProcessor;
71
import org.openide.util.RequestProcessor;
70
72
Lines 173-179 Link Here
173
        return null;
175
        return null;
174
    }
176
    }
175
177
178
    @Override
176
    public Action[] actions(Set files) {
179
    public Action[] actions(Set files) {
180
        if (Boolean.getBoolean("netbeans.indexing.noFileRefresh")) { // NOI18N
181
            try {
182
                Class<?> refresh = Class.forName("org.openide.actions.FileSystemRefreshAction"); // NOI18N
183
                return new Action[]{SystemAction.get(refresh.asSubclass(SystemAction.class))};
184
            } catch (ClassNotFoundException ex) {
185
                throw new IllegalStateException(ex);
186
            }
187
        }
177
        return null;
188
        return null;
178
    }
189
    }
179
190
(-)a/parsing.api/src/org/netbeans/modules/parsing/impl/layer.xml (-2 / +7 lines)
Lines 40-50 Link Here
40
Version 2 license, then the option applies only if the new code is
40
Version 2 license, then the option applies only if the new code is
41
made subject to such option by the copyright holder.
41
made subject to such option by the copyright holder.
42
-->
42
-->
43
<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.0//EN" "http://www.netbeans.org/dtds/filesystem-1_0.dtd">
43
<!DOCTYPE filesystem PUBLIC "-//NetBeans//DTD Filesystem 1.2//EN" "http://www.netbeans.org/dtds/filesystem-1_2.dtd">
44
<filesystem>
44
<filesystem>
45
    <folder name="Actions">
45
    <folder name="Actions">
46
        <folder name="Source">
46
        <folder name="Source">
47
            <file name="org-netbeans-modules-parsing-impl-indexing-ScanForExternalChanges.instance"/>
47
            <file name="org-netbeans-modules-parsing-impl-indexing-ScanForExternalChanges.instance">
48
                <attr name="instanceCreate" methodvalue="org.openide.awt.Actions.alwaysEnabled"/>
49
                <attr name="delegate" newvalue="org.netbeans.modules.parsing.impl.indexing.ScanForExternalChanges"/>
50
                <attr name="displayName" bundlevalue="org.netbeans.modules.parsing.impl.indexing.Bundle#ScanForExternalChanges_name"/>
51
                <attr name="asynchronous" boolvalue="true"/>
52
            </file>
48
        </folder>
53
        </folder>
49
    </folder>
54
    </folder>
50
    <folder name="Menu">
55
    <folder name="Menu">

Return to bug 184430