Search in sources :

Example 1 with FlashUmlDataModel

use of com.intellij.lang.javascript.uml.FlashUmlDataModel in project intellij-plugins by JetBrains.

the class FlashUmlTest method testExpandCollapse2.

public void testExpandCollapse2() throws Exception {
    File projectRoot = new File(getVirtualFile(BASE_PATH + getTestName(false)).getPath());
    String[] files = { getTestName(false) + "/com/test/MyButton.mxml" };
    DiagramBuilder builder = doTestImpl(projectRoot, files, ArrayUtil.EMPTY_STRING_ARRAY, moduleScopeProvider(), EnumSet.allOf(FlashUmlDependenciesSettingsOption.class), null);
    String originQName = "com.test.MyButton";
    DiagramProvider<Object> provider = DiagramProvider.findByID(FlashUmlProvider.ID);
    FlashUmlDataModel model = (FlashUmlDataModel) builder.getDataModel();
    collapseNode(model, JSTestUtils.findClassByQName("com.test.MyButton", myModule.getModuleScope()));
    assertModel("2", provider, originQName, model);
}
Also used : DiagramBuilder(com.intellij.diagram.DiagramBuilder) FlashUmlDependenciesSettingsOption(com.intellij.lang.javascript.uml.FlashUmlDependenciesSettingsOption) FlashUmlDataModel(com.intellij.lang.javascript.uml.FlashUmlDataModel) VirtualFile(com.intellij.openapi.vfs.VirtualFile) File(java.io.File)

Example 2 with FlashUmlDataModel

use of com.intellij.lang.javascript.uml.FlashUmlDataModel in project intellij-plugins by JetBrains.

the class FlashUmlTest method testExpandCollapse.

public void testExpandCollapse() throws Exception {
    File projectRoot = new File(getVirtualFile(BASE_PATH + getTestName(false)).getPath());
    String[] files = { getTestName(false) + "/Classes.as", getTestName(false) + "/com/test/MyButton.mxml", getTestName(false) + "/com/test/MyButton2.mxml" };
    DiagramBuilder builder = doTestImpl(projectRoot, files, new String[] { "com.test.Bar", "Root", "com.test.MyButton" }, moduleScopeProvider(), EnumSet.allOf(FlashUmlDependenciesSettingsOption.class), null);
    String originQName = "com.test.Foo";
    DiagramProvider<Object> provider = DiagramProvider.findByID(FlashUmlProvider.ID);
    FlashUmlDataModel model = (FlashUmlDataModel) builder.getDataModel();
    collapseNode(model, JSTestUtils.findClassByQName("com.test.Bar", myModule.getModuleScope()));
    assertModel("2", provider, originQName, model);
    expandNode(model, "com.test");
    assertModel("3", provider, originQName, model);
    collapseNode(model, JSTestUtils.findClassByQName("Root", myModule.getModuleScope()));
    assertModel("3", provider, originQName, model);
}
Also used : DiagramBuilder(com.intellij.diagram.DiagramBuilder) FlashUmlDependenciesSettingsOption(com.intellij.lang.javascript.uml.FlashUmlDependenciesSettingsOption) FlashUmlDataModel(com.intellij.lang.javascript.uml.FlashUmlDataModel) VirtualFile(com.intellij.openapi.vfs.VirtualFile) File(java.io.File)

Aggregations

DiagramBuilder (com.intellij.diagram.DiagramBuilder)2 FlashUmlDataModel (com.intellij.lang.javascript.uml.FlashUmlDataModel)2 FlashUmlDependenciesSettingsOption (com.intellij.lang.javascript.uml.FlashUmlDependenciesSettingsOption)2 VirtualFile (com.intellij.openapi.vfs.VirtualFile)2 File (java.io.File)2