Skip to content

Commit a5778eb

Browse files
ethanyhouCopilot
andcommitted
refactor: Simplify addKeyValueRow method by removing verticalIndent parameter
Co-authored-by: Copilot <copilot@github.com>
1 parent 599cda1 commit a5778eb

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

com.microsoft.copilot.eclipse.ui/src/com/microsoft/copilot/eclipse/ui/swt/ModelHoverContentProvider.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ private void addPricingSection(Composite parent, String priceCategory) {
131131
}
132132

133133
addSeparator(parent);
134-
addKeyValueRow(parent, Messages.model_hover_cost, costSymbols, SECTION_SPACING);
134+
addKeyValueRow(parent, Messages.model_hover_cost, costSymbols);
135135
}
136136

137137
private void addContextWindowSection(Composite parent, CopilotModelCapabilitiesLimits limits) {
@@ -141,12 +141,12 @@ private void addContextWindowSection(Composite parent, CopilotModelCapabilitiesL
141141

142142
addSeparator(parent);
143143
addKeyValueRow(parent, Messages.model_hover_contextWindow,
144-
ModelUtils.formatTokenCount(limits.maxContextWindowTokens()), SECTION_SPACING);
144+
ModelUtils.formatTokenCount(limits.maxContextWindowTokens()));
145145
}
146146

147-
private void addKeyValueRow(Composite parent, String keyText, String valueText, int verticalIndent) {
147+
private void addKeyValueRow(Composite parent, String keyText, String valueText) {
148148
Composite row = createKeyValueRow(parent);
149-
((GridData) row.getLayoutData()).verticalIndent = verticalIndent;
149+
((GridData) row.getLayoutData()).verticalIndent = SECTION_SPACING;
150150

151151
Label keyLabel = createSecondaryTextLabel(row, keyText);
152152
keyLabel.setLayoutData(new GridData(SWT.LEFT, SWT.NONE, true, false));

0 commit comments

Comments
 (0)