From caaf99eb748266f82a6d75832703ac9f40a79bf3 Mon Sep 17 00:00:00 2001 From: anna Date: Thu, 18 Nov 2010 16:25:36 +0300 Subject: [PATCH] eclipse: provide more details on problem (IDEA-25084 ) --- .../eclipse/config/EclipseClasspathStorageProvider.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/plugins/eclipse/src/org/jetbrains/idea/eclipse/config/EclipseClasspathStorageProvider.java b/plugins/eclipse/src/org/jetbrains/idea/eclipse/config/EclipseClasspathStorageProvider.java index fe9fa414781d..f7c9bd510ee5 100644 --- a/plugins/eclipse/src/org/jetbrains/idea/eclipse/config/EclipseClasspathStorageProvider.java +++ b/plugins/eclipse/src/org/jetbrains/idea/eclipse/config/EclipseClasspathStorageProvider.java @@ -63,6 +63,7 @@ public class EclipseClasspathStorageProvider implements ClasspathStorageProvider } public void assertCompatible(final ModifiableRootModel model) throws ConfigurationException { + final String moduleName = model.getModule().getName(); for (OrderEntry entry : model.getOrderEntries()) { if (entry instanceof LibraryOrderEntry) { final LibraryOrderEntry libraryEntry = (LibraryOrderEntry)entry; @@ -72,18 +73,18 @@ public class EclipseClasspathStorageProvider implements ClasspathStorageProvider libraryEntry.getRootUrls(OrderRootType.CLASSES).length != 1 || library.isJarDirectory(library.getUrls(OrderRootType.CLASSES)[0])) { throw new ConfigurationException( - "Library \'" + entry.getPresentableName() + "\' is incompatible with eclipse format which supports only one content root"); + "Library \'" + entry.getPresentableName() + "\' from module \'" + moduleName + "\' dependencies is incompatible with eclipse format which supports only one library content root"); } } } } if (model.getContentRoots().length == 0) { - throw new ConfigurationException("Module \'" + model.getModule().getName() + "\' has no content roots thus is not compatible with eclipse format"); + throw new ConfigurationException("Module \'" + moduleName + "\' has no content roots thus is not compatible with eclipse format"); } final String output = model.getModuleExtension(CompilerModuleExtension.class).getCompilerOutputUrl(); final String contentRoot = getContentRoot(model); if (output == null || !StringUtil.startsWith(VfsUtil.urlToPath(output), contentRoot)) { - throw new ConfigurationException("Output path is incompatible with eclipse format which supports output under content root only"); + throw new ConfigurationException("Module \'" + moduleName + "\' output path is incompatible with eclipse format which supports output under content root only.\nPlease make sure that \"Inherit project compile output path\" is not selected"); } }