diff --git a/java/compiler/impl/src/com/intellij/compiler/server/BuildManager.java b/java/compiler/impl/src/com/intellij/compiler/server/BuildManager.java index 8d58ec8be56e..247948ded4fa 100644 --- a/java/compiler/impl/src/com/intellij/compiler/server/BuildManager.java +++ b/java/compiler/impl/src/com/intellij/compiler/server/BuildManager.java @@ -546,11 +546,9 @@ public class BuildManager implements ApplicationComponent{ runCommand(new Runnable() { @Override public void run() { - LOG.info("Cancelling preloaded process for project " + projectPath); Pair, OSProcessHandler> pair = takePreloadedProcess(projectPath); if (pair != null) { final RequestFuture future = pair.first; - LOG.info("Cancelling preloaded process, sessionID=" + future.getRequestID()); myMessageDispatcher.cancelSession(future.getRequestID()); // waiting for preloaded process from project's task queue guarantees no build is started for this project // until this one gracefully exits and closes all its storages @@ -561,9 +559,6 @@ public class BuildManager implements ApplicationComponent{ } }); } - else { - LOG.info("takePreloadedProcess() returned null"); - } } }); } @@ -752,12 +747,14 @@ public class BuildManager implements ApplicationComponent{ if (Registry.is("compiler.process.preload") && !project.isDisposed()) { runCommand(new Runnable() { public void run() { - try { - final Future, OSProcessHandler>> preloadResult = launchPreloadedBuildProcess(project, projectTaskQueue); - myPreloadedBuilds.put(projectPath, preloadResult); - } - catch (Exception e) { - LOG.info("Error pre-loading build process for project " + projectPath, e); + if (!myPreloadedBuilds.containsKey(projectPath)) { + try { + final Future, OSProcessHandler>> preloadResult = launchPreloadedBuildProcess(project, projectTaskQueue); + myPreloadedBuilds.put(projectPath, preloadResult); + } + catch (Exception e) { + LOG.info("Error pre-loading build process for project " + projectPath, e); + } } } }); diff --git a/java/compiler/impl/src/com/intellij/compiler/server/BuildMessageDispatcher.java b/java/compiler/impl/src/com/intellij/compiler/server/BuildMessageDispatcher.java index 8bf11a9302e2..59c19f0ad7fe 100644 --- a/java/compiler/impl/src/com/intellij/compiler/server/BuildMessageDispatcher.java +++ b/java/compiler/impl/src/com/intellij/compiler/server/BuildMessageDispatcher.java @@ -75,19 +75,11 @@ class BuildMessageDispatcher extends SimpleChannelInboundHandlerAdapter elementsToSearch = new ArrayList(overrides.length + 1); elementsToSearch.add(parameter); diff --git a/java/java-impl/src/com/intellij/refactoring/introduceparameterobject/usageInfo/MergeMethodArguments.java b/java/java-impl/src/com/intellij/refactoring/introduceparameterobject/usageInfo/MergeMethodArguments.java index 3ba23bc1e0fe..f127efd9f450 100644 --- a/java/java-impl/src/com/intellij/refactoring/introduceparameterobject/usageInfo/MergeMethodArguments.java +++ b/java/java-impl/src/com/intellij/refactoring/introduceparameterobject/usageInfo/MergeMethodArguments.java @@ -94,18 +94,26 @@ public class MergeMethodArguments extends FixableUsageInfo { } final List parametersInfo = new ArrayList(); final PsiClassType classType = JavaPsiFacade.getElementFactory(getProject()).createType(psiClass, subst); - parametersInfo.add(new ParameterInfoImpl(-1, parameterName, classType, null) { + + final ParameterInfoImpl mergedParamInfo = new ParameterInfoImpl(-1, parameterName, classType, null) { @Override public PsiExpression getValue(final PsiCallExpression expr) throws IncorrectOperationException { - return (PsiExpression)JavaCodeStyleManager.getInstance(getProject()).shortenClassReferences(psiFacade.getElementFactory().createExpressionFromText(getMergedParam(expr), expr)); + return (PsiExpression)JavaCodeStyleManager.getInstance(getProject()) + .shortenClassReferences(psiFacade.getElementFactory().createExpressionFromText(getMergedParam(expr), expr)); } - }); + }; + + int firstIncludedIdx = -1; final PsiParameter[] parameters = method.getParameterList().getParameters(); for (int i = 0; i < parameters.length; i++) { if (!isParameterToMerge(i)) { parametersInfo.add(new ParameterInfoImpl(i, parameters[i].getName(), parameters[i].getType())); + } else if (firstIncludedIdx == -1) { + firstIncludedIdx = i; } } + + parametersInfo.add(firstIncludedIdx == -1 ? 0 : firstIncludedIdx, mergedParamInfo); final SmartPsiElementPointer meth = SmartPointerManager.getInstance(getProject()).createSmartPsiElementPointer(method); Runnable performChangeSignatureRunnable = new Runnable() { diff --git a/java/structuralsearch-java/src/com/intellij/structuralsearch/impl/matcher/JavaMatchingVisitor.java b/java/structuralsearch-java/src/com/intellij/structuralsearch/impl/matcher/JavaMatchingVisitor.java index b08f55ee78f6..e963ec91c2fc 100644 --- a/java/structuralsearch-java/src/com/intellij/structuralsearch/impl/matcher/JavaMatchingVisitor.java +++ b/java/structuralsearch-java/src/com/intellij/structuralsearch/impl/matcher/JavaMatchingVisitor.java @@ -835,7 +835,14 @@ public class JavaMatchingVisitor extends JavaElementVisitor { } } final String text = stripTypeParameters(el.getText()); - final boolean equalsIgnorePackage = MatchUtils.compareWithNoDifferenceToPackage(text, stripTypeParameters(el2.getText())); + String text2; + if (el2 instanceof PsiClass) { + text2 = ((PsiClass)el2).getQualifiedName(); + } else { + text2 = el2.getText(); + } + + final boolean equalsIgnorePackage = MatchUtils.compareWithNoDifferenceToPackage(text, stripTypeParameters(text2)); if (equalsIgnorePackage || !(el2 instanceof PsiJavaReference)) { return equalsIgnorePackage; } @@ -846,7 +853,7 @@ public class JavaMatchingVisitor extends JavaElementVisitor { return text.equals(((PsiClass)element2).getQualifiedName()); } else { - return MatchUtils.compareWithNoDifferenceToPackage(text, el2.getText()); + return MatchUtils.compareWithNoDifferenceToPackage(text, text2); } } } diff --git a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/EditCleanupProfileIntentionAction.java b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/EditCleanupProfileIntentionAction.java index e5e7cf01ad1e..c43d2d4bb54d 100644 --- a/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/EditCleanupProfileIntentionAction.java +++ b/platform/lang-impl/src/com/intellij/codeInsight/daemon/impl/EditCleanupProfileIntentionAction.java @@ -16,21 +16,18 @@ package com.intellij.codeInsight.daemon.impl; import com.intellij.codeInsight.intention.IntentionAction; -import com.intellij.codeInspection.InspectionProfile; +import com.intellij.codeInspection.actions.CodeCleanupAction; import com.intellij.codeInspection.ex.InspectionToolWrapper; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.options.ShowSettingsUtil; import com.intellij.openapi.project.Project; import com.intellij.profile.codeInspection.InspectionProfileManager; import com.intellij.profile.codeInspection.InspectionProjectProfileManager; -import com.intellij.profile.codeInspection.ui.IDEInspectionToolsConfigurable; import com.intellij.profile.codeInspection.ui.ProjectInspectionToolsConfigurable; import com.intellij.psi.PsiFile; import com.intellij.util.IncorrectOperationException; import org.jetbrains.annotations.NotNull; -import javax.swing.*; - /** * Created by anna on 5/13/2014. */ @@ -64,6 +61,11 @@ class EditCleanupProfileIntentionAction implements IntentionAction { protected boolean acceptTool(InspectionToolWrapper entry) { return super.acceptTool(entry) && entry.isCleanupTool(); } + + @Override + public String getDisplayName() { + return CodeCleanupAction.CODE_CLEANUP_INSPECTIONS_DISPLAY_NAME; + } }; ShowSettingsUtil.getInstance().editConfigurable(project, configurable); } diff --git a/platform/lang-impl/src/com/intellij/codeInspection/actions/CodeCleanupAction.java b/platform/lang-impl/src/com/intellij/codeInspection/actions/CodeCleanupAction.java index 0eebb7ad050d..783e4998917e 100644 --- a/platform/lang-impl/src/com/intellij/codeInspection/actions/CodeCleanupAction.java +++ b/platform/lang-impl/src/com/intellij/codeInspection/actions/CodeCleanupAction.java @@ -28,6 +28,9 @@ import com.intellij.profile.codeInspection.ui.IDEInspectionToolsConfigurable; import org.jetbrains.annotations.NotNull; public class CodeCleanupAction extends CodeInspectionAction { + + public static final String CODE_CLEANUP_INSPECTIONS_DISPLAY_NAME = "Code Cleanup Inspections"; + public CodeCleanupAction() { super("Code Cleanup", "Code Cleanup"); } @@ -48,6 +51,11 @@ public class CodeCleanupAction extends CodeInspectionAction { protected boolean acceptTool(InspectionToolWrapper entry) { return super.acceptTool(entry) && entry.isCleanupTool(); } + + @Override + public String getDisplayName() { + return CODE_CLEANUP_INSPECTIONS_DISPLAY_NAME; + } }; } } diff --git a/platform/platform-impl/src/com/intellij/idea/IdeaLogger.java b/platform/platform-impl/src/com/intellij/idea/IdeaLogger.java index 67a7c0f88532..8722a7ee84a2 100644 --- a/platform/platform-impl/src/com/intellij/idea/IdeaLogger.java +++ b/platform/platform-impl/src/com/intellij/idea/IdeaLogger.java @@ -121,7 +121,7 @@ public class IdeaLogger extends Logger { @Override public void error(String message, @Nullable Throwable t, @NotNull String... details) { if (t instanceof ProcessCanceledException) { - myLogger.error(new Throwable("Do not log ProcessCanceledException").initCause(t)); + myLogger.error(message, new Throwable("Do not log ProcessCanceledException").initCause(t)); throw (ProcessCanceledException)t; } diff --git a/platform/platform-resources-en/src/messages/VcsBundle.properties b/platform/platform-resources-en/src/messages/VcsBundle.properties index 4ffad83a50b7..b42de2b2f603 100644 --- a/platform/platform-resources-en/src/messages/VcsBundle.properties +++ b/platform/platform-resources-en/src/messages/VcsBundle.properties @@ -239,7 +239,7 @@ todo.in.new.review.button=&Review before.checkin.standard.options.check.smells=Perform code analy&sis before.checkin.new.todo.check=Check TODO ({0}) before.checkin.new.todo.check.title=Check TODO -before.checkin.cleanup.code=&Cleanup +before.checkin.cleanup.code=C&leanup # Changes view changes.nodetitle.unversioned.files=Unversioned Files