private String createConstantDeclarationSource(String initializerSource) throws CoreException { ICodeFormatter formatter= ToolFactory.createCodeFormatter(); String dummyInitializer= "0"; String semicolon= ";"; String dummyDeclaration= getModifier() + " " + getConstantTypeName() + " " + fConstantName + " = " + dummyInitializer + semicolon; int[] position= { dummyDeclaration.length() - dummyInitializer.length() - semicolon.length()}; StringBuffer formattedDummyDeclaration= new StringBuffer(formatter.format(dummyDeclaration, 0, position, getLineDelimiter())); return formattedDummyDeclaration.replace(position[0], position[0] + dummyInitializer.length(), initializerSource).toString();
private String createConstantDeclarationSource() throws JavaModelException, CoreException { return createConstantDeclarationSource(getInitializerSource());
	private String createConstantDeclarationSource(String initializerSource) throws CoreException {		ICodeFormatter formatter= ToolFactory.createCodeFormatter();		String dummyInitializer= "0"; //$NON-NLS-1$		String semicolon= ";"; //$NON-NLS-1$		String dummyDeclaration= getModifier() + " " + getConstantTypeName() + " " + fConstantName + " = " + dummyInitializer + semicolon; //$NON-NLS-1$ //$NON-NLS-2$		int[] position= { dummyDeclaration.length() - dummyInitializer.length() - semicolon.length()};		StringBuffer formattedDummyDeclaration= new StringBuffer(formatter.format(dummyDeclaration, 0, position, getLineDelimiter()));		return formattedDummyDeclaration.replace(position[0], position[0] + dummyInitializer.length(), initializerSource).toString();	}