*
* @throws UnknownKeyException
* if an error occurred while updating the text of this view
*/
private String getMessageText() throws UnknownKeyException {
SwitchLanguage sl = SwitchLanguage.getInstance() ;
GenerationMessage gMessage = (GenerationMessage) this.message ;
String textKey, filePath = null ;
switch(gMessage.getState()) {
case ANALYZING: {
textKey = GENERATION_ANALYZING_START ;
break ;
}// case
case GENERATING: {
State[] states = gMessage.getStates() ;
if (states[0].equals(State.WAITING)) {
textKey = GENERATION_ANALYZING_SUCCESS ;
} else {
textKey = GENERATION_GENERATING ;
int i = 0, nStates = states.length ;
while((i < nStates) && (filePath == null)) {
if (states[i].equals(State.CONVERTING)) {
filePath = gMessage.getTargetPath()[i] ;
}// if
++i ;
}// while
}// if
break ;
}// case
case PARTIAL_SUCESS: {
textKey = GENERATION_PARTIAL_SUCCESS ;
break ;
}// case
case COMPLETE_SUCESS: {
textKey = GENERATION_SUCCESS ;
break ;
}// clase
default: {/* ERROR */
textKey = GENERATION_ERROR ;
}// default
}// switch
return sl.getText(textKey, filePath) ;
}// getMessageText()