Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLars Vogel2018-04-03 09:01:04 +0000
committerLars Vogel2018-06-11 08:35:12 +0000
commitc6c8fd72a90a523f3377f222d0754b8600936b55 (patch)
tree151a8b2db29dc6024d1d3fdec4a3f9ba3bc20473
parente65f04f5ee9e216c8177c61e366713b3f0dd1c3b (diff)
downloadeclipse.platform.ui-c6c8fd72a90a523f3377f222d0754b8600936b55.tar.gz
eclipse.platform.ui-c6c8fd72a90a523f3377f222d0754b8600936b55.tar.xz
eclipse.platform.ui-c6c8fd72a90a523f3377f222d0754b8600936b55.zip
Bug 533156 - Use varargs in AutoCompleteField
As this is an API change (even though it is a compliant API change), we should do this after 4.8. Change-Id: I1241955ee72dda7a19e9bb36aa8f9cec814e45fa Signed-off-by: Lars Vogel <Lars.Vogel@vogella.com>
-rw-r--r--bundles/org.eclipse.jface/src/org/eclipse/jface/fieldassist/AutoCompleteField.java11
1 files changed, 4 insertions, 7 deletions
diff --git a/bundles/org.eclipse.jface/src/org/eclipse/jface/fieldassist/AutoCompleteField.java b/bundles/org.eclipse.jface/src/org/eclipse/jface/fieldassist/AutoCompleteField.java
index 80667a13a19..d411eaf68ec 100644
--- a/bundles/org.eclipse.jface/src/org/eclipse/jface/fieldassist/AutoCompleteField.java
+++ b/bundles/org.eclipse.jface/src/org/eclipse/jface/fieldassist/AutoCompleteField.java
@@ -41,15 +41,12 @@ public class AutoCompleteField {
* the array of Strings representing valid content proposals for
* the field.
*/
- public AutoCompleteField(Control control,
- IControlContentAdapter controlContentAdapter, String[] proposals) {
+ public AutoCompleteField(Control control, IControlContentAdapter controlContentAdapter, String... proposals) {
proposalProvider = new SimpleContentProposalProvider(proposals);
proposalProvider.setFiltering(true);
- adapter = new ContentProposalAdapter(control, controlContentAdapter,
- proposalProvider, null, null);
+ adapter = new ContentProposalAdapter(control, controlContentAdapter, proposalProvider, null, null);
adapter.setPropagateKeys(true);
- adapter
- .setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
+ adapter.setProposalAcceptanceStyle(ContentProposalAdapter.PROPOSAL_REPLACE);
}
/**
@@ -58,7 +55,7 @@ public class AutoCompleteField {
* @param proposals
* the array of Strings to be used as proposals.
*/
- public void setProposals(String[] proposals) {
+ public void setProposals(String... proposals) {
proposalProvider.setProposals(proposals);
}
}

Back to the top