Skip to content

Commit

Permalink
Fix for issue #603: default content assist trailing closure to after ')'
Browse files Browse the repository at this point in the history
"Place trailing closure arguments after closing parenthesis" preference
  • Loading branch information
eric-milles committed Jul 8, 2018
1 parent 38f8312 commit 5237482
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,12 @@
</javaCompletionProposalComputer>
</extension>

<extension point="org.eclipse.core.runtime.preferences">
<initializer
class="org.codehaus.groovy.eclipse.codeassist.preferences.ContentAssistPreferenceInitializer">
</initializer>
</extension>

<extension point="org.eclipse.ui.preferencePages">
<page
category="org.codehaus.groovy.eclipse.preferences.editor"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
/*
* Copyright 2009-2018 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.codehaus.groovy.eclipse.codeassist.preferences;

import org.codehaus.groovy.eclipse.codeassist.GroovyContentAssist;
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.eclipse.jface.preference.IPreferenceStore;

public class ContentAssistPreferenceInitializer extends AbstractPreferenceInitializer {

@Override
public void initializeDefaultPreferences() {
IPreferenceStore prefs = GroovyContentAssist.getDefault().getPreferenceStore();

prefs.setDefault(GroovyContentAssist.CLOSURE_NOPARENS, true);
}
}

0 comments on commit 5237482

Please sign in to comment.