import java.util.Collection;
import org.eclipse.jface.dialogs.IInputValidator;
+import org.eclipse.osgi.util.NLS;
import org.simantics.Simantics;
import org.simantics.browsing.ui.swt.widgets.impl.Widget;
import org.simantics.db.ReadGraph;
@Override
public String isValid(final String newText) {
if (newText == null || newText.length() == 0)
- return "Empty name is not allowed";
+ return Messages.NameInputValidator_EmptyNameNotAllowed;
if (selection != null) {
try {
return Simantics.getSession().syncRequest(new Read<String>() {
continue;
String n = graph.getPossibleRelatedValue(resource, l0.HasName);
if (newText.equals(n))
- return "Cannot have duplicate name " + newText;
+ return NLS.bind(Messages.NameInputValidator_CannotHaveDuplicateName, newText);
}
return null;
}