tmf: Enable address mapping config action for all traces
authorAlexandre Montplaisir <alexmonthy@efficios.com>
Fri, 20 May 2016 21:41:43 +0000 (17:41 -0400)
committerAlexandre Montplaisir <alexmonthy@efficios.com>
Fri, 3 Jun 2016 17:36:48 +0000 (13:36 -0400)
The Call Stack View only enables the "Configure address mapping"
action for traces that provide function entry/exit info. However,
since this configuration is now used by the generic ISymbolProvider
and can be used by other analyses, the dialog should be accesssible
for all traces, as long as they provide a preference page.

Bug: 494212

Change-Id: Ia9db94e051226fb79adfd502f6081857954042d0
Signed-off-by: Alexandre Montplaisir <alexmonthy@efficios.com>
Reviewed-on: https://git.eclipse.org/r/73337
Reviewed-by: Hudson CI
Reviewed-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Tested-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/callstack/CallStackView.java

index 8e915d84a86f8926d582a220450181bafe6e18e7..3bd838adef6391b17c84fbe2292a4e5584411115 100644 (file)
@@ -526,6 +526,20 @@ public class CallStackView extends AbstractTimeGraphView {
         if (monitor.isCanceled()) {
             return;
         }
+
+        /*
+         * Load the symbol provider for the current trace, even if it does not
+         * provide a call stack analysis module. See
+         * https://bugs.eclipse.org/bugs/show_bug.cgi?id=494212
+         */
+        ISymbolProvider provider = fSymbolProviders.get(trace);
+        if (provider == null) {
+            provider = SymbolProviderManager.getInstance().getSymbolProvider(trace);
+            provider.loadConfiguration(null);
+            fSymbolProviders.put(trace, provider);
+        }
+
+        /* Continue with the call stack view specific operations */
         AbstractCallStackAnalysis module = getCallStackModule(trace);
         if (module == null) {
             addUnavailableEntry(trace, parentTrace);
@@ -557,16 +571,6 @@ public class CallStackView extends AbstractTimeGraphView {
                 continue;
             }
 
-            ISymbolProvider provider = fSymbolProviders.get(trace);
-            if (provider == null) {
-                provider = SymbolProviderManager.getInstance().getSymbolProvider(trace);
-                provider.loadConfiguration(monitor);
-                fSymbolProviders.put(trace, provider);
-            }
-
-            getConfigureSymbolsAction().setEnabled(true);
-
-
             TraceEntry traceEntry = traceEntryMap.get(trace);
             if (traceEntry == null) {
                 traceEntry = new TraceEntry(trace.getName(), start, end + 1);
@@ -1223,6 +1227,12 @@ public class CallStackView extends AbstractTimeGraphView {
 
         fConfigureSymbolsAction.setToolTipText(Messages.CallStackView_ConfigureSymbolProvidersTooltip);
         fConfigureSymbolsAction.setImageDescriptor(Activator.getDefault().getImageDescripterFromPath(IMPORT_BINARY_ICON_PATH));
+
+        /*
+         * The updateConfigureSymbolsAction() method (called by refresh()) will
+         * set the action to true if applicable after the symbol provider has
+         * been properly loaded.
+         */
         fConfigureSymbolsAction.setEnabled(false);
 
         return fConfigureSymbolsAction;
This page took 0.025353 seconds and 5 git commands to generate.