static boolean doInsert(NLSSubstitution substitution, Map<String, NLSSubstitution> newKeyToSubstMap, Map<String, NLSSubstitution> oldKeyToSubstMap) { if (substitution.getState() != NLSSubstitution.EXTERNALIZED) { return false; // does not go into the property file } if (!substitution.hasStateChanged() && substitution.getInitialValue() != null) { if (!substitution.isKeyRename() || oldKeyToSubstMap.get(substitution.getInitialKey()) == substitution) { return false; // no key rename and was not a duplicate } } if (newKeyToSubstMap.get(substitution.getKey()) == substitution) { // only insert if we're not a duplicate return true; } return false; }
static boolean doInsert(NLSSubstitution substitution, Map newKeyToSubstMap, Map oldKeyToSubstMap) { if (substitution.getState() != NLSSubstitution.EXTERNALIZED) { return false; // does not go into the property file } if (!substitution.hasStateChanged() && substitution.getInitialValue() != null) { if (!substitution.isKeyRename() || oldKeyToSubstMap.get(substitution.getInitialKey()) == substitution) { return false; // no key rename and was not a duplicate } } if (newKeyToSubstMap.get(substitution.getKey()) == substitution) { // only insert if we're not a duplicate return true; } return false; }
static boolean doInsert(NLSSubstitution substitution, Map<String, NLSSubstitution> newKeyToSubstMap, Map<String, NLSSubstitution> oldKeyToSubstMap) { if (substitution.getState() != NLSSubstitution.EXTERNALIZED) { return false; // does not go into the property file } if (!substitution.hasStateChanged() && substitution.getInitialValue() != null) { if (!substitution.isKeyRename() || oldKeyToSubstMap.get(substitution.getInitialKey()) == substitution) { return false; // no key rename and was not a duplicate } } if (newKeyToSubstMap.get(substitution.getKey()) == substitution) { // only insert if we're not a duplicate return true; } return false; }
static boolean doReplace(NLSSubstitution substitution, Map newKeyToSubstMap, Map oldKeyToSubstMap) { if (substitution.getState() != NLSSubstitution.EXTERNALIZED || substitution.hasStateChanged() || substitution.getInitialValue() == null) { return false; // was not in property file before } if (oldKeyToSubstMap.get(substitution.getInitialKey()) != substitution) { return false; // not the owner of this key } if (substitution.isKeyRename() || substitution.isValueRename()) { if (newKeyToSubstMap.get(substitution.getKey()) == substitution) { // only rename if we're not a duplicate. duplicates will be removed return true; } } return false; }
static boolean doReplace(NLSSubstitution substitution, Map<String, NLSSubstitution> newKeyToSubstMap, Map<String, NLSSubstitution> oldKeyToSubstMap) { if (substitution.getState() != NLSSubstitution.EXTERNALIZED || substitution.hasStateChanged() || substitution.getInitialValue() == null) { return false; // was not in property file before } if (oldKeyToSubstMap.get(substitution.getInitialKey()) != substitution) { return false; // not the owner of this key } if (substitution.isKeyRename() || substitution.isValueRename()) { if (newKeyToSubstMap.get(substitution.getKey()) == substitution) { // only rename if we're not a duplicate. duplicates will be removed return true; } } return false; }
static boolean doReplace(NLSSubstitution substitution, Map<String, NLSSubstitution> newKeyToSubstMap, Map<String, NLSSubstitution> oldKeyToSubstMap) { if (substitution.getState() != NLSSubstitution.EXTERNALIZED || substitution.hasStateChanged() || substitution.getInitialValue() == null) { return false; // was not in property file before } if (oldKeyToSubstMap.get(substitution.getInitialKey()) != substitution) { return false; // not the owner of this key } if (substitution.isKeyRename() || substitution.isValueRename()) { if (newKeyToSubstMap.get(substitution.getKey()) == substitution) { // only rename if we're not a duplicate. duplicates will be removed return true; } } return false; }
if (substitution.isKeyRename() && NLSPropertyFileModifier.doReplace(substitution, newKeyToSubstMap, oldKeyToSubstMap)) { sourceModification.renameKey(substitution, change);
if (substitution.isKeyRename() && NLSPropertyFileModifier.doReplace(substitution, newKeyToSubstMap, oldKeyToSubstMap)) { sourceModification.renameKey(substitution, change);
if (substitution.isKeyRename() && NLSPropertyFileModifier.doReplace(substitution, newKeyToSubstMap, oldKeyToSubstMap)) { sourceModification.renameKey(substitution, change);
if (substitution.isKeyRename()) { sourceModification.replaceKey(substitution, change);
if (substitution.isKeyRename()) { sourceModification.replaceKey(substitution, change);
if (substitution.isKeyRename()) { sourceModification.replaceKey(substitution, change);