mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
/**
|
||||
* @see <a href="http://confluence.jetbrains.com/display/IDEADEV/Indexing+and+PSI+Stubs+in+IntelliJ+IDEA">Indexing and PSI Stubs in IntelliJ IDEA</a>
|
||||
*
|
||||
* @see <a href="http://devnet.jetbrains.com/message/5485343#_ga=1.104383616.1427417469.1367843132">Lifecycle of stub creation</a>
|
||||
*/
|
||||
package com.intellij.psi.stubs;
|
||||
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
package com.intellij.ide.customize;
|
||||
|
||||
import com.intellij.ide.plugins.PluginManager;
|
||||
import com.intellij.ide.startup.StartupActionScriptManager;
|
||||
import com.intellij.openapi.application.ApplicationNamesInfo;
|
||||
import com.intellij.openapi.ui.DialogWrapper;
|
||||
@@ -27,7 +26,6 @@ import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
@@ -160,11 +158,6 @@ public class CustomizeIDEWizardDialog extends DialogWrapper implements ActionLis
|
||||
for (AbstractCustomizeWizardStep step : mySteps) {
|
||||
if (!step.beforeOkAction()) return;
|
||||
}
|
||||
try {
|
||||
PluginManager.saveDisabledPlugins(PluginGroups.getInstance().getDisabledPluginIds(), false);
|
||||
}
|
||||
catch (IOException ignored) {
|
||||
}
|
||||
super.doOKAction();
|
||||
}
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
*/
|
||||
package com.intellij.ide.customize;
|
||||
|
||||
import com.intellij.ide.plugins.PluginManager;
|
||||
import com.intellij.openapi.application.ApplicationNamesInfo;
|
||||
import com.intellij.openapi.ui.DialogWrapper;
|
||||
import com.intellij.openapi.ui.VerticalFlowLayout;
|
||||
@@ -33,6 +34,7 @@ import javax.swing.border.CompoundBorder;
|
||||
import java.awt.*;
|
||||
import java.awt.event.ActionEvent;
|
||||
import java.awt.event.ActionListener;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
@@ -224,6 +226,16 @@ public class CustomizePluginsStepPanel extends AbstractCustomizeWizardStep imple
|
||||
return null;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean beforeOkAction() {
|
||||
try {
|
||||
PluginManager.saveDisabledPlugins(PluginGroups.getInstance().getDisabledPluginIds(), false);
|
||||
}
|
||||
catch (IOException ignored) {
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
private class IdSetPanel extends JPanel implements LinkListener<String> {
|
||||
private JLabel myTitleLabel = new JLabel();
|
||||
private JPanel myContentPanel = new JPanel(new GridLayout(0, 3, 5, 5));
|
||||
|
||||
Binary file not shown.
@@ -9,7 +9,13 @@ import org.jetbrains.annotations.Nullable;
|
||||
*/
|
||||
public interface FunctionParameter {
|
||||
/**
|
||||
* @return parameter position
|
||||
* Position value if argument is keyword-only
|
||||
*/
|
||||
int POSITION_NOT_SUPPORTED = -1;
|
||||
|
||||
/**
|
||||
* @return parameter position. Be sure to check position is supported (!= {@link #POSITION_NOT_SUPPORTED} )
|
||||
* @see #POSITION_NOT_SUPPORTED
|
||||
*/
|
||||
int getPosition();
|
||||
|
||||
|
||||
@@ -107,7 +107,14 @@ public class PsiQuery {
|
||||
*/
|
||||
@NotNull
|
||||
public PsiQuery parents(@NotNull final Class<? extends PsiElement> clazz) {
|
||||
throw new RuntimeException("Not impl");
|
||||
final List<PsiElement> result = new ArrayList<PsiElement>();
|
||||
for (final PsiElement element : myPsiElements) {
|
||||
final PsiElement parent = PsiTreeUtil.getParentOfType(element, clazz);
|
||||
if (parent != null) {
|
||||
result.add(parent);
|
||||
}
|
||||
}
|
||||
return new PsiQuery(result);
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -24,10 +24,10 @@ import com.intellij.psi.tree.TokenSet;
|
||||
import com.intellij.psi.util.PsiTreeUtil;
|
||||
import com.intellij.util.IncorrectOperationException;
|
||||
import com.jetbrains.NotNullPredicate;
|
||||
import com.jetbrains.python.FunctionParameter;
|
||||
import com.jetbrains.python.PyElementTypes;
|
||||
import com.jetbrains.python.PyTokenTypes;
|
||||
import com.jetbrains.python.PythonDialectsTokenSetProvider;
|
||||
import com.jetbrains.python.FunctionParameter;
|
||||
import com.jetbrains.python.psi.*;
|
||||
import com.jetbrains.python.psi.resolve.PyResolveContext;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
@@ -344,11 +344,13 @@ public class PyArgumentListImpl extends PyElementImpl implements PyArgumentList
|
||||
}
|
||||
|
||||
final PyExpression[] arguments = getArguments();
|
||||
if (arguments.length > parameter.getPosition()) {
|
||||
final PyExpression result = arguments[parameter.getPosition()];
|
||||
final int position = parameter.getPosition();
|
||||
if ((position != FunctionParameter.POSITION_NOT_SUPPORTED) && (arguments.length > position)) {
|
||||
final PyExpression result = arguments[position];
|
||||
if (result instanceof PyKeywordArgument) {
|
||||
((PyKeywordArgument)result).getValueExpression();
|
||||
} else {
|
||||
}
|
||||
else {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user