diff -r ce3e82112d76 lib.profiler.common/src/org/netbeans/lib/profiler/common/Profiler.java --- a/lib.profiler.common/src/org/netbeans/lib/profiler/common/Profiler.java Tue Dec 02 11:00:23 2008 +0100 +++ b/lib.profiler.common/src/org/netbeans/lib/profiler/common/Profiler.java Tue Dec 02 11:24:10 2008 +0100 @@ -57,6 +57,8 @@ import java.io.IOException; import java.util.Iterator; import java.util.Vector; +import java.util.logging.Level; +import java.util.logging.Logger; import javax.swing.*; @@ -107,6 +109,7 @@ public static final int ERROR = 16; private static final boolean DEBUG = System.getProperty("org.netbeans.lib.profiler.common.Profiler") != null; // NOI18N private static Profiler defaultProfiler; + private static final Logger LOG = Logger.getLogger(Profiler.class.getName()); //~ Instance fields ---------------------------------------------------------------------------------------------------------- @@ -117,6 +120,7 @@ public static synchronized Profiler getDefault() { if (defaultProfiler == null) { + LOG.info("about to create default profiler"); final Iterator it = Service.providers(Profiler.class); if (it.hasNext()) { @@ -130,6 +134,7 @@ if (defaultProfiler == null) { throw new InternalError("Should never happen"); // NOI18N } + LOG.log(Level.INFO, "profiler is here " + defaultProfiler, new Exception("stacktrace")); } return defaultProfiler; diff -r ce3e82112d76 profiler/src/org/netbeans/modules/profiler/ProfilerModule.java --- a/profiler/src/org/netbeans/modules/profiler/ProfilerModule.java Tue Dec 02 11:00:23 2008 +0100 +++ b/profiler/src/org/netbeans/modules/profiler/ProfilerModule.java Tue Dec 02 11:24:10 2008 +0100 @@ -145,7 +145,7 @@ // to run correctly - it needs to know the saved JVM executable file/version to run. MiscUtils.deleteHeapTempFiles(); - Profiler.getDefault(); + // Profiler.getDefault(); } /** diff -r ce3e82112d76 profiler/src/org/netbeans/modules/profiler/actions/GetCmdLineArgumentsAction.java --- a/profiler/src/org/netbeans/modules/profiler/actions/GetCmdLineArgumentsAction.java Tue Dec 02 11:00:23 2008 +0100 +++ b/profiler/src/org/netbeans/modules/profiler/actions/GetCmdLineArgumentsAction.java Tue Dec 02 11:24:10 2008 +0100 @@ -86,8 +86,8 @@ ); putValue("noIconInMenu", Boolean.TRUE); //NOI18N - updateEnabledState(); - Profiler.getDefault().addProfilingStateListener(this); + //updateEnabledState(); + //Profiler.getDefault().addProfilingStateListener(this); } //~ Methods ------------------------------------------------------------------------------------------------------------------ diff -r ce3e82112d76 profiler/src/org/netbeans/modules/profiler/actions/InternalStatsAction.java --- a/profiler/src/org/netbeans/modules/profiler/actions/InternalStatsAction.java Tue Dec 02 11:00:23 2008 +0100 +++ b/profiler/src/org/netbeans/modules/profiler/actions/InternalStatsAction.java Tue Dec 02 11:24:10 2008 +0100 @@ -70,8 +70,8 @@ )); putValue("noIconInMenu", Boolean.TRUE); //NOI18N - updateEnabledState(); - Profiler.getDefault().addProfilingStateListener(this); + //updateEnabledState(); + //Profiler.getDefault().addProfilingStateListener(this); } //~ Methods ------------------------------------------------------------------------------------------------------------------ diff -r ce3e82112d76 profiler/src/org/netbeans/modules/profiler/actions/ProfilingAwareAction.java --- a/profiler/src/org/netbeans/modules/profiler/actions/ProfilingAwareAction.java Tue Dec 02 11:00:23 2008 +0100 +++ b/profiler/src/org/netbeans/modules/profiler/actions/ProfilingAwareAction.java Tue Dec 02 11:24:10 2008 +0100 @@ -60,14 +60,14 @@ //~ Constructors ------------------------------------------------------------------------------------------------------------- protected ProfilingAwareAction() { - Profiler.getDefault().addProfilingStateListener(this); + //Profiler.getDefault().addProfilingStateListener(this); } //~ Methods ------------------------------------------------------------------------------------------------------------------ public boolean isEnabled() { if (!NetBeansProfiler.isInitialized()) { - return false; + return true; } boolean shouldBeEnabled = false; diff -r ce3e82112d76 profiler/src/org/netbeans/modules/profiler/actions/RerunAction.java --- a/profiler/src/org/netbeans/modules/profiler/actions/RerunAction.java Tue Dec 02 11:00:23 2008 +0100 +++ b/profiler/src/org/netbeans/modules/profiler/actions/RerunAction.java Tue Dec 02 11:24:10 2008 +0100 @@ -66,7 +66,7 @@ public RerunAction() { putProperty(Action.SHORT_DESCRIPTION, NbBundle.getMessage(RerunAction.class, "HINT_RerunAction")); //NOI18N - Profiler.getDefault().addProfilingStateListener(this); + // Profiler.getDefault().addProfilingStateListener(this); } //~ Methods ------------------------------------------------------------------------------------------------------------------ diff -r ce3e82112d76 profiler/src/org/netbeans/modules/profiler/actions/StopAction.java --- a/profiler/src/org/netbeans/modules/profiler/actions/StopAction.java Tue Dec 02 11:00:23 2008 +0100 +++ b/profiler/src/org/netbeans/modules/profiler/actions/StopAction.java Tue Dec 02 11:24:10 2008 +0100 @@ -79,9 +79,9 @@ //~ Constructors ------------------------------------------------------------------------------------------------------------- public StopAction() { - updateDisplayName(); - updateEnabledState(); - Profiler.getDefault().addProfilingStateListener(this); + //updateDisplayName(); + //updateEnabledState(); + //Profiler.getDefault().addProfilingStateListener(this); } //~ Methods ------------------------------------------------------------------------------------------------------------------