diff --git a/build/scripts/layouts.gant b/build/scripts/layouts.gant index a99e25a84328..f3632e8a6d53 100644 --- a/build/scripts/layouts.gant +++ b/build/scripts/layouts.gant @@ -233,10 +233,24 @@ public def layoutCommunityPlugins(String home) { jar("maven2-server-impl.jar") { module("maven2-server-impl") } + jar("maven3-server-impl.jar") { + module("maven3-server-impl") + } + + dir("maven3") { + fileset(dir: "$home/plugins/maven/maven3-server-impl/lib") {include(name: "maven-dependency-tree-*.jar")} + fileset(dir: "$home/plugins/maven/maven3-server-impl/lib") {include(name: "nexus-indexer-*.jar")} + fileset(dir: "$home/plugins/maven/maven3-server-impl/lib/maven3/lib") {include(name: "*.jar")} + fileset(dir: "$home/plugins/maven/maven3-server-impl/lib/maven3/boot") + } + + dir("maven2") { + fileset(dir: "$home/lib/") { include(name: "jaxb*.jar")} + fileset(dir: "$home/plugins/maven/maven2-server-impl/lib") + } + fileset(dir: "$home/plugins/maven/lib") - fileset(dir: "$home/lib/") { include(name: "jaxb*.jar")} fileset(dir: "$home/plugins/maven/maven-server-api/lib") - fileset(dir: "$home/plugins/maven/maven2-server-impl/lib") } layoutPlugin("gradle") { diff --git a/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/SelectTemplateSettings.java b/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/SelectTemplateSettings.java new file mode 100644 index 000000000000..4bc065fc4f81 --- /dev/null +++ b/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/SelectTemplateSettings.java @@ -0,0 +1,72 @@ +/* + * 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.ide.util.newProjectWizard; + +import com.intellij.ide.util.treeView.TreeState; +import com.intellij.openapi.components.*; +import com.intellij.openapi.util.InvalidDataException; +import com.intellij.openapi.util.WriteExternalException; +import com.intellij.util.xmlb.annotations.Tag; +import com.intellij.util.xmlb.annotations.Transient; +import org.jdom.Element; +import org.jetbrains.annotations.Nullable; + +/** + * @author Dmitry Avdeev + * Date: 10/9/12 + */ +@State(name = "SelectProjectTemplateSettings", storages = {@Storage( file = StoragePathMacros.APP_CONFIG + "/other.xml")}) +public class SelectTemplateSettings implements PersistentStateComponent { + + static SelectTemplateSettings getInstance() { + return ServiceManager.getService(SelectTemplateSettings.class); + } + + @Transient + public TreeState getTreeState() { + return myTreeState; + } + + @Transient + public void setTreeState(TreeState state) { + myTreeState = state; + } + + @Nullable + @Override + public SelectTemplateSettings getState() { + try { + myTreeState.writeExternal(treeState); + } + catch (WriteExternalException ignore) { + } + return this; + } + + @Override + public void loadState(SelectTemplateSettings state) { + try { + myTreeState.readExternal(state.treeState); + } + catch (InvalidDataException ignore) { + } + } + + @Tag("treeState") + public Element treeState = new Element("treeState"); + + private TreeState myTreeState = new TreeState(); +} diff --git a/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/SelectTemplateStep.form b/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/SelectTemplateStep.form index d207491734f3..ac163ca26c3b 100644 --- a/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/SelectTemplateStep.form +++ b/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/SelectTemplateStep.form @@ -51,26 +51,6 @@ - - - - - - - - - - - - - - - - - - - - @@ -82,6 +62,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/SelectTemplateStep.java b/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/SelectTemplateStep.java index f92ce0a7877f..a4315b73687a 100644 --- a/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/SelectTemplateStep.java +++ b/java/idea-ui/src/com/intellij/ide/util/newProjectWizard/SelectTemplateStep.java @@ -18,12 +18,16 @@ package com.intellij.ide.util.newProjectWizard; import com.intellij.ide.util.projectWizard.ModuleWizardStep; import com.intellij.ide.util.projectWizard.WizardContext; import com.intellij.ide.util.treeView.AlphaComparator; +import com.intellij.ide.util.treeView.NodeDescriptor; +import com.intellij.ide.util.treeView.TreeState; import com.intellij.openapi.ui.Messages; import com.intellij.openapi.util.Disposer; import com.intellij.openapi.util.Ref; import com.intellij.openapi.util.text.StringUtil; import com.intellij.platform.ProjectTemplate; import com.intellij.platform.ProjectTemplatesFactory; +import com.intellij.platform.templates.ArchivedTemplatesFactory; +import com.intellij.platform.templates.EmptyModuleTemplatesFactory; import com.intellij.psi.codeStyle.MinusculeMatcher; import com.intellij.psi.codeStyle.NameUtil; import com.intellij.ui.ColoredTreeCellRenderer; @@ -47,10 +51,8 @@ import javax.swing.event.TreeSelectionListener; import javax.swing.tree.DefaultMutableTreeNode; import javax.swing.tree.TreePath; import java.awt.*; -import java.util.ArrayList; -import java.util.Collection; +import java.util.*; import java.util.List; -import java.util.Map; /** * @author Dmitry Avdeev @@ -102,7 +104,23 @@ public class SelectTemplateStep extends ModuleWizardStep { return matches(template); } }; - myBuilder = new FilteringTreeBuilder(myTemplatesTree, myFilter, structure, AlphaComparator.INSTANCE); + myBuilder = new FilteringTreeBuilder(myTemplatesTree, myFilter, structure, new Comparator() { + @Override + public int compare(NodeDescriptor o1, NodeDescriptor o2) { + if (o1 instanceof FilteringTreeStructure.FilteringNode) { + if (((FilteringTreeStructure.FilteringNode)o1).getDelegate() instanceof GroupNode) { + String name = ((GroupNode)((FilteringTreeStructure.FilteringNode)o1).getDelegate()).getName(); + if (name.equals(EmptyModuleTemplatesFactory.GROUP_NAME)) { +// return 1; + } + else if (name.equals(ArchivedTemplatesFactory.CUSTOM_GROUP)) { +// return -1; + } + } + } + return AlphaComparator.INSTANCE.compare(o1, o2); + } + }); myTemplatesTree.setRootVisible(false); myTemplatesTree.setShowsRootHandles(false); @@ -137,6 +155,7 @@ public class SelectTemplateStep extends ModuleWizardStep { } ProjectTemplate template = getSelectedTemplate(); if (template != null) { +// PropertiesComponent JComponent settingsPanel = template.getSettingsPanel(); if (settingsPanel != null) { mySettingsPanel.add(settingsPanel, BorderLayout.NORTH); @@ -165,6 +184,11 @@ public class SelectTemplateStep extends ModuleWizardStep { } }); // doFilter(); + + TreeState state = SelectTemplateSettings.getInstance().getTreeState(); + if (state != null) { + state.applyTo(myTemplatesTree, (DefaultMutableTreeNode)myTemplatesTree.getModel().getRoot()); + } } @Override @@ -174,7 +198,7 @@ public class SelectTemplateStep extends ModuleWizardStep { private void doFilter() { buildMatcher(); - SimpleNode selectedNode = getSelectedNode(); + SimpleNode selectedNode = myTemplatesTree.getSelectedNode(); final Ref node = new Ref(); if (!(selectedNode instanceof TemplateNode) || !matches(selectedNode)) { myTemplatesTree.accept(myBuilder, new SimpleNodeVisitor() { @@ -233,7 +257,8 @@ public class SelectTemplateStep extends ModuleWizardStep { private SimpleNode getSimpleNode(Object component) { DefaultMutableTreeNode node = (DefaultMutableTreeNode)component; Object userObject = node.getUserObject(); - if (!(userObject instanceof FilteringTreeStructure.FilteringNode)) return null; + if (!(userObject instanceof FilteringTreeStructure.FilteringNode)) //noinspection ConstantConditions + return null; FilteringTreeStructure.FilteringNode object = (FilteringTreeStructure.FilteringNode)userObject; return (SimpleNode)object.getDelegate(); } @@ -252,6 +277,19 @@ public class SelectTemplateStep extends ModuleWizardStep { public void updateDataModel() { } + @Override + public void onStepLeaving() { + TreePath path = myTemplatesTree.getSelectionPath(); + TreeState state; + if (path == null) { + state = TreeState.createOn(myTemplatesTree); + } + else { + state = TreeState.createOn(myTemplatesTree, (DefaultMutableTreeNode)path.getLastPathComponent()); + } + SelectTemplateSettings.getInstance().setTreeState(state); + } + @Override public void disposeUIResources() { Disposer.dispose(myBuilder); @@ -278,7 +316,6 @@ public class SelectTemplateStep extends ModuleWizardStep { return children.toArray(new SimpleNode[children.size()]); } - @Override public String getName() { return myGroup; diff --git a/java/idea-ui/src/com/intellij/platform/templates/ArchivedTemplatesFactory.java b/java/idea-ui/src/com/intellij/platform/templates/ArchivedTemplatesFactory.java index cf625871917d..861717875b44 100644 --- a/java/idea-ui/src/com/intellij/platform/templates/ArchivedTemplatesFactory.java +++ b/java/idea-ui/src/com/intellij/platform/templates/ArchivedTemplatesFactory.java @@ -41,7 +41,9 @@ import java.util.*; */ public class ArchivedTemplatesFactory implements ProjectTemplatesFactory { + public static final String CUSTOM_GROUP = "Custom"; private static final String ZIP = ".zip"; + private final NotNullLazyValue> myGroups = new NotNullLazyValue>() { @NotNull @Override @@ -66,7 +68,7 @@ public class ArchivedTemplatesFactory implements ProjectTemplatesFactory { try { List children = UrlUtil.getChildrenRelativePaths(url); if (configURL == url && !children.isEmpty()) { - map.putValue("Custom", url); + map.putValue(CUSTOM_GROUP, url); continue; } diff --git a/java/idea-ui/src/com/intellij/platform/templates/EmptyModuleTemplatesFactory.java b/java/idea-ui/src/com/intellij/platform/templates/EmptyModuleTemplatesFactory.java new file mode 100644 index 000000000000..2a5080e415aa --- /dev/null +++ b/java/idea-ui/src/com/intellij/platform/templates/EmptyModuleTemplatesFactory.java @@ -0,0 +1,80 @@ +/* + * 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.platform.templates; + +import com.intellij.ide.util.projectWizard.ModuleBuilder; +import com.intellij.ide.util.projectWizard.ProjectBuilder; +import com.intellij.ide.util.projectWizard.WizardContext; +import com.intellij.platform.ProjectTemplate; +import com.intellij.platform.ProjectTemplatesFactory; +import com.intellij.util.Function; +import com.intellij.util.containers.ContainerUtil; +import org.jetbrains.annotations.NotNull; +import org.jetbrains.annotations.Nullable; + +import javax.swing.*; +import java.util.List; + +/** + * @author Dmitry Avdeev + * Date: 10/9/12 + */ +public class EmptyModuleTemplatesFactory implements ProjectTemplatesFactory { + + public static final String GROUP_NAME = "Standard"; + + @NotNull + @Override + public String[] getGroups() { + return new String[] {GROUP_NAME}; + } + + @NotNull + @Override + public ProjectTemplate[] createTemplates(String group, WizardContext context) { + List builders = ModuleBuilder.getAllBuilders(); + return ContainerUtil.map2Array(builders, ProjectTemplate.class, new Function() { + @Override + public ProjectTemplate fun(final ModuleBuilder builder) { + return new ProjectTemplate() { + @NotNull + @Override + public String getName() { + return builder.getPresentableName(); + } + + @Nullable + @Override + public String getDescription() { + return builder.getDescription(); + } + + @Nullable + @Override + public JComponent getSettingsPanel() { + return null; + } + + @NotNull + @Override + public ProjectBuilder createModuleBuilder() { + return builder; + } + }; + } + }); + } +} diff --git a/java/java-impl/src/com/intellij/codeInsight/completion/JavaCompletionUtil.java b/java/java-impl/src/com/intellij/codeInsight/completion/JavaCompletionUtil.java index b8a2c9be6f39..e919ba12a4eb 100644 --- a/java/java-impl/src/com/intellij/codeInsight/completion/JavaCompletionUtil.java +++ b/java/java-impl/src/com/intellij/codeInsight/completion/JavaCompletionUtil.java @@ -464,6 +464,7 @@ public class JavaCompletionUtil { document.insertString(exprStart, prefix + spaceWithin + ")" + spaceAfter); CompletionUtil.emulateInsertion(context, exprStart + prefix.length(), castTypeItem); + PsiDocumentManager.getInstance(file.getProject()).doPostponedOperationsAndUnblockDocument(document); context.getEditor().getCaretModel().moveToOffset(context.getTailOffset()); } } diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/ClassResolverProcessor.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/ClassResolverProcessor.java index 39815fb6ad30..39ef8eb5f465 100644 --- a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/ClassResolverProcessor.java +++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/ClassResolverProcessor.java @@ -15,6 +15,7 @@ */ package com.intellij.psi.impl.source.resolve; +import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.util.Comparing; import com.intellij.openapi.util.Key; import com.intellij.openapi.util.text.StringUtil; @@ -31,6 +32,7 @@ import java.util.Iterator; import java.util.List; public class ClassResolverProcessor extends BaseScopeProcessor implements NameHint, ElementClassHint { + private static final Logger LOG = Logger.getInstance("#com.intellij.psi.impl.source.resolve.ClassResolverProcessor"); private static final String[] DEFAULT_PACKAGES = new String[]{CommonClassNames.DEFAULT_PACKAGE}; private final String myClassName; private final PsiElement myPlace; @@ -58,6 +60,7 @@ public class ClassResolverProcessor extends BaseScopeProcessor implements NameHi } } else if (qualifierExpression instanceof PsiJavaCodeReferenceElement) { + LOG.assertTrue(qualifierExpression.isValid()); final PsiElement resolve = ((PsiJavaCodeReferenceElement)qualifierExpression).resolve(); if (resolve instanceof PsiClass) { myAccessClass = (PsiClass)resolve; diff --git a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/PsiResolveHelperImpl.java b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/PsiResolveHelperImpl.java index 8dd78b3b6739..4da7b78f17ea 100644 --- a/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/PsiResolveHelperImpl.java +++ b/java/java-psi-impl/src/com/intellij/psi/impl/source/resolve/PsiResolveHelperImpl.java @@ -15,6 +15,7 @@ */ package com.intellij.psi.impl.source.resolve; +import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.util.Pair; import com.intellij.pom.java.LanguageLevel; import com.intellij.psi.*; @@ -38,6 +39,7 @@ import java.util.Map; import java.util.Set; public class PsiResolveHelperImpl implements PsiResolveHelper { + private static final Logger LOG = Logger.getInstance("#com.intellij.psi.impl.source.resolve.PsiResolveHelperImpl"); public static final Pair RAW_INFERENCE = new Pair(null, ConstraintType.EQUALS); private final PsiManager myManager; @@ -86,6 +88,7 @@ public class PsiResolveHelperImpl implements PsiResolveHelper { final PsiJavaParserFacade parserFacade = JavaPsiFacade.getInstance(myManager.getProject()).getParserFacade(); try { final PsiJavaCodeReferenceElement ref = parserFacade.createReferenceFromText(referenceText, context); + LOG.assertTrue(ref.isValid()); return ResolveClassUtil.resolveClass(ref); } catch (IncorrectOperationException e) { diff --git a/platform/indexing-impl/src/com/intellij/psi/impl/search/PsiSearchHelperImpl.java b/platform/indexing-impl/src/com/intellij/psi/impl/search/PsiSearchHelperImpl.java index e95a7d47623d..096e4958d37b 100644 --- a/platform/indexing-impl/src/com/intellij/psi/impl/search/PsiSearchHelperImpl.java +++ b/platform/indexing-impl/src/com/intellij/psi/impl/search/PsiSearchHelperImpl.java @@ -386,6 +386,7 @@ public class PsiSearchHelperImpl implements PsiSearchHelper { for (int i = 0; i < files.length; i++) { if (progress != null) progress.checkCanceled(); final PsiFile psiFile = files[i]; + if (psiFile instanceof PsiBinaryFile) continue; ApplicationManager.getApplication().runReadAction(new Runnable() { @Override diff --git a/platform/lang-impl/src/com/intellij/codeInsight/completion/CodeCompletionHandlerBase.java b/platform/lang-impl/src/com/intellij/codeInsight/completion/CodeCompletionHandlerBase.java index 358e97983172..12169bdcbdbd 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/completion/CodeCompletionHandlerBase.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/completion/CodeCompletionHandlerBase.java @@ -135,9 +135,11 @@ public class CodeCompletionHandlerBase { CompletionPhase phase = CompletionServiceImpl.getCompletionPhase(); boolean repeated = phase.indicator != null && phase.indicator.isRepeatedInvocation(myCompletionType, editor); + /* if (repeated && isAutocompleteCommonPrefixOnInvocation() && phase.fillInCommonPrefix()) { return; } + */ int newTime = phase.newCompletionStarted(time, repeated); if (invokedExplicitly) { diff --git a/platform/lang-impl/src/com/intellij/ide/navigationToolbar/NavBarPanel.java b/platform/lang-impl/src/com/intellij/ide/navigationToolbar/NavBarPanel.java index 245507d6741e..143660181f5e 100644 --- a/platform/lang-impl/src/com/intellij/ide/navigationToolbar/NavBarPanel.java +++ b/platform/lang-impl/src/com/intellij/ide/navigationToolbar/NavBarPanel.java @@ -376,12 +376,6 @@ public class NavBarPanel extends JPanel implements DataProvider, PopupOwner, Dis index++; } - //IDEA-89401 - if (myModel.getSelectedIndex() != myModel.size() - 1 && !hasFocus() && !isNodePopupShowing()) { - myModel.setSelectedIndex(myModel.size() -1); - return true; - } - return false; } else { return true; diff --git a/platform/platform-api/src/com/intellij/ide/util/treeView/TreeState.java b/platform/platform-api/src/com/intellij/ide/util/treeView/TreeState.java index 925a7d0e80f3..bf3888418c6e 100644 --- a/platform/platform-api/src/com/intellij/ide/util/treeView/TreeState.java +++ b/platform/platform-api/src/com/intellij/ide/util/treeView/TreeState.java @@ -33,6 +33,13 @@ import java.lang.ref.WeakReference; import java.util.ArrayList; import java.util.List; +/** + * @see #createOn(javax.swing.JTree) + * @see #createOn(javax.swing.JTree, javax.swing.tree.DefaultMutableTreeNode) + * + * @see #applyTo(javax.swing.JTree) + * @see #applyTo(javax.swing.JTree, javax.swing.tree.DefaultMutableTreeNode) + */ public class TreeState implements JDOMExternalizable { @NonNls private static final String PATH = "PATH"; @NonNls private static final String PATH_ELEMENT = "PATH_ELEMENT"; @@ -128,6 +135,10 @@ public class TreeState implements JDOMExternalizable { return new TreeState(createExpandedPaths(tree, treeNode), createSelectedPaths(tree, treeNode)); } + public static TreeState createOn(@NotNull JTree tree) { + return new TreeState(createPaths(tree), new ArrayList>()); + } + @Override public void writeExternal(Element element) throws WriteExternalException { for (List path : myExpandedPaths) { @@ -145,11 +156,6 @@ public class TreeState implements JDOMExternalizable { } } - public static TreeState createOn(@NotNull JTree tree) { - return new TreeState(createPaths(tree), new ArrayList>()); - } - - private static List> createPaths(final JTree tree) { final ArrayList> result = new ArrayList>(); final List expandedPaths = TreeUtil.collectExpandedPaths(tree); diff --git a/platform/platform-impl/src/com/intellij/openapi/editor/colors/impl/AbstractColorsScheme.java b/platform/platform-impl/src/com/intellij/openapi/editor/colors/impl/AbstractColorsScheme.java index 3bfa45fd7b9a..017a039ad1f4 100644 --- a/platform/platform-impl/src/com/intellij/openapi/editor/colors/impl/AbstractColorsScheme.java +++ b/platform/platform-impl/src/com/intellij/openapi/editor/colors/impl/AbstractColorsScheme.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * 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. @@ -552,7 +552,7 @@ public abstract class AbstractColorsScheme implements EditorColorsScheme { } } } - return "Source Code Pro"; // "Monospaced" if we cease to bundle Source Code Pro + return "Monospaced"; } } diff --git a/platform/platform-impl/src/com/intellij/openapi/options/newEditor/OptionsEditor.java b/platform/platform-impl/src/com/intellij/openapi/options/newEditor/OptionsEditor.java index b84476be5a57..cb6a861c130e 100644 --- a/platform/platform-impl/src/com/intellij/openapi/options/newEditor/OptionsEditor.java +++ b/platform/platform-impl/src/com/intellij/openapi/options/newEditor/OptionsEditor.java @@ -301,11 +301,6 @@ public class OptionsEditor extends JPanel implements DataProvider, Place.Navigat return myTree.select(configurable); } - @NotNull - public List getPathToRoot(@NotNull Configurable configurable) { - return myTree.getPathToRoot(configurable); - } - private float readProportion(final float defaultValue, final String propertyName) { float proportion = defaultValue; try { diff --git a/platform/platform-impl/src/com/intellij/openapi/options/newEditor/OptionsTree.java b/platform/platform-impl/src/com/intellij/openapi/options/newEditor/OptionsTree.java index be3330db1bf5..3c504642fc68 100644 --- a/platform/platform-impl/src/com/intellij/openapi/options/newEditor/OptionsTree.java +++ b/platform/platform-impl/src/com/intellij/openapi/options/newEditor/OptionsTree.java @@ -257,17 +257,6 @@ public class OptionsTree extends JPanel implements Disposable, OptionsEditorColl return path; } - @Nullable - public Configurable getParentFor(final Configurable configurable) { - final List path = getPathToRoot(configurable); - if (path.size() > 1) { - return path.get(1); - } - else { - return null; - } - } - public SimpleNode findNodeFor(final Configurable toSelect) { return myConfigurable2Node.get(toSelect); } diff --git a/platform/platform-impl/src/org/jetbrains/io/WebServer.java b/platform/platform-impl/src/org/jetbrains/io/WebServer.java index 9972f176e56e..dbfef259ff6f 100644 --- a/platform/platform-impl/src/org/jetbrains/io/WebServer.java +++ b/platform/platform-impl/src/org/jetbrains/io/WebServer.java @@ -13,7 +13,9 @@ import org.jboss.netty.channel.group.DefaultChannelGroup; import org.jboss.netty.channel.socket.nio.NioServerSocketChannelFactory; import org.jboss.netty.handler.codec.http.*; +import java.net.InetAddress; import java.net.InetSocketAddress; +import java.net.UnknownHostException; import java.util.List; import java.util.concurrent.Executor; @@ -64,10 +66,26 @@ public class WebServer { bootstrap.setOption("child.tcpNoDelay", true); bootstrap.setPipelineFactory(new ChannelPipelineFactoryImpl(pipelineConsumers, new DefaultHandler(openChannels))); + // IDEA-91436 idea <121 binds to 127.0.0.1, but >=121 must be available not only from localhost + // but if we bind only to any local port (0.0.0.0), instance of idea <121 can bind to our ports and any request to us will be intercepted + // so, we bind to 127.0.0.1 and 0.0.0.0 + int port = bind(firstPort, portsCount, tryAnyPort, bootstrap); + if (port != -1) { + try { + openChannels.add(bootstrap.bind(new InetSocketAddress(port))); + } + catch (ChannelException e) { + LOG.error(e); + } + } + return port; + } + + private int bind(int firstPort, int portsCount, boolean tryAnyPort, ServerBootstrap bootstrap) { for (int i = 0; i < portsCount; i++) { int port = firstPort + i; try { - openChannels.add(bootstrap.bind(new InetSocketAddress(port))); + openChannels.add(bootstrap.bind(new InetSocketAddress(InetAddress.getByName("127.0.0.1"), port))); return port; } catch (ChannelException e) { @@ -78,6 +96,9 @@ public class WebServer { LOG.error(e); } } + catch (UnknownHostException e) { + LOG.error(e); + } } if (tryAnyPort) { diff --git a/platform/platform-resources-en/src/messages/ActionsBundle.properties b/platform/platform-resources-en/src/messages/ActionsBundle.properties index b941a8aa4573..2f0cb90e6e6f 100644 --- a/platform/platform-resources-en/src/messages/ActionsBundle.properties +++ b/platform/platform-resources-en/src/messages/ActionsBundle.properties @@ -314,11 +314,11 @@ action.FindWordAtCaret.text=Find _Word at Caret action.FindWordAtCaret.description=Find next occurrence of the word at caret action.IncrementalSearch.text=Incrementa_l Search action.IncrementalSearch.description=Start incremental search (searches string as you type), IntelliJ IDEA 6.0 implementation. -action.FindUsages.text=Find _Usages... +action.FindUsages.text=Find _Usages action.FindUsages.description=Find usages of the symbol at caret action.ShowUsages.text=_Show Usages action.ShowUsages.description=Show usages of the symbol at caret -action.ShowSettingsAndFindUsages.text=Find Usages Settings +action.ShowSettingsAndFindUsages.text=Find Usages Settings... action.ShowSettingsAndFindUsages.description=Choose scope and edit options for the Find Usages action action.FindUsagesInFile.text=F_ind Usages in File action.FindUsagesInFile.description=Find usages of the symbol at caret in active editor diff --git a/platform/util/src/com/intellij/openapi/util/io/win32/IdeaWin32.java b/platform/util/src/com/intellij/openapi/util/io/win32/IdeaWin32.java index 7e159ce83b00..945a0a139261 100644 --- a/platform/util/src/com/intellij/openapi/util/io/win32/IdeaWin32.java +++ b/platform/util/src/com/intellij/openapi/util/io/win32/IdeaWin32.java @@ -16,7 +16,6 @@ package com.intellij.openapi.util.io.win32; import com.intellij.openapi.application.PathManager; -import com.intellij.openapi.diagnostic.LogUtil; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.util.SystemInfo; import org.jetbrains.annotations.NotNull; @@ -100,7 +99,6 @@ public class IdeaWin32 { final FileInfo result = getInfo0(path); t = (System.nanoTime() - t) / 1000; LOG.debug("getInfo(" + path + "): " + t + " mks"); - LogUtil.debug(LOG, "getInfo(%s)", path); return result; } else { diff --git a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/annotate/CvsAnnotationProvider.java b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/annotate/CvsAnnotationProvider.java index e924dd5e9d3c..459c8308f202 100644 --- a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/annotate/CvsAnnotationProvider.java +++ b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/annotate/CvsAnnotationProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2011 JetBrains s.r.o. + * 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. @@ -51,6 +51,7 @@ public class CvsAnnotationProvider implements AnnotationProvider{ @NonNls private static final String INVALID_OPTION_F = "invalid option -- F"; @NonNls private static final String USAGE_CVSNTSRV_SERVER = "Usage: cvs"; + private static final Collection ourDoNotAnnotateBinaryRoots = new HashSet(); private final Project myProject; private final CvsHistoryProvider myCvsHistoryProvider; @@ -64,9 +65,10 @@ public class CvsAnnotationProvider implements AnnotationProvider{ final File file = new File(virtualFile.getPath()); final File cvsLightweightFile = CvsUtil.getCvsLightweightFileForFile(file); final String revision = CvsUtil.getRevisionFor(file); - final CvsConnectionSettings root = - CvsEntriesManager.getInstance().getCvsConnectionSettingsFor(file.getParentFile()); - final AnnotateOperation operation = executeOperation(cvsLightweightFile, revision, root, true); + final CvsEntriesManager entriesManager = CvsEntriesManager.getInstance(); + final CvsConnectionSettings root = entriesManager.getCvsConnectionSettingsFor(file.getParentFile()); + final boolean binary = annotateBinary(virtualFile, root); + final AnnotateOperation operation = executeOperation(cvsLightweightFile, revision, root, binary, true); final FilePath filePath = VcsContextFactory.SERVICE.getInstance().createFilePathOn(virtualFile); final List revisions = myCvsHistoryProvider.createRevisions(filePath); @@ -94,8 +96,8 @@ public class CvsAnnotationProvider implements AnnotationProvider{ hasLocalFile = true; cvsFile = new File(CvsUtil.getModuleName(cvsVirtualFile)); } - - final AnnotateOperation annotateOperation = executeOperation(cvsFile, revision, environment, true); + final boolean binary = annotateBinary(cvsVirtualFile, environment); + final AnnotateOperation annotateOperation = executeOperation(cvsFile, revision, environment, binary, true); final Annotation[] lineAnnotations = annotateOperation.getLineAnnotations(); final List revisions; if (hasLocalFile) { @@ -119,12 +121,18 @@ public class CvsAnnotationProvider implements AnnotationProvider{ return new CvsFileAnnotation(annotateOperation.getContent(), lineAnnotations, revisions, cvsVirtualFile); } - private AnnotateOperation executeOperation(File cvsLightweightFile, String revision, CvsEnvironment root, boolean retryOnFailure) + private static boolean annotateBinary(VirtualFile cvsVirtualFile, CvsEnvironment environment) { + if (ourDoNotAnnotateBinaryRoots.contains(environment.getCvsRootAsString())) { + return false; + } + return CvsEntriesManager.getInstance().getEntryFor(cvsVirtualFile).isBinary(); + } + + private AnnotateOperation executeOperation(File file, String revision, CvsEnvironment root, boolean binary, boolean retryOnFailure) throws VcsException { - final AnnotateOperation operation = new AnnotateOperation(cvsLightweightFile, revision, root); + final AnnotateOperation operation = new AnnotateOperation(file, revision, root, binary); final CvsOperationExecutor executor = new CvsOperationExecutor(myProject); - executor.performActionSync(new CommandCvsHandler(CvsBundle.getAnnotateOperationName(), operation), - CvsOperationExecutorCallback.EMPTY); + executor.performActionSync(new CommandCvsHandler(CvsBundle.getAnnotateOperationName(), operation), CvsOperationExecutorCallback.EMPTY); final CvsResult result = executor.getResult(); if (result.hasErrors()) { if (!retryOnFailure) { @@ -133,8 +141,8 @@ public class CvsAnnotationProvider implements AnnotationProvider{ for (VcsException error : result.getErrors()) { for (String message : error.getMessages()) { if (message.contains(INVALID_OPTION_F) || message.contains(USAGE_CVSNTSRV_SERVER)) { - AnnotateOperation.doesNotSupportAnnotateBinary(root); - return executeOperation(cvsLightweightFile, revision, root, false); + ourDoNotAnnotateBinaryRoots.add(root.getCvsRootAsString()); + return executeOperation(file, revision, root, false, false); } } } diff --git a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvsBrowser/CvsTree.java b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvsBrowser/CvsTree.java index 7d280229806c..07c28e52c050 100644 --- a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvsBrowser/CvsTree.java +++ b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvsBrowser/CvsTree.java @@ -274,6 +274,9 @@ public class CvsTree extends JPanel implements CvsTabbedWindow.DeactivateListene if (myShowFiles) { process(directoryContent.getFilesRaw(), CvsElementFactory.FILE_ELEMENT_FACTORY, RemoteResourceDataProvider.NOT_EXPANDABLE); } + if (myTree.getSelectionPath() == null) { + myTree.setSelectionPath(mySelectionPath); + } final long currentTime = System.currentTimeMillis(); if (currentTime - timeStamp > waitTime) { waitTime += 100; // ease off diff --git a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvsoperations/cvsAnnotate/AnnotateOperation.java b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvsoperations/cvsAnnotate/AnnotateOperation.java index fd90b4f1f011..e535d18bd4d6 100644 --- a/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvsoperations/cvsAnnotate/AnnotateOperation.java +++ b/plugins/cvs/cvs-plugin/src/com/intellij/cvsSupport2/cvsoperations/cvsAnnotate/AnnotateOperation.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2011 JetBrains s.r.o. + * 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. @@ -29,8 +29,6 @@ import org.netbeans.lib.cvsclient.command.annotate.AnnotateCommand; import java.io.File; import java.text.ParseException; import java.util.ArrayList; -import java.util.Collection; -import java.util.HashSet; import java.util.List; /** @@ -40,49 +38,40 @@ public class AnnotateOperation extends LocalPathIndifferentOperation { private static final Logger LOG = Logger.getInstance("#com.intellij.cvsSupport2.cvsoperations.cvsAnnotate.AnnotateOperation"); - private static final Collection ourDoNotSupportingAnnotateBinaryRoots = new HashSet(); - private final String myRevision; private final List myAnnotations = new ArrayList(); - private final StringBuffer myBuffer = new StringBuffer(); + private final StringBuilder myBuffer = new StringBuilder(); private final LocalPathIndifferentOperationHelper myHelper; + private final boolean myAnnotateBinary; public static AnnotateOperation createForFile(File file){ - File cvsLightweightFile = CvsUtil.getCvsLightweightFileForFile(file); - String revision = CvsUtil.getRevisionFor(file); + final File cvsLightweightFile = CvsUtil.getCvsLightweightFileForFile(file); + final String revision = CvsUtil.getRevisionFor(file); return new AnnotateOperation(cvsLightweightFile, - revision, CvsEntriesManager.getInstance().getCvsConnectionSettingsFor(file.getParentFile())); + revision, CvsEntriesManager.getInstance().getCvsConnectionSettingsFor(file.getParentFile()), false); } - public AnnotateOperation(File cvsLightweightFile, String revision, CvsEnvironment env) { - this(cvsLightweightFile, revision, env, new LocalPathIndifferentOperationHelper(revision)); + public AnnotateOperation(File cvsLightweightFile, String revision, CvsEnvironment env, boolean annotateBinary) { + this(cvsLightweightFile, revision, env, new LocalPathIndifferentOperationHelper(revision), annotateBinary); } private AnnotateOperation(File cvsLightweightFile, String revision, CvsEnvironment env, - LocalPathIndifferentOperationHelper helper){ + LocalPathIndifferentOperationHelper helper, boolean annotateBinary){ super(helper.getAdminReader(), env); myHelper = helper; myHelper.addFile(cvsLightweightFile); myRevision = revision; - + myAnnotateBinary = annotateBinary; } protected Command createCommand(CvsRootProvider root, CvsExecutionEnvironment cvsExecutionEnvironment) { - AnnotateCommand result = new AnnotateCommand(); + final AnnotateCommand result = new AnnotateCommand(); myHelper.addFilesTo(result); result.setAnnotateByRevisionOrTag(myRevision); - - if (!ourDoNotSupportingAnnotateBinaryRoots.contains(root.getCvsRootAsString())) { - result.setAnnotateBinary(true); - } - + result.setAnnotateBinary(myAnnotateBinary); return result; } - public static void doesNotSupportAnnotateBinary(CvsEnvironment root) { - ourDoNotSupportingAnnotateBinaryRoots.add(root.getCvsRootAsString()); - } - public Annotation[] getLineAnnotations(){ return myAnnotations.toArray(new Annotation[myAnnotations.size()]); } diff --git a/plugins/hg4idea/resources/org/zmlx/hg4idea/HgVcsMessages.properties b/plugins/hg4idea/resources/org/zmlx/hg4idea/HgVcsMessages.properties index 1a696ce18dd1..c43a47a2ca94 100644 --- a/plugins/hg4idea/resources/org/zmlx/hg4idea/HgVcsMessages.properties +++ b/plugins/hg4idea/resources/org/zmlx/hg4idea/HgVcsMessages.properties @@ -114,4 +114,6 @@ hg4idea.integrate.other.head=Other head: {0} hg4idea.dialog.login.password.required=Login and password required hg4idea.dialog.login.description=Login to {0} -hg4idea.exception.file.not.under.hg=The file {0} is not under Mercurial. \ No newline at end of file +hg4idea.exception.file.not.under.hg=The file {0} is not under Mercurial. + +hg4idea.history.copy.revision.number=Copy Revision Number \ No newline at end of file diff --git a/plugins/hg4idea/src/org/zmlx/hg4idea/HgCopyHistoryRevisionNumberAction.java b/plugins/hg4idea/src/org/zmlx/hg4idea/HgCopyHistoryRevisionNumberAction.java new file mode 100644 index 000000000000..ea6d72151918 --- /dev/null +++ b/plugins/hg4idea/src/org/zmlx/hg4idea/HgCopyHistoryRevisionNumberAction.java @@ -0,0 +1,63 @@ +/* + * 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 org.zmlx.hg4idea; + +import com.intellij.openapi.actionSystem.AnAction; +import com.intellij.openapi.actionSystem.AnActionEvent; +import com.intellij.openapi.ide.CopyPasteManager; +import com.intellij.openapi.project.DumbAware; +import com.intellij.openapi.vcs.VcsDataKeys; +import com.intellij.openapi.vcs.history.VcsFileRevision; +import com.intellij.util.PlatformIcons; + +import java.awt.datatransfer.StringSelection; + +/** + * @author Nadya Zabrodina + */ +public class HgCopyHistoryRevisionNumberAction extends AnAction implements DumbAware { + + /** + * The constructor + */ + public HgCopyHistoryRevisionNumberAction() { + super(HgVcsMessages.message("hg4idea.history.copy.revision.number"), + HgVcsMessages.message("hg4idea.history.copy.revision.number"), + PlatformIcons.COPY_ICON); + } + + /** + * {@inheritDoc} + */ + @Override + public void actionPerformed(AnActionEvent e) { + VcsFileRevision revision = e.getData(VcsDataKeys.VCS_FILE_REVISION); + if (revision != null) { + CopyPasteManager.getInstance().setContents(new StringSelection(revision.getRevisionNumber().asString())); + } + } + + /** + * {@inheritDoc} + */ + @Override + public void update(AnActionEvent e) { + super.update(e); + e.getPresentation().setEnabled((e.getData(VcsDataKeys.VCS_FILE_REVISION) != null)); + } +} + + diff --git a/plugins/hg4idea/src/org/zmlx/hg4idea/provider/HgHistoryProvider.java b/plugins/hg4idea/src/org/zmlx/hg4idea/provider/HgHistoryProvider.java index c56ebd7fb26a..5c7fc4ed6f4b 100644 --- a/plugins/hg4idea/src/org/zmlx/hg4idea/provider/HgHistoryProvider.java +++ b/plugins/hg4idea/src/org/zmlx/hg4idea/provider/HgHistoryProvider.java @@ -16,17 +16,19 @@ import com.intellij.openapi.actionSystem.AnAction; import com.intellij.openapi.project.Project; import com.intellij.openapi.vcs.FilePath; import com.intellij.openapi.vcs.VcsException; +import com.intellij.openapi.vcs.annotate.ShowAllAffectedGenericAction; import com.intellij.openapi.vcs.history.*; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.util.ui.ColumnInfo; import com.intellij.vcsUtil.VcsUtil; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; +import org.zmlx.hg4idea.HgCopyHistoryRevisionNumberAction; import org.zmlx.hg4idea.HgFile; import org.zmlx.hg4idea.HgFileRevision; -import org.zmlx.hg4idea.util.HgUtil; import org.zmlx.hg4idea.command.HgLogCommand; import org.zmlx.hg4idea.command.HgWorkingCopyRevisionsCommand; +import org.zmlx.hg4idea.util.HgUtil; import javax.swing.*; import java.util.ArrayList; @@ -49,7 +51,7 @@ public class HgHistoryProvider implements VcsHistoryProvider { } public AnAction[] getAdditionalActions(Runnable runnable) { - return new AnAction[0]; + return new AnAction[]{ShowAllAffectedGenericAction.getInstance(), new HgCopyHistoryRevisionNumberAction()}; } public boolean isDateOmittable() { diff --git a/plugins/maven/src/main/java/org/jetbrains/idea/maven/server/MavenServerManager.java b/plugins/maven/src/main/java/org/jetbrains/idea/maven/server/MavenServerManager.java index 38c09326e9ac..af704ab381a2 100644 --- a/plugins/maven/src/main/java/org/jetbrains/idea/maven/server/MavenServerManager.java +++ b/plugins/maven/src/main/java/org/jetbrains/idea/maven/server/MavenServerManager.java @@ -32,12 +32,10 @@ import com.intellij.openapi.projectRoots.JavaSdkType; import com.intellij.openapi.projectRoots.JdkUtil; import com.intellij.openapi.projectRoots.Sdk; import com.intellij.openapi.projectRoots.SimpleJavaSdkType; -import com.intellij.openapi.util.Pair; import com.intellij.openapi.util.ShutDownTracker; import com.intellij.openapi.util.SystemInfo; import com.intellij.util.Alarm; import com.intellij.util.PathUtil; -import com.intellij.util.SmartList; import com.intellij.util.SystemProperties; import com.intellij.util.containers.ContainerUtil; import gnu.trove.THashMap; @@ -176,7 +174,7 @@ public class MavenServerManager extends RemoteObjectWrapper impleme ContainerUtil.addIfNotNull(PathUtil.getJarPathForClass(Query.class), classPath); params.getClassPath().add(PathManager.getResourceRoot(getClass(), "/messages/CommonBundle.properties")); params.getClassPath().addAll(classPath); - params.getClassPath().addAllFiles(collectClassPathAndLibsFolder().first); + params.getClassPath().addAllFiles(collectClassPathAndLibsFolder()); params.setMainClass(MAIN_CLASS); @@ -262,51 +260,68 @@ public class MavenServerManager extends RemoteObjectWrapper impleme }; } - public static Pair, File> collectClassPathAndLibsFolder() { + public static File getMavenLibDirectory() { + File pluginFileOrDir = new File(PathUtil.getJarPathForClass(MavenServerManager.class)); + if (pluginFileOrDir.isDirectory()) { + File luceneLib = new File(PathUtil.getJarPathForClass(Query.class)); + return new File(luceneLib.getParentFile().getParentFile().getParentFile(), "maven3-server-impl/lib/maven3/lib"); + } + + return new File(pluginFileOrDir.getParentFile(), "maven3"); + } + + public static List collectClassPathAndLibsFolder() { File pluginFileOrDir = new File(PathUtil.getJarPathForClass(MavenServerManager.class)); - File libDir; - List classpath = new SmartList(); + List classpath = new ArrayList(); + + String root = pluginFileOrDir.getParent(); if (pluginFileOrDir.isDirectory()) { - classpath.add(new File(pluginFileOrDir.getParent(), "maven-server-api")); + classpath.add(new File(root, "maven-server-api")); + + File luceneLib = new File(PathUtil.getJarPathForClass(Query.class)); if (getInstance().isUseMaven2()) { - classpath.add(new File(pluginFileOrDir.getParent(), "maven2-server-impl")); - File luceneLib = new File(PathUtil.getJarPathForClass(Query.class)); - libDir = new File(luceneLib.getParentFile().getParentFile().getParentFile(), "maven2-server-impl/lib"); + classpath.add(new File(root, "maven2-server-impl")); + addDir(classpath, new File(luceneLib.getParentFile().getParentFile().getParentFile(), "maven2-server-impl/lib")); } else { - classpath.add(new File(pluginFileOrDir.getParent(), "maven3-server-impl")); - File luceneLib = new File(PathUtil.getJarPathForClass(Query.class)); + classpath.add(new File(root, "maven3-server-impl")); File maven3Module_Lib = new File(luceneLib.getParentFile().getParentFile().getParentFile(), "maven3-server-impl/lib"); + addDir(classpath, maven3Module_Lib); File maven3Home = new File(maven3Module_Lib, "maven3"); - libDir = new File(maven3Home, "lib"); + addDir(classpath, new File(maven3Home, "lib")); classpath.add(new File(maven3Home, "boot/plexus-classworlds-2.4.jar")); - - for (File jar : maven3Module_Lib.listFiles()) { - if (jar.isFile() && jar.getName().endsWith(".jar")) { - classpath.add(jar); - } - } } } else { - libDir = pluginFileOrDir.getParentFile(); - } - MavenLog.LOG.assertTrue(libDir.exists() && libDir.isDirectory(), "Maven server libraries dir not found: " + libDir); + classpath.add(new File(root, "maven-server-api.jar")); - File[] files = libDir.listFiles(); - for (File jar : files) { - if (jar.isFile() && jar.getName().endsWith(".jar") && !jar.equals(pluginFileOrDir)) { + if (getInstance().isUseMaven2()) { + classpath.add(new File(root, "maven2-server-impl.jar")); + + addDir(classpath, new File(root, "maven2")); + } + else { + classpath.add(new File(root, "maven3-server-impl.jar")); + addDir(classpath, new File(root, "maven3")); + } + } + + return classpath; + } + + private static void addDir(List classpath, File dir) { + for (File jar : dir.listFiles()) { + if (jar.isFile() && jar.getName().endsWith(".jar")) { classpath.add(jar); } } - return Pair.create(classpath, libDir); } public MavenEmbedderWrapper createEmbedder(final Project project, final boolean alwaysOnline) { diff --git a/plugins/maven/src/main/java/org/jetbrains/idea/maven/utils/MavenUtil.java b/plugins/maven/src/main/java/org/jetbrains/idea/maven/utils/MavenUtil.java index bbe7e5e2cec8..f40dc71d9a7f 100644 --- a/plugins/maven/src/main/java/org/jetbrains/idea/maven/utils/MavenUtil.java +++ b/plugins/maven/src/main/java/org/jetbrains/idea/maven/utils/MavenUtil.java @@ -689,7 +689,7 @@ public class MavenUtil { result = doResolveSuperPomFile(new File(mavenHome, LIB_DIR)); } if (result == null) { - result = doResolveSuperPomFile(MavenServerManager.collectClassPathAndLibsFolder().second); + result = doResolveSuperPomFile(MavenServerManager.getMavenLibDirectory()); } return result; } diff --git a/resources/src/idea/RichPlatformPlugin.xml b/resources/src/idea/RichPlatformPlugin.xml index b7303944ba3b..a3284049db16 100644 --- a/resources/src/idea/RichPlatformPlugin.xml +++ b/resources/src/idea/RichPlatformPlugin.xml @@ -299,6 +299,9 @@ + + +