diff --git a/platform/platform-api/src/com/intellij/openapi/ui/MasterDetailsComponent.java b/platform/platform-api/src/com/intellij/openapi/ui/MasterDetailsComponent.java index a262ea0a3b85..547fa03e438d 100644 --- a/platform/platform-api/src/com/intellij/openapi/ui/MasterDetailsComponent.java +++ b/platform/platform-api/src/com/intellij/openapi/ui/MasterDetailsComponent.java @@ -131,7 +131,7 @@ public abstract class MasterDetailsComponent implements Configurable, DetailsCom protected MasterDetailsComponent(MasterDetailsState state) { myState = state; - mySplitter = Registry.is("ide.new.project.settings") ? new OnePixelSplitter(false, .2f) : new JBSplitter(false, .2f); + mySplitter = isNewProjectSettings() ? new OnePixelSplitter(false, .2f) : new JBSplitter(false, .2f); mySplitter.setSplitterProportionKey("ProjectStructure.SecondLevelElements"); mySplitter.setHonorComponentsMinimumSize(true); @@ -139,6 +139,20 @@ public abstract class MasterDetailsComponent implements Configurable, DetailsCom reInitWholePanelIfNeeded(); } + private boolean isNewProjectSettings() { + if (!Registry.is("ide.new.project.settings")) { + return false; + } + try { + // assume that only project structure dialog uses the following base class for details: + String name = "com.intellij.openapi.roots.ui.configuration.projectRoot.BaseStructureConfigurable"; + return Class.forName(name).isAssignableFrom(getClass()); + } + catch (ClassNotFoundException ignored) { + return false; + } + } + protected void reInitWholePanelIfNeeded() { if (!myToReInitWholePanel) return; @@ -170,7 +184,7 @@ public abstract class MasterDetailsComponent implements Configurable, DetailsCom } }; - if (Registry.is("ide.new.project.settings")) { + if (isNewProjectSettings()) { ToolbarDecorator decorator = ToolbarDecorator.createDecorator(myTree); DefaultActionGroup group = createToolbarActionGroup(); if (group != null) { @@ -281,7 +295,7 @@ public abstract class MasterDetailsComponent implements Configurable, DetailsCom } private void initToolbar() { - if (Registry.is("ide.new.project.settings")) return; + if (isNewProjectSettings()) return; DefaultActionGroup group = createToolbarActionGroup(); if (group != null) { final JComponent component = ActionManager.getInstance().createActionToolbar(ActionPlaces.UNKNOWN, group, true).getComponent(); diff --git a/platform/platform-api/src/com/intellij/ui/HyperlinkLabel.java b/platform/platform-api/src/com/intellij/ui/HyperlinkLabel.java index 1e81eb729e40..6a99624a620b 100644 --- a/platform/platform-api/src/com/intellij/ui/HyperlinkLabel.java +++ b/platform/platform-api/src/com/intellij/ui/HyperlinkLabel.java @@ -58,7 +58,6 @@ public class HyperlinkLabel extends HighlightableComponent { private HighlightedText myHighlightedText; private final List myListeners = ContainerUtil.createLockFreeCopyOnWriteList(); private boolean myUseIconAsLink; - private final Color myTextEffectColor; private final TextAttributes myAnchorAttributes; private HyperlinkListener myHyperlinkListener = null; @@ -80,8 +79,8 @@ public class HyperlinkLabel extends HighlightableComponent { } public HyperlinkLabel(String text, final Color textForegroundColor, final Color textBackgroundColor, final Color textEffectColor) { - myTextEffectColor = textEffectColor; - myAnchorAttributes = new TextAttributes(textForegroundColor, textBackgroundColor, null, null, Font.PLAIN); + myAnchorAttributes = + new TextAttributes(textForegroundColor, textBackgroundColor, textEffectColor, EffectType.LINE_UNDERSCORE, Font.PLAIN); enforceBackgroundOutsideText(textBackgroundColor); setHyperlinkText(text); enableEvents(AWTEvent.MOUSE_EVENT_MASK | AWTEvent.MOUSE_MOTION_EVENT_MASK); @@ -116,7 +115,6 @@ public class HyperlinkLabel extends HighlightableComponent { protected void processMouseEvent(MouseEvent e) { if (e.getID() == MouseEvent.MOUSE_EXITED) { setCursor(Cursor.getDefaultCursor()); - updateLinkUnderlining(e); } else if (UIUtil.isActionClick(e, MouseEvent.MOUSE_PRESSED) && isOnLink(e.getX())) { fireHyperlinkEvent(); @@ -128,32 +126,10 @@ public class HyperlinkLabel extends HighlightableComponent { protected void processMouseMotionEvent(MouseEvent e) { if (e.getID() == MouseEvent.MOUSE_MOVED) { setCursor(isOnLink(e.getX()) ? Cursor.getPredefinedCursor(Cursor.HAND_CURSOR) : Cursor.getDefaultCursor()); - updateLinkUnderlining(e); } super.processMouseMotionEvent(e); } - private void updateLinkUnderlining(MouseEvent e) { - boolean wasUnderlined = myAnchorAttributes.getEffectType() == EffectType.LINE_UNDERSCORE; - if (e.getID() == MouseEvent.MOUSE_EXITED) { - if (wasUnderlined) { - myAnchorAttributes.setEffectColor(null); - myAnchorAttributes.setEffectType(null); - repaint(); - } - } - else if (e.getID() == MouseEvent.MOUSE_MOVED) { - if (!wasUnderlined) { - HighlightedRegion region = findRegionByX(e.getX()); - if (region != null && region.textAttributes == myAnchorAttributes) { - myAnchorAttributes.setEffectColor(myTextEffectColor); - myAnchorAttributes.setEffectType(EffectType.LINE_UNDERSCORE); - repaint(); - } - } - } - } - private boolean isOnLink(int x) { if (myUseIconAsLink && myIcon != null && x < myIcon.getIconWidth()) { return true; diff --git a/plugins/git4idea/src/git4idea/GitUtil.java b/plugins/git4idea/src/git4idea/GitUtil.java index e96d52de8ea0..3f344482f5c6 100644 --- a/plugins/git4idea/src/git4idea/GitUtil.java +++ b/plugins/git4idea/src/git4idea/GitUtil.java @@ -1016,6 +1016,7 @@ public class GitUtil { @NotNull public static String cleanupErrorPrefixes(@NotNull String msg) { final String[] PREFIXES = { "fatal:", "error:" }; + msg = msg.trim(); for (String prefix : PREFIXES) { if (msg.startsWith(prefix)) { return msg.substring(prefix.length()).trim(); diff --git a/plugins/git4idea/src/git4idea/reset/GitResetAction.java b/plugins/git4idea/src/git4idea/reset/GitResetAction.java index 749acd7e7c7c..97b5b4ffeae8 100644 --- a/plugins/git4idea/src/git4idea/reset/GitResetAction.java +++ b/plugins/git4idea/src/git4idea/reset/GitResetAction.java @@ -16,7 +16,6 @@ package git4idea.reset; import com.intellij.dvcs.ui.VcsLogOneCommitPerRepoAction; -import com.intellij.openapi.components.ServiceManager; import com.intellij.openapi.progress.ProgressIndicator; import com.intellij.openapi.progress.Task; import com.intellij.openapi.project.Project; @@ -25,18 +24,19 @@ import com.intellij.util.ObjectUtils; import com.intellij.vcs.log.VcsFullCommitDetails; import git4idea.config.GitVcsSettings; import git4idea.repo.GitRepository; -import git4idea.repo.GitRepositoryManager; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.Map; +import static git4idea.GitUtil.getRepositoryManager; + public class GitResetAction extends VcsLogOneCommitPerRepoAction { @Nullable @Override protected GitRepository getRepositoryForRoot(@NotNull Project project, @NotNull VirtualFile root) { - return getRepoManager(project).getRepositoryForRoot(root); + return getRepositoryManager(project).getRepositoryForRoot(root); } @Override @@ -57,9 +57,4 @@ public class GitResetAction extends VcsLogOneCommitPerRepoAction } } - @NotNull - private static GitRepositoryManager getRepoManager(@NotNull Project project) { - return ServiceManager.getService(project, GitRepositoryManager.class); - } - } diff --git a/python/edu/build/pycharm_edu_build.gant b/python/edu/build/pycharm_edu_build.gant index 8765a69e55e0..784c2fe7d90b 100644 --- a/python/edu/build/pycharm_edu_build.gant +++ b/python/edu/build/pycharm_edu_build.gant @@ -167,7 +167,7 @@ public layoutEducational(String classesPath, Set usedJars) { def appInfo = appInfoFile() if (!dryRun) { - wireBuildDate("PE-${buildNumber}", appInfo) + wireBuildDate(${buildNumber}, appInfo) } Map args = [ @@ -223,7 +223,7 @@ private layoutPlugins(layouts) { } private String appInfoFile() { - return "$pythonEduHome/out/pycharm/classes/production/python-educational/idea/PyCharmEduApplicationInfo.xml" + return "${paths.sandbox}/classes/production/python-educational/idea/PyCharmEduApplicationInfo.xml" } private layoutFull(Map args, String target, Set usedJars) {