Added test interface methods to access INF/MMP editor view models.
--- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/editors/inf/BldInfEditor.java Tue Jun 09 14:43:27 2009 -0500
+++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/editors/inf/BldInfEditor.java Thu Jun 11 11:54:08 2009 -0500
@@ -45,6 +45,7 @@
import com.nokia.carbide.cdt.internal.api.builder.ui.ManageConfigurationsDialog;
import com.nokia.carbide.cpp.epoc.engine.model.BldInfModelFactory;
import com.nokia.carbide.cpp.epoc.engine.model.IView;
+import com.nokia.carbide.cpp.epoc.engine.model.bldinf.IBldInfView;
import com.nokia.carbide.cpp.internal.project.ui.editors.common.CarbideFormEditor;
import com.nokia.carbide.cpp.internal.project.ui.editors.common.CarbideTextEditor;
import com.nokia.cpp.internal.api.utils.core.Check;
@@ -338,4 +339,8 @@
return exportsPage;
}
+ public IBldInfView getBldInfView() {
+ return editorContext.bldInfView;
+ }
+
}
--- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/editors/inf/testapi/BldInfEditorTester.java Tue Jun 09 14:43:27 2009 -0500
+++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/editors/inf/testapi/BldInfEditorTester.java Thu Jun 11 11:54:08 2009 -0500
@@ -21,6 +21,7 @@
import org.eclipse.ui.forms.editor.FormEditor;
import org.eclipse.ui.forms.editor.FormPage;
+import com.nokia.carbide.cpp.epoc.engine.model.bldinf.IBldInfView;
import com.nokia.carbide.cpp.internal.project.ui.editors.inf.BldInfEditor;
/**
@@ -67,4 +68,17 @@
return null;
}
+ /**
+ * Retrieves the view model of the Bld.inf editor.
+ * @param editor - editor part provided by caller
+ * @return Bld.inf view model if success, null otherwise
+ */
+ public static IBldInfView getBldInfView(FormEditor editor) {
+ if (editor != null && editor instanceof BldInfEditor) {
+ BldInfEditor infEditor = (BldInfEditor) editor;
+ return infEditor.getBldInfView();
+ }
+ return null;
+ }
+
}
--- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/mmpEditor/MMPEditor.java Tue Jun 09 14:43:27 2009 -0500
+++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/mmpEditor/MMPEditor.java Thu Jun 11 11:54:08 2009 -0500
@@ -21,6 +21,7 @@
import com.nokia.carbide.cdt.internal.api.builder.ui.ManageConfigurationsDialog;
import com.nokia.carbide.cpp.epoc.engine.model.IView;
import com.nokia.carbide.cpp.epoc.engine.model.MMPModelFactory;
+import com.nokia.carbide.cpp.epoc.engine.model.mmp.IMMPView;
import com.nokia.carbide.cpp.internal.project.ui.editors.common.*;
import com.nokia.cpp.internal.api.utils.core.*;
import com.nokia.cpp.internal.api.utils.ui.*;
@@ -370,4 +371,7 @@
return optionsPage;
}
+ public IMMPView getMMPView() {
+ return editorContext.mmpView;
+ }
}
--- a/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/mmpEditor/testapi/MMPEditorTester.java Tue Jun 09 14:43:27 2009 -0500
+++ b/project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/mmpEditor/testapi/MMPEditorTester.java Thu Jun 11 11:54:08 2009 -0500
@@ -21,6 +21,7 @@
import org.eclipse.ui.forms.editor.FormEditor;
import org.eclipse.ui.forms.editor.FormPage;
+import com.nokia.carbide.cpp.epoc.engine.model.mmp.IMMPView;
import com.nokia.carbide.cpp.internal.project.ui.mmpEditor.MMPEditor;
/**
@@ -93,4 +94,17 @@
return null;
}
+ /**
+ * Retrieves the view model of the MMP editor.
+ * @param editor - editor part provided by caller
+ * @return MMP view model if success, null otherwise
+ */
+ public static IMMPView getMMPView(FormEditor editor) {
+ if (editor != null && editor instanceof MMPEditor) {
+ MMPEditor mmpEditor = (MMPEditor) editor;
+ return mmpEditor.getMMPView();
+ }
+ return null;
+ }
+
}