Class TimePercentageLabelProvider
java.lang.Object
org.eclipse.core.commands.common.EventManager
org.eclipse.jface.viewers.BaseLabelProvider
org.eclipse.jface.viewers.CellLabelProvider
org.eclipse.jface.viewers.OwnerDrawLabelProvider
org.eclipse.jface.viewers.StyledCellLabelProvider
com._1c.g5.v8.dt.internal.profiling.ui.view.TimePercentageLabelProvider
- All Implemented Interfaces:
IBaseLabelProvider
,IToolTipProvider
Percentage column label provider. Adds bar chart based on results into column.
Can be used for both table and method list views.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int
Percent bars less than this value will be green.static final int
Percent bars less than this value, but more thanTHIRD_PART
will be orange.static final int
Percent bars less than this value, but more thanFIRST_PART
will be light green.static final int
Percent bars less than this value, but more thanSECOND_PART
will be yellow.Fields inherited from class org.eclipse.jface.viewers.StyledCellLabelProvider
COLORS_ON_SELECTION, NO_FOCUS
-
Constructor Summary
ConstructorsConstructorDescriptionTimePercentageLabelProvider
(Viewer viewer, boolean includeInternal) Creates new TimePercentageLabelProvider. -
Method Summary
Modifier and TypeMethodDescriptionvoid
dispose()
getToolTipText
(Object element) protected void
void
Sets max percents using method statistics result.void
setMaxPercents
(IProfilingResult results) Sets max percents using profiling result.void
setTargets
(boolean showClient, boolean showServer, boolean showMobileManagedServer) Sets flag to show or hide results from client or server.Methods inherited from class org.eclipse.jface.viewers.StyledCellLabelProvider
erase, getColumn, getViewer, initialize, isOwnerDrawEnabled, measure, prepareStyleRange, setOwnerDrawEnabled, styleDecoratedString, update
Methods inherited from class org.eclipse.jface.viewers.OwnerDrawLabelProvider
dispose, initialize, setOwnerDrawEnabled, setUpOwnerDraw
Methods inherited from class org.eclipse.jface.viewers.CellLabelProvider
getToolTipBackgroundColor, getToolTipDisplayDelayTime, getToolTipFont, getToolTipForegroundColor, getToolTipImage, getToolTipShift, getToolTipStyle, getToolTipTimeDisplayed, useNativeToolTip
Methods inherited from class org.eclipse.jface.viewers.BaseLabelProvider
addListener, fireLabelProviderChanged, isLabelProperty, removeListener
Methods inherited from class org.eclipse.core.commands.common.EventManager
addListenerObject, clearListeners, getListeners, isListenerAttached, removeListenerObject
-
Field Details
-
FIRST_PART
public static final int FIRST_PARTPercent bars less than this value will be green.- See Also:
-
SECOND_PART
public static final int SECOND_PARTPercent bars less than this value, but more thanFIRST_PART
will be light green.- See Also:
-
THIRD_PART
public static final int THIRD_PARTPercent bars less than this value, but more thanSECOND_PART
will be yellow.- See Also:
-
FOURTH_PART
public static final int FOURTH_PARTPercent bars less than this value, but more thanTHIRD_PART
will be orange. The ones that are more than this value will be red.- See Also:
-
-
Constructor Details
-
TimePercentageLabelProvider
Creates new TimePercentageLabelProvider.- Parameters:
viewer
- Viewer to attach label provider to. Cannot benull
.includeInternal
-true
if should be in full time mode,false
otherwise.
-
-
Method Details
-
setMaxPercents
Sets max percents using profiling result.- Parameters:
results
- Result to use for computing max percents span.
-
setMaxPercents
Sets max percents using method statistics result.- Parameters:
results
- Result to use for computing max percents span.
-
setTargets
public void setTargets(boolean showClient, boolean showServer, boolean showMobileManagedServer) Sets flag to show or hide results from client or server. These flags also determine the percentages that will be shown in table and method list. If both flags aretrue
, the usual percentage will be shown, but if only one is set totrue
, then shown percentages will be recalculated using only time of code execution on that target.- Parameters:
showClient
-true
if results from client are shown andfalse
if they're hidden.showServer
-true
if results from server are shown andfalse
if they're hidden.
-
dispose
public void dispose()- Specified by:
dispose
in interfaceIBaseLabelProvider
- Overrides:
dispose
in classStyledCellLabelProvider
-
paint
- Overrides:
paint
in classStyledCellLabelProvider
-
getToolTipText
- Specified by:
getToolTipText
in interfaceIToolTipProvider
- Overrides:
getToolTipText
in classCellLabelProvider
-