Skip to content

Commit

Permalink
EventsView: avoid narrowing conversion
Browse files Browse the repository at this point in the history
getRunningTime() returns a long
  • Loading branch information
EcljpseB0T authored and jukzi committed Sep 20, 2023
1 parent df661fe commit a5a8208
Showing 1 changed file with 25 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,36 @@

package org.eclipse.core.tools.runtime;

import java.util.*;
import java.util.Arrays;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import org.eclipse.core.runtime.PerformanceStats;
import org.eclipse.core.tools.*;
import org.eclipse.jface.action.*;
import org.eclipse.core.tools.CopyStructuredSelectionAction;
import org.eclipse.core.tools.Messages;
import org.eclipse.core.tools.TableSelectionProviderDecorator;
import org.eclipse.core.tools.TableWithTotalView;
import org.eclipse.jface.action.Action;
import org.eclipse.jface.action.IToolBarManager;
import org.eclipse.jface.action.MenuManager;
import org.eclipse.jface.resource.ImageDescriptor;
import org.eclipse.jface.viewers.*;
import org.eclipse.jface.viewers.ColumnLayoutData;
import org.eclipse.jface.viewers.ColumnPixelData;
import org.eclipse.jface.viewers.ColumnWeightData;
import org.eclipse.jface.viewers.IColorProvider;
import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.ITreeContentProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.jface.viewers.TableViewer;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerComparator;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.Image;
import org.eclipse.swt.widgets.*;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Display;
import org.eclipse.swt.widgets.Menu;
import org.eclipse.ui.IActionBars;

/**
Expand Down Expand Up @@ -185,7 +204,7 @@ protected String[] computeTotalLine(Iterator<PerformanceStats> iter) {
String[] totals = new String[getColumnHeaders().length];
int count = 0;
int events = 0;
int time = 0;
long time = 0;
if (!iter.hasNext()) {
Object[] elements = ((ITreeContentProvider) viewer.getContentProvider()).getElements(viewer.getInput());
@SuppressWarnings({ "rawtypes", "unchecked" })
Expand Down

0 comments on commit a5a8208

Please sign in to comment.