Java Code Examples for org.eclipse.jdt.core.NamingConventions#suggestSetterName()

The following examples show how to use org.eclipse.jdt.core.NamingConventions#suggestSetterName() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ParameterObjectFactory.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
private String getSetterName(ParameterInfo pi, AST ast, IJavaProject project) {
	ITypeBinding type= pi.getNewTypeBinding();
	boolean isBoolean= ast.resolveWellKnownType("boolean").isEqualTo(type) || ast.resolveWellKnownType("java.lang.Boolean").isEqualTo(type); //$NON-NLS-1$//$NON-NLS-2$
	return NamingConventions.suggestSetterName(project, pi.getNewName(), Flags.AccPublic, isBoolean, null);
}
 
Example 2
Source File: GetterSetterUtil.java    From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 4 votes vote down vote up
public static String getSetterName(IJavaProject project, String fieldName, int flags, boolean isBoolean, String[] excludedNames){
	boolean useIs= StubUtility.useIsForBooleanGetters(project);
	return NamingConventions.suggestSetterName(project, fieldName, flags, useIs && isBoolean, excludedNames);
}