// Create new parameters and ports.
// Set default values of the parameters and type constraints.
pattern = new PortParameter(this, "pattern");
pattern.setStringMode(true);
pattern.setExpression("");
(new SingletonParameter(pattern.getPort(), "_showName"))
.setToken(BooleanToken.TRUE);
replaceAll = new Parameter(this, "replaceAll");
replaceAll.setExpression("true");
replaceAll.setTypeEquals(BaseType.BOOLEAN);
replacement = new PortParameter(this, "replacement");
replacement.setStringMode(true);
replacement.setExpression("");
(new SingletonParameter(replacement.getPort(), "_showName"))
.setToken(BooleanToken.TRUE);
stringToEdit = new PortParameter(this, "stringToEdit");
stringToEdit.setStringMode(true);
stringToEdit.setExpression("");
(new SingletonParameter(stringToEdit.getPort(), "_showName"))
.setToken(BooleanToken.TRUE);
output = new TypedIOPort(this, "output", false, true);
output.setTypeEquals(BaseType.STRING);
}