@Override protected JComponent getRowPresentation(ParameterTableModelItemBase<PyParameterInfo> item, boolean selected, final boolean focused) { String text = item.parameter.getName(); final String defaultCallValue = item.defaultValueCodeFragment.getText(); PyParameterTableModelItem pyItem = (PyParameterTableModelItem)item; final String defaultValue = pyItem.isDefaultInSignature()? pyItem.defaultValueCodeFragment.getText() : ""; if (StringUtil.isNotEmpty(defaultValue)) { text += " = " + defaultValue; } String tail = ""; if (StringUtil.isNotEmpty(defaultCallValue)) { tail += " default value = " + defaultCallValue; } if (!StringUtil.isEmpty(tail)) { text += " //" + tail; } return JBListTable.createEditorTextFieldPresentation(getProject(), getFileType(), " " + text, selected, focused); }
@Override protected JComponent getRowPresentation(ParameterTableModelItemBase<ParameterInfoImpl> item, boolean selected, final boolean focused) { final String typeText = item.typeCodeFragment.getText(); final String separator = StringUtil.repeatSymbol(' ', getTypesMaxLength() - typeText.length() + 1); String text = typeText + separator + item.parameter.getName(); final String defaultValue = item.defaultValueCodeFragment.getText(); String tail = ""; if (StringUtil.isNotEmpty(defaultValue)) { tail += " default value = " + defaultValue; } if (item.parameter.isUseAnySingleVariable()) { if (StringUtil.isNotEmpty(defaultValue)) { tail += ";"; } tail += " Use any var."; } if (!StringUtil.isEmpty(tail)) { text += " //" + tail; } return JBListTable.createEditorTextFieldPresentation(getProject(), getFileType(), " " + text, selected, focused); }
@Override @RequiredDispatchThread protected JComponent getRowPresentation(ParameterTableModelItemBase<CSharpParameterInfo> item, boolean selected, final boolean focused) { final String typeText = item.typeCodeFragment.getText(); CSharpModifier modifier = item.parameter.getModifier(); String text = ""; if(modifier != null) { text = modifier.getPresentableText() + " "; } final String separator = StringUtil.repeatSymbol(' ', getTypesMaxLength() - typeText.length() + 1); text += typeText + separator + item.parameter.getName(); final String defaultValue = item.defaultValueCodeFragment.getText(); String tail = ""; if(StringUtil.isNotEmpty(defaultValue)) { tail += " argument value = " + defaultValue; } if(!StringUtil.isEmpty(tail)) { text += " //" + tail; } return JBListTable.createEditorTextFieldPresentation(getProject(), getFileType(), " " + text, selected, focused); }
@Override protected JComponent getRowPresentation(ParameterTableModelItemBase<ParameterInfoImpl> item, boolean selected, final boolean focused) { final String typeText = item.typeCodeFragment.getText(); final String separator = StringUtil.repeatSymbol(' ', getTypesMaxLength() - typeText.length() + 1); String text = typeText + separator + item.parameter.getName(); final String defaultValue = item.defaultValueCodeFragment.getText(); String tail = ""; if(StringUtil.isNotEmpty(defaultValue)) { tail += " default value = " + defaultValue; } if(item.parameter.isUseAnySingleVariable()) { if(StringUtil.isNotEmpty(defaultValue)) { tail += ";"; } tail += " Use any var."; } if(!StringUtil.isEmpty(tail)) { text += " //" + tail; } return JBListTable.createEditorTextFieldPresentation(getProject(), getFileType(), " " + text, selected, focused); }