Project: JDT
Bug 49610 [content assist] completion could honour code formatter settings
Reported: 2004-01-06 19:05:13 | Status: resolved fixed

With the fabulous new code formatter, it is possible to define settings for spacing around parenthesis on method calls etc. Curly brace formatting settings are automatically applied when typing such that the braces are placed using the code formatter settings, but this is not done with parentheses. For example, if I have parameter completion turned on, if I type in: if( Then a popup list of parameters deemed appropriate by Eclipse is presented. However this list appears immediately as I type the open parenthesis. When I code, I prefer to put a space after my open parenthesis so that I would end up with code that looks like (for example): if( parameter == true ) As, when I type this, I type "if( " (eg I type the space), then the parameter completion sticks the item from the top of its list into my "if(" statement right next to the open parenthesis. What I would like is, if I have configured for parameter completion to be turned on, and have also configured for a space to be added after the open parenthesis, that Eclipse adds the space before popping up the parameter list and inserts my selection. In this way, if I type "if(", Eclipse adds a space, pops the parameter list, and then adds the selected parameter *after* the space to achieve the code formatting I have selected. Please please please!! Otherwise I cannot use the auto parameter completion

Files changed in fix:
org.eclipse.jdt.text.tests/src/org/eclipse/jdt/text/tests/performance/CodeCompletionPerformanceTest.java org.eclipse.jdt.ui.tests/ui/org/eclipse/jdt/ui/tests/core/CodeCompletionTest.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ExperimentalProposal.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ExperimentalResultCollector.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaCompletionProposalComputer.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaMethodCompletionProposal.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaNoTypeCompletionProposalComputer.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/JavaTypeCompletionProposalComputer.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/LazyJavaCompletionProposal.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/java/ParameterGuessingProposal.java org.eclipse.jdt.ui/ui/org/eclipse/jdt/internal/ui/text/javadoc/JavadocCompletionProposalComputer.java