From: Alexandre Montplaisir Date: Fri, 20 May 2016 21:41:43 +0000 (-0400) Subject: tmf: Enable address mapping config action for all traces X-Git-Url: http://git.efficios.com/?p=deliverable%2Ftracecompass.git;a=commitdiff_plain;h=cc5baabc9a74ddf8f547ba21d2e789af814fff15 tmf: Enable address mapping config action for all traces 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 Reviewed-on: https://git.eclipse.org/r/73337 Reviewed-by: Hudson CI Reviewed-by: Marc-Andre Laperle Tested-by: Marc-Andre Laperle --- diff --git a/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/callstack/CallStackView.java b/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/callstack/CallStackView.java index 8e915d84a8..3bd838adef 100644 --- a/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/callstack/CallStackView.java +++ b/tmf/org.eclipse.tracecompass.tmf.ui/src/org/eclipse/tracecompass/tmf/ui/views/callstack/CallStackView.java @@ -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;