Package org.eclipse.jdt.ui.text.java
Class CompletionProposalLabelProvider
java.lang.Object
org.eclipse.jdt.ui.text.java.CompletionProposalLabelProvider
Provides labels for java content assist proposals. The functionality is
similar to the one provided by
JavaElementLabels
,
but based on signatures and CompletionProposal
s.- Since:
- 3.1
- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.jface.resource.ImageDescriptor
createImageDescriptor
(CompletionProposal proposal) Creates and returns a decorated image descriptor for a completion proposal.createLabel
(CompletionProposal proposal) Creates the display label for a givenCompletionProposal
.createParameterList
(CompletionProposal proposal) Creates and returns a parameter list of the given method or type proposal suitable for display.org.eclipse.jface.viewers.StyledString
createStyledLabel
(CompletionProposal proposal) Creates a display label with styles for a givenCompletionProposal
.
-
Constructor Details
-
CompletionProposalLabelProvider
public CompletionProposalLabelProvider()Creates a new label provider.
-
-
Method Details
-
createParameterList
Creates and returns a parameter list of the given method or type proposal suitable for display. The list does not include parentheses. The lower bound of parameter types is returned.Examples:
"void method(int i, String s)" -> "int i, String s" "? extends Number method(java.lang.String s, ? super Number n)" -> "String s, Number n"
- Parameters:
proposal
- the proposal to create the parameter list for- Returns:
- the list of comma-separated parameters suitable for display
-
createLabel
Creates the display label for a givenCompletionProposal
.- Parameters:
proposal
- the completion proposal to create the display label for- Returns:
- the display label for
proposal
-
createStyledLabel
Creates a display label with styles for a givenCompletionProposal
.- Parameters:
proposal
- the completion proposal to create the display label for- Returns:
- the display label for
proposal
- Since:
- 3.4
-
createImageDescriptor
public org.eclipse.jface.resource.ImageDescriptor createImageDescriptor(CompletionProposal proposal) Creates and returns a decorated image descriptor for a completion proposal.- Parameters:
proposal
- the proposal for which to create an image descriptor- Returns:
- the created image descriptor, or
null
if no image is available
-