Merge remote-tracking branch 'origin/master'

This commit is contained in:
Maxim.Mossienko
2015-01-19 21:01:27 +01:00
67 changed files with 554 additions and 243 deletions
+21
View File
@@ -362,6 +362,27 @@
<option name="Class">
<value />
</option>
<option name="DEBUGGER_INLINED_VALUES">
<value>
<option name="FOREGROUND" value="3d8065" />
<option name="FONT_TYPE" value="2" />
<option name="EFFECT_TYPE" value="0" />
</value>
</option>
<option name="DEBUGGER_INLINED_VALUES_EXECUTION_LINE">
<value>
<option name="FOREGROUND" value="ffeb09" />
<option name="FONT_TYPE" value="2" />
<option name="EFFECT_TYPE" value="0" />
</value>
</option>
<option name="DEBUGGER_INLINED_VALUES_MODIFIED">
<value>
<option name="FOREGROUND" value="ca7e03" />
<option name="FONT_TYPE" value="2" />
<option name="EFFECT_TYPE" value="0" />
</value>
</option>
<option name="DEFAULT_BRACES">
<value />
</option>
@@ -50,7 +50,7 @@ public class ProcessedModulesTable extends JPanel {
myTable.getEmptyText().setText("No modules configured");
//myTable.setShowGrid(false);
myTable.setIntercellSpacing(new Dimension(0, 0));
myTable.setIntercellSpacing(JBUI.emptySize());
myTable.setAutoResizeMode(JTable.AUTO_RESIZE_LAST_COLUMN);
myTable.setColumnSelectionAllowed(false);
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 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,6 +29,7 @@ import com.intellij.psi.PsiClass;
import com.intellij.psi.search.GlobalSearchScope;
import com.intellij.ui.TableUtil;
import com.intellij.util.ui.AbstractTableCellEditor;
import com.intellij.util.ui.JBUI;
import com.intellij.util.ui.Table;
import javax.swing.*;
@@ -64,7 +65,7 @@ public class NamedChildrenConfigurable implements UnnamedConfigurable{
myCompletionEditor = ((DebuggerUtilsEx)DebuggerUtils.getInstance()).createEditor(project, psiClass, "NamedChildrenConfigurable");
myTable.setDragEnabled(false);
myTable.setIntercellSpacing(new Dimension(0, 0));
myTable.setIntercellSpacing(JBUI.emptySize());
myTable.getColumn(expressionColumnName).setCellEditor(new AbstractTableCellEditor() {
public Object getCellEditorValue() {
@@ -78,11 +78,12 @@ public int hashCode() {
#end
##
#macro(adjustHashCodeToArrays $field)
#if ($field.array && $java_version > 4)
#if ($field.nestedArray)
// Probably incorrect - hashCode for high dimension arrays with Arrays.hashCode
#if ($field.array && $java_version > 4)
#if ($field.nestedArray)
java.util.Arrays.deepHashCode($field.accessor)##
#else
java.util.Arrays.hashCode($field.accessor)##
#end
java.util.Arrays.hashCode($field.accessor)##
#else
${field.accessor}.hashCode()##
#end
@@ -13,15 +13,7 @@ Object $paramName){
&&
#end
#set($i = $i + 1)
#if ($field.array)
#if ($field.nestedArray)
java.util.Arrays.deepEquals($field.accessor, ${classInstanceName}.$field.accessor)##
#else
java.util.Arrays.equals($field.accessor, ${classInstanceName}.$field.accessor)##
#end
#else
java.util.Objects.equals($field.accessor, ${classInstanceName}.$field.accessor)##
#end
#end
;
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -23,20 +23,40 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
/**
* Represents a JavaDoc comment.
*/
public interface PsiDocComment extends PsiComment, PsiDocCommentBase {
/**
* Returns the class, method or field described by the comment.
*/
@Override
@Nullable
PsiDocCommentOwner getOwner();
/**
* Returns the PSI elements containing the description of the element being documented
* (all significant tokens up to the first doc comment tag).
*/
@NotNull
PsiElement[] getDescriptionElements();
/**
* Returns the list of JavaDoc tags in the comment.
*/
@NotNull
PsiDocTag[] getTags();
/**
* Finds the first JavaDoc tag with the specified name.
* @return the tag with the specified name, or null if not found.
*/
@Nullable
PsiDocTag findTagByName(@NonNls String name);
/**
* Finds all JavaDoc tags with the specified name.
*/
@NotNull
PsiDocTag[] findTagsByName(@NonNls String name);
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -22,13 +22,38 @@ import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
public interface PsiDocTag extends PsiElement, PsiNamedElement{
/**
* Represents a JavaDoc tag (either an inline tag or a block tag).
*/
public interface PsiDocTag extends PsiElement, PsiNamedElement {
PsiDocTag[] EMPTY_ARRAY = new PsiDocTag[0];
/**
* Returns the doc comment in which the tag is conained.
*/
PsiDocComment getContainingComment();
/**
* Returns the token representing the name of this JavaDoc tag.
*/
PsiElement getNameElement();
/**
* Returns the name of this JavaDoc tag.
*/
@Override
@NonNls @NotNull String getName();
/**
* Returns the list of all elements representing the contents of a tag.
*/
PsiElement[] getDataElements();
/**
* Returns the element specifying what exactly is being documented by this tag
* (for example, the parameter name for a param tag or the exception name for a throws tag).
*
* @return the element, or null if the tag structure does not include such an element.
*/
@Nullable PsiDocTagValue getValueElement();
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -19,8 +19,13 @@ import com.intellij.psi.PsiElement;
import com.intellij.psi.tree.IElementType;
/**
* Represents a token inside a JavaDoc comment.
*
* @author Mike
*/
public interface PsiDocToken extends PsiElement {
/**
* Returns the element type of this token.
*/
IElementType getTokenType();
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -15,5 +15,8 @@
*/
package com.intellij.psi.javadoc;
/**
* Represents an inline JavaDoc tag.
*/
public interface PsiInlineDocTag extends PsiDocTag {
}
@@ -204,7 +204,14 @@ public class RedundantCastUtil {
if (rExpr instanceof PsiTypeCastExpression) {
PsiExpression castOperand = ((PsiTypeCastExpression)rExpr).getOperand();
if (castOperand != null) {
PsiType operandType = castOperand.getType();
PsiType operandType;
if (castOperand instanceof PsiTypeCastExpression) {
final PsiExpression nestedCastOperand = ((PsiTypeCastExpression)castOperand).getOperand();
operandType = nestedCastOperand != null ? nestedCastOperand.getType() : null;
}
else {
operandType = castOperand.getType();
}
if (operandType != null) {
if (lType != null && TypeConversionUtil.isAssignable(lType, operandType, false)) {
addToResults((PsiTypeCastExpression)rExpr);
@@ -21,8 +21,7 @@ class Test {
public int hashCode() {
int result = myOs != null ? Arrays.hashCode(myOs) : 0;
result = 31 * result + (myIIs != null ? // Probably incorrect - hashCode for high dimension arrays with Arrays.hashCode
Arrays.hashCode(myIIs) : 0);
result = 31 * result + (myIIs != null ? Arrays.deepHashCode(myIIs) : 0);
result = 31 * result + (myIs != null ? Arrays.hashCode(myIs) : 0);
return result;
}
@@ -51,14 +51,11 @@ class A {
int result;
long temp;
result = a1 != null ? Arrays.hashCode(a1) : 0;
result = 31 * result + (a2 != null ? // Probably incorrect - hashCode for high dimension arrays with Arrays.hashCode
Arrays.hashCode(a2) : 0);
result = 31 * result + (a2 != null ? Arrays.deepHashCode(a2) : 0);
result = 31 * result + (a3 != null ? Arrays.hashCode(a3) : 0);
result = 31 * result + (a4 != null ? // Probably incorrect - hashCode for high dimension arrays with Arrays.hashCode
Arrays.hashCode(a4) : 0);
result = 31 * result + (a4 != null ? Arrays.deepHashCode(a4) : 0);
result = 31 * result + (a5 != null ? Arrays.hashCode(a5) : 0);
result = 31 * result + (a6 != null ? // Probably incorrect - hashCode for high dimension arrays with Arrays.hashCode
Arrays.hashCode(a6) : 0);
result = 31 * result + (a6 != null ? Arrays.deepHashCode(a6) : 0);
result = 31 * result + (int) a7;
result = 31 * result + (int) a8;
result = 31 * result + a9;
@@ -51,14 +51,11 @@ class A {
int result;
long temp;
result = Arrays.hashCode(a1);
result = 31 * result + // Probably incorrect - hashCode for high dimension arrays with Arrays.hashCode
Arrays.hashCode(a2);
result = 31 * result + Arrays.deepHashCode(a2);
result = 31 * result + Arrays.hashCode(a3);
result = 31 * result + // Probably incorrect - hashCode for high dimension arrays with Arrays.hashCode
Arrays.hashCode(a4);
result = 31 * result + Arrays.deepHashCode(a4);
result = 31 * result + Arrays.hashCode(a5);
result = 31 * result + // Probably incorrect - hashCode for high dimension arrays with Arrays.hashCode
Arrays.hashCode(a6);
result = 31 * result + Arrays.deepHashCode(a6);
result = 31 * result + (int) a7;
result = 31 * result + (int) a8;
result = 31 * result + a9;
@@ -99,14 +99,11 @@ class A {
int result;
long temp;
result = getA1() != null ? Arrays.hashCode(getA1()) : 0;
result = 31 * result + (getA2() != null ? // Probably incorrect - hashCode for high dimension arrays with Arrays.hashCode
Arrays.hashCode(getA2()) : 0);
result = 31 * result + (getA2() != null ? Arrays.deepHashCode(getA2()) : 0);
result = 31 * result + (getA3() != null ? Arrays.hashCode(getA3()) : 0);
result = 31 * result + (getA4() != null ? // Probably incorrect - hashCode for high dimension arrays with Arrays.hashCode
Arrays.hashCode(getA4()) : 0);
result = 31 * result + (getA4() != null ? Arrays.deepHashCode(getA4()) : 0);
result = 31 * result + (getA5() != null ? Arrays.hashCode(getA5()) : 0);
result = 31 * result + (getA6() != null ? // Probably incorrect - hashCode for high dimension arrays with Arrays.hashCode
Arrays.hashCode(getA6()) : 0);
result = 31 * result + (getA6() != null ? Arrays.deepHashCode(getA6()) : 0);
result = 31 * result + (int) getA7();
result = 31 * result + (int) getA8();
result = 31 * result + getA9();
@@ -47,14 +47,11 @@ class A {
@Override
public int hashCode() {
int result = Arrays.hashCode(a1);
result = 31 * result + // Probably incorrect - hashCode for high dimension arrays with Arrays.hashCode
Arrays.hashCode(a2);
result = 31 * result + Arrays.deepHashCode(a2);
result = 31 * result + Arrays.hashCode(a3);
result = 31 * result + // Probably incorrect - hashCode for high dimension arrays with Arrays.hashCode
Arrays.hashCode(a4);
result = 31 * result + Arrays.deepHashCode(a4);
result = 31 * result + Arrays.hashCode(a5);
result = 31 * result + // Probably incorrect - hashCode for high dimension arrays with Arrays.hashCode
Arrays.hashCode(a6);
result = 31 * result + Arrays.deepHashCode(a6);
result = 31 * result + (int) a7;
result = 31 * result + (int) a8;
result = 31 * result + a9;
@@ -63,14 +63,11 @@ class A extends B {
int result = super.hashCode();
long temp;
result = 31 * result + Arrays.hashCode(a1);
result = 31 * result + // Probably incorrect - hashCode for high dimension arrays with Arrays.hashCode
Arrays.hashCode(a2);
result = 31 * result + Arrays.deepHashCode(a2);
result = 31 * result + Arrays.hashCode(a3);
result = 31 * result + // Probably incorrect - hashCode for high dimension arrays with Arrays.hashCode
Arrays.hashCode(a4);
result = 31 * result + Arrays.deepHashCode(a4);
result = 31 * result + Arrays.hashCode(a5);
result = 31 * result + // Probably incorrect - hashCode for high dimension arrays with Arrays.hashCode
Arrays.hashCode(a6);
result = 31 * result + Arrays.deepHashCode(a6);
result = 31 * result + (int) a7;
result = 31 * result + (int) a8;
result = 31 * result + a9;
@@ -51,14 +51,11 @@ class A {
int result1;
long temp1;
result1 = Arrays.hashCode(a1);
result1 = 31 * result1 + // Probably incorrect - hashCode for high dimension arrays with Arrays.hashCode
Arrays.hashCode(a2);
result1 = 31 * result1 + Arrays.deepHashCode(a2);
result1 = 31 * result1 + Arrays.hashCode(a3);
result1 = 31 * result1 + // Probably incorrect - hashCode for high dimension arrays with Arrays.hashCode
Arrays.hashCode(a4);
result1 = 31 * result1 + Arrays.deepHashCode(a4);
result1 = 31 * result1 + Arrays.hashCode(a5);
result1 = 31 * result1 + // Probably incorrect - hashCode for high dimension arrays with Arrays.hashCode
Arrays.hashCode(a6);
result1 = 31 * result1 + Arrays.deepHashCode(a6);
result1 = 31 * result1 + (int) a7;
result1 = 31 * result1 + (int) a8;
result1 = 31 * result1 + a9;
@@ -3,12 +3,17 @@
<problem>
<file>DoubleCast3.java</file>
<line>4</line>
<description>Casting '(String) o' to String is redundant</description>
<description>Casting 'o' to String is redundant</description>
</problem>
<problem>
<file>DoubleCast3.java</file>
<line>4</line>
<description>Casting 'o' to String is redundant</description>
<line>6</line>
<description>Casting '(String) s' to String is redundant</description>
</problem>
<problem>
<file>DoubleCast3.java</file>
<line>6</line>
<description>Casting 's' to String is redundant</description>
</problem>
</problems>
@@ -2,5 +2,7 @@ class Test{
static f(){
Object o;
String s = (String) (String) o;
String s2 = (String) (String) s;
}
}
Binary file not shown.
@@ -59,7 +59,7 @@ public class OptimizeImportsAction extends AnAction {
if (file == null) return;
dir = file.getContainingDirectory();
}
else if (files != null && ReformatCodeAction.areFiles(files)) {
else if (files != null && ReformatCodeAction.containsAtLeastOneFile(files)) {
final ReadonlyStatusHandler.OperationStatus operationStatus = ReadonlyStatusHandler.getInstance(project).ensureFilesWritable(files);
if (!operationStatus.hasReadonlyFiles()) {
new OptimizeImportsProcessor(project, ReformatCodeAction.convertToPsiFiles(files, project), null).run();
@@ -160,7 +160,7 @@ public class OptimizeImportsAction extends AnAction {
return;
}
}
else if (files != null && ReformatCodeAction.areFiles(files)) {
else if (files != null && ReformatCodeAction.containsAtLeastOneFile(files)) {
boolean anyHasOptimizeImports = false;
for (VirtualFile virtualFile : files) {
PsiFile file = PsiManager.getInstance(project).findFile(virtualFile);
@@ -88,7 +88,7 @@ public class ReformatCodeAction extends AnAction implements DumbAware {
dir = file.getContainingDirectory();
hasSelection = editor.getSelectionModel().hasSelection();
}
else if (areFiles(files)) {
else if (containsAtLeastOneFile(files)) {
final ReadonlyStatusHandler.OperationStatus operationStatus = ReadonlyStatusHandler.getInstance(project).ensureFilesWritable(files);
if (!operationStatus.hasReadonlyFiles()) {
ReformatFilesOptions selectedFlags = getReformatFilesOptions(project, files);
@@ -118,9 +118,6 @@ public class ReformatCodeAction extends AnAction implements DumbAware {
}
return;
}
else if (files != null && files.length == 1) {
file = PsiManager.getInstance(project).findFile(files[0]);
}
else {
PsiElement element = CommonDataKeys.PSI_ELEMENT.getData(dataContext);
if (element == null) return;
@@ -385,7 +382,7 @@ public class ReformatCodeAction extends AnAction implements DumbAware {
return;
}
}
else if (files!= null && areFiles(files)) {
else if (files!= null && containsAtLeastOneFile(files)) {
boolean anyFormatters = false;
for (VirtualFile virtualFile : files) {
if (virtualFile.isDirectory()) {
@@ -490,9 +487,9 @@ public class ReformatCodeAction extends AnAction implements DumbAware {
myTestOptions = options;
}
public static boolean areFiles(final VirtualFile[] files) {
public static boolean containsAtLeastOneFile(final VirtualFile[] files) {
if (files == null) return false;
if (files.length < 2) return false;
if (files.length < 1) return false;
for (VirtualFile virtualFile : files) {
if (virtualFile.isDirectory()) return false;
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -175,7 +175,6 @@ public final class NavigationUtil {
return false;
}
private static boolean activatePsiElementIfOpen(@NotNull PsiElement elt, boolean searchForOpen, boolean requestFocus) {
if (!elt.isValid()) return false;
elt = elt.getNavigationElement();
@@ -33,6 +33,7 @@ import com.intellij.openapi.util.Comparing;
import com.intellij.openapi.util.EmptyRunnable;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.ui.*;
import com.intellij.ui.speedSearch.SpeedSearchSupply;
import com.intellij.util.Alarm;
import com.intellij.util.NullableFunction;
import com.intellij.util.ObjectUtils;
@@ -947,20 +948,7 @@ public class TemplateListPanel extends JPanel implements Disposable {
}
void selectNode(@NotNull String searchQuery) {
for (TemplateGroup group : myTemplateGroups) {
for (TemplateImpl template : group.getElements()) {
if (StringUtil.startsWithIgnoreCase(template.getKey(), searchQuery)) {
selectTemplate(group.getName(), template.getKey());
return;
}
}
}
for (TemplateGroup group : myTemplateGroups) {
if (StringUtil.startsWithIgnoreCase(group.getName(), searchQuery)) {
selectTemplate(group.getName(), null);
return;
}
}
ObjectUtils.assertNotNull(SpeedSearchSupply.getSupply(myTree, true)).findAndSelectElement(searchQuery);
}
private void selectTemplate(@Nullable final String groupName, @Nullable final String templateKey) {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -13,11 +13,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.ide.actions;
import com.intellij.codeInsight.navigation.NavigationUtil;
import com.intellij.featureStatistics.FeatureUsageTracker;
import com.intellij.ide.IdeBundle;
import com.intellij.ide.structureView.StructureView;
import com.intellij.ide.structureView.StructureViewBuilder;
import com.intellij.ide.structureView.StructureViewTreeElement;
@@ -29,7 +29,6 @@ import com.intellij.lang.LanguageStructureViewBuilder;
import com.intellij.lang.PsiStructureViewFactory;
import com.intellij.navigation.AnonymousElementProvider;
import com.intellij.navigation.ChooseByNameRegistry;
import com.intellij.navigation.ItemPresentation;
import com.intellij.navigation.NavigationItem;
import com.intellij.openapi.actionSystem.*;
import com.intellij.openapi.application.AccessToken;
@@ -53,34 +52,38 @@ import com.intellij.psi.util.PsiUtilCore;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import java.awt.*;
import java.awt.event.InputEvent;
import java.util.ArrayList;
import java.util.List;
public class GotoClassAction extends GotoActionBase implements DumbAware {
@Override
public void actionPerformed(@NotNull final AnActionEvent e) {
final Project project = e.getData(CommonDataKeys.PROJECT);
assert project != null;
public void actionPerformed(@NotNull AnActionEvent e) {
Project project = e.getProject();
if (project == null) return;
if (!DumbService.getInstance(project).isDumb()) {
super.actionPerformed(e);
}
else {
DumbService.getInstance(project)
.showDumbModeNotification("Goto Class action is not available until indices are built, using Goto File instead");
ActionManager.getInstance()
.tryToExecute(ActionManager.getInstance().getAction(GotoFileAction.ID), ActionCommand.getInputEvent(GotoFileAction.ID),
e.getData(PlatformDataKeys.CONTEXT_COMPONENT), e.getPlace(), true);
DumbService.getInstance(project).showDumbModeNotification(IdeBundle.message("go.to.class.dumb.mode.message"));
AnAction action = ActionManager.getInstance().getAction(GotoFileAction.ID);
InputEvent event = ActionCommand.getInputEvent(GotoFileAction.ID);
Component component = e.getData(PlatformDataKeys.CONTEXT_COMPONENT);
ActionManager.getInstance().tryToExecute(action, event, component, e.getPlace(), true);
}
}
@Override
public void gotoActionPerformed(AnActionEvent e) {
final Project project = e.getData(CommonDataKeys.PROJECT);
assert project != null;
public void gotoActionPerformed(@NotNull AnActionEvent e) {
final Project project = e.getProject();
if (project == null) return;
FeatureUsageTracker.getInstance().triggerFeatureUsed("navigation.popup.class");
PsiDocumentManager.getInstance(project).commitAllDocuments();
FeatureUsageTracker.getInstance().triggerFeatureUsed("navigation.popup.class");
final GotoClassModel2 model = new GotoClassModel2(project);
showNavigationPopup(e, model, new GotoActionCallback<Language>() {
@Override
@@ -93,17 +96,20 @@ public class GotoClassAction extends GotoActionBase implements DumbAware {
AccessToken token = ReadAction.start();
try {
if (element instanceof PsiElement) {
final PsiElement psiElement = getElement(((PsiElement)element), popup);
final VirtualFile file = PsiUtilCore.getVirtualFile(psiElement);
if (popup.getLinePosition() != -1 && file != null) {
Navigatable n = new OpenFileDescriptor(project, file, popup.getLinePosition(), popup.getColumnPosition()).setUseCurrentWindow(
popup.isOpenInCurrentWindowRequested());
PsiElement psiElement = getElement(((PsiElement)element), popup);
psiElement = psiElement.getNavigationElement();
VirtualFile file = PsiUtilCore.getVirtualFile(psiElement);
if (file != null && popup.getLinePosition() != -1) {
OpenFileDescriptor descriptor = new OpenFileDescriptor(project, file, popup.getLinePosition(), popup.getColumnPosition());
Navigatable n = descriptor.setUseCurrentWindow(popup.isOpenInCurrentWindowRequested());
if (n.canNavigate()) {
n.navigate(true);
return;
}
}
if (psiElement != null && file != null && popup.getMemberPattern() != null) {
if (file != null && popup.getMemberPattern() != null) {
NavigationUtil.activateFileWithPsiElement(psiElement, !popup.isOpenInCurrentWindowRequested());
Navigatable member = findMember(popup.getMemberPattern(), psiElement, file);
if (member != null) {
@@ -121,10 +127,11 @@ public class GotoClassAction extends GotoActionBase implements DumbAware {
token.finish();
}
}
}, "Classes matching pattern", true);
}, IdeBundle.message("go.to.class.toolwindow.title"), true);
}
@Nullable private static Navigatable findMember(String pattern, PsiElement psiElement, VirtualFile file) {
@Nullable
private static Navigatable findMember(String pattern, PsiElement psiElement, VirtualFile file) {
final PsiStructureViewFactory factory = LanguageStructureViewBuilder.INSTANCE.forLanguage(psiElement.getLanguage());
final StructureViewBuilder builder = factory == null ? null : factory.getStructureViewBuilder(psiElement.getContainingFile());
final FileEditor[] editors = FileEditorManager.getInstance(psiElement.getProject()).getEditors(file);
@@ -144,8 +151,7 @@ public class GotoClassAction extends GotoActionBase implements DumbAware {
Object target = null;
for (TreeElement treeElement : element.getChildren()) {
if (treeElement instanceof StructureViewTreeElement) {
final ItemPresentation presentation = treeElement.getPresentation();
String presentableText = presentation == null ? null : presentation.getPresentableText();
String presentableText = treeElement.getPresentation().getPresentableText();
if (presentableText != null) {
final int degree = matcher.matchingDegree(presentableText);
if (degree > max) {
@@ -181,6 +187,7 @@ public class GotoClassAction extends GotoActionBase implements DumbAware {
return null;
}
@NotNull
private static PsiElement getElement(@NotNull PsiElement element, ChooseByNamePopup popup) {
final String path = popup.getPathToAnonymous();
if (path != null) {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -13,11 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.intellij.ide.actions;
import com.intellij.featureStatistics.FeatureUsageTracker;
import com.intellij.ide.util.gotoByName.*;
import com.intellij.ide.IdeBundle;
import com.intellij.ide.util.gotoByName.ChooseByNameFilter;
import com.intellij.ide.util.gotoByName.ChooseByNamePopup;
import com.intellij.ide.util.gotoByName.GotoFileConfiguration;
import com.intellij.ide.util.gotoByName.GotoFileModel;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CommonDataKeys;
import com.intellij.openapi.application.ApplicationManager;
@@ -30,7 +33,6 @@ import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.pom.Navigatable;
import com.intellij.psi.PsiElement;
import com.intellij.psi.PsiFile;
import com.intellij.util.containers.ContainerUtil;
import org.jetbrains.annotations.NotNull;
@@ -52,8 +54,11 @@ public class GotoFileAction extends GotoActionBase implements DumbAware {
@Override
public void gotoActionPerformed(AnActionEvent e) {
FeatureUsageTracker.getInstance().triggerFeatureUsed("navigation.popup.file");
final Project project = e.getData(CommonDataKeys.PROJECT);
if (project == null) return;
FeatureUsageTracker.getInstance().triggerFeatureUsed("navigation.popup.file");
final GotoFileModel gotoFileModel = new GotoFileModel(project);
GotoActionCallback<FileType> callback = new GotoActionCallback<FileType>() {
@Override
@@ -71,9 +76,10 @@ public class GotoFileAction extends GotoActionBase implements DumbAware {
//this is for better cursor position
if (element instanceof PsiFile) {
VirtualFile vfile = ((PsiFile)element).getVirtualFile();
if (vfile == null) return;
n = new OpenFileDescriptor(project, vfile, popup.getLinePosition(), popup.getColumnPosition()).setUseCurrentWindow(popup.isOpenInCurrentWindowRequested());
VirtualFile file = ((PsiFile)element).getVirtualFile();
if (file == null) return;
OpenFileDescriptor descriptor = new OpenFileDescriptor(project, file, popup.getLinePosition(), popup.getColumnPosition());
n = descriptor.setUseCurrentWindow(popup.isOpenInCurrentWindowRequested());
}
if (!n.canNavigate()) return;
@@ -82,8 +88,8 @@ public class GotoFileAction extends GotoActionBase implements DumbAware {
}, ModalityState.NON_MODAL);
}
};
PsiElement context = getPsiContext(e);
showNavigationPopup(e, gotoFileModel, callback, "Files matching pattern", true, true, new GotoFileItemProvider(project, context));
GotoFileItemProvider provider = new GotoFileItemProvider(project, getPsiContext(e));
showNavigationPopup(e, gotoFileModel, callback, IdeBundle.message("go.to.file.toolwindow.title"), true, true, provider);
}
protected static class GotoFileFilter extends ChooseByNameFilter<FileType> {
@@ -148,5 +154,4 @@ public class GotoFileAction extends GotoActionBase implements DumbAware {
return o1.getName().compareToIgnoreCase(o2.getName());
}
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -36,21 +36,17 @@ import java.util.List;
public class OpenFileDescriptor implements Navigatable {
/**
* Tells descriptor to navigate in specific editor rather than file editor
* in main IDEA window.
* For example if you want to navigate in editor embedded into modal dialog,
* you should provide this data.
* Tells descriptor to navigate in specific editor rather than file editor in main IDEA window.
* For example if you want to navigate in editor embedded into modal dialog, you should provide this data.
*/
public static final DataKey<Editor> NAVIGATE_IN_EDITOR = DataKey.create("NAVIGATE_IN_EDITOR");
@NotNull
private final Project myProject;
private final VirtualFile myFile;
private final int myOffset;
private final int myLogicalLine;
private final int myLogicalColumn;
private final int myOffset;
private final RangeMarker myRangeMarker;
@NotNull
private final Project myProject;
private boolean myUseCurrentWindow = false;
@@ -62,8 +58,7 @@ public class OpenFileDescriptor implements Navigatable {
this(project, file, logicalLine, logicalColumn, -1, false);
}
public OpenFileDescriptor(@NotNull Project project, @NotNull VirtualFile file,
int logicalLine, int logicalColumn, boolean persistent) {
public OpenFileDescriptor(@NotNull Project project, @NotNull VirtualFile file, int logicalLine, int logicalColumn, boolean persistent) {
this(project, file, logicalLine, logicalColumn, -1, persistent);
}
@@ -71,10 +66,8 @@ public class OpenFileDescriptor implements Navigatable {
this(project, file, -1, -1, -1, false);
}
private OpenFileDescriptor(@NotNull Project project, @NotNull VirtualFile file,
int logicalLine, int logicalColumn, int offset, boolean persistent) {
private OpenFileDescriptor(@NotNull Project project, @NotNull VirtualFile file, int logicalLine, int logicalColumn, int offset, boolean persistent) {
myProject = project;
myFile = file;
myLogicalLine = logicalLine;
myLogicalColumn = logicalColumn;
@@ -139,7 +132,7 @@ public class OpenFileDescriptor implements Navigatable {
}
private boolean navigateInRequestedEditor() {
DataContext ctx = DataManager.getInstance().getDataContext();
@SuppressWarnings("deprecation") DataContext ctx = DataManager.getInstance().getDataContext();
Editor e = NAVIGATE_IN_EDITOR.getData(ctx);
if (e == null) return false;
if (!Comparing.equal(FileDocumentManager.getInstance().getFile(e.getDocument()), myFile)) return false;
@@ -80,4 +80,10 @@ public abstract class SpeedSearchSupply {
public abstract void addChangeListener(@NotNull PropertyChangeListener listener);
public abstract void removeChangeListener(@NotNull PropertyChangeListener listener);
/**
* Find an element matching the searching query in the underlying component and select it there. Speed-search popup is not affected.
* @param searchQuery text that the selected element should match
*/
public abstract void findAndSelectElement(@NotNull String searchQuery);
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -21,6 +21,7 @@ import com.intellij.ide.IdeBundle;
import com.intellij.ide.plugins.HelpSetPath;
import com.intellij.ide.plugins.IdeaPluginDescriptor;
import com.intellij.ide.plugins.PluginManager;
import com.intellij.internal.statistic.UsageTrigger;
import com.intellij.openapi.application.ApplicationInfo;
import com.intellij.openapi.application.ex.ApplicationInfoEx;
import com.intellij.openapi.diagnostic.Logger;
@@ -49,6 +50,8 @@ public class HelpManagerImpl extends HelpManager {
private Object myFXHelpBrowser = null;
public void invokeHelp(@Nullable String id) {
UsageTrigger.trigger("ide.help." + id);
if (myHelpSet == null) {
myHelpSet = createHelpSet();
}
@@ -0,0 +1,32 @@
/*
* Copyright 2000-2015 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.notification.impl;
import com.intellij.ide.ui.search.SearchableOptionContributor;
import com.intellij.ide.ui.search.SearchableOptionProcessor;
import org.jetbrains.annotations.NotNull;
/**
* @author peter
*/
public class NotificationSearchableOptionContributor extends SearchableOptionContributor {
@Override
public void processOptions(@NotNull SearchableOptionProcessor processor) {
for (NotificationSettings settings : NotificationsConfigurationImpl.getInstanceImpl().getAllSettings()) {
processor.addOptions(settings.getGroupId(), null, settings.getGroupId() + " notifications", NotificationsConfigurable.ID, NotificationsConfigurable.DISPLAY_NAME, true);
}
}
}
@@ -30,6 +30,7 @@ import javax.swing.*;
*/
public class NotificationsConfigurable implements Configurable, SearchableConfigurable, Configurable.NoScroll {
public static final String DISPLAY_NAME = "Notifications";
static final String ID = "reference.settings.ide.settings.notifications";
private NotificationsConfigurablePanel myComponent;
@Override
@@ -41,7 +42,7 @@ public class NotificationsConfigurable implements Configurable, SearchableConfig
@Override
@NotNull
public String getHelpTopic() {
return "reference.settings.ide.settings.notifications";
return ID;
}
@Override
@@ -82,6 +83,11 @@ public class NotificationsConfigurable implements Configurable, SearchableConfig
@Override
public Runnable enableSearch(final String option) {
return null;
return new Runnable() {
@Override
public void run() {
myComponent.selectGroup(option);
}
};
}
}
@@ -23,6 +23,8 @@ import com.intellij.openapi.ui.ComboBoxTableRenderer;
import com.intellij.openapi.ui.StripeTable;
import com.intellij.openapi.util.SystemInfo;
import com.intellij.ui.*;
import com.intellij.ui.speedSearch.SpeedSearchSupply;
import com.intellij.util.ObjectUtils;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NotNull;
@@ -427,4 +429,8 @@ public class NotificationsConfigurablePanel extends JPanel implements Disposable
return result;
}
}
public void selectGroup(String searchQuery) {
ObjectUtils.assertNotNull(SpeedSearchSupply.getSupply(myTable, true)).findAndSelectElement(searchQuery);
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -16,6 +16,7 @@
package com.intellij.openapi.editor;
import com.intellij.openapi.editor.markup.EffectType;
import com.intellij.openapi.editor.markup.TextAttributes;
import org.intellij.lang.annotations.JdkConstants;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
@@ -43,6 +44,13 @@ public class LineExtensionInfo {
myEffectColor = effectColor;
myFontType = fontType;
}
public LineExtensionInfo(@NotNull String text, @NotNull TextAttributes attr) {
myText = text;
myColor = attr.getForegroundColor();
myEffectType = attr.getEffectType();
myEffectColor = attr.getEffectColor();
myFontType = attr.getFontType();
}
@NotNull
public String getText() {
@@ -338,6 +338,11 @@ public abstract class SpeedSearchBase<Comp extends JComponent> extends SpeedSear
if ( mySearchPopup != null ) mySearchPopup.refreshSelection();
}
@Override
public void findAndSelectElement(@NotNull String searchQuery) {
selectElement(findElement(searchQuery), searchQuery);
}
private class SearchPopup extends JPanel {
private final SearchField mySearchField;
@@ -425,7 +430,7 @@ public abstract class SpeedSearchBase<Comp extends JComponent> extends SpeedSear
}
public void refreshSelection () {
updateSelection(findElement(mySearchField.getText()));
findAndSelectElement(mySearchField.getText());
}
private void updateSelection(Object element) {
@@ -21,6 +21,7 @@ import com.intellij.openapi.actionSystem.PlatformDataKeys;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.wm.ex.ToolWindowEx;
import com.intellij.openapi.wm.ex.ToolWindowManagerEx;
import com.intellij.util.ObjectUtils;
public class ContentManagerUtil {
private ContentManagerUtil() {
@@ -43,18 +44,14 @@ public class ContentManagerUtil {
id = mgr.getLastActiveToolWindowId();
}
}
if(id == null){
ToolWindowEx toolWindow = id != null ? (ToolWindowEx)mgr.getToolWindow(id) : null;
if (requiresVisibleToolWindow && (toolWindow == null || !toolWindow.isVisible())) {
return null;
}
ToolWindowEx toolWindow = (ToolWindowEx)mgr.getToolWindow(id);
if (requiresVisibleToolWindow && !toolWindow.isVisible()) {
return null;
}
final ContentManager fromContext = PlatformDataKeys.CONTENT_MANAGER.getData(dataContext);
if (fromContext != null) return fromContext;
return toolWindow != null ? toolWindow.getContentManager() : null;
ContentManager fromToolWindow = toolWindow != null ? toolWindow.getContentManager() : null;
ContentManager fromContext = PlatformDataKeys.CONTENT_MANAGER.getData(dataContext);
return ObjectUtils.chooseNotNull(fromContext, fromToolWindow);
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -35,6 +35,7 @@ import com.intellij.ui.switcher.SwitchProvider;
import com.intellij.ui.switcher.SwitchTarget;
import com.intellij.util.SmartList;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.ui.JBUI;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
@@ -100,7 +101,7 @@ public class ContentManagerImpl implements ContentManager, PropertyChangeListene
myFocusProxy = new Wrapper.FocusHolder();
myFocusProxy.setOpaque(false);
myFocusProxy.setPreferredSize(new Dimension(0, 0));
myFocusProxy.setPreferredSize(JBUI.emptySize());
MyContentComponent contentComponent = new MyContentComponent();
contentComponent.setContent(myUI.getComponent());
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -49,6 +49,7 @@ import com.intellij.util.IJSwingUtilities;
import com.intellij.util.Processor;
import com.intellij.util.ui.ChildFocusWatcher;
import com.intellij.util.ui.EmptyIcon;
import com.intellij.util.ui.JBUI;
import com.intellij.util.ui.UIUtil;
import org.jetbrains.annotations.NonNls;
import org.jetbrains.annotations.NotNull;
@@ -292,7 +293,7 @@ public class AbstractPopup implements JBPopup {
else {
myCaption = new CaptionPanel();
myCaption.setBorder(null);
myCaption.setPreferredSize(new Dimension(0, 0));
myCaption.setPreferredSize(JBUI.emptySize());
}
setWindowActive(myHeaderAlwaysFocusable);
@@ -1166,3 +1166,7 @@ new.dir.project.chooser.title=Select Location for Project Directory
new.dir.project.default.generator=Empty project
new.dir.project.error.empty=Project name can't be empty
new.dir.project.error.buck=Project directory name must not contain the ''$'' character
go.to.file.toolwindow.title=Files matching pattern
go.to.class.toolwindow.title=Classes matching pattern
go.to.class.dumb.mode.message=Go To Class action is not available until indices are built, using Go To File instead
@@ -95,6 +95,9 @@ options.java.attribute.descriptor.bad.character=Bad character
options.java.attribute.descriptor.breakpoint.line=Breakpoint line
options.java.attribute.descriptor.execution.point=Execution point
options.java.attribute.descriptor.not.top.frame=Not top frame
options.java.attribute.descriptor.inlined.values=Inlined values
options.java.attribute.descriptor.inlined.values.modified=Inlined modified values
options.java.attribute.descriptor.inlined.values.execution.line=Inlined values for breakpoint line
options.java.attribute.descriptor.recursive.call=Recursive calls highlighting
options.java.attribute.descriptor.annotation.name=Annotation name
options.java.attribute.descriptor.annotation.attribute.name=Annotation attribute name
@@ -33,6 +33,27 @@
<attributes>
<option name="DEBUGGER_INLINED_VALUES">
<value>
<option name="FOREGROUND" value="868686" />
<option name="FONT_TYPE" value="2" />
<option name="EFFECT_TYPE" value="0" />
</value>
</option>
<option name="DEBUGGER_INLINED_VALUES_EXECUTION_LINE">
<value>
<option name="FOREGROUND" value="ff56" />
<option name="FONT_TYPE" value="2" />
<option name="EFFECT_TYPE" value="0" />
</value>
</option>
<option name="DEBUGGER_INLINED_VALUES_MODIFIED">
<value>
<option name="FOREGROUND" value="ca8021" />
<option name="FONT_TYPE" value="2" />
<option name="EFFECT_TYPE" value="0" />
</value>
</option>
<option name="DEFAULT_TEMPLATE_LANGUAGE_COLOR">
<value>
<option name="BACKGROUND" value="f7faff"/>
@@ -241,6 +241,7 @@
displayName="Notifications"
id="reference.settings.ide.settings.notifications"
provider="com.intellij.notification.impl.NotificationsConfigurableProvider"/>
<search.optionContributor implementation="com.intellij.notification.impl.NotificationSearchableOptionContributor"/>
<!-- Plugins -->
<applicationConfigurable groupId="root" groupWeight="55" instance="com.intellij.ide.plugins.PluginManagerConfigurable" id="preferences.pluginManager"
@@ -29,6 +29,8 @@
<remoteServer.deploymentSource.type implementation="com.intellij.remoteServer.impl.configuration.deployment.ModuleDeploymentSourceType"/>
<productivityFeaturesProvider implementation="com.intellij.remoteServer.statistics.CloudFeaturesProvider"/>
<tipAndTrick file="UploadSshKey.html" feature-id="upload.ssh.key"/>
</extensions>
<application-components>
<component>
@@ -565,16 +565,16 @@ public abstract class KeymapsTestCase extends PlatformTestCase {
);
@SuppressWarnings("MismatchedQueryAndUpdateOfCollection")
Map<String, List<String>> reassignedShortcuts = new FactoryMap<String, List<String>>() {
Map<Keymap, List<Shortcut>> reassignedShortcuts = new FactoryMap<Keymap, List<Shortcut>>() {
@Override
protected Map<String, List<String>> createMap() {
return new LinkedHashMap<String, List<String>>();
protected Map<Keymap, List<Shortcut>> createMap() {
return new LinkedHashMap<Keymap, List<Shortcut>>();
}
@Nullable
@Override
protected List<String> create(String key) {
return new ArrayList<String>();
protected List<Shortcut> create(Keymap key) {
return new ArrayList<Shortcut>();
}
};
for (String name : duplicates.keySet()) {
@@ -597,7 +597,7 @@ public abstract class KeymapsTestCase extends PlatformTestCase {
Set<String> expectedSc = new HashSet<String>(shortcutMappings.getValue());
for (String s : actualSc) {
if (!expectedSc.contains(s)) {
reassignedShortcuts.get(keymap.getName()).add(getText(shortcut));
reassignedShortcuts.get(keymap).add(shortcut);
}
}
for (String s : expectedSc) {
@@ -610,11 +610,19 @@ public abstract class KeymapsTestCase extends PlatformTestCase {
}
if (!reassignedShortcuts.isEmpty()) {
StringBuilder message = new StringBuilder();
for (Map.Entry<String, List<String>> keymapToShortcuts : reassignedShortcuts.entrySet()) {
message.append("The following shortcuts was reassigned in keymap ").append(keymapToShortcuts.getKey())
for (Map.Entry<Keymap, List<Shortcut>> keymapToShortcuts : reassignedShortcuts.entrySet()) {
Keymap keymap = keymapToShortcuts.getKey();
message.append("The following shortcuts was reassigned in keymap ").append(keymap.getName())
.append(". Please modify known duplicates list:\n");
for (String eachShortcut : keymapToShortcuts.getValue()) {
message.append(eachShortcut).append("\n");
for (Shortcut eachShortcut : keymapToShortcuts.getValue()) {
message.append(" { ").append(StringUtil.wrapWithDoubleQuote(getText(eachShortcut))).append(",\t")
.append(StringUtil.join(keymap.getActionIds(eachShortcut), new Function<String, String>() {
@Override
public String fun(String s) {
return StringUtil.wrapWithDoubleQuote(s);
}
}, ", "))
.append("},\n");
}
}
TestCase.fail("\n" + message.toString());
@@ -45,14 +45,6 @@ ide.firstStartup=true
ide.debugMode=false
ide.debugger.inline=true
ide.debugger.inline.description=Enables variables view in editor
ide.debugger.inline.fg.color=134,134,134
ide.debugger.inline.fg.color.description=Inline values foreground
ide.debugger.inline.dark.fg.color=61,128,101
ide.debugger.inline.dark.fg.color.description=Inline values foreground for dark editor scheme
ide.debugger.inline.fg.modified.color=202,128,33
ide.debugger.inline.fg.modified.color.description=Inline modified values foreground
ide.debugger.inline.dark.fg.modified.color=202,126,3
ide.debugger.inline.dark.fg.modified.color.description=Inline modified values foreground for dark editor scheme
ide.debugMode.description=Record additional information to make bug reports more informative.
ide.forcedShowTooltip=alt
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2013 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -54,7 +54,7 @@ public abstract class AbstractLayoutManager implements LayoutManager2 {
@Override
public Dimension minimumLayoutSize(final Container parent) {
return new Dimension(0, 0);
return JBUI.emptySize();
}
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2013 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -31,7 +31,7 @@ public class Layers extends JLayeredPane {
@Override
public Dimension getMinimumSize() {
if (!isMinimumSizeSet())
return new Dimension(0, 0);
return JBUI.emptySize();
return super.getMinimumSize();
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -56,6 +56,7 @@ import com.intellij.ui.content.Content;
import com.intellij.ui.content.ContentFactory;
import com.intellij.util.Alarm;
import com.intellij.util.messages.MessageBusConnection;
import com.intellij.util.ui.JBUI;
import com.intellij.util.ui.UIUtil;
import com.intellij.util.ui.tree.TreeUtil;
import org.intellij.lang.annotations.JdkConstants;
@@ -361,7 +362,7 @@ public class ChangesViewManager implements ChangesViewI, JDOMExternalizable, Pro
if (myProgressLabel != null) {
myProgressLabel.removeAll();
myProgressLabel.add(progress.create());
myProgressLabel.setMinimumSize(new Dimension(0, 0));
myProgressLabel.setMinimumSize(JBUI.emptySize());
}
}
});
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -300,7 +300,7 @@ public class VcsDirectoryConfigurationPanel extends JPanel implements Configurab
}
myDirectoryMappingTable = new TableView<MapInfo>();
myDirectoryMappingTable.setIntercellSpacing(new Dimension(0, 0));
myDirectoryMappingTable.setIntercellSpacing(JBUI.emptySize());
myBaseRevisionTexts = new JCheckBox("Store on shelf base revision texts for files under DVCS");
myLimitHistory = new VcsLimitHistoryConfigurable(myProject);
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -32,6 +32,7 @@ import com.intellij.util.Function;
import com.intellij.util.NotNullProducer;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.text.DateFormatUtil;
import com.intellij.util.ui.JBUI;
import com.intellij.util.ui.UIUtil;
import com.intellij.vcs.log.VcsFullCommitDetails;
import com.intellij.vcs.log.VcsLogHighlighter;
@@ -114,7 +115,7 @@ public class VcsLogGraphTable extends JBTable implements TypeSafeDataProvider, C
setRowHeight(HEIGHT_CELL);
setShowHorizontalLines(false);
setIntercellSpacing(new Dimension(0, 0));
setIntercellSpacing(JBUI.emptySize());
MouseAdapter mouseAdapter = new MyMouseAdapter();
addMouseMotionListener(mouseAdapter);
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -36,4 +36,7 @@ public interface DebuggerColors {
Key<Boolean> BREAKPOINT_HIGHLIGHTER_KEY = Key.create("BREAKPOINT_HIGHLIGHTER_KEY");
int EXECUTION_LINE_HIGHLIGHTERLAYER = HighlighterLayer.SELECTION - 1;
TextAttributesKey INLINED_VALUES = TextAttributesKey.createTextAttributesKey("DEBUGGER_INLINED_VALUES");
TextAttributesKey INLINED_VALUES_MODIFIED = TextAttributesKey.createTextAttributesKey("DEBUGGER_INLINED_VALUES_MODIFIED");
TextAttributesKey INLINED_VALUES_EXECUTION_LINE = TextAttributesKey.createTextAttributesKey("DEBUGGER_INLINED_VALUES_EXECUTION_LINE");
}
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2014 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -19,6 +19,7 @@ import com.intellij.openapi.editor.Document;
import com.intellij.openapi.editor.EditorLinePainter;
import com.intellij.openapi.editor.LineExtensionInfo;
import com.intellij.openapi.editor.colors.EditorColorsManager;
import com.intellij.openapi.editor.markup.TextAttributes;
import com.intellij.openapi.fileEditor.FileDocumentManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.util.Key;
@@ -26,10 +27,7 @@ import com.intellij.openapi.util.Pair;
import com.intellij.openapi.util.registry.Registry;
import com.intellij.openapi.util.text.StringUtil;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.ui.ColorUtil;
import com.intellij.ui.JBColor;
import com.intellij.ui.SimpleColoredText;
import com.intellij.ui.SimpleTextAttributes;
import com.intellij.ui.*;
import com.intellij.util.NotNullProducer;
import com.intellij.util.containers.ObjectLongHashMap;
import com.intellij.xdebugger.XDebugSession;
@@ -40,6 +38,7 @@ import com.intellij.xdebugger.impl.frame.XDebugView;
import com.intellij.xdebugger.impl.frame.XVariablesView;
import com.intellij.xdebugger.impl.ui.tree.nodes.XValueNodeImpl;
import com.intellij.xdebugger.impl.ui.tree.nodes.XValueTextRendererImpl;
import com.intellij.xdebugger.ui.DebuggerColors;
import org.jetbrains.annotations.NotNull;
import java.awt.*;
@@ -102,7 +101,7 @@ public class XDebuggerEditorLinePainter extends EditorLinePainter {
}
XDebugSession session = XDebugView.getSession(values.iterator().next().getTree());
boolean isTopFrame = session instanceof XDebugSessionImpl && ((XDebugSessionImpl)session).isTopFrameSelected();
final Color color = bpLine == lineNumber && isTopFrame ? new JBColor(new Color(0, 255, 86), new Color(255, 235, 9)) : getForeground();
final TextAttributes attributes = bpLine == lineNumber && isTopFrame ? getTopFrameSelectedAttributes() : getNormalAttributes();
final String name = value.getName();
if (StringUtil.isEmpty(text.toString())) {
@@ -110,7 +109,7 @@ public class XDebuggerEditorLinePainter extends EditorLinePainter {
}
final VariableText res = new VariableText();
result.add(res);
res.add(new LineExtensionInfo(" " + name + ": ", color, null, null, Font.ITALIC));
res.add(new LineExtensionInfo(" " + name + ": ", attributes));
Variable var = new Variable(name, lineNumber);
VariableValue variableValue = oldValues.get(var);
@@ -126,7 +125,7 @@ public class XDebuggerEditorLinePainter extends EditorLinePainter {
if (!variableValue.isChanged()) {
for (String s : text.getTexts()) {
res.add(new LineExtensionInfo(s, color, null, null, Font.ITALIC));
res.add(new LineExtensionInfo(s, attributes));
}
}
else {
@@ -167,28 +166,43 @@ public class XDebuggerEditorLinePainter extends EditorLinePainter {
return ColorUtil.isDark(bg);
}
public static JBColor getForeground() {
return new JBColor(new NotNullProducer<Color>() {
@SuppressWarnings("UseJBColor")
@NotNull
@Override
public Color produce() {
return isDarkEditor() ? Registry.getColor("ide.debugger.inline.dark.fg.color", new Color(0x3d8065))
: Registry.getColor("ide.debugger.inline.fg.color", new Color(0x3d8065));
}
});
public static TextAttributes getNormalAttributes() {
TextAttributes attributes = EditorColorsManager.getInstance().getGlobalScheme().getAttributes(DebuggerColors.INLINED_VALUES);
if (attributes == null || attributes.getForegroundColor() == null) {
return new TextAttributes(new JBColor(new NotNullProducer<Color>() {
@SuppressWarnings("UseJBColor")
@NotNull
@Override
public Color produce() {
return isDarkEditor() ? new Color(0x3d8065) : Gray._135;
}
}), null, null, null, Font.ITALIC);
}
return attributes;
}
public static JBColor getChangedForeground() {
return new JBColor(new NotNullProducer<Color>() {
@SuppressWarnings("UseJBColor")
@NotNull
@Override
public Color produce() {
return isDarkEditor() ? Registry.getColor("ide.debugger.inline.dark.fg.modified.color", new Color(0xa1830a))
: Registry.getColor("ide.debugger.inline.fg.modified.color", new Color(0xca8021));
}
});
public static TextAttributes getChangedAttributes() {
TextAttributes attributes = EditorColorsManager.getInstance().getGlobalScheme().getAttributes(DebuggerColors.INLINED_VALUES_MODIFIED);
if (attributes == null || attributes.getForegroundColor() == null) {
return new TextAttributes(new JBColor(new NotNullProducer<Color>() {
@SuppressWarnings("UseJBColor")
@NotNull
@Override
public Color produce() {
return isDarkEditor() ? new Color(0xa1830a) : new Color(0xca8021);
}
}), null, null, null, Font.ITALIC);
}
return attributes;
}
private static TextAttributes getTopFrameSelectedAttributes() {
TextAttributes attributes = EditorColorsManager.getInstance().getGlobalScheme().getAttributes(DebuggerColors.INLINED_VALUES_EXECUTION_LINE);
if (attributes == null || attributes.getForegroundColor() == null) {
//noinspection UseJBColor
return new TextAttributes(isDarkEditor() ? new Color(255, 235, 9) : new Color(0, 255, 86), null, null, null, Font.ITALIC);
}
return attributes;
}
static class Variable {
@@ -240,22 +254,22 @@ public class XDebuggerEditorLinePainter extends EditorLinePainter {
if (isArray(actual) && isArray(old)) {
List<String> actualParts = getArrayParts(actual);
List<String> oldParts = getArrayParts(old);
result.add(new LineExtensionInfo("{", getForeground(), null, null, Font.ITALIC));
result.add(new LineExtensionInfo("{", getNormalAttributes()));
for (int i = 0; i < actualParts.size(); i++) {
if (i < oldParts.size() && StringUtil.equals(actualParts.get(i), oldParts.get(i))) {
result.add(new LineExtensionInfo(actualParts.get(i), getForeground(), null, null, Font.ITALIC));
result.add(new LineExtensionInfo(actualParts.get(i), getNormalAttributes()));
} else {
result.add(new LineExtensionInfo(actualParts.get(i), getChangedForeground(), null, null, Font.ITALIC));
result.add(new LineExtensionInfo(actualParts.get(i), getChangedAttributes()));
}
if (i != actualParts.size() - 1) {
result.add(new LineExtensionInfo(", ", getForeground(), null, null, Font.ITALIC));
result.add(new LineExtensionInfo(", ", getNormalAttributes()));
}
}
result.add(new LineExtensionInfo("}", getForeground(), null, null, Font.ITALIC));
result.add(new LineExtensionInfo("}", getNormalAttributes()));
return;
}
result.add(new LineExtensionInfo(actual, getChangedForeground(), null, null, Font.ITALIC));
result.add(new LineExtensionInfo(actual, getChangedAttributes()));
}
private static boolean isArray(String s) {
@@ -1,5 +1,5 @@
/*
* Copyright 2000-2009 JetBrains s.r.o.
* Copyright 2000-2015 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.
@@ -54,6 +54,9 @@ public class DebuggerColorsPage implements ColorSettingsPage, DisplayPrioritySor
new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.breakpoint.line"), DebuggerColors.BREAKPOINT_ATTRIBUTES),
new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.execution.point"), DebuggerColors.EXECUTIONPOINT_ATTRIBUTES),
new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.not.top.frame"), DebuggerColors.NOT_TOP_FRAME_ATTRIBUTES),
new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.inlined.values"), DebuggerColors.INLINED_VALUES),
new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.inlined.values.modified"), DebuggerColors.INLINED_VALUES_MODIFIED),
new AttributesDescriptor(OptionsBundle.message("options.java.attribute.descriptor.inlined.values.execution.line"), DebuggerColors.INLINED_VALUES_EXECUTION_LINE),
};
}
@@ -99,7 +99,7 @@ public class ChooseModulesDialog extends DialogWrapper {
myView.setShowGrid(false);
myView.setTableHeader(null);
myView.setIntercellSpacing(new Dimension(0, 0));
myView.setIntercellSpacing(JBUI.emptySize());
TableUtil.setupCheckboxColumn(myView, 0);
myView.getModel().addTableModelListener(new TableModelListener() {
public void tableChanged(TableModelEvent e) {
@@ -572,14 +572,7 @@ public final class Generator {
@SuppressWarnings({"HardCodedStringLiteral"})
private static String suggestGetterName(final String propertyName, final String propertyType) {
final StringBuffer name = new StringBuffer(StringUtil.capitalize(propertyName));
if ("boolean".equals(propertyType)) {
name.insert(0, "is");
}
else {
name.insert(0, "get");
}
return name.toString();
return PropertyUtil.suggestGetterName(propertyName, "boolean".equals(propertyType) ? PsiType.BOOLEAN : null);
}
public static void prepareWizardData(final WizardData data, PsiClass boundClass) throws MyException {
@@ -243,12 +243,13 @@ public class PyBlock implements ASTBlock {
}
}
//Align elements vertically if there is an argument in the first line of parenthesized expression
else if (((parentType == PyElementTypes.PARENTHESIZED_EXPRESSION && myContext.getSettings().ALIGN_MULTILINE_PARENTHESIZED_EXPRESSION)
|| (parentType == PyElementTypes.ARGUMENT_LIST && myContext.getSettings().ALIGN_MULTILINE_PARAMETERS_IN_CALLS)
|| (parentType == PyElementTypes.PARAMETER_LIST && myContext.getSettings().ALIGN_MULTILINE_PARAMETERS)) &&
else if (!hasHangingIndent(_node.getPsi()) &&
((parentType == PyElementTypes.PARENTHESIZED_EXPRESSION && myContext.getSettings().ALIGN_MULTILINE_PARENTHESIZED_EXPRESSION) ||
(parentType == PyElementTypes.ARGUMENT_LIST && myContext.getSettings().ALIGN_MULTILINE_PARAMETERS_IN_CALLS) ||
(parentType == PyElementTypes.PARAMETER_LIST && myContext.getSettings().ALIGN_MULTILINE_PARAMETERS)) &&
!isIndentNext(child) &&
!hasLineBreaksBefore(_node.getFirstChildNode(), 1)
&& !ourListElementTypes.contains(childType)) {
!hasLineBreaksBefore(_node.getFirstChildNode(), 1) &&
!ourListElementTypes.contains(childType)) {
if (!ourBrackets.contains(childType)) {
childAlignment = getAlignmentForChildren();
@@ -325,6 +326,49 @@ public class PyBlock implements ASTBlock {
return new PyBlock(this, child, childAlignment, childIndent, wrap, myContext);
}
// Check https://www.python.org/dev/peps/pep-0008/#indentation
private boolean hasHangingIndent(@NotNull PsiElement elem) {
final PsiElement[] items;
if (elem instanceof PyCallExpression) {
final PyArgumentList argumentList = ((PyCallExpression)elem).getArgumentList();
return argumentList != null && hasHangingIndent(argumentList);
}
else if (elem instanceof PyFunction) {
return hasHangingIndent(((PyFunction)elem).getParameterList());
}
final PsiElement firstChild = elem.getFirstChild();
if (firstChild == null) {
return false;
}
if (PyTokenTypes.OPEN_BRACES.contains(firstChild.getNode().getElementType()) && hasLineBreaksAfter(firstChild.getNode(), 1)) {
return true;
}
if (elem instanceof PySequenceExpression) {
items = ((PySequenceExpression)elem).getElements();
}
else if (elem instanceof PyParameterList) {
items = ((PyParameterList)elem).getParameters();
}
else if (elem instanceof PyArgumentList) {
items = ((PyArgumentList)elem).getArguments();
}
else if (elem instanceof PyParenthesizedExpression) {
final PyParenthesizedExpression parenthesizedExpr = (PyParenthesizedExpression)elem;
if (parenthesizedExpr.getContainedExpression() instanceof PyTupleExpression) {
items = (((PyTupleExpression)parenthesizedExpr.getContainedExpression()).getElements());
}
else {
items = new PsiElement[]{parenthesizedExpr.getContainedExpression()};
}
}
else {
return false;
}
return items.length == 0 || hasHangingIndent(items[0]);
}
private static boolean breaksAlignment(IElementType type) {
return type != PyElementTypes.BINARY_EXPRESSION;
}
@@ -409,10 +453,10 @@ public class PyBlock implements ASTBlock {
myContext.getMode() == FormattingMode.ADJUST_INDENT) {
return true;
}
return false;
return !hasHangingIndent(_node.getPsi());
}
if (_node.getElementType() == PyElementTypes.ARGUMENT_LIST) {
if (!myContext.getSettings().ALIGN_MULTILINE_PARAMETERS_IN_CALLS) {
if (!myContext.getSettings().ALIGN_MULTILINE_PARAMETERS_IN_CALLS || hasHangingIndent(_node.getPsi())) {
return false;
}
if (child.getElementType() == PyTokenTypes.COMMA) {
@@ -427,7 +471,7 @@ public class PyBlock implements ASTBlock {
return false;
}
if (_node.getElementType() == PyElementTypes.PARAMETER_LIST) {
return myContext.getSettings().ALIGN_MULTILINE_PARAMETERS;
return !hasHangingIndent(_node.getPsi()) && myContext.getSettings().ALIGN_MULTILINE_PARAMETERS;
}
if (_node.getElementType() == PyElementTypes.SUBSCRIPTION_EXPRESSION) {
return false;
@@ -447,12 +491,18 @@ public class PyBlock implements ASTBlock {
return node;
}
private static boolean hasLineBreaksBefore(ASTNode child, int minCount) {
private static boolean hasLineBreaksBefore(@NotNull ASTNode child, int minCount) {
final ASTNode treePrev = child.getTreePrev();
return (treePrev != null && isWhitespaceWithLineBreaks(TreeUtil.findLastLeaf(treePrev), minCount)) ||
isWhitespaceWithLineBreaks(child.getFirstChildNode(), minCount);
}
private static boolean hasLineBreaksAfter(@NotNull ASTNode child, int minCount) {
final ASTNode treeNext = child.getTreeNext();
return (treeNext != null && isWhitespaceWithLineBreaks(TreeUtil.findLastLeaf(treeNext), minCount)) ||
isWhitespaceWithLineBreaks(child.getLastChildNode(), minCount);
}
private static boolean isWhitespaceWithLineBreaks(ASTNode node, int minCount) {
if (node != null && node.getElementType() == TokenType.WHITE_SPACE) {
String prevNodeText = node.getText();
@@ -113,6 +113,7 @@ public class PythonFormattingModelBuilder implements FormattingModelBuilderEx, C
.withinPairInside(LPAR, RPAR, PARAMETER_LIST).spaceIf(commonSettings.SPACE_WITHIN_METHOD_PARENTHESES)
.withinPairInside(LPAR, RPAR, FROM_IMPORT_STATEMENT).spaces(0)
.withinPairInside(LPAR, RPAR, GENERATOR_EXPRESSION).spaces(0)
.withinPairInside(LPAR, RPAR, PARENTHESIZED_EXPRESSION).spaces(0)
.before(LBRACKET).spaceIf(pySettings.SPACE_BEFORE_LBRACKET)
.withinPair(LBRACE, RBRACE).spaceIf(pySettings.SPACE_WITHIN_BRACES)
@@ -5,4 +5,4 @@ print(1 + (1 + (1
+
x.
calc()
))
))
@@ -0,0 +1,8 @@
class Checkpoints(webapp2.RequestHandler):
def get(self):
self.response.write(json.dumps({"meta": {"code": 400,
"errorType": "paramError",
"errorDetail": "Parameter 'api_key' is missing"
},
"response": {}
}))
@@ -0,0 +1,8 @@
class Checkpoints(webapp2.RequestHandler):
def get(self):
self.response.write(json.dumps({"meta": {"code": 400,
"errorType": "paramError",
"errorDetail": "Parameter 'api_key' is missing"
},
"response": {}
}))
@@ -0,0 +1,10 @@
def test_function(*args):
pass
test_function({
'a': 'b',
}, 5)
test_function(1,
2,
3)
@@ -0,0 +1,3 @@
handler = webapp2.WSGIApplication([
('/', UserHandler),<caret>
], debug=True)
@@ -0,0 +1,4 @@
handler = webapp2.WSGIApplication([
('/', UserHandler),
()
], debug=True)
@@ -0,0 +1,11 @@
def test_function(*args):
pass
test_function({
'a': 'b',
}, 5)
test_function(1,
2,
3)
@@ -0,0 +1,4 @@
def crap( self ):
foo = ( 'bar' for bar in [ 1, 2,3,4 ] )
if ( 'a' and 'b' ):
blah( '123' )
@@ -0,0 +1,4 @@
def crap(self):
foo = ('bar' for bar in [1, 2, 3, 4])
if ('a' and 'b'):
blah('123')
@@ -1,4 +1,4 @@
urlpatterns = patterns('',
(r'^admin/', include(admin.site.urls)),
url(r'^', include('cms.urls')),
)
)
@@ -21,6 +21,7 @@ import com.intellij.psi.PsiFile;
import com.intellij.psi.codeStyle.CodeStyleManager;
import com.intellij.psi.codeStyle.CodeStyleSettings;
import com.intellij.psi.codeStyle.CodeStyleSettingsManager;
import com.intellij.psi.codeStyle.CommonCodeStyleSettings;
import com.intellij.psi.util.PsiTreeUtil;
import com.jetbrains.python.fixtures.PyTestCase;
import com.jetbrains.python.formatter.PyCodeStyleSettings;
@@ -159,7 +160,7 @@ public class PyFormatterTest extends PyTestCase {
}
public void testNoAlignForMethodArguments() { // PY-3995
settings().getCommonSettings(PythonLanguage.getInstance()).ALIGN_MULTILINE_PARAMETERS_IN_CALLS = false;
getCommonSettings().ALIGN_MULTILINE_PARAMETERS_IN_CALLS = false;
doTest();
}
@@ -430,6 +431,46 @@ public class PyFormatterTest extends PyTestCase {
myFixture.checkResultByFile("formatter/" + getTestName(true) + "_after.py");
}
// PY-12861
public void testSpacesInsideParenthesisAreStripped() {
doTest();
}
// PY-14838
public void testNoAlignmentAfterDictHangingIndentInFunctionCall() {
getCommonSettings().ALIGN_MULTILINE_PARAMETERS_IN_CALLS = true;
try {
doTest();
}
finally {
settings().ALIGN_MULTILINE_PARAMETERS_IN_CALLS = false;
}
}
// PY-13955
public void testNoAlignmentAfterDictHangingIndentInFunctionCallOnTyping() {
settings().ALIGN_MULTILINE_PARAMETERS_IN_CALLS = true;
try {
final String testName = "formatter/" + getTestName(true);
myFixture.configureByFile(testName + ".py");
WriteCommandAction.runWriteCommandAction(null, new Runnable() {
@Override
public void run() {
myFixture.type("\n(");
}
});
myFixture.checkResultByFile(testName + "_after.py");
}
finally {
settings().ALIGN_MULTILINE_PARAMETERS_IN_CALLS = false;
}
}
// PY-12145
public void testAlignmentOfClosingBraceInDictLiteralWhenNoHangingIndent() {
doTest();
}
/**
* This test merely checks that call to {@link com.intellij.psi.codeStyle.CodeStyleManager#reformat(com.intellij.psi.PsiElement)}
* is possible for Python sources.
@@ -450,7 +491,11 @@ public class PyFormatterTest extends PyTestCase {
myFixture.checkResultByFile("formatter/" + getTestName(true) + "_after.py");
}
private CommonCodeStyleSettings getCommonSettings() {
return settings().getCommonSettings(PythonLanguage.getInstance());
}
private CodeStyleSettings settings() {
return CodeStyleSettingsManager.getInstance().getSettings(myFixture.getProject());
return CodeStyleSettingsManager.getSettings(myFixture.getProject());
}
}