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

(-)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.web.monitor/1
2
OpenIDE-Module: org.netbeans.modules.web.monitor/1
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/web/monitor/Bundle.properties
3
OpenIDE-Module-Localizing-Bundle: org/netbeans/modules/web/monitor/Bundle.properties
4
OpenIDE-Module-Install: org/netbeans/modules/web/monitor/MonitorModule.class
5
OpenIDE-Module-Layer: org/netbeans/modules/web/monitor/resources/layer.xml
4
OpenIDE-Module-Layer: org/netbeans/modules/web/monitor/resources/layer.xml
6
OpenIDE-Module-Specification-Version: 1.12
5
OpenIDE-Module-Specification-Version: 1.12
7
OpenIDE-Module-Requires: org.openide.util.HttpServer$Impl
6
OpenIDE-Module-Requires: org.openide.util.HttpServer$Impl
(-)src/org/netbeans/modules/web/monitor/client/Controller.java (-20 / +28 lines)
Lines 18-23 Link Here
18
package  org.netbeans.modules.web.monitor.client;
18
package  org.netbeans.modules.web.monitor.client;
19
19
20
import java.util.Comparator;
20
import java.util.Comparator;
21
import java.util.Date;
21
import java.util.Enumeration;
22
import java.util.Enumeration;
22
import java.util.Hashtable;
23
import java.util.Hashtable;
23
import java.util.Vector;
24
import java.util.Vector;
Lines 102-109 Link Here
102
    private boolean useBrowserCookie = true;
103
    private boolean useBrowserCookie = true;
103
104
104
    private static Controller instance = null; 
105
    private static Controller instance = null; 
106
    private Date startDate;
105
    
107
    
106
    private Controller() {
108
    private Controller() {
109
        startDate = new Date();
107
	currBeans = new Hashtable();
110
	currBeans = new Hashtable();
108
	saveBeans = new Hashtable();
111
	saveBeans = new Hashtable();
109
	createNodeStructure();
112
	createNodeStructure();
Lines 144-161 Link Here
144
	    
147
	    
145
    }
148
    }
146
149
147
    static void removeFiles() { 
148
	if(instance == null) return; 
149
	instance.cleanup(); 
150
    }
151
152
    void cleanup() {
153
	deleteDirectory(currDirStr);
154
        /*
155
	removeBrowserListener();
156
        */
157
    }
158
159
    /**
150
    /**
160
     * Adds a transaction to the list of current transactions.
151
     * Adds a transaction to the list of current transactions.
161
     */
152
     */
Lines 962-975 Link Here
962
	while(e.hasMoreElements()) {
953
	while(e.hasMoreElements()) {
963
954
964
	    fo = (FileObject)e.nextElement();
955
	    fo = (FileObject)e.nextElement();
965
	    id = fo.getName();
956
            if (fo.lastModified().after(startDate)) {
966
	    if(debug) 
957
                id = fo.getName();
967
		log("getting current transaction: " + id); //NOI18N 
958
                if(debug) 
968
		    
959
                    log("getting current transaction: " + id); //NOI18N 
969
	    // Retrieve the monitordata
960
970
	    md = retrieveMonitorData(id, currDir); 
961
                // Retrieve the monitordata
971
            if (md != null) {
962
                md = retrieveMonitorData(id, currDir); 
972
                nodes.add(createTransactionNode(md, true)); 
963
                if (md != null) {
964
                    nodes.add(createTransactionNode(md, true)); 
965
                }
966
            }
967
            else {
968
                // delete it
969
                final FileObject foToDelete = fo;
970
                RequestProcessor.getDefault().post(new Runnable () {
971
                    public void run() {
972
                        Thread.yield();
973
                        try {
974
                            foToDelete.delete();
975
                        }
976
                        catch (IOException e) {
977
                            ErrorManager.getDefault().notify(ErrorManager.INFORMATIONAL, e);
978
                        }
979
                    }
980
                });
973
            }
981
            }
974
	}
982
	}
975
	    
983
	    
(-)src/org/netbeans/modules/web/monitor/client/MonitorAction.java (-4 lines)
Lines 97-106 Link Here
97
        tv.requestActive();        
97
        tv.requestActive();        
98
    }
98
    }
99
99
100
    public static void cleanupMonitor() {
101
	Controller.removeFiles(); 
102
    }
103
104
    public static void log(String s) {
100
    public static void log(String s) {
105
	log("MonitorAction::" + s); //NOI18N
101
	log("MonitorAction::" + s); //NOI18N
106
    }
102
    }

Return to bug 43213