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

(-)a/autoupdate.pluginimporter/manifest.mf (-1 lines)
Lines 1-7 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
AutoUpdate-Show-In-Client: false
2
AutoUpdate-Show-In-Client: false
3
OpenIDE-Module: org.netbeans.modules.autoupdate.pluginimporter
3
OpenIDE-Module: org.netbeans.modules.autoupdate.pluginimporter
4
OpenIDE-Module-Install: org/netbeans/modules/autoupdate/pluginimporter/Installer.class
5
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/autoupdate/pluginimporter/Bundle.properties
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/autoupdate/pluginimporter/Bundle.properties
6
OpenIDE-Module-Specification-Version: 1.4
5
OpenIDE-Module-Specification-Version: 1.4
7
6
(-)a/autoupdate.pluginimporter/src/org/netbeans/modules/autoupdate/pluginimporter/Installer.java (-12 / +5 lines)
Lines 54-69 Link Here
54
import org.netbeans.api.autoupdate.UpdateUnit;
54
import org.netbeans.api.autoupdate.UpdateUnit;
55
import org.netbeans.api.autoupdate.UpdateUnitProvider;
55
import org.netbeans.api.autoupdate.UpdateUnitProvider;
56
import org.netbeans.api.autoupdate.UpdateUnitProviderFactory;
56
import org.netbeans.api.autoupdate.UpdateUnitProviderFactory;
57
import org.openide.modules.ModuleInstall;
58
import org.openide.util.NbPreferences;
57
import org.openide.util.NbPreferences;
59
import org.openide.util.RequestProcessor;
58
import org.openide.util.RequestProcessor;
60
import org.openide.windows.WindowManager;
59
import org.openide.windows.OnShowing;
61
60
62
/**
61
/**
63
 * Manages a module's lifecycle. Remember that an installer is optional and
62
 * Manages a module's lifecycle. Remember that an installer is optional and
64
 * often not needed at all.
63
 * often not needed at all.
65
 */
64
 */
66
public class Installer extends ModuleInstall {
65
@OnShowing
66
public class Installer implements Runnable {
67
67
68
    public static final String KEY_IMPORT_FROM = "import-from";
68
    public static final String KEY_IMPORT_FROM = "import-from";
69
    public static final String CODE_NAME = "ClusterUpdateProvider";
69
    public static final String CODE_NAME = "ClusterUpdateProvider";
Lines 78-84 Link Here
78
    private static final String IMPORTED = "imported"; // NOI18N
78
    private static final String IMPORTED = "imported"; // NOI18N
79
79
80
    @Override
80
    @Override
81
    public void restored () {
81
    public void run() {
82
        // don't try to invoke at all in these special cases
82
        // don't try to invoke at all in these special cases
83
        if (Boolean.getBoolean("netbeans.full.hack") || Boolean.getBoolean("netbeans.close")) { // NOI18N
83
        if (Boolean.getBoolean("netbeans.full.hack") || Boolean.getBoolean("netbeans.close")) { // NOI18N
84
            return;
84
            return;
Lines 88-101 Link Here
88
        Preferences au_pref = NbPreferences.root ().node ("/org/netbeans/modules/autoupdate"); // NOI18N
88
        Preferences au_pref = NbPreferences.root ().node ("/org/netbeans/modules/autoupdate"); // NOI18N
89
        au_pref.node (Installer.CODE_NAME + Installer.REMOVED).putBoolean (Installer.REMOVED, true);
89
        au_pref.node (Installer.CODE_NAME + Installer.REMOVED).putBoolean (Installer.REMOVED, true);
90
90
91
        // install plugin importer when UI is ready (main window shown)
91
        RequestProcessor.getDefault ().post (doCheck, getImportDelay ()); // XXX: Need to wait until UC downloaded&parsed
92
        WindowManager.getDefault ().invokeWhenUIReady (new Runnable () {
93
94
            @Override
95
            public void run () {
96
                RequestProcessor.getDefault ().post (doCheck, getImportDelay ()); // XXX: Need to wait until UC downloaded&parsed
97
            }
98
        });
99
    }
92
    }
100
93
101
    private Runnable doCheck = new Runnable () {
94
    private Runnable doCheck = new Runnable () {
(-)a/autoupdate.ui/manifest.mf (-1 lines)
Lines 1-6 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.autoupdate.ui
2
OpenIDE-Module: org.netbeans.modules.autoupdate.ui
3
OpenIDE-Module-Install: org/netbeans/modules/autoupdate/ui/actions/Installer.class
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/autoupdate/ui/resources/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/autoupdate/ui/resources/Bundle.properties
5
OpenIDE-Module-Specification-Version: 1.26
4
OpenIDE-Module-Specification-Version: 1.26
6
AutoUpdate-Show-In-Client: false
5
AutoUpdate-Show-In-Client: false
(-)a/autoupdate.ui/src/org/netbeans/modules/autoupdate/ui/actions/Installer.java (-4 / +4 lines)
Lines 44-61 Link Here
44
44
45
package org.netbeans.modules.autoupdate.ui.actions;
45
package org.netbeans.modules.autoupdate.ui.actions;
46
46
47
import org.openide.modules.ModuleInstall;
47
import org.openide.modules.OnStart;
48
import org.openide.util.RequestProcessor;
48
import org.openide.util.RequestProcessor;
49
49
50
/**
50
/**
51
 * Manages a module's lifecycle. Remember that an installer is optional and
51
 * Manages a module's lifecycle. Remember that an installer is optional and
52
 * often not needed at all.
52
 * often not needed at all.
53
 */
53
 */
54
public class Installer extends ModuleInstall {
54
@OnStart
55
public class Installer implements Runnable {
55
    public static final RequestProcessor RP = new RequestProcessor("AutoUpdate-UI"); // NOI18N
56
    public static final RequestProcessor RP = new RequestProcessor("AutoUpdate-UI"); // NOI18N
56
    
57
    @Override
57
    @Override
58
    public void restored () {
58
    public void run() {
59
        // don't try to invoke at all in these special cases
59
        // don't try to invoke at all in these special cases
60
        if (Boolean.getBoolean("netbeans.full.hack") || Boolean.getBoolean("netbeans.close")) { // NOI18N
60
        if (Boolean.getBoolean("netbeans.full.hack") || Boolean.getBoolean("netbeans.close")) { // NOI18N
61
            return;
61
            return;
(-)a/core.startup/src/org/netbeans/core/startup/ModuleSystem.java (-1 / +2 lines)
Lines 297-303 Link Here
297
        } finally {
297
        } finally {
298
            mgr.mutexPrivileged().exitWriteAccess();
298
            mgr.mutexPrivileged().exitWriteAccess();
299
        }
299
        }
300
	ev.log(Events.PERF_END, "ModuleSystem.restore"); // NOI18N	
300
        ev.log(Events.PERF_END, "ModuleSystem.restore"); // NOI18N	
301
        installer.waitOnStart();
301
    }
302
    }
302
    
303
    
303
    /** Shut down the system: ask modules to shut down.
304
    /** Shut down the system: ask modules to shut down.
(-)a/core.startup/src/org/netbeans/core/startup/NbInstaller.java (-1 / +54 lines)
Lines 65-70 Link Here
65
import java.util.StringTokenizer;
65
import java.util.StringTokenizer;
66
import java.util.TreeMap;
66
import java.util.TreeMap;
67
import java.util.TreeSet;
67
import java.util.TreeSet;
68
import java.util.concurrent.Callable;
68
import java.util.jar.Attributes;
69
import java.util.jar.Attributes;
69
import java.util.jar.JarEntry;
70
import java.util.jar.JarEntry;
70
import java.util.jar.JarFile;
71
import java.util.jar.JarFile;
Lines 83-94 Link Here
83
import org.openide.modules.Dependency;
84
import org.openide.modules.Dependency;
84
import org.openide.modules.ModuleInfo;
85
import org.openide.modules.ModuleInfo;
85
import org.openide.modules.ModuleInstall;
86
import org.openide.modules.ModuleInstall;
87
import org.openide.modules.Modules;
86
import org.openide.modules.SpecificationVersion;
88
import org.openide.modules.SpecificationVersion;
89
import org.openide.util.Lookup;
87
import org.openide.util.NbCollections;
90
import org.openide.util.NbCollections;
88
import org.openide.util.SharedClassObject;
91
import org.openide.util.SharedClassObject;
89
import org.openide.util.NbBundle;
92
import org.openide.util.NbBundle;
93
import org.openide.util.RequestProcessor;
94
import org.openide.util.RequestProcessor.Task;
90
import org.openide.util.Utilities;
95
import org.openide.util.Utilities;
91
import org.openide.util.lookup.InstanceContent;
96
import org.openide.util.lookup.InstanceContent;
97
import org.openide.util.lookup.Lookups;
92
import org.xml.sax.SAXException;
98
import org.xml.sax.SAXException;
93
99
94
/** Concrete implementation of the module installation functionality.
100
/** Concrete implementation of the module installation functionality.
Lines 318-327 Link Here
318
        }
324
        }
319
    }
325
    }
320
326
327
    private static final RequestProcessor onStartStop = new RequestProcessor("On Start/Stop", 8); // NOI18N
328
    private final Map<String,Task> onStart = new HashMap<String, Task>();
321
    @Override
329
    @Override
322
    protected void classLoaderUp(ClassLoader cl) {
330
    protected void classLoaderUp(ClassLoader cl) {
323
        MainLookup.systemClassLoaderChanged(cl);
331
        MainLookup.systemClassLoaderChanged(cl);
324
        ev.log(Events.PERF_TICK, "META-INF/services/ additions registered"); // NOI18N
332
        ev.log(Events.PERF_TICK, "META-INF/services/ additions registered"); // NOI18N
333
334
        for (Lookup.Item<Runnable> item : Lookups.forPath("Modules/Start").lookupResult(Runnable.class).allItems()) {
335
            synchronized (onStart) {
336
                Task already = onStart.get(item.getId());
337
                if (already == null) {
338
                    Runnable r = item.getInstance();
339
                    if (r != null) {
340
                        onStart.put(item.getId(), onStartStop.post(r));
341
                    }
342
                }
343
            }
344
        }
345
    }
346
347
    final void waitOnStart() {
348
        Task[] all;
349
        synchronized (onStart) {
350
            all = onStart.values().toArray(new Task[0]);
351
        }
352
        for (Task t : all) {
353
            t.waitFinished();
354
        }
325
    }
355
    }
326
    
356
    
327
    @Override
357
    @Override
Lines 651-657 Link Here
651
        
681
        
652
    public boolean closing(List<Module> modules) {
682
    public boolean closing(List<Module> modules) {
653
        Util.err.fine("closing: " + modules);
683
        Util.err.fine("closing: " + modules);
654
	for (Module m: modules) {
684
        for (Module m: modules) {
655
            Class<? extends ModuleInstall> instClazz = installs.get(m);
685
            Class<? extends ModuleInstall> instClazz = installs.get(m);
656
            if (instClazz != null) {
686
            if (instClazz != null) {
657
                try {
687
                try {
Lines 668-673 Link Here
668
                }
698
                }
669
            }
699
            }
670
        }
700
        }
701
        for (Callable<?> c : Lookups.forPath("Modules/Stop").lookupAll(Callable.class)) { // NOI18N
702
            if (!modules.contains(Modules.getDefault().ownerOf(c.getClass()))) {
703
                continue;
704
            }
705
            try {
706
                if (Boolean.TRUE.equals(c.call())) {
707
                    Util.err.log(Level.FINE, "{0} refused to close", c.getClass()); // NOI18N
708
                }
709
            } catch (Exception ex) {
710
                Util.err.log(Level.FINE, c.getClass() + " thrown an exception", ex); // NOI18N
711
                return false;
712
            }
713
        }
671
        return true;
714
        return true;
672
    }
715
    }
673
    
716
    
Lines 675-680 Link Here
675
        Util.err.fine("close: " + modules);
718
        Util.err.fine("close: " + modules);
676
        ev.log(Events.CLOSE);
719
        ev.log(Events.CLOSE);
677
        moduleList.shutDown();
720
        moduleList.shutDown();
721
        List<Task> waitFor = new ArrayList<Task>();
722
        for (Runnable r : Lookups.forPath("Modules/Stop").lookupAll(Runnable.class)) { // NOI18N
723
            if (!modules.contains(Modules.getDefault().ownerOf(r.getClass()))) {
724
                continue;
725
            }
726
            waitFor.add(onStartStop.post(r));
727
        }
678
        // [PENDING] this may need to write out changed ModuleInstall externalized
728
        // [PENDING] this may need to write out changed ModuleInstall externalized
679
        // forms...is that really necessary to do here, or isn't it enough to
729
        // forms...is that really necessary to do here, or isn't it enough to
680
        // do right after loading etc.? Currently these are only written when
730
        // do right after loading etc.? Currently these are only written when
Lines 695-700 Link Here
695
                }
745
                }
696
            }
746
            }
697
        }
747
        }
748
        for (Task t : waitFor) {
749
            t.waitFinished();
750
        }
698
    }
751
    }
699
752
700
    private static String cacheCnb;
753
    private static String cacheCnb;
(-)a/core.windows/src/org/netbeans/core/windows/WindowManagerImpl.java (+8 lines)
Lines 59-64 Link Here
59
import org.netbeans.core.windows.view.ui.MainWindow;
59
import org.netbeans.core.windows.view.ui.MainWindow;
60
import org.openide.nodes.Node;
60
import org.openide.nodes.Node;
61
import org.openide.util.*;
61
import org.openide.util.*;
62
import org.openide.util.lookup.Lookups;
62
import org.openide.windows.*;
63
import org.openide.windows.*;
63
64
64
/**
65
/**
Lines 1455-1460 Link Here
1455
    private static final class Exclusive implements Runnable, ActionListener {
1456
    private static final class Exclusive implements Runnable, ActionListener {
1456
        /** lists of runnables to run */
1457
        /** lists of runnables to run */
1457
        private ArrayList<Runnable> arr = new ArrayList<Runnable>();
1458
        private ArrayList<Runnable> arr = new ArrayList<Runnable>();
1459
        private boolean subsequent;
1458
1460
1459
        /** Registers given runnable and ensures that it is run when UI 
1461
        /** Registers given runnable and ensures that it is run when UI 
1460
         * of the system is ready.
1462
         * of the system is ready.
Lines 1469-1474 Link Here
1469
            if (!WindowManagerImpl.getInstance().isVisible()) {
1471
            if (!WindowManagerImpl.getInstance().isVisible()) {
1470
                return;
1472
                return;
1471
            }
1473
            }
1474
            if (!subsequent) {
1475
                subsequent = true;
1476
                for (Runnable r : Lookups.forPath("Modules/UIReady").lookupAll(Runnable.class)) { // NOI18N
1477
                    SwingUtilities.invokeLater(r);
1478
                }
1479
            }
1472
            
1480
            
1473
            synchronized (this) {
1481
            synchronized (this) {
1474
                if (arr.isEmpty()) {
1482
                if (arr.isEmpty()) {
(-)a/db/manifest.mf (-1 lines)
Lines 1-6 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.db/1
2
OpenIDE-Module: org.netbeans.modules.db/1
3
OpenIDE-Module-Install: org/netbeans/modules/db/DatabaseModule.class
4
OpenIDE-Module-Implementation-Version: 30
3
OpenIDE-Module-Implementation-Version: 30
5
OpenIDE-Module-Layer: org/netbeans/modules/db/resources/mf-layer.xml
4
OpenIDE-Module-Layer: org/netbeans/modules/db/resources/mf-layer.xml
6
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/db/resources/Bundle.properties
5
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/db/resources/Bundle.properties
(-)a/db/src/org/netbeans/modules/db/DatabaseModule.java (-3 / +4 lines)
Lines 51-59 Link Here
51
import org.netbeans.modules.db.explorer.DatabaseConnection;
51
import org.netbeans.modules.db.explorer.DatabaseConnection;
52
import org.netbeans.modules.db.runtime.DatabaseRuntimeManager;
52
import org.netbeans.modules.db.runtime.DatabaseRuntimeManager;
53
import org.netbeans.spi.db.explorer.DatabaseRuntime;
53
import org.netbeans.spi.db.explorer.DatabaseRuntime;
54
import org.openide.modules.ModuleInstall;
54
import org.openide.modules.OnStop;
55
55
56
public class DatabaseModule extends ModuleInstall {
56
@OnStop
57
public class DatabaseModule implements Runnable {
57
58
58
    public static final String IDENTIFIER_MYSQL = "MySQL"; // NOI18N
59
    public static final String IDENTIFIER_MYSQL = "MySQL"; // NOI18N
59
    public static final String IDENTIFIER_ORACLE = "Oracle"; // NOI18N
60
    public static final String IDENTIFIER_ORACLE = "Oracle"; // NOI18N
Lines 61-67 Link Here
61
    public static final String IDENTIFIER_ORACLE_OCI_DRIVER = "OCI"; // NOI18N
62
    public static final String IDENTIFIER_ORACLE_OCI_DRIVER = "OCI"; // NOI18N
62
    
63
    
63
    @Override
64
    @Override
64
    public void close () {
65
    public void run() {
65
        // XXX this method is called in the event thread and could take long
66
        // XXX this method is called in the event thread and could take long
66
        // to execute
67
        // to execute
67
68
(-)a/editor.completion/manifest.mf (-1 lines)
Lines 1-7 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.editor.completion/1
2
OpenIDE-Module: org.netbeans.modules.editor.completion/1
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/editor/completion/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/editor/completion/Bundle.properties
4
OpenIDE-Module-Install: org/netbeans/modules/editor/completion/CompletionModule.class
5
OpenIDE-Module-Layer: org/netbeans/modules/editor/completion/resources/layer.xml
4
OpenIDE-Module-Layer: org/netbeans/modules/editor/completion/resources/layer.xml
6
OpenIDE-Module-Implementation-Version: 1
5
OpenIDE-Module-Implementation-Version: 1
7
AutoUpdate-Show-In-Client: false
6
AutoUpdate-Show-In-Client: false
(-)a/editor.completion/src/org/netbeans/modules/editor/completion/CompletionModule.java (-4 / +5 lines)
Lines 44-58 Link Here
44
44
45
package org.netbeans.modules.editor.completion;
45
package org.netbeans.modules.editor.completion;
46
46
47
import org.openide.modules.ModuleInstall;
47
import org.openide.modules.OnStart;
48
48
49
/**
49
/**
50
 *
50
 *
51
 * @author Dusan Balek
51
 * @author Dusan Balek
52
 */
52
 */
53
public class CompletionModule extends ModuleInstall {
53
@OnStart
54
54
public class CompletionModule implements Runnable {
55
    public void restored() {
55
    @Override
56
    public void run() {
56
        CompletionImpl.get();
57
        CompletionImpl.get();
57
    }
58
    }
58
}
59
}
(-)a/form.j2ee/manifest.mf (-1 lines)
Lines 1-6 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.form.j2ee/0
2
OpenIDE-Module: org.netbeans.modules.form.j2ee/0
3
OpenIDE-Module-Install: org/netbeans/modules/form/j2ee/Installer.class
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/form/j2ee/Bundle2.properties
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/form/j2ee/Bundle2.properties
5
OpenIDE-Module-Layer: org/netbeans/modules/form/j2ee/resources/layer.xml
4
OpenIDE-Module-Layer: org/netbeans/modules/form/j2ee/resources/layer.xml
6
OpenIDE-Module-Implementation-Version: 1
5
OpenIDE-Module-Implementation-Version: 1
(-)a/form.j2ee/src/org/netbeans/modules/form/j2ee/Installer.java (-3 / +4 lines)
Lines 45-64 Link Here
45
45
46
import org.netbeans.modules.form.CreationDescriptor;
46
import org.netbeans.modules.form.CreationDescriptor;
47
import org.netbeans.modules.form.CreationFactory;
47
import org.netbeans.modules.form.CreationFactory;
48
import org.openide.modules.ModuleInstall;
48
import org.openide.modules.OnStart;
49
49
50
/**
50
/**
51
 * Management of form/j2ee module's lifecycle.
51
 * Management of form/j2ee module's lifecycle.
52
 *
52
 *
53
 * @author Jan Stola
53
 * @author Jan Stola
54
 */
54
 */
55
public class Installer extends ModuleInstall {
55
@OnStart
56
public class Installer implements Runnable {
56
    
57
    
57
    /**
58
    /**
58
     * Registers creation descriptors.
59
     * Registers creation descriptors.
59
     */
60
     */
60
    @Override
61
    @Override
61
    public void restored() {
62
    public void run() {
62
        // Install creator for EntityManager
63
        // Install creator for EntityManager
63
        CreationDescriptor cd = new CreationDescriptor() {
64
        CreationDescriptor cd = new CreationDescriptor() {
64
            @Override
65
            @Override
(-)a/glassfish.common/manifest.mf (-1 lines)
Lines 1-6 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.glassfish.common/0
2
OpenIDE-Module: org.netbeans.modules.glassfish.common/0
3
OpenIDE-Module-Install: org/netbeans/modules/glassfish/common/Installer.class
4
OpenIDE-Module-Layer: org/netbeans/modules/glassfish/common/layer.xml
3
OpenIDE-Module-Layer: org/netbeans/modules/glassfish/common/layer.xml
5
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/glassfish/common/Bundle.properties
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/glassfish/common/Bundle.properties
6
OpenIDE-Module-Specification-Version: 1.21
5
OpenIDE-Module-Specification-Version: 1.21
(-)a/glassfish.common/src/org/netbeans/modules/glassfish/common/Installer.java (-6 / +4 lines)
Lines 41-47 Link Here
41
 */
41
 */
42
package org.netbeans.modules.glassfish.common;
42
package org.netbeans.modules.glassfish.common;
43
43
44
import org.openide.modules.ModuleInstall;
44
import org.openide.modules.OnStop;
45
45
46
/**
46
/**
47
 * Manages a module's lifecycle. Remember that an installer is optional and
47
 * Manages a module's lifecycle. Remember that an installer is optional and
Lines 49-60 Link Here
49
 *
49
 *
50
 * @auther Peter Williams
50
 * @auther Peter Williams
51
 */
51
 */
52
public class Installer extends ModuleInstall {
52
@OnStop
53
53
public class Installer implements Runnable {
54
    @Override
54
    @Override
55
    public void close() {
55
    public void run() {
56
        super.close();
57
58
        // Send a shutdown message to any V3 server instances we started.
56
        // Send a shutdown message to any V3 server instances we started.
59
        if (GlassfishInstanceProvider.initialized()) {
57
        if (GlassfishInstanceProvider.initialized()) {
60
            for(GlassfishInstanceProvider provider: GlassfishInstanceProvider.getProviders(false)) {
58
            for(GlassfishInstanceProvider provider: GlassfishInstanceProvider.getProviders(false)) {
(-)a/httpserver/manifest.mf (-1 lines)
Lines 2-8 Link Here
2
OpenIDE-Module: org.netbeans.modules.httpserver/2
2
OpenIDE-Module: org.netbeans.modules.httpserver/2
3
OpenIDE-Module-Implementation-Version: 42
3
OpenIDE-Module-Implementation-Version: 42
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/httpserver/Bundle.properties
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/httpserver/Bundle.properties
5
OpenIDE-Module-Install: org/netbeans/modules/httpserver/HttpServerModule.class
6
OpenIDE-Module-Layer: org/netbeans/modules/httpserver/layer.xml
5
OpenIDE-Module-Layer: org/netbeans/modules/httpserver/layer.xml
7
OpenIDE-Module-Provides: org.openide.util.HttpServer$Impl
6
OpenIDE-Module-Provides: org.openide.util.HttpServer$Impl
8
AutoUpdate-Show-In-Client: false
7
AutoUpdate-Show-In-Client: false
(-)a/httpserver/src/org/netbeans/modules/httpserver/HttpServerModule.java (-4 / +5 lines)
Lines 44-50 Link Here
44
44
45
package org.netbeans.modules.httpserver;
45
package org.netbeans.modules.httpserver;
46
46
47
import java.io.Externalizable;
48
import java.io.File;
47
import java.io.File;
49
import java.net.MalformedURLException;
48
import java.net.MalformedURLException;
50
import java.util.Enumeration;
49
import java.util.Enumeration;
Lines 60-66 Link Here
60
import org.apache.tomcat.logging.TomcatLogger;
59
import org.apache.tomcat.logging.TomcatLogger;
61
import org.apache.tomcat.service.PoolTcpConnector;
60
import org.apache.tomcat.service.PoolTcpConnector;
62
import org.openide.filesystems.FileUtil;
61
import org.openide.filesystems.FileUtil;
63
import org.openide.modules.ModuleInstall;
62
import org.openide.modules.OnStop;
64
import org.openide.util.Lookup;
63
import org.openide.util.Lookup;
65
import org.openide.util.LookupEvent;
64
import org.openide.util.LookupEvent;
66
import org.openide.util.LookupListener;
65
import org.openide.util.LookupListener;
Lines 72-78 Link Here
72
*
71
*
73
* @author Petr Jiricka
72
* @author Petr Jiricka
74
*/
73
*/
75
public class HttpServerModule extends ModuleInstall implements Externalizable {
74
@OnStop
75
public class HttpServerModule implements Runnable {
76
76
77
77
78
    private static ContextManager server;
78
    private static ContextManager server;
Lines 84-90 Link Here
84
    private static boolean inSetRunning = false;
84
    private static boolean inSetRunning = false;
85
85
86
    /** Module is being closed. */
86
    /** Module is being closed. */
87
    public void close () {
87
    @Override
88
    public void run() {
88
        // stop the server, don't set the running status
89
        // stop the server, don't set the running status
89
        synchronized (HttpServerSettings.httpLock ()) {
90
        synchronized (HttpServerSettings.httpLock ()) {
90
            stopHTTPServer();
91
            stopHTTPServer();
(-)a/hudson/manifest.mf (-1 lines)
Lines 1-6 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.hudson
2
OpenIDE-Module: org.netbeans.modules.hudson
3
OpenIDE-Module-Install: org/netbeans/modules/hudson/Installer.class
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/hudson/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/hudson/Bundle.properties
5
OpenIDE-Module-Layer: org/netbeans/modules/hudson/layer.xml
4
OpenIDE-Module-Layer: org/netbeans/modules/hudson/layer.xml
6
OpenIDE-Module-Specification-Version: 1.18
5
OpenIDE-Module-Specification-Version: 1.18
(-)a/hudson/src/org/netbeans/modules/hudson/Installer.java (-9 / +14 lines)
Lines 46-71 Link Here
46
46
47
import java.util.prefs.BackingStoreException;
47
import java.util.prefs.BackingStoreException;
48
import org.netbeans.modules.hudson.impl.HudsonManagerImpl;
48
import org.netbeans.modules.hudson.impl.HudsonManagerImpl;
49
import org.openide.modules.ModuleInstall;
49
import org.openide.modules.OnStop;
50
import org.openide.util.Exceptions;
50
import org.openide.util.Exceptions;
51
import org.openide.util.NbPreferences;
51
import org.openide.util.NbPreferences;
52
import org.openide.windows.WindowManager;
52
import org.openide.windows.OnShowing;
53
53
54
public class Installer extends ModuleInstall implements Runnable {
54
@OnShowing
55
public class Installer implements Runnable {
55
    
56
    
56
    public @Override void restored() {
57
    public @Override void run() {
57
        if (active()) {
58
        if (active()) {
58
            WindowManager.getDefault().invokeWhenUIReady(this);
59
            init();
59
        }
60
        }
60
    }
61
    }
61
    
62
    
62
    public void run() {
63
    private void init() {
63
        HudsonManagerImpl.getDefault().getInstances();
64
        HudsonManagerImpl.getDefault().getInstances();
64
    }
65
    }
65
66
66
    public @Override void uninstalled() {
67
    @OnStop
67
        if (active()) {
68
    public static final class Down implements Runnable {
68
            HudsonManagerImpl.getDefault().terminate();
69
        @Override
70
        public void run() {
71
            if (active()) {
72
                HudsonManagerImpl.getDefault().terminate();
73
            }
69
        }
74
        }
70
    }
75
    }
71
76
(-)a/i18n.form/src/org/netbeans/modules/i18n/form/I18nFormCrossModule.java (-10 / +5 lines)
Lines 45-52 Link Here
45
package org.netbeans.modules.i18n.form;
45
package org.netbeans.modules.i18n.form;
46
46
47
import org.netbeans.modules.form.FormPropertyEditorManager;
47
import org.netbeans.modules.form.FormPropertyEditorManager;
48
import org.netbeans.modules.i18n.I18nSupport;
48
import org.openide.modules.OnStart;
49
import org.openide.modules.ModuleInstall;
50
49
51
/**
50
/**
52
 * Installation class for i18n to form cross dependency module.
51
 * Installation class for i18n to form cross dependency module.
Lines 54-68 Link Here
54
 *
53
 *
55
 * @author Peter Zavadsky
54
 * @author Peter Zavadsky
56
 */
55
 */
57
public class I18nFormCrossModule extends ModuleInstall {
56
@OnStart
58
57
public class I18nFormCrossModule implements Runnable {
59
    /** Registers property editor in form module and factory in i18n module. */
58
    /** Registers property editor in form module and factory in i18n module. */
60
    public void restored() {
59
    @Override
61
        registerFormPropertyEditor();
60
    public void run() {
62
    }
63
    
64
    /** Registers <code>FormI18nStringEditor</code> form property editor to form module. */
65
    private void registerFormPropertyEditor() {
66
        Class newEditorClass = FormI18nStringEditor.class;
61
        Class newEditorClass = FormI18nStringEditor.class;
67
        Class newEditorClassInteger = FormI18nIntegerEditor.class;
62
        Class newEditorClassInteger = FormI18nIntegerEditor.class;
68
        Class newEditorClassMnemonic = FormI18nMnemonicEditor.class;
63
        Class newEditorClassMnemonic = FormI18nMnemonicEditor.class;
(-)a/j2eeserver/src/org/netbeans/modules/j2ee/deployment/impl/Install.java (-7 / +4 lines)
Lines 46-63 Link Here
46
46
47
import java.util.Collection;
47
import java.util.Collection;
48
import java.util.Iterator;
48
import java.util.Iterator;
49
import org.openide.modules.OnStop;
49
50
50
51
51
/**
52
/**
52
 * @author  nn136682
53
 * @author  nn136682
53
 */
54
 */
54
public class Install extends org.openide.modules.ModuleInstall {
55
@OnStop
55
56
public class Install implements Runnable {
56
    /** Creates a new instance of Install */
57
    @Override public void run() {
57
    public Install() {
58
    }
59
60
    @Override public void close() {
61
        if (ServerRegistry.wasInitialized ()) {
58
        if (ServerRegistry.wasInitialized ()) {
62
            Collection instances = ServerRegistry.getInstance().getInstances();
59
            Collection instances = ServerRegistry.getInstance().getInstances();
63
            for (Iterator i=instances.iterator(); i.hasNext();) {
60
            for (Iterator i=instances.iterator(); i.hasNext();) {
(-)a/java.j2seplatform/src/org/netbeans/modules/java/j2seplatform/J2SEPlatformModule.java (-16 / +10 lines)
Lines 49-80 Link Here
49
import org.openide.cookies.InstanceCookie;
49
import org.openide.cookies.InstanceCookie;
50
import org.openide.filesystems.FileObject;
50
import org.openide.filesystems.FileObject;
51
import org.openide.loaders.DataObject;
51
import org.openide.loaders.DataObject;
52
import org.openide.modules.ModuleInstall;
53
import org.openide.util.Exceptions;
52
import org.openide.util.Exceptions;
54
import org.netbeans.api.project.ProjectManager;
53
import org.netbeans.api.project.ProjectManager;
55
import org.openide.filesystems.FileUtil;
54
import org.openide.filesystems.FileUtil;
55
import org.openide.modules.OnStart;
56
56
57
57
58
public class J2SEPlatformModule extends ModuleInstall {
58
@OnStart
59
public class J2SEPlatformModule implements Runnable {
59
    
60
    
60
    private static final String DEFAULT_PLATFORM = "Services/Platforms/org-netbeans-api-java-Platform/default_platform.xml";    //NOI18N
61
    private static final String DEFAULT_PLATFORM = "Services/Platforms/org-netbeans-api-java-Platform/default_platform.xml";    //NOI18N
61
62
62
    public void restored() {
63
    @Override
63
        super.restored();
64
    public void run() {
64
        ProjectManager.mutex().postWriteRequest(
65
        if (ProjectManager.mutex().isWriteAccess()) {
65
            new Runnable () {
66
            recoverDefaultPlatform();
66
                public void run () {
67
        } else {
67
                    recoverDefaultPlatform ();
68
            ProjectManager.mutex().postWriteRequest(this);
68
                }
69
        }
69
            }
70
        );
71
72
    }
70
    }
73
71
74
    
75
    
76
    
77
78
    private static void recoverDefaultPlatform () {
72
    private static void recoverDefaultPlatform () {
79
        final FileObject defaultPlatform = FileUtil.getConfigFile(DEFAULT_PLATFORM);
73
        final FileObject defaultPlatform = FileUtil.getConfigFile(DEFAULT_PLATFORM);
80
        if (defaultPlatform != null) {
74
        if (defaultPlatform != null) {
(-)a/java.source/src/org/netbeans/modules/java/source/JBrowseModule.java (-10 / +4 lines)
Lines 45-66 Link Here
45
package org.netbeans.modules.java.source;
45
package org.netbeans.modules.java.source;
46
46
47
import org.netbeans.modules.java.source.usages.ClassIndexManager;
47
import org.netbeans.modules.java.source.usages.ClassIndexManager;
48
import org.openide.modules.ModuleInstall;
48
import org.openide.modules.OnStop;
49
49
50
/**
50
/**
51
 *
51
 *
52
 * @author Petr Hrebejk
52
 * @author Petr Hrebejk
53
 * @author Tomas Zezula
53
 * @author Tomas Zezula
54
 */
54
 */
55
public class JBrowseModule extends ModuleInstall {
55
@OnStop
56
        
56
public class JBrowseModule implements Runnable {
57
    /** Creates a new instance of JBrowseModule */
57
    public @Override void run() {
58
    public JBrowseModule() {
59
    }
60
    
61
    
62
    public @Override void close () {
63
        super.close();
64
        ClassIndexManager.getDefault().close();
58
        ClassIndexManager.getDefault().close();
65
    }        
59
    }        
66
}
60
}
(-)a/java.sourceui/src/org/netbeans/modules/java/source/ui/JavaSourceUIModule.java (-4 / +4 lines)
Lines 41-57 Link Here
41
 */
41
 */
42
package org.netbeans.modules.java.source.ui;
42
package org.netbeans.modules.java.source.ui;
43
43
44
import org.openide.modules.ModuleInstall;
44
import org.openide.modules.OnStart;
45
45
46
/**
46
/**
47
 * Activates the GPR Listener that prepares 'fast index'
47
 * Activates the GPR Listener that prepares 'fast index'
48
 *
48
 *
49
 * @author sdedic
49
 * @author sdedic
50
 */
50
 */
51
public class JavaSourceUIModule extends ModuleInstall {
51
@OnStart
52
public class JavaSourceUIModule implements Runnable {
52
    @Override
53
    @Override
53
    public void restored() {
54
    public void run() {
54
        super.restored();
55
        // attach to GPR
55
        // attach to GPR
56
        OpenProjectFastIndex.getDefault();
56
        OpenProjectFastIndex.getDefault();
57
    }
57
    }
(-)a/javadoc/src/org/netbeans/modules/javadoc/JavadocModule.java (-3 / +5 lines)
Lines 49-62 Link Here
49
import java.util.Collections;
49
import java.util.Collections;
50
import java.util.Iterator;
50
import java.util.Iterator;
51
import java.util.LinkedList;
51
import java.util.LinkedList;
52
import org.openide.modules.ModuleInstall;
52
import org.openide.modules.OnStop;
53
import org.openide.windows.TopComponent;
53
import org.openide.windows.TopComponent;
54
54
55
/**
55
/**
56
 * Class for initializing Javadoc module on IDE startup.
56
 * Class for initializing Javadoc module on IDE startup.
57
 * @author Petr Hrebejk
57
 * @author Petr Hrebejk
58
 */
58
 */
59
public final class JavadocModule extends ModuleInstall {
59
@OnStop
60
public final class JavadocModule implements Runnable {
60
61
61
    private static Collection/*<TopComponent>*/ floatingTopComponents;
62
    private static Collection/*<TopComponent>*/ floatingTopComponents;
62
63
Lines 72-78 Link Here
72
        floatingTopComponents.remove(tc);
73
        floatingTopComponents.remove(tc);
73
    }
74
    }
74
    
75
    
75
    public void uninstalled() {
76
    @Override
77
    public void run() {
76
        Collection c;
78
        Collection c;
77
        synchronized (JavadocModule.class) {
79
        synchronized (JavadocModule.class) {
78
            if (floatingTopComponents != null) {
80
            if (floatingTopComponents != null) {
(-)a/javascript.editing/manifest.mf (-1 lines)
Lines 1-6 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.javascript.editing/1
2
OpenIDE-Module: org.netbeans.modules.javascript.editing/1
3
OpenIDE-Module-Install: org/netbeans/modules/javascript/editing/Installer.class
4
OpenIDE-Module-Layer: org/netbeans/modules/javascript/editing/layer.xml
3
OpenIDE-Module-Layer: org/netbeans/modules/javascript/editing/layer.xml
5
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/javascript/editing/Bundle.properties
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/javascript/editing/Bundle.properties
6
OpenIDE-Module-Specification-Version: 0.104
5
OpenIDE-Module-Specification-Version: 0.104
(-)a/javascript.editing/src/org/netbeans/modules/javascript/editing/Installer.java (-8 / +4 lines)
Lines 43-58 Link Here
43
43
44
import org.netbeans.api.java.classpath.ClassPath;
44
import org.netbeans.api.java.classpath.ClassPath;
45
import org.netbeans.api.java.classpath.GlobalPathRegistry;
45
import org.netbeans.api.java.classpath.GlobalPathRegistry;
46
import org.openide.modules.ModuleInstall;
46
import org.openide.modules.OnStop;
47
47
48
/**
48
@OnStop
49
 * Manages a module's lifecycle. Remember that an installer is optional and
49
public class Installer implements Runnable {
50
 * often not needed at all.
51
 */
52
public class Installer extends ModuleInstall {
53
54
    @Override
50
    @Override
55
    public void uninstalled() {
51
    public void run() {
56
        GlobalPathRegistry.getDefault().unregister(JsClassPathProvider.BOOT_CP, new ClassPath[] { JsClassPathProvider.getBootClassPath() });
52
        GlobalPathRegistry.getDefault().unregister(JsClassPathProvider.BOOT_CP, new ClassPath[] { JsClassPathProvider.getBootClassPath() });
57
    }
53
    }
58
54
(-)a/localhistory/manifest.mf (-1 lines)
Lines 1-5 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.localhistory
2
OpenIDE-Module: org.netbeans.modules.localhistory
3
OpenIDE-Module-Install: org/netbeans/modules/localhistory/ModuleLifecycleManager.class
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/localhistory/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/localhistory/Bundle.properties
5
OpenIDE-Module-Specification-Version: 1.17
4
OpenIDE-Module-Specification-Version: 1.17
(-)a/localhistory/src/org/netbeans/modules/localhistory/ModuleLifecycleManager.java (-3 / +5 lines)
Lines 43-56 Link Here
43
 */
43
 */
44
package org.netbeans.modules.localhistory;
44
package org.netbeans.modules.localhistory;
45
45
46
import org.openide.modules.ModuleInstall;
46
import org.openide.modules.OnStart;
47
47
48
/**
48
/**
49
 *
49
 *
50
 * @author Tomas Stupka
50
 * @author Tomas Stupka
51
 */
51
 */
52
public class ModuleLifecycleManager extends ModuleInstall {        
52
@OnStart
53
    public void restored() {      
53
public class ModuleLifecycleManager implements Runnable {        
54
    @Override
55
    public void run() {      
54
        LocalHistory.getInstance().init();        
56
        LocalHistory.getInstance().init();        
55
    }
57
    }
56
}
58
}
(-)a/masterfs/manifest.mf (-1 lines)
Lines 1-6 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.masterfs/2
2
OpenIDE-Module: org.netbeans.modules.masterfs/2
3
OpenIDE-Module-Install: org/netbeans/modules/masterfs/Installer.class
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/masterfs/resources/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/masterfs/resources/Bundle.properties
5
OpenIDE-Module-Specification-Version: 2.37
4
OpenIDE-Module-Specification-Version: 2.37
6
OpenIDE-Module-Recommends: org.netbeans.modules.masterfs.providers.Notifier
5
OpenIDE-Module-Recommends: org.netbeans.modules.masterfs.providers.Notifier
(-)a/masterfs/src/org/netbeans/modules/masterfs/Installer.java (-11 / +11 lines)
Lines 42-64 Link Here
42
package org.netbeans.modules.masterfs;
42
package org.netbeans.modules.masterfs;
43
43
44
import org.netbeans.modules.masterfs.watcher.Watcher;
44
import org.netbeans.modules.masterfs.watcher.Watcher;
45
import org.openide.modules.ModuleInstall;
45
import org.openide.modules.OnStart;
46
import org.openide.modules.OnStop;
46
47
47
/** Shutdown the watcher system.
48
/** Shutdown the watcher system.
48
 */
49
 */
49
public final class Installer extends ModuleInstall {
50
@OnStart
51
public final class Installer implements Runnable {
50
    @Override
52
    @Override
51
    public void restored() {
53
    public void run() {
52
        Watcher.isEnabled();
54
        Watcher.isEnabled();
53
    }
55
    }
54
    
56
    
55
    @Override
57
    @OnStop
56
    public void uninstalled() {
58
    public static final class Down implements Runnable {
57
        close();
59
        @Override
58
    }
60
        public void run() {
59
61
            Watcher.shutdown();
60
    @Override
62
        }
61
    public void close() {
62
        Watcher.shutdown();
63
    }
63
    }
64
}
64
}
(-)a/maven.indexer/manifest.mf (-1 lines)
Lines 1-5 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module-Install: org/netbeans/modules/maven/indexer/Installer.class
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/maven/indexer/Bundle.properties
2
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/maven/indexer/Bundle.properties
4
AutoUpdate-Show-In-Client: false
3
AutoUpdate-Show-In-Client: false
5
OpenIDE-Module-Specification-Version: 2.9
4
OpenIDE-Module-Specification-Version: 2.9
(-)a/maven.indexer/src/org/netbeans/modules/maven/indexer/Installer.java (-3 / +4 lines)
Lines 45-57 Link Here
45
import java.util.logging.Level;
45
import java.util.logging.Level;
46
import java.util.logging.Logger;
46
import java.util.logging.Logger;
47
import org.netbeans.modules.maven.indexer.spi.RepositoryIndexerImplementation;
47
import org.netbeans.modules.maven.indexer.spi.RepositoryIndexerImplementation;
48
import org.openide.modules.ModuleInstall;
48
import org.openide.modules.OnStop;
49
import org.openide.util.Lookup;
49
import org.openide.util.Lookup;
50
50
51
public class Installer extends ModuleInstall {
51
@OnStop
52
public class Installer implements Runnable {
52
53
53
    @SuppressWarnings("deprecation")
54
    @SuppressWarnings("deprecation")
54
    public @Override void close() {
55
    public @Override void run() {
55
        Logger LOG = Logger.getLogger(Installer.class.getName());
56
        Logger LOG = Logger.getLogger(Installer.class.getName());
56
        if (!Cancellation.cancelAll()) {
57
        if (!Cancellation.cancelAll()) {
57
            // Cf. #188883. Hard to kill HTTP connections.
58
            // Cf. #188883. Hard to kill HTTP connections.
(-)a/mobility.cldcplatform/src/org/netbeans/modules/mobility/cldcplatform/startup/DefaultEmulatorInstall.java (-3 / +5 lines)
Lines 70-76 Link Here
70
import org.openide.filesystems.FileObject;
70
import org.openide.filesystems.FileObject;
71
import org.openide.filesystems.FileUtil;
71
import org.openide.filesystems.FileUtil;
72
import org.openide.modules.InstalledFileLocator;
72
import org.openide.modules.InstalledFileLocator;
73
import org.openide.modules.ModuleInstall;
73
import org.openide.modules.OnStart;
74
import org.openide.util.RequestProcessor;
74
import org.openide.util.RequestProcessor;
75
import org.openide.xml.XMLUtil;
75
import org.openide.xml.XMLUtil;
76
import org.w3c.dom.Attr;
76
import org.w3c.dom.Attr;
Lines 81-91 Link Here
81
/**
81
/**
82
 * @author David Kaspar
82
 * @author David Kaspar
83
 */
83
 */
84
public class DefaultEmulatorInstall extends ModuleInstall {
84
@OnStart
85
public class DefaultEmulatorInstall implements Runnable {
85
    static private final String EMU_MARKER="emu_installed.mark";
86
    static private final String EMU_MARKER="emu_installed.mark";
86
    static private final String DSC_MARKER="dsc_installed.mark";
87
    static private final String DSC_MARKER="dsc_installed.mark";
87
    
88
    
88
    public void restored() {
89
    @Override
90
    public void run() {
89
        new LibraryConverter();
91
        new LibraryConverter();
90
        installEmulators();
92
        installEmulators();
91
        installDescriptors();
93
        installDescriptors();
(-)a/openide.modules/manifest.mf (-1 / +1 lines)
Lines 1-5 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.openide.modules
2
OpenIDE-Module: org.openide.modules
3
OpenIDE-Module-Localizing-Bundle: org/openide/modules/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/openide/modules/Bundle.properties
4
OpenIDE-Module-Specification-Version: 7.28
4
OpenIDE-Module-Specification-Version: 7.29
5
5
(-)7c987de275c5 (+55 lines)
Added Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2012 Oracle and/or its affiliates. All rights reserved.
5
 *
6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7
 * Other names may be trademarks of their respective owners.
8
 *
9
 * The contents of this file are subject to the terms of either the GNU
10
 * General Public License Version 2 only ("GPL") or the Common
11
 * Development and Distribution License("CDDL") (collectively, the
12
 * "License"). You may not use this file except in compliance with the
13
 * License. You can obtain a copy of the License at
14
 * http://www.netbeans.org/cddl-gplv2.html
15
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
16
 * specific language governing permissions and limitations under the
17
 * License.  When distributing the software, include this License Header
18
 * Notice in each file and include the License file at
19
 * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
20
 * particular file as subject to the "Classpath" exception as provided
21
 * by Oracle in the GPL Version 2 section of the License file that
22
 * accompanied this code. If applicable, add the following below the
23
 * License Header, with the fields enclosed by brackets [] replaced by
24
 * your own identifying information:
25
 * "Portions Copyrighted [year] [name of copyright owner]"
26
 *
27
 * If you wish your version of this file to be governed by only the CDDL
28
 * or only the GPL Version 2, indicate your decision by adding
29
 * "[Contributor] elects to include this software in this distribution
30
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
31
 * single choice of license, a recipient has the option to distribute
32
 * your version of this file under either the CDDL, the GPL Version 2 or
33
 * to extend the choice of license to its licensees as provided above.
34
 * However, if you add GPL Version 2 code and therefore, elected the GPL
35
 * Version 2 license, then the option applies only if the new code is
36
 * made subject to such option by the copyright holder.
37
 *
38
 * Contributor(s):
39
 *
40
 * Portions Copyrighted 2012 Sun Microsystems, Inc.
41
 */
42
package org.openide.modules;
43
44
import org.openide.util.lookup.NamedServiceDefinition;
45
46
/**
47
 *
48
 * 
49
 * @since 7.29
50
 * @author Jaroslav Tulach <jtulach@netbeans.org>
51
 */
52
@NamedServiceDefinition(path="Modules/Start", serviceType=Runnable.class)
53
public @interface OnStart {
54
    
55
}
(-)7c987de275c5 (+56 lines)
Added Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2012 Oracle and/or its affiliates. All rights reserved.
5
 *
6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7
 * Other names may be trademarks of their respective owners.
8
 *
9
 * The contents of this file are subject to the terms of either the GNU
10
 * General Public License Version 2 only ("GPL") or the Common
11
 * Development and Distribution License("CDDL") (collectively, the
12
 * "License"). You may not use this file except in compliance with the
13
 * License. You can obtain a copy of the License at
14
 * http://www.netbeans.org/cddl-gplv2.html
15
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
16
 * specific language governing permissions and limitations under the
17
 * License.  When distributing the software, include this License Header
18
 * Notice in each file and include the License file at
19
 * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
20
 * particular file as subject to the "Classpath" exception as provided
21
 * by Oracle in the GPL Version 2 section of the License file that
22
 * accompanied this code. If applicable, add the following below the
23
 * License Header, with the fields enclosed by brackets [] replaced by
24
 * your own identifying information:
25
 * "Portions Copyrighted [year] [name of copyright owner]"
26
 *
27
 * If you wish your version of this file to be governed by only the CDDL
28
 * or only the GPL Version 2, indicate your decision by adding
29
 * "[Contributor] elects to include this software in this distribution
30
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
31
 * single choice of license, a recipient has the option to distribute
32
 * your version of this file under either the CDDL, the GPL Version 2 or
33
 * to extend the choice of license to its licensees as provided above.
34
 * However, if you add GPL Version 2 code and therefore, elected the GPL
35
 * Version 2 license, then the option applies only if the new code is
36
 * made subject to such option by the copyright holder.
37
 *
38
 * Contributor(s):
39
 *
40
 * Portions Copyrighted 2012 Sun Microsystems, Inc.
41
 */
42
package org.openide.modules;
43
44
import java.util.concurrent.Callable;
45
import org.openide.util.lookup.NamedServiceDefinition;
46
47
/**
48
 *
49
 * @since 7.29
50
 * @author Jaroslav Tulach <jtulach@netbeans.org>
51
 */
52
@NamedServiceDefinition(
53
    path="Modules/Stop", serviceType={ Runnable.class, Callable.class }
54
)
55
public @interface OnStop {
56
}
(-)a/openide.text/manifest.mf (-1 lines)
Lines 1-6 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.openide.text
2
OpenIDE-Module: org.openide.text
3
OpenIDE-Module-Install: org/netbeans/modules/openide/text/Installer.class
4
OpenIDE-Module-Specification-Version: 6.44
3
OpenIDE-Module-Specification-Version: 6.44
5
OpenIDE-Module-Localizing-Bundle: org/openide/text/Bundle.properties
4
OpenIDE-Module-Localizing-Bundle: org/openide/text/Bundle.properties
6
AutoUpdate-Essential-Module: true
5
AutoUpdate-Essential-Module: true
(-)a/openide.text/src/org/netbeans/modules/openide/text/Installer.java (-3 / +4 lines)
Lines 47-53 Link Here
47
import java.util.logging.Level;
47
import java.util.logging.Level;
48
import java.util.logging.LogRecord;
48
import java.util.logging.LogRecord;
49
import java.util.logging.Logger;
49
import java.util.logging.Logger;
50
import org.openide.modules.ModuleInstall;
50
import org.openide.modules.OnStop;
51
51
52
/**
52
/**
53
 * Log number of editors opened during IDE session by mime type.
53
 * Log number of editors opened during IDE session by mime type.
Lines 55-61 Link Here
55
 *
55
 *
56
 * @author Marek Slama
56
 * @author Marek Slama
57
 */
57
 */
58
public class Installer extends ModuleInstall {
58
@OnStop
59
public class Installer implements Runnable {
59
    
60
    
60
    private static Map<String,Integer> mimeTypes = new HashMap<String,Integer>();
61
    private static Map<String,Integer> mimeTypes = new HashMap<String,Integer>();
61
62
Lines 71-77 Link Here
71
    }
72
    }
72
    
73
    
73
    @Override
74
    @Override
74
    public void close() {
75
    public void run() {
75
        for (String s : mimeTypes.keySet()) {
76
        for (String s : mimeTypes.keySet()) {
76
            Logger logger = Logger.getLogger("org.netbeans.ui.metrics.editor"); //NOI18N
77
            Logger logger = Logger.getLogger("org.netbeans.ui.metrics.editor"); //NOI18N
77
            LogRecord rec = new LogRecord(Level.INFO, "USG_EDITOR_MIME_TYPE"); //NOI18N
78
            LogRecord rec = new LogRecord(Level.INFO, "USG_EDITOR_MIME_TYPE"); //NOI18N
(-)a/openide.windows/manifest.mf (-1 / +1 lines)
Lines 1-6 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.openide.windows
2
OpenIDE-Module: org.openide.windows
3
OpenIDE-Module-Specification-Version: 6.52
3
OpenIDE-Module-Specification-Version: 6.53
4
OpenIDE-Module-Localizing-Bundle: org/openide/windows/Bundle.properties
4
OpenIDE-Module-Localizing-Bundle: org/openide/windows/Bundle.properties
5
AutoUpdate-Essential-Module: true
5
AutoUpdate-Essential-Module: true
6
6
(-)7c987de275c5 (+54 lines)
Added Link Here
1
/*
2
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
3
 *
4
 * Copyright 2012 Oracle and/or its affiliates. All rights reserved.
5
 *
6
 * Oracle and Java are registered trademarks of Oracle and/or its affiliates.
7
 * Other names may be trademarks of their respective owners.
8
 *
9
 * The contents of this file are subject to the terms of either the GNU
10
 * General Public License Version 2 only ("GPL") or the Common
11
 * Development and Distribution License("CDDL") (collectively, the
12
 * "License"). You may not use this file except in compliance with the
13
 * License. You can obtain a copy of the License at
14
 * http://www.netbeans.org/cddl-gplv2.html
15
 * or nbbuild/licenses/CDDL-GPL-2-CP. See the License for the
16
 * specific language governing permissions and limitations under the
17
 * License.  When distributing the software, include this License Header
18
 * Notice in each file and include the License file at
19
 * nbbuild/licenses/CDDL-GPL-2-CP.  Oracle designates this
20
 * particular file as subject to the "Classpath" exception as provided
21
 * by Oracle in the GPL Version 2 section of the License file that
22
 * accompanied this code. If applicable, add the following below the
23
 * License Header, with the fields enclosed by brackets [] replaced by
24
 * your own identifying information:
25
 * "Portions Copyrighted [year] [name of copyright owner]"
26
 *
27
 * If you wish your version of this file to be governed by only the CDDL
28
 * or only the GPL Version 2, indicate your decision by adding
29
 * "[Contributor] elects to include this software in this distribution
30
 * under the [CDDL or GPL Version 2] license." If you do not indicate a
31
 * single choice of license, a recipient has the option to distribute
32
 * your version of this file under either the CDDL, the GPL Version 2 or
33
 * to extend the choice of license to its licensees as provided above.
34
 * However, if you add GPL Version 2 code and therefore, elected the GPL
35
 * Version 2 license, then the option applies only if the new code is
36
 * made subject to such option by the copyright holder.
37
 *
38
 * Contributor(s):
39
 *
40
 * Portions Copyrighted 2012 Sun Microsystems, Inc.
41
 */
42
package org.openide.windows;
43
44
import org.openide.util.lookup.NamedServiceDefinition;
45
46
/**
47
 * 
48
 * @since 6.53
49
 * @author Jaroslav Tulach <jtulach@netbeans.org>
50
 */
51
@NamedServiceDefinition(path="Modules/UIReady", serviceType=Runnable.class)
52
public @interface OnShowing {
53
    
54
}
(-)a/parsing.api/manifest.mf (-1 lines)
Lines 1-7 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.parsing.api/1
2
OpenIDE-Module: org.netbeans.modules.parsing.api/1
3
OpenIDE-Module-Implementation-Version: 6
3
OpenIDE-Module-Implementation-Version: 6
4
OpenIDE-Module-Install: org/netbeans/modules/parsing/impl/Installer.class
5
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/parsing/impl/Bundle.properties
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/parsing/impl/Bundle.properties
6
OpenIDE-Module-Layer: org/netbeans/modules/parsing/impl/layer.xml
5
OpenIDE-Module-Layer: org/netbeans/modules/parsing/impl/layer.xml
7
AutoUpdate-Show-In-Client: false
6
AutoUpdate-Show-In-Client: false
(-)a/parsing.api/src/org/netbeans/modules/parsing/impl/Installer.java (-20 / +23 lines)
Lines 4-41 Link Here
4
 */
4
 */
5
package org.netbeans.modules.parsing.impl;
5
package org.netbeans.modules.parsing.impl;
6
6
7
import java.awt.EventQueue;
7
import org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater;
8
import org.netbeans.modules.parsing.impl.indexing.RepositoryUpdater;
8
import org.openide.modules.ModuleInstall;
9
import org.openide.modules.OnStart;
9
import org.openide.util.RequestProcessor;
10
import org.openide.util.RequestProcessor;
10
import org.openide.windows.WindowManager;
11
import org.openide.windows.OnShowing;
11
12
12
/**
13
/**
13
 * Manages a module's lifecycle. Remember that an installer is optional and
14
 * Manages a module's lifecycle. Remember that an installer is optional and
14
 * often not needed at all.
15
 * often not needed at all.
15
 */
16
 */
16
public class Installer extends ModuleInstall {
17
@OnStart
18
public class Installer implements Runnable {
17
19
18
    @Override
20
    @Override
19
    public void restored () {
21
    public void run() {
20
        super.restored();
21
        RepositoryUpdater.getDefault().start(false);
22
        RepositoryUpdater.getDefault().start(false);
22
23
    }
23
        WindowManager.getDefault().invokeWhenUIReady(new Runnable() {
24
    
24
            public void run () {
25
    @OnShowing
25
                RequestProcessor.getDefault().post(new Runnable() {
26
    public static class UI implements Runnable {
26
                    public void run() {
27
        @Override
27
                        Schedulers.init();
28
        public void run() {
28
                    }
29
            if (EventQueue.isDispatchThread()) {
29
                });
30
                RequestProcessor.getDefault().post(this);
31
            } else {
32
                Schedulers.init();
30
            }
33
            }
31
        });
34
        }
32
    }
35
    }
33
36
34
    @Override
37
    @OnStart
35
    public boolean closing () {
38
    public static class Stop implements Runnable {
36
        final boolean ret = super.closing();
39
        @Override
37
        RepositoryUpdater.getDefault().stop();
40
        public void run() {
38
        return ret;
41
            RepositoryUpdater.getDefault().stop();
42
        }
39
    }
43
    }
40
41
}
44
}
(-)a/profiler.drilldown/manifest.mf (-1 lines)
Lines 1-7 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
AutoUpdate-Show-In-Client: false
2
AutoUpdate-Show-In-Client: false
3
OpenIDE-Module: org.netbeans.modules.profiler.drilldown/1
3
OpenIDE-Module: org.netbeans.modules.profiler.drilldown/1
4
OpenIDE-Module-Install: org/netbeans/modules/profiler/drilldown/Installer.class
5
OpenIDE-Module-Layer: org/netbeans/modules/profiler/drilldown/layer.xml
4
OpenIDE-Module-Layer: org/netbeans/modules/profiler/drilldown/layer.xml
6
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/profiler/drilldown/Bundle.properties
5
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/profiler/drilldown/Bundle.properties
7
OpenIDE-Module-Specification-Version: 1.2
6
OpenIDE-Module-Specification-Version: 1.2
(-)a/profiler.drilldown/src/org/netbeans/modules/profiler/drilldown/Installer.java (-4 / +4 lines)
Lines 41-56 Link Here
41
 */
41
 */
42
package org.netbeans.modules.profiler.drilldown;
42
package org.netbeans.modules.profiler.drilldown;
43
43
44
import org.openide.modules.ModuleInstall;
44
import org.openide.modules.OnStop;
45
45
46
/**
46
/**
47
 * Manages a module's lifecycle. Remember that an installer is optional and
47
 * Manages a module's lifecycle. Remember that an installer is optional and
48
 * often not needed at all.
48
 * often not needed at all.
49
 */
49
 */
50
public class Installer extends ModuleInstall {
50
@OnStop
51
51
public class Installer implements Runnable {
52
    @Override
52
    @Override
53
    public void uninstalled() {
53
    public void run() {
54
        DrillDownWindow.closeIfOpened();
54
        DrillDownWindow.closeIfOpened();
55
    }
55
    }
56
}
56
}
(-)a/profiler.ppoints/manifest.mf (-1 lines)
Lines 1-6 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.profiler.ppoints
2
OpenIDE-Module: org.netbeans.modules.profiler.ppoints
3
OpenIDE-Module-Install: org/netbeans/modules/profiler/ppoints/Installer.class
4
OpenIDE-Module-Layer: org/netbeans/modules/profiler/ppoints/layer.xml
3
OpenIDE-Module-Layer: org/netbeans/modules/profiler/ppoints/layer.xml
5
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/profiler/ppoints/Bundle.properties
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/profiler/ppoints/Bundle.properties
6
OpenIDE-Module-Specification-Version: 1.2
5
OpenIDE-Module-Specification-Version: 1.2
(-)a/profiler.ppoints/src/org/netbeans/modules/profiler/ppoints/Installer.java (-7 / +4 lines)
Lines 41-59 Link Here
41
 */
41
 */
42
package org.netbeans.modules.profiler.ppoints;
42
package org.netbeans.modules.profiler.ppoints;
43
43
44
import org.openide.modules.ModuleInstall;
44
import org.openide.modules.OnStop;
45
45
46
/**
46
/**
47
 * Manages a module's lifecycle. Remember that an installer is optional and
47
 * Manages a module's lifecycle. Remember that an installer is optional and
48
 * often not needed at all.
48
 * often not needed at all.
49
 */
49
 */
50
public class Installer extends ModuleInstall {
50
@OnStop
51
51
public class Installer implements Runnable {
52
    @Override
52
    @Override
53
    public boolean closing() {
53
    public void run() {
54
        ProfilingPointsManager.getDefault().ideClosing(); // TODO: dirty profiling points should be persisted on document save!
54
        ProfilingPointsManager.getDefault().ideClosing(); // TODO: dirty profiling points should be persisted on document save!
55
        return true;
56
    }
55
    }
57
    
58
    
59
}
56
}
(-)a/project.ant/manifest.mf (-1 lines)
Lines 3-7 Link Here
3
OpenIDE-Module-Specification-Version: 1.47
3
OpenIDE-Module-Specification-Version: 1.47
4
OpenIDE-Module-Layer: org/netbeans/modules/project/ant/resources/mf-layer.xml
4
OpenIDE-Module-Layer: org/netbeans/modules/project/ant/resources/mf-layer.xml
5
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/project/ant/Bundle.properties
5
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/project/ant/Bundle.properties
6
OpenIDE-Module-Install: org/netbeans/modules/project/ant/AntProjectModule.class
7
6
(-)a/project.ant/src/org/netbeans/modules/project/ant/AntProjectModule.java (-6 / +4 lines)
Lines 63-69 Link Here
63
import org.openide.DialogDisplayer;
63
import org.openide.DialogDisplayer;
64
import org.openide.LifecycleManager;
64
import org.openide.LifecycleManager;
65
import org.openide.NotifyDescriptor;
65
import org.openide.NotifyDescriptor;
66
import org.openide.modules.ModuleInstall;
66
import org.openide.modules.OnStart;
67
import org.openide.util.NbBundle;
67
import org.openide.util.NbBundle;
68
import org.openide.windows.WindowManager;
68
import org.openide.windows.WindowManager;
69
import org.openide.xml.XMLUtil;
69
import org.openide.xml.XMLUtil;
Lines 75-85 Link Here
75
 * @author Jan Lahoda
75
 * @author Jan Lahoda
76
 * @see "issue #70130"
76
 * @see "issue #70130"
77
 */
77
 */
78
public class AntProjectModule extends ModuleInstall {
78
@OnStart
79
    
79
public class AntProjectModule implements Runnable {
80
    public @Override void restored() {
80
    public @Override void run() {
81
        super.restored();
82
        
83
        if (Boolean.getBoolean("netbeans.do.not.check.xalan")) // NOI18N
81
        if (Boolean.getBoolean("netbeans.do.not.check.xalan")) // NOI18N
84
            return ;
82
            return ;
85
        
83
        
(-)a/project.libraries/manifest.mf (-1 lines)
Lines 1-6 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.project.libraries/1
2
OpenIDE-Module: org.netbeans.modules.project.libraries/1
3
OpenIDE-Module-Install: org/netbeans/modules/project/libraries/LibrariesModule.class
4
OpenIDE-Module-Layer: org/netbeans/modules/project/libraries/resources/mf-layer.xml
3
OpenIDE-Module-Layer: org/netbeans/modules/project/libraries/resources/mf-layer.xml
5
OpenIDE-Module-Specification-Version: 1.35
4
OpenIDE-Module-Specification-Version: 1.35
6
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/project/libraries/resources/Bundle.properties
5
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/project/libraries/resources/Bundle.properties
(-)a/project.libraries/src/org/netbeans/modules/project/libraries/LibrariesModule.java (-9 / +4 lines)
Lines 43-51 Link Here
43
 */
43
 */
44
package org.netbeans.modules.project.libraries;
44
package org.netbeans.modules.project.libraries;
45
45
46
import org.openide.modules.ModuleInstall;
47
import org.openide.util.Lookup;
46
import org.openide.util.Lookup;
48
import org.netbeans.spi.project.libraries.LibraryProvider;
47
import org.netbeans.spi.project.libraries.LibraryProvider;
48
import org.openide.modules.OnStart;
49
49
50
/**
50
/**
51
 * Ensures that all {@link LibraryProvider}s are actually loaded.
51
 * Ensures that all {@link LibraryProvider}s are actually loaded.
Lines 54-67 Link Here
54
 * This needs to happen before any Ant build is run.
54
 * This needs to happen before any Ant build is run.
55
 * @author Tomas Zezula
55
 * @author Tomas Zezula
56
 */
56
 */
57
public class LibrariesModule extends ModuleInstall {
57
@OnStart
58
58
public class LibrariesModule implements Runnable {
59
    @Override public void restored() {
59
    @Override public void run() {
60
        super.restored();
61
        this.initProviders();
62
    }
63
    
64
    private void initProviders () {
65
        for (LibraryProvider lp : Lookup.getDefault().lookupAll(LibraryProvider.class)) {            
60
        for (LibraryProvider lp : Lookup.getDefault().lookupAll(LibraryProvider.class)) {            
66
            lp.getLibraries();
61
            lp.getLibraries();
67
        }
62
        }
(-)a/projectapi/manifest.mf (-1 lines)
Lines 1-6 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.projectapi/1
2
OpenIDE-Module: org.netbeans.modules.projectapi/1
3
OpenIDE-Module-Install: org/netbeans/modules/projectapi/Installer.class
4
OpenIDE-Module-Specification-Version: 1.42
3
OpenIDE-Module-Specification-Version: 1.42
5
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/projectapi/Bundle.properties
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/projectapi/Bundle.properties
6
OpenIDE-Module-Layer: org/netbeans/modules/projectapi/layer.xml
5
OpenIDE-Module-Layer: org/netbeans/modules/projectapi/layer.xml
(-)a/projectapi/src/org/netbeans/modules/projectapi/Installer.java (-8 / +12 lines)
Lines 44-66 Link Here
44
44
45
package org.netbeans.modules.projectapi;
45
package org.netbeans.modules.projectapi;
46
46
47
import org.openide.modules.ModuleInstall;
47
import org.openide.modules.OnStart;
48
import org.openide.modules.OnStop;
48
49
49
/**
50
/**
50
 * Manages a module's lifecycle. Remember that an installer is optional and
51
 * Manages a module's lifecycle. Remember that an installer is optional and
51
 * often not needed at all.
52
 * often not needed at all.
52
 */
53
 */
53
public class Installer extends ModuleInstall {
54
@OnStart
54
55
public class Installer implements Runnable {
55
    @Override
56
    @Override
56
    public void restored() {
57
    public void run() {
57
        //#125582
58
        //#125582
58
        SimpleFileOwnerQueryImplementation.deserialize();
59
        SimpleFileOwnerQueryImplementation.deserialize();
59
    }
60
    }
60
61
61
    @Override
62
    @OnStop
62
    public void close() {
63
    public static final class Down implements Runnable {
63
        //#125582
64
        @Override
64
        SimpleFileOwnerQueryImplementation.serialize();
65
        public void run() {
66
            //#125582
67
            SimpleFileOwnerQueryImplementation.serialize();
68
        }
65
    }
69
    }
66
}
70
}
(-)a/projectui/manifest.mf (-1 lines)
Lines 1-6 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.projectui
2
OpenIDE-Module: org.netbeans.modules.projectui
3
OpenIDE-Module-Install: org/netbeans/modules/project/ui/ProjectUiModule.class
4
OpenIDE-Module-Layer: org/netbeans/modules/project/ui/resources/layer.xml
3
OpenIDE-Module-Layer: org/netbeans/modules/project/ui/resources/layer.xml
5
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/project/ui/Bundle.properties
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/project/ui/Bundle.properties
6
OpenIDE-Module-Provides: org.netbeans.modules.project.uiapi.ActionsFactory,   org.netbeans.modules.project.uiapi.OpenProjectsTrampoline,  org.netbeans.modules.project.uiapi.ProjectChooserFactory
5
OpenIDE-Module-Provides: org.netbeans.modules.project.uiapi.ActionsFactory,   org.netbeans.modules.project.uiapi.OpenProjectsTrampoline,  org.netbeans.modules.project.uiapi.ProjectChooserFactory
(-)a/projectui/src/org/netbeans/modules/project/ui/ProjectUiModule.java (-12 / +17 lines)
Lines 48-75 Link Here
48
import java.io.IOException;
48
import java.io.IOException;
49
import org.netbeans.api.project.ProjectManager;
49
import org.netbeans.api.project.ProjectManager;
50
import org.openide.ErrorManager;
50
import org.openide.ErrorManager;
51
import org.openide.modules.ModuleInstall;
51
import org.openide.modules.OnStop;
52
import org.openide.windows.OnShowing;
52
53
53
/**
54
/**
54
 * Startup and shutdown hooks for projectui module.
55
 * Startup and shutdown hooks for projectui module.
55
 * @author Jesse Glick
56
 * @author Jesse Glick
56
 */
57
 */
57
public class ProjectUiModule extends ModuleInstall {
58
@OnShowing
58
59
public class ProjectUiModule implements Runnable {
59
    public void restored() {
60
    @Override
61
    public void run() {
60
        if (!GraphicsEnvironment.isHeadless()) {
62
        if (!GraphicsEnvironment.isHeadless()) {
61
            Hacks.keepCurrentProjectNameUpdated();
63
            Hacks.keepCurrentProjectNameUpdated();
62
        }
64
        }
63
    }
65
    }
64
66
65
    public void close() {
67
    @OnStop
66
        OpenProjectList.shutdown();
68
    public static final class Down implements Runnable {
67
        // Just in case something was modified outside the usual customizer dialog:
69
        @Override
68
        try {
70
        public void run() {
69
            ProjectManager.getDefault().saveAllProjects();
71
            OpenProjectList.shutdown();
70
        } catch (IOException e) {
72
            // Just in case something was modified outside the usual customizer dialog:
71
            ErrorManager.getDefault().notify(e);
73
            try {
74
                ProjectManager.getDefault().saveAllProjects();
75
            } catch (IOException e) {
76
                ErrorManager.getDefault().notify(e);
77
            }
72
        }
78
        }
73
    }
79
    }
74
    
75
}
80
}
(-)a/properties.syntax/src/org/netbeans/modules/properties/syntax/RestoreColoring.java (+1 lines)
Lines 56-61 Link Here
56
 *
56
 *
57
 * @author Petr Jiricka, Libor Kramolis, Jesse Glick
57
 * @author Petr Jiricka, Libor Kramolis, Jesse Glick
58
 */
58
 */
59
// XXX: Rewrite LocalizerSupport to obtain the registration via Lookup
59
public class RestoreColoring extends ModuleInstall {
60
public class RestoreColoring extends ModuleInstall {
60
61
61
    /** <code>Localizer</code> passed to editor. */
62
    /** <code>Localizer</code> passed to editor. */
(-)a/spi.debugger.ui/manifest.mf (-1 lines)
Lines 4-7 Link Here
4
OpenIDE-Module-Layer: org/netbeans/modules/debugger/resources/mf-layer.xml
4
OpenIDE-Module-Layer: org/netbeans/modules/debugger/resources/mf-layer.xml
5
OpenIDE-Module-Specification-Version: 2.30
5
OpenIDE-Module-Specification-Version: 2.30
6
OpenIDE-Module-Provides: org.netbeans.spi.debugger.ui
6
OpenIDE-Module-Provides: org.netbeans.spi.debugger.ui
7
OpenIDE-Module-Install: org/netbeans/modules/debugger/ui/DebuggerModule.class
(-)a/spi.debugger.ui/src/org/netbeans/modules/debugger/ui/DebuggerModule.java (-8 / +7 lines)
Lines 44-62 Link Here
44
44
45
package org.netbeans.modules.debugger.ui;
45
package org.netbeans.modules.debugger.ui;
46
46
47
import org.openide.modules.ModuleInstall;
47
import java.util.concurrent.Callable;
48
import org.openide.modules.OnStop;
48
49
49
/**
50
/**
50
 *
51
 *
51
 * @author Martin Entlicher
52
 * @author Martin Entlicher
52
 */
53
 */
53
public class DebuggerModule extends ModuleInstall {
54
@OnStop
54
    
55
public class DebuggerModule implements Callable<Boolean> {
55
    /** Creates a new instance of DebuggerModule */
56
    /** called on closing */
56
    public DebuggerModule() {
57
    @Override
57
    }
58
    public Boolean call() {
58
59
    public boolean closing() {
60
        DebuggerManagerListener.closeDebuggerUI();
59
        DebuggerManagerListener.closeDebuggerUI();
61
        return true;
60
        return true;
62
    }
61
    }
(-)a/spi.editor.hints/manifest.mf (-1 lines)
Lines 3-7 Link Here
3
OpenIDE-Module-Implementation-Version: 7
3
OpenIDE-Module-Implementation-Version: 7
4
OpenIDE-Module-Layer: org/netbeans/modules/editor/hints/resources/layer.xml
4
OpenIDE-Module-Layer: org/netbeans/modules/editor/hints/resources/layer.xml
5
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/editor/hints/resources/Bundle.properties
5
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/editor/hints/resources/Bundle.properties
6
OpenIDE-Module-Install: org/netbeans/modules/editor/hints/HintsModule.class
7
AutoUpdate-Show-In-Client: false
6
AutoUpdate-Show-In-Client: false
(-)a/spi.editor.hints/src/org/netbeans/modules/editor/hints/HintsModule.java (-4 / +5 lines)
Lines 44-59 Link Here
44
44
45
package org.netbeans.modules.editor.hints;
45
package org.netbeans.modules.editor.hints;
46
46
47
import org.openide.modules.ModuleInstall;
47
import org.openide.modules.OnStart;
48
48
49
/**
49
/**
50
 * Module installation class for HintsModule.
50
 * Module installation class for HintsModule.
51
 *
51
 *
52
 * @author Jan Lahoda
52
 * @author Jan Lahoda
53
 */
53
 */
54
public final class HintsModule extends ModuleInstall {
54
@OnStart
55
55
public final class HintsModule implements Runnable {
56
    public void restored () {
56
    @Override
57
    public void run() {
57
        //create HintsUI (which registers some listeners)
58
        //create HintsUI (which registers some listeners)
58
        HintsUI.getDefault();
59
        HintsUI.getDefault();
59
    }
60
    }
(-)a/spi.palette/manifest.mf (-1 lines)
Lines 3-6 Link Here
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/palette/resources/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/palette/resources/Bundle.properties
4
OpenIDE-Module-Specification-Version: 1.30
4
OpenIDE-Module-Specification-Version: 1.30
5
OpenIDE-Module-Layer: org/netbeans/modules/palette/resources/layer.xml
5
OpenIDE-Module-Layer: org/netbeans/modules/palette/resources/layer.xml
6
OpenIDE-Module-Install: org/netbeans/spi/palette/PaletteModule.class
(-)a/spi.palette/src/org/netbeans/spi/palette/PaletteModule.java (-17 / +7 lines)
Lines 44-72 Link Here
44
44
45
package org.netbeans.spi.palette;
45
package org.netbeans.spi.palette;
46
46
47
import org.openide.modules.ModuleInstall;
47
import org.openide.windows.OnShowing;
48
import org.openide.windows.WindowManager;
49
48
50
/**
49
/**
51
 *
50
 *
52
 * @author S. Aubrecht
51
 * @author S. Aubrecht
53
 * @since 1.10
52
 * @since 1.10
54
 */
53
 */
55
public class PaletteModule extends ModuleInstall {
54
@OnShowing
56
    
55
public class PaletteModule implements Runnable {
57
    /** Creates a new instance of ModuleInstall */
58
    public PaletteModule() {
59
    }
60
    
61
    @Override
56
    @Override
62
    public void restored() {
57
    public void run() {
63
        super.restored();
58
        //start listening to activated TopComponents and Nodes 
64
        WindowManager.getDefault().invokeWhenUIReady( new Runnable() {
59
        //to see if palette window should be displayed
65
            public void run() {
60
        PaletteSwitch.getDefault().startListening();
66
                //start listening to activated TopComponents and Nodes 
67
                //to see if palette window should be displayed
68
                PaletteSwitch.getDefault().startListening();
69
            }
70
        });
71
    }
61
    }
72
}
62
}
(-)a/subversion/src/org/netbeans/modules/subversion/ModuleLifecycleManager.java (+1 lines)
Lines 72-77 Link Here
72
 * @author Petr Kuzel
72
 * @author Petr Kuzel
73
 * @author Maros Sandor
73
 * @author Maros Sandor
74
 */
74
 */
75
// XXX: No longer needed, I guess
75
public final class ModuleLifecycleManager extends ModuleInstall implements ErrorHandler, EntityResolver {
76
public final class ModuleLifecycleManager extends ModuleInstall implements ErrorHandler, EntityResolver {
76
77
77
    static final String [] vcsGenericModules = {
78
    static final String [] vcsGenericModules = {
(-)a/timers/src/org/netbeans/modules/timers/Install.java (-3 / +4 lines)
Lines 57-69 Link Here
57
import org.netbeans.api.editor.EditorRegistry;
57
import org.netbeans.api.editor.EditorRegistry;
58
import org.openide.filesystems.FileObject;
58
import org.openide.filesystems.FileObject;
59
import org.openide.loaders.DataObject;
59
import org.openide.loaders.DataObject;
60
import org.openide.modules.ModuleInstall;
60
import org.openide.windows.OnShowing;
61
61
62
/**
62
/**
63
 *
63
 *
64
 * @author nenik
64
 * @author nenik
65
 */
65
 */
66
public class Install extends  ModuleInstall {
66
@OnShowing
67
public class Install implements Runnable {
67
68
68
    static final boolean ENABLED;
69
    static final boolean ENABLED;
69
70
Lines 80-86 Link Here
80
81
81
    private static String INSTANCES = "Important instances";
82
    private static String INSTANCES = "Important instances";
82
    
83
    
83
    public @Override void restored() {
84
    public @Override void run() {
84
        if (!ENABLED) {
85
        if (!ENABLED) {
85
            return ;
86
            return ;
86
        }
87
        }
(-)a/versioning.system.cvss/src/org/netbeans/modules/versioning/system/cvss/ModuleLifecycleManager.java (+1 lines)
Lines 73-78 Link Here
73
 * @author Petr Kuzel
73
 * @author Petr Kuzel
74
 * @author Maros Sandor
74
 * @author Maros Sandor
75
 */
75
 */
76
// XXX: No longer needed I guess
76
public final class ModuleLifecycleManager extends ModuleInstall implements ErrorHandler, EntityResolver {
77
public final class ModuleLifecycleManager extends ModuleInstall implements ErrorHandler, EntityResolver {
77
78
78
    static final String [] vcsGenericModules = {
79
    static final String [] vcsGenericModules = {
(-)a/webpreview/manifest.mf (-1 lines)
Lines 1-7 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.webpreview/1
2
OpenIDE-Module: org.netbeans.modules.webpreview/1
3
OpenIDE-Module-Implementation-Version: 1
3
OpenIDE-Module-Implementation-Version: 1
4
OpenIDE-Module-Install: org/netbeans/modules/webpreview/Installer.class
5
OpenIDE-Module-Layer: org/netbeans/modules/webpreview/resources/layer.xml
4
OpenIDE-Module-Layer: org/netbeans/modules/webpreview/resources/layer.xml
6
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/webpreview/resources/Bundle.properties
5
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/webpreview/resources/Bundle.properties
7
6
(-)a/webpreview/src/org/netbeans/modules/webpreview/Installer.java (-8 / +12 lines)
Lines 42-64 Link Here
42
package org.netbeans.modules.webpreview;
42
package org.netbeans.modules.webpreview;
43
43
44
import org.netbeans.api.editor.EditorRegistry;
44
import org.netbeans.api.editor.EditorRegistry;
45
import org.openide.modules.ModuleInstall;
45
import org.openide.modules.OnStart;
46
import org.openide.modules.OnStop;
46
47
47
/**
48
/**
48
 * Web Preview module install
49
 * Web Preview module install
49
 */
50
 */
50
public class Installer extends ModuleInstall {
51
@OnStart
52
public class Installer implements Runnable {
51
53
52
    @Override
54
    @Override
53
    public void restored() {
55
    public void run() {
54
        EditorRegistry.addPropertyChangeListener(new WebPreviewControler());
56
        EditorRegistry.addPropertyChangeListener(new WebPreviewControler());
55
    }
57
    }
56
58
57
    @Override
59
    @OnStop
58
    public boolean closing() {
60
    public static final class Down implements Runnable {
59
        // we don't want the browser to open on IDE startup
61
        @Override
60
        WebPreviewTopComponent.findInstance().close();
62
        public void run() {
61
        return super.closing();
63
            // we don't want the browser to open on IDE startup
64
            WebPreviewTopComponent.findInstance().close();
65
        }
62
    }
66
    }
63
    
67
    
64
}
68
}
(-)a/websvc.jaxrpc/manifest.mf (-1 lines)
Lines 1-6 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.websvc.jaxrpc
2
OpenIDE-Module: org.netbeans.modules.websvc.jaxrpc
3
OpenIDE-Module-Install: org/netbeans/modules/websvc/jaxrpc/Installer.class
4
OpenIDE-Module-Layer: org/netbeans/modules/websvc/jaxrpc/layer.xml
3
OpenIDE-Module-Layer: org/netbeans/modules/websvc/jaxrpc/layer.xml
5
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/websvc/jaxrpc/Bundle.properties
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/websvc/jaxrpc/Bundle.properties
6
OpenIDE-Module-Specification-Version: 1.1
5
OpenIDE-Module-Specification-Version: 1.1
(-)a/websvc.jaxrpc/src/org/netbeans/modules/websvc/jaxrpc/Installer.java (-29 / +31 lines)
Lines 46-51 Link Here
46
46
47
import java.io.File;
47
import java.io.File;
48
import java.io.IOException;
48
import java.io.IOException;
49
import java.util.MissingResourceException;
49
import org.netbeans.api.project.ProjectManager;
50
import org.netbeans.api.project.ProjectManager;
50
import org.netbeans.modules.websvc.api.client.WebServicesClientSupport;
51
import org.netbeans.modules.websvc.api.client.WebServicesClientSupport;
51
import org.netbeans.spi.project.support.ant.EditableProperties;
52
import org.netbeans.spi.project.support.ant.EditableProperties;
Lines 54-95 Link Here
54
import org.openide.ErrorManager;
55
import org.openide.ErrorManager;
55
import org.openide.NotifyDescriptor;
56
import org.openide.NotifyDescriptor;
56
import org.openide.modules.InstalledFileLocator;
57
import org.openide.modules.InstalledFileLocator;
57
import org.openide.modules.ModuleInstall;
58
import org.openide.modules.OnStart;
58
import org.openide.util.NbBundle;
59
import org.openide.util.NbBundle;
59
60
60
/**
61
/**
61
 * @author Peter Williams
62
 * @author Peter Williams
62
 */
63
 */
63
public class Installer extends ModuleInstall {
64
@OnStart
64
65
public class Installer implements Runnable {
65
    public Installer() {
66
    @Override
66
        super();
67
    public  void run() {
68
        if (ProjectManager.mutex().isWriteAccess()) {
69
            init();
70
        } else {
71
            ProjectManager.mutex().postWriteRequest(this);
72
        }
67
    }
73
    }
68
74
    
69
    public  void restored() {
75
    private void init() throws MissingResourceException {
70
        ProjectManager.mutex().postWriteRequest(new Runnable(){
76
        try {
71
            public  void run() {
77
            EditableProperties ep = PropertyUtils.getGlobalProperties();
72
                try {
78
            boolean changed = false;
73
                    EditableProperties ep = PropertyUtils.getGlobalProperties();
79
            File wsclient_update = InstalledFileLocator.getDefault().locate("ant/extra/wsclientuptodate.jar", null, false);
74
                    boolean changed = false;
80
            if (wsclient_update == null) {
75
                    File wsclient_update = InstalledFileLocator.getDefault().locate("ant/extra/wsclientuptodate.jar", null, false);
81
                String msg = NbBundle.getMessage(Installer.class, "MSG_WSClientUpdateMissing");
76
                    if (wsclient_update == null) {
82
                DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(msg, NotifyDescriptor.ERROR_MESSAGE));
77
                        String msg = NbBundle.getMessage(Installer.class, "MSG_WSClientUpdateMissing");
83
            } else  {
78
                        DialogDisplayer.getDefault().notify(new NotifyDescriptor.Message(msg, NotifyDescriptor.ERROR_MESSAGE));
84
                String wsclient_update_old = ep.getProperty(WebServicesClientSupport.WSCLIENTUPTODATE_CLASSPATH);
79
                    } else  {
85
                if (wsclient_update_old == null || !wsclient_update_old.equals(wsclient_update.toString())) {
80
                        String wsclient_update_old = ep.getProperty(WebServicesClientSupport.WSCLIENTUPTODATE_CLASSPATH);
86
                    ep.setProperty(WebServicesClientSupport.WSCLIENTUPTODATE_CLASSPATH, wsclient_update.toString());
81
                        if (wsclient_update_old == null || !wsclient_update_old.equals(wsclient_update.toString())) {
87
                    changed = true;
82
                            ep.setProperty(WebServicesClientSupport.WSCLIENTUPTODATE_CLASSPATH, wsclient_update.toString());
83
                            changed = true;
84
                        }
85
                    }
86
                    if (changed) {
87
                        PropertyUtils.putGlobalProperties(ep);
88
                    }
89
                } catch (IOException ioe) {
90
                    ErrorManager.getDefault().notify(ioe);
91
                }
88
                }
92
            }
89
            }
93
        });
90
            if (changed) {
91
                PropertyUtils.putGlobalProperties(ep);
92
            }
93
        } catch (IOException ioe) {
94
            ErrorManager.getDefault().notify(ioe);
95
        }
94
    }
96
    }
95
}
97
}
(-)a/websvc.manager/manifest.mf (-1 lines)
Lines 2-7 Link Here
2
AutoUpdate-Show-In-Client: false
2
AutoUpdate-Show-In-Client: false
3
OpenIDE-Module: org.netbeans.modules.websvc.manager
3
OpenIDE-Module: org.netbeans.modules.websvc.manager
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/websvc/manager/Bundle.properties
4
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/websvc/manager/Bundle.properties
5
OpenIDE-Module-Install: org/netbeans/modules/websvc/manager/WebServiceModuleInstaller.class
6
OpenIDE-Module-Specification-Version: 1.14
5
OpenIDE-Module-Specification-Version: 1.14
7
6
(-)a/websvc.manager/src/org/netbeans/modules/websvc/manager/WebServiceModuleInstaller.java (-8 / +5 lines)
Lines 45-66 Link Here
45
45
46
package org.netbeans.modules.websvc.manager;
46
package org.netbeans.modules.websvc.manager;
47
47
48
import org.openide.modules.ModuleInstall;
48
import org.openide.modules.OnStop;
49
49
50
// This is here just to persist the snippets
50
// This is here just to persist the snippets
51
51
52
public class WebServiceModuleInstaller extends ModuleInstall {
52
@OnStop
53
public class WebServiceModuleInstaller implements Runnable {
53
    
54
    
54
    @Override
55
    @Override
55
    public void close() {
56
    public void run() {
56
        /**
57
        /**
57
         * Persist the Webservice meta data in the user's directory.
58
         * Persist the Webservice meta data in the user's directory.
58
         */
59
         */
59
        WebServicePersistenceManager persistenceManager = new WebServicePersistenceManager();
60
        WebServicePersistenceManager persistenceManager = new WebServicePersistenceManager();
60
        persistenceManager.save();
61
        persistenceManager.save();
61
    }
62
    }
62
        
63
}        
63
    public void uninstalled() {
64
        close();
65
    } 
66
}
(-)a/welcome/manifest.mf (-1 lines)
Lines 1-5 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module-Install: org/netbeans/modules/welcome/Installer.class
3
OpenIDE-Module-Specification-Version: 1.28
2
OpenIDE-Module-Specification-Version: 1.28
4
OpenIDE-Module: org.netbeans.modules.welcome/1
3
OpenIDE-Module: org.netbeans.modules.welcome/1
5
OpenIDE-Module-Layer: org/netbeans/modules/welcome/resources/layer.xml
4
OpenIDE-Module-Layer: org/netbeans/modules/welcome/resources/layer.xml
(-)a/welcome/src/org/netbeans/modules/welcome/Installer.java (-4 / +5 lines)
Lines 31-38 Link Here
31
package org.netbeans.modules.welcome;
31
package org.netbeans.modules.welcome;
32
32
33
import java.util.Set;
33
import java.util.Set;
34
import org.openide.modules.ModuleInstall;
35
import org.openide.windows.Mode;
34
import org.openide.windows.Mode;
35
import org.openide.windows.OnShowing;
36
import org.openide.windows.TopComponent;
36
import org.openide.windows.TopComponent;
37
import org.openide.windows.WindowManager;
37
import org.openide.windows.WindowManager;
38
import org.openide.windows.WindowSystemEvent;
38
import org.openide.windows.WindowSystemEvent;
Lines 41-50 Link Here
41
/**
41
/**
42
 * Checks the feedback survey.
42
 * Checks the feedback survey.
43
 */
43
 */
44
public class Installer extends ModuleInstall implements Runnable {
44
@OnShowing
45
public class Installer implements Runnable {
45
46
46
    @Override public void restored() {
47
    private void initListener() {
47
        WindowManager.getDefault().invokeWhenUIReady(this);
48
        WindowManager.getDefault().addWindowSystemListener( new WindowSystemListener() {
48
        WindowManager.getDefault().addWindowSystemListener( new WindowSystemListener() {
49
49
50
            @Override
50
            @Override
Lines 90-95 Link Here
90
90
91
    @Override
91
    @Override
92
    public void run() {
92
    public void run() {
93
        initListener();
93
        FeedbackSurvey.start();
94
        FeedbackSurvey.start();
94
    }
95
    }
95
}
96
}
(-)a/xml.tax/src/org/netbeans/modules/xml/tax/TAXModuleInstall.java (+2 lines)
Lines 55-60 Link Here
55
 *
55
 *
56
 * @author Libor Kramolis
56
 * @author Libor Kramolis
57
 */
57
 */
58
// XXX: Modifications to bean search path should not run in parallel, otherwise
59
// we risk race condition with others (Form?)
58
public class TAXModuleInstall extends ModuleInstall {
60
public class TAXModuleInstall extends ModuleInstall {
59
61
60
    private static final String BEANINFO_PATH = "org.netbeans.modules.xml.tax.beans.beaninfo"; // NOI18N
62
    private static final String BEANINFO_PATH = "org.netbeans.modules.xml.tax.beans.beaninfo"; // NOI18N
(-)a/xml/manifest.mf (-1 lines)
Lines 1-7 Link Here
1
Manifest-Version: 1.0
1
Manifest-Version: 1.0
2
OpenIDE-Module: org.netbeans.modules.xml
2
OpenIDE-Module: org.netbeans.modules.xml
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/xml/resources/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/xml/resources/Bundle.properties
4
OpenIDE-Module-Install: org/netbeans/modules/xml/CoreModuleInstall.class
5
OpenIDE-Module-Layer: org/netbeans/modules/xml/resources/mf-layer.xml
4
OpenIDE-Module-Layer: org/netbeans/modules/xml/resources/mf-layer.xml
6
AutoUpdate-Show-In-Client: false
5
AutoUpdate-Show-In-Client: false
7
OpenIDE-Module-Specification-Version: 1.16
6
OpenIDE-Module-Specification-Version: 1.16
(-)a/xml/src/org/netbeans/modules/xml/CoreModuleInstall.java (-4 / +5 lines)
Lines 45-60 Link Here
45
package org.netbeans.modules.xml;
45
package org.netbeans.modules.xml;
46
46
47
import org.netbeans.modules.xml.actions.InputOutputReporter;
47
import org.netbeans.modules.xml.actions.InputOutputReporter;
48
import org.openide.modules.ModuleInstall;
48
import org.openide.modules.OnStop;
49
49
50
/**
50
/**
51
 * Module installation class for core module.
51
 * Module installation class for core module.
52
 *
52
 *
53
 * @author Libor Kramolis
53
 * @author Libor Kramolis
54
 */
54
 */
55
public class CoreModuleInstall extends ModuleInstall {
55
@OnStop
56
56
public class CoreModuleInstall implements Runnable {
57
    public void uninstalled() {
57
    @Override
58
    public void run() {
58
        InputOutputReporter.releaseAllAnnotations();
59
        InputOutputReporter.releaseAllAnnotations();
59
    }
60
    }
60
}
61
}

Return to bug 200636