From a8f3f04261b0241bf8171a93448b6c6eb003d346 Mon Sep 17 00:00:00 2001 From: "Denis.Zhdanov" Date: Mon, 26 Dec 2011 13:12:33 +0400 Subject: [PATCH] IDEA-79186 Pasting a reference without selection replaces text --- .../ide/actions/JavaQualifiedNameProvider.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/java/java-impl/src/com/intellij/ide/actions/JavaQualifiedNameProvider.java b/java/java-impl/src/com/intellij/ide/actions/JavaQualifiedNameProvider.java index 0c26bd0a90ae..6f6841b074c1 100644 --- a/java/java-impl/src/com/intellij/ide/actions/JavaQualifiedNameProvider.java +++ b/java/java-impl/src/com/intellij/ide/actions/JavaQualifiedNameProvider.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2009 JetBrains s.r.o. + * Copyright 2000-2011 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. @@ -303,14 +303,14 @@ public class JavaQualifiedNameProvider implements QualifiedNameProvider { element = element.getParent(); if (element == null) return; } - if (element instanceof PsiJavaCodeReferenceElement && elementToInsert != null) { - try { - element = ((PsiJavaCodeReferenceElement)element).bindToElement(elementToInsert); - } - catch (IncorrectOperationException e) { - // failed to bind - } - } + //if (element instanceof PsiJavaCodeReferenceElement && elementToInsert != null) { + // try { + // element = ((PsiJavaCodeReferenceElement)element).bindToElement(elementToInsert); + // } + // catch (IncorrectOperationException e) { + // // failed to bind + // } + //} final JavaCodeStyleManager codeStyleManagerEx = JavaCodeStyleManager.getInstance(element.getProject()); codeStyleManagerEx.shortenClassReferences(element, JavaCodeStyleManager.UNCOMPLETE_CODE); }