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

(-)a/lib.profiler.common/src/org/netbeans/lib/profiler/common/Profiler.java (+5 lines)
Lines 57-62 Link Here
57
import java.io.IOException;
57
import java.io.IOException;
58
import java.util.Iterator;
58
import java.util.Iterator;
59
import java.util.Vector;
59
import java.util.Vector;
60
import java.util.logging.Level;
61
import java.util.logging.Logger;
60
import javax.swing.*;
62
import javax.swing.*;
61
63
62
64
Lines 107-112 Link Here
107
    public static final int ERROR = 16;
109
    public static final int ERROR = 16;
108
    private static final boolean DEBUG = System.getProperty("org.netbeans.lib.profiler.common.Profiler") != null; // NOI18N
110
    private static final boolean DEBUG = System.getProperty("org.netbeans.lib.profiler.common.Profiler") != null; // NOI18N
109
    private static Profiler defaultProfiler;
111
    private static Profiler defaultProfiler;
112
    private static final Logger LOG = Logger.getLogger(Profiler.class.getName());
110
113
111
    //~ Instance fields ----------------------------------------------------------------------------------------------------------
114
    //~ Instance fields ----------------------------------------------------------------------------------------------------------
112
115
Lines 117-122 Link Here
117
120
118
    public static synchronized Profiler getDefault() {
121
    public static synchronized Profiler getDefault() {
119
        if (defaultProfiler == null) {
122
        if (defaultProfiler == null) {
123
            LOG.info("about to create default profiler");
120
            final Iterator it = Service.providers(Profiler.class);
124
            final Iterator it = Service.providers(Profiler.class);
121
125
122
            if (it.hasNext()) {
126
            if (it.hasNext()) {
Lines 130-135 Link Here
130
            if (defaultProfiler == null) {
134
            if (defaultProfiler == null) {
131
                throw new InternalError("Should never happen"); // NOI18N
135
                throw new InternalError("Should never happen"); // NOI18N
132
            }
136
            }
137
            LOG.log(Level.INFO, "profiler is here " + defaultProfiler, new Exception("stacktrace"));
133
        }
138
        }
134
139
135
        return defaultProfiler;
140
        return defaultProfiler;
(-)a/profiler/src/org/netbeans/modules/profiler/ProfilerModule.java (-1 / +1 lines)
Lines 145-151 Link Here
145
                                     // to run correctly - it needs to know the saved JVM executable file/version to run.
145
                                     // to run correctly - it needs to know the saved JVM executable file/version to run.
146
146
147
        MiscUtils.deleteHeapTempFiles();
147
        MiscUtils.deleteHeapTempFiles();
148
        Profiler.getDefault();
148
       // Profiler.getDefault();
149
    }
149
    }
150
150
151
    /**
151
    /**
(-)a/profiler/src/org/netbeans/modules/profiler/actions/GetCmdLineArgumentsAction.java (-2 / +2 lines)
Lines 86-93 Link Here
86
        );
86
        );
87
        putValue("noIconInMenu", Boolean.TRUE); //NOI18N
87
        putValue("noIconInMenu", Boolean.TRUE); //NOI18N
88
        
88
        
89
        updateEnabledState();
89
        //updateEnabledState();
90
        Profiler.getDefault().addProfilingStateListener(this);
90
        //Profiler.getDefault().addProfilingStateListener(this);
91
    }
91
    }
92
92
93
    //~ Methods ------------------------------------------------------------------------------------------------------------------
93
    //~ Methods ------------------------------------------------------------------------------------------------------------------
(-)a/profiler/src/org/netbeans/modules/profiler/actions/InternalStatsAction.java (-2 / +2 lines)
Lines 70-77 Link Here
70
        ));
70
        ));
71
        putValue("noIconInMenu", Boolean.TRUE); //NOI18N
71
        putValue("noIconInMenu", Boolean.TRUE); //NOI18N
72
        
72
        
73
        updateEnabledState();
73
        //updateEnabledState();
74
        Profiler.getDefault().addProfilingStateListener(this);
74
        //Profiler.getDefault().addProfilingStateListener(this);
75
    }
75
    }
76
76
77
    //~ Methods ------------------------------------------------------------------------------------------------------------------
77
    //~ Methods ------------------------------------------------------------------------------------------------------------------
(-)a/profiler/src/org/netbeans/modules/profiler/actions/ProfilingAwareAction.java (-2 / +2 lines)
Lines 60-73 Link Here
60
    //~ Constructors -------------------------------------------------------------------------------------------------------------
60
    //~ Constructors -------------------------------------------------------------------------------------------------------------
61
61
62
    protected ProfilingAwareAction() {
62
    protected ProfilingAwareAction() {
63
        Profiler.getDefault().addProfilingStateListener(this);
63
        //Profiler.getDefault().addProfilingStateListener(this);
64
    }
64
    }
65
65
66
    //~ Methods ------------------------------------------------------------------------------------------------------------------
66
    //~ Methods ------------------------------------------------------------------------------------------------------------------
67
67
68
    public boolean isEnabled() {
68
    public boolean isEnabled() {
69
        if (!NetBeansProfiler.isInitialized()) {
69
        if (!NetBeansProfiler.isInitialized()) {
70
            return false;
70
            return true;
71
        }
71
        }
72
72
73
        boolean shouldBeEnabled = false;
73
        boolean shouldBeEnabled = false;
(-)a/profiler/src/org/netbeans/modules/profiler/actions/RerunAction.java (-1 / +1 lines)
Lines 66-72 Link Here
66
66
67
    public RerunAction() {
67
    public RerunAction() {
68
        putProperty(Action.SHORT_DESCRIPTION, NbBundle.getMessage(RerunAction.class, "HINT_RerunAction")); //NOI18N
68
        putProperty(Action.SHORT_DESCRIPTION, NbBundle.getMessage(RerunAction.class, "HINT_RerunAction")); //NOI18N
69
        Profiler.getDefault().addProfilingStateListener(this);
69
     //   Profiler.getDefault().addProfilingStateListener(this);
70
    }
70
    }
71
71
72
    //~ Methods ------------------------------------------------------------------------------------------------------------------
72
    //~ Methods ------------------------------------------------------------------------------------------------------------------
(-)a/profiler/src/org/netbeans/modules/profiler/actions/StopAction.java (-3 / +3 lines)
Lines 79-87 Link Here
79
    //~ Constructors -------------------------------------------------------------------------------------------------------------
79
    //~ Constructors -------------------------------------------------------------------------------------------------------------
80
80
81
    public StopAction() {
81
    public StopAction() {
82
        updateDisplayName();
82
        //updateDisplayName();
83
        updateEnabledState();
83
        //updateEnabledState();
84
        Profiler.getDefault().addProfilingStateListener(this);
84
        //Profiler.getDefault().addProfilingStateListener(this);
85
    }
85
    }
86
86
87
    //~ Methods ------------------------------------------------------------------------------------------------------------------
87
    //~ Methods ------------------------------------------------------------------------------------------------------------------

Return to bug 154324