Skip to content

Commit

Permalink
callstack: Fix the FlameChartView file formatting
Browse files Browse the repository at this point in the history
Fix the default Eclipse formatting for this whole file, except for its
NOSONAR line to preserve as is.

Change-Id: I373aaf6448183153809a982c42904fba60c0f0c8
Signed-off-by: Marco Miller <marco.miller@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/c/tracecompass.incubator/org.eclipse.tracecompass.incubator/+/201547
Tested-by: Trace Compass Bot <tracecompass-bot@eclipse.org>
Tested-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Reviewed-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
  • Loading branch information
marco-miller committed Apr 27, 2023
1 parent 3159352 commit 9a4f0c5
Showing 1 changed file with 14 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,8 @@ public Image getColumnImage(Object element, int columnIndex) {
if (entryModel instanceof FlameChartEntryModel) {
FlameChartEntryModel model = (FlameChartEntryModel) entryModel;
if (model.getEntryType() == EntryType.LEVEL) {
// Is this the symbol key image? then show the symbol key image, otherwise, just
// the group image
// Is this the symbol key image? then show the symbol
// key image, otherwise, just the group image
return GROUP_IMAGE;
}
if (model.getEntryType() == EntryType.FUNCTION && fFunctions.containsKey(entryModel.getId())) {
Expand Down Expand Up @@ -421,7 +421,8 @@ protected void synchingToTime(final long time) {
return true;
});
Map<Long, TimeGraphEntry> map = Maps.uniqueIndex(filtered, e -> e.getEntryModel().getId());
// use time -1 as a lower bound for the end of Time events to be included.
// use time -1 as a lower bound for the end of Time events to be
// included.
SelectionTimeQueryFilter filter = new SelectionTimeQueryFilter(Math.max(traceEntry.getStartTime(), time - 1), time, 2, map.keySet());
TmfModelResponse<@NonNull TimeGraphModel> response = traceEntry.getProvider().fetchRowModel(FetchParametersUtils.selectionTimeQueryToMap(filter), null);
TimeGraphModel model = response.getModel();
Expand All @@ -445,8 +446,9 @@ private void syncToRow(ITimeGraphRowModel rowModel, long time, Map<Long, TimeGra
ITimeGraphState event = list.get(0);
if (event.getStartTime() + event.getDuration() <= time && list.size() > 1) {
/*
* get the second time graph state as passing time - 1 as a first argument to
* the filter will get the previous state, if time is the beginning of an event
* get the second time graph state as passing time - 1 as a
* first argument to the filter will get the previous state, if
* time is the beginning of an event
*/
event = list.get(1);
}
Expand Down Expand Up @@ -558,7 +560,8 @@ public void run() {
TimeGraphEntry callStackEntry = (TimeGraphEntry) entry;
ITimeGraphDataProvider<? extends TimeGraphEntryModel> provider = getProvider(callStackEntry);
long selectionBegin = viewer.getSelectionBegin();
Map<@NonNull String, @NonNull Object> parameters = FetchParametersUtils.selectionTimeQueryToMap(new SelectionTimeQueryFilter(Lists.newArrayList(Long.MIN_VALUE, selectionBegin), Collections.singleton(callStackEntry.getEntryModel().getId())));
Map<@NonNull String, @NonNull Object> parameters = FetchParametersUtils
.selectionTimeQueryToMap(new SelectionTimeQueryFilter(Lists.newArrayList(Long.MIN_VALUE, selectionBegin), Collections.singleton(callStackEntry.getEntryModel().getId())));
TmfModelResponse<@NonNull TimeGraphModel> response = provider.fetchRowModel(parameters, null);
TimeGraphModel model = response.getModel();
if (model == null || model.getRows().size() != 1) {
Expand Down Expand Up @@ -654,18 +657,18 @@ public void run() {
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.
* 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;
}

/**
* @return an array of {@link ISymbolProviderPreferencePage} that will configure
* the current traces
* @return an array of {@link ISymbolProviderPreferencePage} that will
* configure the current traces
*/
private ISymbolProviderPreferencePage[] getProviderPages() {
List<ISymbolProviderPreferencePage> pages = new ArrayList<>();
Expand Down

0 comments on commit 9a4f0c5

Please sign in to comment.