Merge remote-tracking branch 'origin/master'

This commit is contained in:
Vladimir.Orlov
2014-10-06 16:45:22 +04:00
4 changed files with 21 additions and 5 deletions
+1
View File
@@ -280,6 +280,7 @@ libraryLicense(name: "ReflectASM", libraryName: "reflectasm-1.0.7.jar", version:
libraryLicense(name: "Objenesis", libraryName: "objenesis-1.2.jar", version: "1.2", license: "Apache 2.0", url: "http://objenesis.org/", licenseUrl: "http://apache.org/licenses/LICENSE-2.0")
libraryLicense(name: "EditorConfig Java Core", libraryName: "editorconfig-core-java.jar", version: "1.0", license: "Apache 2.0", url: "https://github.com/editorconfig/editorconfig-core-java/", licenseUrl: "https://github.com/editorconfig/editorconfig-core-java/blob/master/LICENSE")
libraryLicense(name: "Fest", libraryName: "fest", version: "", license: "Apache 2.0", licenseUrl: "http://www.apache.org/licenses/LICENSE-2.0.txt", url: "https://code.google.com/p/fest/")
libraryLicense(name: "Gherkin", libraryName: "Gherkin", version: "2.12.2", license: "MIT", licenseUrl: "http://www.apache.org/licenses/LICENSE-2.0.txt", url: "https://github.com/cucumber/gherkin")
jetbrainsLibrary("Coverage")
jetbrainsLibrary("CoverageReport")
jetbrainsLibrary("JPS")
@@ -37,9 +37,9 @@ import com.intellij.openapi.util.text.StringUtil;
import com.intellij.psi.PsiFile;
import com.intellij.psi.codeStyle.CodeStyleSettings;
import com.intellij.ui.IdeBorderFactory;
import com.intellij.ui.ScrollPaneFactory;
import com.intellij.ui.awt.RelativePoint;
import com.intellij.ui.components.JBLabel;
import com.intellij.ui.components.JBScrollPane;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -77,7 +77,7 @@ public class GeneralCodeStylePanel extends CodeStyleAbstractPanel {
private JPanel myAdditionalSettingsPanel;
private JCheckBox myAutodetectIndentsBox;
private final SmartIndentOptionsEditor myIndentOptionsEditor;
private final JBScrollPane myScrollPane;
private final JScrollPane myScrollPane;
public GeneralCodeStylePanel(CodeStyleSettings settings) {
@@ -106,9 +106,7 @@ public class GeneralCodeStylePanel extends CodeStyleAbstractPanel {
ApplicationBundle.message("settings.code.style.general.formatter.marker.title"), true));
myMarkerOptionsPanel.setBorder(
IdeBorderFactory.createTitledBorder(ApplicationBundle.message("settings.code.style.general.formatter.marker.options.title"), true));
myScrollPane = new JBScrollPane(myPanel,
ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER);
myScrollPane.setBorder(IdeBorderFactory.createEmptyBorder());
myScrollPane = ScrollPaneFactory.createScrollPane(myPanel, true);
myAdditionalSettingsPanel.setLayout(new VerticalFlowLayout(true, true));
myAdditionalSettingsPanel.removeAll();
@@ -31,6 +31,7 @@ import com.intellij.openapi.progress.ProgressIndicator;
import com.intellij.openapi.project.DumbAwareRunnable;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.ModuleRootManager;
import com.intellij.openapi.roots.ProjectFileIndex;
import com.intellij.openapi.roots.impl.DirectoryIndexExcludePolicy;
import com.intellij.openapi.ui.MessageType;
import com.intellij.openapi.ui.Messages;
@@ -328,8 +329,15 @@ public class ChangeListManagerImpl extends ChangeListManagerEx implements Projec
}
}
ProjectFileIndex fileIndex = ProjectFileIndex.SERVICE.getInstance(myProject);
VirtualFileManager virtualFileManager = VirtualFileManager.getInstance();
for (Module module : ModuleManager.getInstance(myProject).getModules()) {
for (String url : ModuleRootManager.getInstance(module).getExcludeRootUrls()) {
VirtualFile file = virtualFileManager.findFileByUrl(url);
if (file != null && !fileIndex.isExcluded(file)) {
//root is included into some inner module so it shouldn't be ignored
continue;
}
addDirectoryToIgnoreImplicitly(VfsUtilCore.urlToPath(url));
}
}
@@ -1,5 +1,6 @@
package com.intellij.openapi.vcs.changes;
import com.intellij.openapi.module.ModuleType;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.CompilerProjectExtension;
import com.intellij.openapi.vfs.VirtualFile;
@@ -71,6 +72,14 @@ public class ConvertExcludedToIgnoredTest extends PlatformTestCase {
assertIgnored(excluded);
}
public void testDoNotIgnoreInnerModuleExplicitlyMarkedAsExcludedFromOuterModule() throws IOException {
VirtualFile inner = createChildDirectory(myContentRoot, "inner");
PsiTestUtil.addModule(myProject, ModuleType.EMPTY, "inner", inner);
PsiTestUtil.addExcludedRoot(myModule, inner);
getChangeListManager().convertExcludedToIgnored();
assertFalse(getChangeListManager().isIgnoredFile(inner));
}
private void assertIgnored(VirtualFile... ignoredDirs) {
assertIgnoredDirectories(getProject(), ignoredDirs);
}