From be0dd75d97ee6f69010a643605d0214068050bb1 Mon Sep 17 00:00:00 2001 From: Sergey Malenkov Date: Mon, 6 Oct 2014 15:39:38 +0400 Subject: [PATCH 1/3] IDEA-130682 Preferences : Code style: Can't scroll the page on Mac --- .../application/options/GeneralCodeStylePanel.java | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/application/options/GeneralCodeStylePanel.java b/platform/lang-impl/src/com/intellij/application/options/GeneralCodeStylePanel.java index d0e1558abd41..a521067dbfd1 100644 --- a/platform/lang-impl/src/com/intellij/application/options/GeneralCodeStylePanel.java +++ b/platform/lang-impl/src/com/intellij/application/options/GeneralCodeStylePanel.java @@ -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(); From 00b17e88c3b85bde7e27cdf610dc50cebefce424 Mon Sep 17 00:00:00 2001 From: nik Date: Mon, 6 Oct 2014 16:01:29 +0400 Subject: [PATCH 2/3] 'excluded' to 'ignored' conversion: do not mark as ignored content roots of inner modules explicitly excluded from outer module (IDEA-129864) --- .../openapi/vcs/changes/ChangeListManagerImpl.java | 8 ++++++++ .../vcs/changes/ConvertExcludedToIgnoredTest.java | 9 +++++++++ 2 files changed, 17 insertions(+) diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangeListManagerImpl.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangeListManagerImpl.java index 87d39a539254..1947e8c36bc1 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangeListManagerImpl.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ChangeListManagerImpl.java @@ -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)); } } diff --git a/platform/vcs-impl/testSrc/com/intellij/openapi/vcs/changes/ConvertExcludedToIgnoredTest.java b/platform/vcs-impl/testSrc/com/intellij/openapi/vcs/changes/ConvertExcludedToIgnoredTest.java index 4ec5ea4bcdad..e2721e3aeb8d 100644 --- a/platform/vcs-impl/testSrc/com/intellij/openapi/vcs/changes/ConvertExcludedToIgnoredTest.java +++ b/platform/vcs-impl/testSrc/com/intellij/openapi/vcs/changes/ConvertExcludedToIgnoredTest.java @@ -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); } From 88f6718c4c78658dbe9fcc382cc1c8938a5f2f24 Mon Sep 17 00:00:00 2001 From: Andrey Vokin Date: Mon, 6 Oct 2014 16:34:11 +0400 Subject: [PATCH 3/3] Cucumber. Gherkin keywords are taken from built-in json file --- build/scripts/libLicenses.gant | 1 + 1 file changed, 1 insertion(+) diff --git a/build/scripts/libLicenses.gant b/build/scripts/libLicenses.gant index 70e22cda7d1d..3065c26d756c 100644 --- a/build/scripts/libLicenses.gant +++ b/build/scripts/libLicenses.gant @@ -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")