--- a/project/com.nokia.carbide.cpp.epoc.engine.tests/src/com/nokia/carbide/cpp/epoc/engine/tests/model/TestMMPView5.java Wed Jul 07 11:42:30 2010 -0500
+++ b/project/com.nokia.carbide.cpp.epoc.engine.tests/src/com/nokia/carbide/cpp/epoc/engine/tests/model/TestMMPView5.java Wed Jul 07 11:49:33 2010 -0500
@@ -489,6 +489,22 @@
// ensure the unknown languages don't abort processing
assertEquals(3, seen.size());
}
+ public void testMissingLanguagesBug10958() {
+ // this has unknown languages
+ String text =
+ "LANG 01 02 1000 1001 33\n";
+ IMMPView view;
+ makeModel(text);
+ view = getView(mmpConfig);
+ List<EMMPLanguage> languages = view.getLanguages();
+
+ // add new entries
+ languages.add(EMMPLanguage.Punjabi);
+
+ // should not remove unknown entries
+ commitTest(view, "LANG 01 02 1000 1001 33 77\n");
+
+ }
public void testUnterminatedCrossDocumentParseBug7886() {
String text =
--- a/project/com.nokia.carbide.cpp.epoc.engine/src/com/nokia/carbide/cpp/epoc/engine/model/mmp/EMMPLanguage.java Wed Jul 07 11:42:30 2010 -0500
+++ b/project/com.nokia.carbide.cpp.epoc.engine/src/com/nokia/carbide/cpp/epoc/engine/model/mmp/EMMPLanguage.java Wed Jul 07 11:49:33 2010 -0500
@@ -236,6 +236,13 @@
/*
* Discontinuity
*/
+ E14346("14346", 14346), //$NON-NLS-1$
+ E14387("14387", 14387), //$NON-NLS-1$
+ E14412("14412", 14412), //$NON-NLS-1$
+ E14419("14419", 14419), //$NON-NLS-1$
+ /*
+ * Discontinuity
+ */
SC_NonLocalized(Messages.getString("EMMPLanguage.NonLocalized"), 0); //$NON-NLS-1$
private String key;
--- a/project/com.nokia.carbide.cpp.epoc.engine/src/com/nokia/carbide/internal/cpp/epoc/engine/model/mmp/MMPView.java Wed Jul 07 11:42:30 2010 -0500
+++ b/project/com.nokia.carbide.cpp.epoc.engine/src/com/nokia/carbide/internal/cpp/epoc/engine/model/mmp/MMPView.java Wed Jul 07 11:49:33 2010 -0500
@@ -213,12 +213,14 @@
try {
list.add(EMMPLanguage.fromCode(node.getValue()));
} catch (IllegalArgumentException e) {
- // ignore unknown language
+ // ignore unknown language... completely! (I'm tired of these bug reports)
+ /*
EpocEnginePlugin.log(
Logging.newStatus(EpocEnginePlugin.getDefault(),
new IllegalArgumentException(
"Warning, ignoring unknown language code: " + node.getValue() + " in " + stmt)
));
+ */
}
}
return list;