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:
+1
-1
@@ -93,7 +93,7 @@ class JavaClassNameInsertHandler implements InsertHandler<JavaPsiClassReferenceE
|
||||
if (ref == null || !ref.isQualified()) {
|
||||
PsiTypeLookupItem.addImportForItem(context, psiClass);
|
||||
}
|
||||
if (context.getOffset(refEnd) < 0) {
|
||||
if (!context.getOffsetMap().containsOffset(refEnd)) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,6 +22,7 @@ import com.intellij.ide.ui.UISettings;
|
||||
import com.intellij.openapi.actionSystem.*;
|
||||
import com.intellij.openapi.actionSystem.impl.PresentationFactory;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.application.ModalityState;
|
||||
import com.intellij.openapi.command.CommandProcessor;
|
||||
import com.intellij.openapi.editor.markup.EffectType;
|
||||
import com.intellij.openapi.editor.markup.TextAttributes;
|
||||
@@ -70,13 +71,14 @@ import javax.swing.event.ListSelectionEvent;
|
||||
import javax.swing.event.ListSelectionListener;
|
||||
import java.awt.*;
|
||||
import java.awt.event.*;
|
||||
import java.awt.event.KeyEvent;
|
||||
import java.beans.PropertyChangeEvent;
|
||||
import java.beans.PropertyChangeListener;
|
||||
import java.io.File;
|
||||
import java.util.*;
|
||||
import java.util.List;
|
||||
|
||||
import static java.awt.event.InputEvent.*;
|
||||
import static java.awt.event.InputEvent.CTRL_DOWN_MASK;
|
||||
import static java.awt.event.KeyEvent.*;
|
||||
import static javax.swing.KeyStroke.getKeyStroke;
|
||||
|
||||
@@ -886,7 +888,8 @@ public class Switcher extends AnAction implements DumbAware {
|
||||
}
|
||||
else if (values[0] instanceof ToolWindow) {
|
||||
final ToolWindow toolWindow = (ToolWindow)values[0];
|
||||
IdeFocusManager.getInstance(project).doWhenFocusSettlesDown(() -> toolWindow.activate(null, true, true));
|
||||
IdeFocusManager.getInstance(project).doWhenFocusSettlesDown(() -> toolWindow.activate(null, true, true),
|
||||
ModalityState.current());
|
||||
}
|
||||
else {
|
||||
IdeFocusManager.getInstance(project).doWhenFocusSettlesDown(() -> {
|
||||
@@ -916,7 +919,7 @@ public class Switcher extends AnAction implements DumbAware {
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}, ModalityState.current());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -404,7 +404,7 @@ public class EditorTextField extends NonOpaquePanel implements DocumentListener,
|
||||
// and only then execute another removal from the hierarchy. Otherwise
|
||||
// swing goes nuts because of nested removals and indices get corrupted
|
||||
EditorEx editor = myEditor;
|
||||
SwingUtilities.invokeLater(() -> releaseEditor(editor));
|
||||
ApplicationManager.getApplication().invokeLater(() -> releaseEditor(editor));
|
||||
myEditor = null;
|
||||
}
|
||||
|
||||
|
||||
@@ -31,7 +31,6 @@ import java.util.Set;
|
||||
* @author peter
|
||||
*/
|
||||
public class UndoHelper {
|
||||
private final Project myProject;
|
||||
private boolean myShowing;
|
||||
private final Set<Document> myCurrentDocuments = new HashSet<>();
|
||||
private boolean myDirty;
|
||||
@@ -45,7 +44,6 @@ public class UndoHelper {
|
||||
};
|
||||
|
||||
public UndoHelper(final Project project, final Committable committable) {
|
||||
myProject = project;
|
||||
final PsiDocumentManager psiDocumentManager = PsiDocumentManager.getInstance(project);
|
||||
CommandProcessor.getInstance().addCommandListener(new CommandAdapter() {
|
||||
@Override
|
||||
@@ -86,7 +84,6 @@ public class UndoHelper {
|
||||
}
|
||||
|
||||
public final void setShowing(final boolean showing) {
|
||||
commitAllDocuments();
|
||||
myShowing = showing;
|
||||
}
|
||||
|
||||
@@ -94,17 +91,6 @@ public class UndoHelper {
|
||||
return myShowing;
|
||||
}
|
||||
|
||||
public final void commitAllDocuments() {
|
||||
final PsiDocumentManager manager = getDocumentManager();
|
||||
for (final Document document : myCurrentDocuments) {
|
||||
manager.commitDocument(document);
|
||||
}
|
||||
}
|
||||
|
||||
private PsiDocumentManager getDocumentManager() {
|
||||
return PsiDocumentManager.getInstance(myProject);
|
||||
}
|
||||
|
||||
public final void addWatchedDocument(final Document document) {
|
||||
stopListeningDocuments();
|
||||
myCurrentDocuments.add(document);
|
||||
|
||||
Reference in New Issue
Block a user