# HG changeset patch # User stechong # Date 1244739248 18000 # Node ID 6c93e3b928376d3b583439d7a60d3b5480adca28 # Parent 4082125d964e5657dfa418190a867e7a7bc8229c Added test interface methods to access INF/MMP editor view models. diff -r 4082125d964e -r 6c93e3b92837 project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/editors/inf/BldInfEditor.java --- 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; + } + } diff -r 4082125d964e -r 6c93e3b92837 project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/editors/inf/testapi/BldInfEditorTester.java --- 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; + } + } diff -r 4082125d964e -r 6c93e3b92837 project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/mmpEditor/MMPEditor.java --- 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; + } } diff -r 4082125d964e -r 6c93e3b92837 project/com.nokia.carbide.cpp.project.ui/src/com/nokia/carbide/cpp/internal/project/ui/mmpEditor/testapi/MMPEditorTester.java --- 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; + } + }