mirror of
https://github.com/Minres/RDL-Editor.git
synced 2025-07-04 23:03:27 +02:00
Iniital checkin
This commit is contained in:
@ -0,0 +1,22 @@
|
||||
package com.minres.rdl.converter;
|
||||
|
||||
import org.eclipse.xtext.conversion.impl.AbstractLexerBasedConverter;
|
||||
import org.eclipse.xtext.nodemodel.INode;
|
||||
|
||||
@SuppressWarnings("all")
|
||||
public class IDValueConverter extends AbstractLexerBasedConverter<String> {
|
||||
@Override
|
||||
protected String toEscapedString(final String value) {
|
||||
return value;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toValue(final String string, final INode node) {
|
||||
boolean _startsWith = string.startsWith("\\");
|
||||
if (_startsWith) {
|
||||
return string.substring(1);
|
||||
} else {
|
||||
return string;
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user