diff --git a/plugins/ui-designer/testData/build/copyFormsRuntimeToArtifact/B.form b/plugins/ui-designer/testData/build/copyFormsRuntimeToArtifact/B.form new file mode 100644 index 000000000000..1107877ed689 --- /dev/null +++ b/plugins/ui-designer/testData/build/copyFormsRuntimeToArtifact/B.form @@ -0,0 +1,13 @@ + +
+ + + + + + + + + + +
diff --git a/plugins/ui-designer/testData/build/copyFormsRuntimeToArtifact/B.java b/plugins/ui-designer/testData/build/copyFormsRuntimeToArtifact/B.java new file mode 100644 index 000000000000..66dd24ce6750 --- /dev/null +++ b/plugins/ui-designer/testData/build/copyFormsRuntimeToArtifact/B.java @@ -0,0 +1,2 @@ +public class B { +} diff --git a/plugins/ui-designer/testSrc/com/intellij/uiDesigner/make/UiDesignerExternalBuildTest.java b/plugins/ui-designer/testSrc/com/intellij/uiDesigner/make/UiDesignerExternalBuildTest.java new file mode 100644 index 000000000000..da4b4233d5ff --- /dev/null +++ b/plugins/ui-designer/testSrc/com/intellij/uiDesigner/make/UiDesignerExternalBuildTest.java @@ -0,0 +1,58 @@ +/* + * Copyright 2000-2012 JetBrains s.r.o. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package com.intellij.uiDesigner.make; + +import com.intellij.compiler.artifacts.ArtifactCompilerTestCase; +import com.intellij.openapi.application.ex.PathManagerEx; +import com.intellij.openapi.module.Module; +import com.intellij.openapi.util.io.FileUtil; +import com.intellij.openapi.vfs.VfsUtilCore; +import com.intellij.openapi.vfs.VirtualFile; +import com.intellij.packaging.artifacts.Artifact; + +import java.io.File; +import java.io.IOException; + +/** + * @author nik + */ +public class UiDesignerExternalBuildTest extends ArtifactCompilerTestCase { + @Override + protected boolean useExternalCompiler() { + return true; + } + + //IDEA-94779 + public void testCopyFormsRuntimeToArtifact() throws IOException { + VirtualFile file = createFile("src/A.java", "class A{}"); + VirtualFile srcRoot = file.getParent(); + Module module = addModule("a", srcRoot); + Artifact a = addArtifact(root().module(module)); + make(a); + assertOutput(a, fs().file("A.class")); + + File dir = PathManagerEx.findFileUnderCommunityHome("plugins/ui-designer/testData/build/copyFormsRuntimeToArtifact"); + FileUtil.copyDir(dir, VfsUtilCore.virtualToIoFile(srcRoot)); + srcRoot.refresh(false, false); + make(a); + File outputDir = VfsUtilCore.virtualToIoFile(getOutputDir(a)); + assertTrue(new File(outputDir, "A.class").exists()); + assertTrue(new File(outputDir, "B.class").exists()); + //todo[jeka] fix + //assertTrue(new File(outputDir, AbstractLayout.class.getName().replace('.', '/') + ".class").exists()); + } + +} diff --git a/plugins/ui-designer/ui-designer.iml b/plugins/ui-designer/ui-designer.iml index 7add16f170c1..8bf285756362 100644 --- a/plugins/ui-designer/ui-designer.iml +++ b/plugins/ui-designer/ui-designer.iml @@ -27,6 +27,7 @@ +