blob: 89b9c1b0df7e0835ff4d9592f17bda96f3e07be2 [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2015 BSI Business Systems Integration AG.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* BSI Business Systems Integration AG - initial API and implementation
******************************************************************************/
package org.eclipse.scout.sdk.s2e.ui.internal.template;
import org.eclipse.jdt.core.ICompilationUnit;
import org.eclipse.jdt.core.dom.Type;
import org.eclipse.jdt.core.dom.TypeDeclaration;
/**
* <h3>{@link BigDecimalFieldProposal}</h3>
*
* @author Matthias Villiger
* @since 5.2.0
*/
public class BigDecimalFieldProposal extends FormFieldProposal {
public BigDecimalFieldProposal(String name, int relevance, String imageId, ICompilationUnit cu, TypeProposalContext context) {
super(name, relevance, imageId, cu, context);
}
@Override
protected TypeDeclaration createFormFieldType(Type superType) {
return getFactory().newBigDecimalField(getProposalContext().getDefaultName())
.withNlsMethod(getNlsMethodName())
.withReadOnlyNameSuffix(getProposalContext().getSuffix())
.withSuperType(superType)
.in(getProposalContext().getDeclaringType())
.atPosition(getProposalContext().getInsertPosition())
.insert()
.get();
}
}