From 18bb521b287cbe761365cc1527e0f63849ab0dfc Mon Sep 17 00:00:00 2001 From: "Egor.Ushakov" Date: Thu, 31 Mar 2016 14:48:57 +0300 Subject: [PATCH] cleanup - use field instead of method call --- .../debugger/ui/impl/watch/ArgumentValueDescriptorImpl.java | 4 ++-- .../debugger/ui/impl/watch/ArrayElementDescriptorImpl.java | 4 ++-- .../debugger/ui/impl/watch/FieldDescriptorImpl.java | 6 +++--- .../debugger/ui/impl/watch/LocalVariableDescriptorImpl.java | 4 ++-- .../intellij/debugger/ui/impl/watch/ThisDescriptorImpl.java | 4 ++-- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/ArgumentValueDescriptorImpl.java b/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/ArgumentValueDescriptorImpl.java index 3f9ef8031d00..581176c4bb66 100644 --- a/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/ArgumentValueDescriptorImpl.java +++ b/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/ArgumentValueDescriptorImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -70,7 +70,7 @@ public class ArgumentValueDescriptorImpl extends ValueDescriptorImpl{ } public PsiExpression getDescriptorEvaluation(DebuggerContext context) throws EvaluateException { - PsiElementFactory elementFactory = JavaPsiFacade.getInstance(context.getProject()).getElementFactory(); + PsiElementFactory elementFactory = JavaPsiFacade.getInstance(myProject).getElementFactory(); try { return elementFactory.createExpressionFromText(getName(), PositionUtil.getContextElement(context)); } diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/ArrayElementDescriptorImpl.java b/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/ArrayElementDescriptorImpl.java index b1f1da671fd7..2e760f420a30 100644 --- a/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/ArrayElementDescriptorImpl.java +++ b/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/ArrayElementDescriptorImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -73,7 +73,7 @@ public class ArrayElementDescriptorImpl extends ValueDescriptorImpl implements A } public PsiExpression getDescriptorEvaluation(DebuggerContext context) throws EvaluateException { - PsiElementFactory elementFactory = JavaPsiFacade.getInstance(context.getProject()).getElementFactory(); + PsiElementFactory elementFactory = JavaPsiFacade.getInstance(myProject).getElementFactory(); try { return elementFactory.createExpressionFromText("this[" + myIndex + "]", null); } diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/FieldDescriptorImpl.java b/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/FieldDescriptorImpl.java index ac64b580c8df..2ea8ad3c79b0 100644 --- a/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/FieldDescriptorImpl.java +++ b/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/FieldDescriptorImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -137,11 +137,11 @@ public class FieldDescriptorImpl extends ValueDescriptorImpl implements FieldDes @Override public PsiExpression getDescriptorEvaluation(DebuggerContext context) throws EvaluateException { - PsiElementFactory elementFactory = JavaPsiFacade.getInstance(context.getProject()).getElementFactory(); + PsiElementFactory elementFactory = JavaPsiFacade.getInstance(myProject).getElementFactory(); String fieldName; if(isStatic()) { String typeName = myField.declaringType().name().replace('$', '.'); - typeName = DebuggerTreeNodeExpression.normalize(typeName, PositionUtil.getContextElement(context), context.getProject()); + typeName = DebuggerTreeNodeExpression.normalize(typeName, PositionUtil.getContextElement(context), myProject); fieldName = typeName + "." + getName(); } else { diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/LocalVariableDescriptorImpl.java b/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/LocalVariableDescriptorImpl.java index 42169f855f38..718b855a56f5 100644 --- a/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/LocalVariableDescriptorImpl.java +++ b/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/LocalVariableDescriptorImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2015 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -108,7 +108,7 @@ public class LocalVariableDescriptorImpl extends ValueDescriptorImpl implements @Override public PsiExpression getDescriptorEvaluation(DebuggerContext context) throws EvaluateException { - PsiElementFactory elementFactory = JavaPsiFacade.getInstance(context.getProject()).getElementFactory(); + PsiElementFactory elementFactory = JavaPsiFacade.getInstance(myProject).getElementFactory(); try { return elementFactory.createExpressionFromText(getName(), PositionUtil.getContextElement(context)); } diff --git a/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/ThisDescriptorImpl.java b/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/ThisDescriptorImpl.java index 52d824b46200..11d13a7614af 100644 --- a/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/ThisDescriptorImpl.java +++ b/java/debugger/impl/src/com/intellij/debugger/ui/impl/watch/ThisDescriptorImpl.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2014 JetBrains s.r.o. + * Copyright 2000-2016 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. @@ -46,7 +46,7 @@ public class ThisDescriptorImpl extends ValueDescriptorImpl{ } public PsiExpression getDescriptorEvaluation(DebuggerContext context) throws EvaluateException { - PsiElementFactory elementFactory = JavaPsiFacade.getInstance(context.getProject()).getElementFactory(); + PsiElementFactory elementFactory = JavaPsiFacade.getInstance(myProject).getElementFactory(); try { return elementFactory.createExpressionFromText("this", null); }