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:
@@ -94,11 +94,11 @@ public class EditorTextFieldProviderImpl implements EditorTextFieldProvider {
|
||||
EditorSettings settings = ex.getSettings();
|
||||
settings.setAdditionalColumnsCount(3);
|
||||
settings.setVirtualSpace(false);
|
||||
applyFeatures(ex);
|
||||
applyCustomizations(ex);
|
||||
return ex;
|
||||
}
|
||||
|
||||
private void applyFeatures(@NotNull EditorEx editor) {
|
||||
private void applyCustomizations(@NotNull EditorEx editor) {
|
||||
for (EditorCustomization customization : myCustomizations) {
|
||||
customization.customize(editor);
|
||||
}
|
||||
|
||||
@@ -361,7 +361,7 @@ public abstract class AbstractWizard<T extends Step> extends DialogWrapper {
|
||||
// Commit data of current step
|
||||
final Step currentStep = mySteps.get(myCurrentStep);
|
||||
LOG.assertTrue(currentStep != null);
|
||||
LOG.assertTrue(!isLastStep());
|
||||
LOG.assertTrue(!isLastStep(), "steps: " + mySteps + " current: " + currentStep);
|
||||
try {
|
||||
currentStep._commit(false);
|
||||
}
|
||||
@@ -522,8 +522,4 @@ public abstract class AbstractWizard<T extends Step> extends DialogWrapper {
|
||||
@Nullable
|
||||
@NonNls
|
||||
protected abstract String getHelpID();
|
||||
|
||||
protected boolean isCurrentStep(final T step) {
|
||||
return step != null && getCurrentStepComponent() == step.getComponent();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -19,7 +19,7 @@ import com.intellij.ide.presentation.VirtualFilePresentation;
|
||||
import com.intellij.ide.util.PropertiesComponent;
|
||||
import com.intellij.openapi.actionSystem.DataProvider;
|
||||
import com.intellij.openapi.actionSystem.PlatformDataKeys;
|
||||
import com.intellij.openapi.application.ex.ApplicationManagerEx;
|
||||
import com.intellij.openapi.application.ApplicationManager;
|
||||
import com.intellij.openapi.diff.DiffRequest;
|
||||
import com.intellij.openapi.editor.Document;
|
||||
import com.intellij.openapi.fileChooser.FileChooser;
|
||||
@@ -34,6 +34,7 @@ import com.intellij.openapi.vfs.LocalFileSystem;
|
||||
import com.intellij.openapi.vfs.VfsUtilCore;
|
||||
import com.intellij.openapi.vfs.VirtualFile;
|
||||
import com.intellij.util.PlatformIcons;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import org.jetbrains.annotations.NonNls;
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
@@ -278,12 +279,17 @@ public class VirtualFileDiffElement extends DiffElement<VirtualFile> {
|
||||
}
|
||||
|
||||
if (!docsToSave.isEmpty()) {
|
||||
ApplicationManagerEx.getApplicationEx().runEdtSafeAction(new Runnable() {
|
||||
UIUtil.invokeAndWaitIfNeeded(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
for (Document document : docsToSave) {
|
||||
manager.saveDocument(document);
|
||||
}
|
||||
ApplicationManager.getApplication().runWriteAction(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
for (Document document : docsToSave) {
|
||||
manager.saveDocument(document);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
@@ -32,7 +32,7 @@ public interface EditorTextFieldProvider {
|
||||
*
|
||||
* @param language target language used by document that will be displayed by returned editor
|
||||
* @param project target project
|
||||
* @return
|
||||
* @return {@link EditorTextField} with specified customizations applied to its editor.
|
||||
*/
|
||||
@NotNull
|
||||
EditorTextField getEditorField(@NotNull Language language, @NotNull Project project, @NotNull Iterable<EditorCustomization> features);
|
||||
|
||||
+2
-2
@@ -28,10 +28,10 @@ import com.intellij.openapi.vcs.changes.LocalChangeList;
|
||||
import com.intellij.spellchecker.ui.SpellCheckingEditorCustomization;
|
||||
import com.intellij.ui.*;
|
||||
import com.intellij.util.Consumer;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
|
||||
import javax.swing.*;
|
||||
import java.awt.*;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
public abstract class NewEditChangelistPanel extends JPanel {
|
||||
@@ -163,7 +163,7 @@ public abstract class NewEditChangelistPanel extends JPanel {
|
||||
final EditorTextFieldProvider service = ServiceManager.getService(project, EditorTextFieldProvider.class);
|
||||
final EditorTextField editorField;
|
||||
|
||||
final Set<EditorCustomization> editorFeatures = new HashSet<EditorCustomization>();
|
||||
final Set<EditorCustomization> editorFeatures = ContainerUtil.newHashSet();
|
||||
editorFeatures.add(SpellCheckingEditorCustomization.ENABLED);
|
||||
|
||||
if (defaultLines == 1) {
|
||||
|
||||
@@ -155,7 +155,7 @@ public class ExtendedTagInsertHandler extends XmlTagInsertHandler {
|
||||
final PsiElement tag = element.getParent();
|
||||
if (tag instanceof XmlTag) {
|
||||
final String prefix = ((XmlTag)tag).getNamespacePrefix();
|
||||
if (!prefix.equals(namespacePrefix)) {
|
||||
if (!prefix.equals(namespacePrefix) && StringUtil.isNotEmpty(namespacePrefix)) {
|
||||
final String name = namespacePrefix + ":" + ((XmlTag)tag).getLocalName();
|
||||
try {
|
||||
((XmlTag)tag).setName(name);
|
||||
|
||||
@@ -87,7 +87,7 @@ public class AnchorReference implements PsiReference, EmptyResolveMessageProvide
|
||||
attribute = tag.getAttribute("usemap");
|
||||
}
|
||||
|
||||
assert attribute != null;
|
||||
assert attribute != null: tag.getText();
|
||||
return attribute.getValueElement();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user