/** * @see ICellModifier#getValue(Object, String) */ public Object getValue(Object element, String property) { if (element instanceof NLSSubstitution) { NLSSubstitution substitution= (NLSSubstitution) element; String res= null; if (PROPERTIES[KEY_PROP].equals(property)) { res= substitution.getKeyWithoutPrefix(); } else if (PROPERTIES[VAL_PROP].equals(property)) { res= substitution.getValue(); } else if (PROPERTIES[STATE_PROP].equals(property)) { return new Integer(substitution.getState()); } if (res != null) { return unwindEscapeChars(res); } return ""; //$NON-NLS-1$ } return ""; //$NON-NLS-1$ }
/** * @see ICellModifier#getValue(Object, String) */ @Override public Object getValue(Object element, String property) { if (element instanceof NLSSubstitution) { NLSSubstitution substitution= (NLSSubstitution) element; String res= null; if (PROPERTIES[KEY_PROP].equals(property)) { res= substitution.getKeyWithoutPrefix(); } else if (PROPERTIES[VAL_PROP].equals(property)) { res= substitution.getValue(); } else if (PROPERTIES[STATE_PROP].equals(property)) { return Integer.valueOf(substitution.getState()); } if (res != null) { return getEscapedAsciiString(res); } return ""; //$NON-NLS-1$ } return ""; //$NON-NLS-1$ }
/** * @see ICellModifier#getValue(Object, String) */ @Override public Object getValue(Object element, String property) { if (element instanceof NLSSubstitution) { NLSSubstitution substitution= (NLSSubstitution) element; String res= null; if (PROPERTIES[KEY_PROP].equals(property)) { res= substitution.getKeyWithoutPrefix(); } else if (PROPERTIES[VAL_PROP].equals(property)) { res= substitution.getValue(); } else if (PROPERTIES[STATE_PROP].equals(property)) { return new Integer(substitution.getState()); } if (res != null) { return getEscapedAsciiString(res); } return ""; //$NON-NLS-1$ } return ""; //$NON-NLS-1$ }
public NLSInputDialog(Shell parent, NLSSubstitution substitution) { super(parent); setTitle(NLSUIMessages.ExternalizeWizardPage_NLSInputDialog_Title); fSubstitution= substitution; fMessageField= new DialogField(); if (substitution.getState() == NLSSubstitution.EXTERNALIZED) { fMessageField.setLabelText(NLSUIMessages.ExternalizeWizardPage_NLSInputDialog_ext_Label); } else { fMessageField.setLabelText(NLSUIMessages.ExternalizeWizardPage_NLSInputDialog_Label); } fKeyField= new StringDialogField(); fKeyField.setLabelText(NLSUIMessages.ExternalizeWizardPage_NLSInputDialog_Enter_key); fKeyField.setDialogFieldListener(this); fValueField= new StringDialogField(); fValueField.setLabelText(NLSUIMessages.ExternalizeWizardPage_NLSInputDialog_Enter_value); fValueField.setDialogFieldListener(this); if (substitution.getState() == NLSSubstitution.EXTERNALIZED) { fKeyField.setText(substitution.getKeyWithoutPrefix()); } else { fKeyField.setText(""); //$NON-NLS-1$ } fValueField.setText(substitution.getValueNonEmpty()); }
public NLSInputDialog(Shell parent, NLSSubstitution substitution) { super(parent); setTitle(NLSUIMessages.ExternalizeWizardPage_NLSInputDialog_Title); fSubstitution= substitution; fMessageField= new DialogField(); if (substitution.getState() == NLSSubstitution.EXTERNALIZED) { fMessageField.setLabelText(NLSUIMessages.ExternalizeWizardPage_NLSInputDialog_ext_Label); } else { fMessageField.setLabelText(NLSUIMessages.ExternalizeWizardPage_NLSInputDialog_Label); } fKeyField= new StringDialogField(); fKeyField.setLabelText(NLSUIMessages.ExternalizeWizardPage_NLSInputDialog_Enter_key); fKeyField.setDialogFieldListener(this); fValueField= new StringDialogField(); fValueField.setLabelText(NLSUIMessages.ExternalizeWizardPage_NLSInputDialog_Enter_value); fValueField.setDialogFieldListener(this); if (substitution.getState() == NLSSubstitution.EXTERNALIZED) { fKeyField.setText(substitution.getKeyWithoutPrefix()); } else { fKeyField.setText(""); //$NON-NLS-1$ } fValueField.setText(substitution.getValueNonEmpty()); }
public NLSInputDialog(Shell parent, NLSSubstitution substitution) { super(parent); setTitle(NLSUIMessages.ExternalizeWizardPage_NLSInputDialog_Title); fSubstitution= substitution; fMessageField= new DialogField(); if (substitution.getState() == NLSSubstitution.EXTERNALIZED) { fMessageField.setLabelText(NLSUIMessages.ExternalizeWizardPage_NLSInputDialog_ext_Label); } else { fMessageField.setLabelText(NLSUIMessages.ExternalizeWizardPage_NLSInputDialog_Label); } fKeyField= new StringDialogField(); fKeyField.setLabelText(NLSUIMessages.ExternalizeWizardPage_NLSInputDialog_Enter_key); fKeyField.setDialogFieldListener(this); fValueField= new StringDialogField(); fValueField.setLabelText(NLSUIMessages.ExternalizeWizardPage_NLSInputDialog_Enter_value); fValueField.setDialogFieldListener(this); if (substitution.getState() == NLSSubstitution.EXTERNALIZED) { fKeyField.setText(substitution.getKeyWithoutPrefix()); } else { fKeyField.setText(""); //$NON-NLS-1$ } fValueField.setText(substitution.getValueNonEmpty()); }