blob: 855f95657b580921871e799607d96b8781b82c42 [file] [log] [blame]
/**
*
* Copyright (c) 2011, 2016 - Loetz GmbH&Co.KG (69115 Heidelberg, Germany)
*
* 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:
* Christophe Loetz (Loetz GmbH&Co.KG) - initial implementation
*
*/
package org.eclipse.osbp.xtext.gridsource.converter;
import org.eclipse.xtext.conversion.ValueConverterException;
import org.eclipse.xtext.conversion.impl.AbstractValueConverter;
import org.eclipse.xtext.nodemodel.INode;
public class TOPICValueConverter extends AbstractValueConverter<String> {
@Override
public String toValue(String string, INode node)
throws ValueConverterException {
return string.replaceAll("'", "");
}
@Override
public String toString(String value) throws ValueConverterException {
return "'" + value + "'";
}
}