From cfc5b0082d198c7b2f08c78c3cba3683197707e9 Mon Sep 17 00:00:00 2001 From: Konstantin Bulenkov Date: Fri, 5 Sep 2014 16:30:07 +0400 Subject: [PATCH 1/9] change tree foreground --- .../openapi/options/newEditor/SettingsTreeView.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/options/newEditor/SettingsTreeView.java b/platform/platform-impl/src/com/intellij/openapi/options/newEditor/SettingsTreeView.java index b86282f95309..08da609a21ad 100644 --- a/platform/platform-impl/src/com/intellij/openapi/options/newEditor/SettingsTreeView.java +++ b/platform/platform-impl/src/com/intellij/openapi/options/newEditor/SettingsTreeView.java @@ -56,14 +56,16 @@ import java.awt.event.ComponentAdapter; import java.awt.event.ComponentEvent; import java.awt.event.KeyEvent; import java.awt.event.MouseEvent; -import java.util.*; +import java.util.ArrayDeque; +import java.util.ArrayList; +import java.util.IdentityHashMap; import java.util.List; /** * @author Sergey.Malenkov */ final class SettingsTreeView extends JComponent implements Disposable, OptionsEditorColleague { - private static final Color NORMAL_NODE = new JBColor(Gray._60, Gray._140); + private static final Color NORMAL_NODE = new JBColor(Gray._0, Gray._140); private static final Color WRONG_CONTENT = JBColor.RED; private static final Color MODIFIED_CONTENT = JBColor.BLUE; From fdc1b6e513fde610a274b4a2bfad6ff189ebb4ef Mon Sep 17 00:00:00 2001 From: Anna Kozlova Date: Fri, 5 Sep 2014 21:56:25 +0400 Subject: [PATCH 2/9] use promoter to override default actions in tests view; change view diff shortcut to ctrl-d (IDEA-128272) --- .../src/idea/LangActions.xml | 3 +- .../execution/testframework/TestTreeView.java | 1 - .../testframework/TestTreeViewAction.java | 19 ++++++++++ .../TestTreeViewActionsPromoter.java | 38 +++++++++++++++++++ .../actions/ViewAssertEqualsDiffAction.java | 7 +--- .../NavigateToTestDataAction.java | 3 +- resources/src/META-INF/IdeaPlugin.xml | 1 + 7 files changed, 64 insertions(+), 8 deletions(-) create mode 100644 platform/testRunner/src/com/intellij/execution/testframework/TestTreeViewAction.java create mode 100644 platform/testRunner/src/com/intellij/execution/testframework/TestTreeViewActionsPromoter.java diff --git a/platform/platform-resources/src/idea/LangActions.xml b/platform/platform-resources/src/idea/LangActions.xml index bb05f8276ceb..a9c204b1e6e7 100644 --- a/platform/platform-resources/src/idea/LangActions.xml +++ b/platform/platform-resources/src/idea/LangActions.xml @@ -817,7 +817,8 @@ - + diff --git a/platform/testRunner/src/com/intellij/execution/testframework/TestTreeView.java b/platform/testRunner/src/com/intellij/execution/testframework/TestTreeView.java index 839568b4c2a9..bdbee84e49bd 100644 --- a/platform/testRunner/src/com/intellij/execution/testframework/TestTreeView.java +++ b/platform/testRunner/src/com/intellij/execution/testframework/TestTreeView.java @@ -162,7 +162,6 @@ public abstract class TestTreeView extends Tree implements DataProvider, CopyPro }); TreeUtil.installActions(this); PopupHandler.installPopupHandler(this, IdeActions.GROUP_TESTTREE_POPUP, ActionPlaces.TESTTREE_VIEW_POPUP); - ViewAssertEqualsDiffAction.registerShortcut(this); } @JdkConstants.TreeSelectionMode diff --git a/platform/testRunner/src/com/intellij/execution/testframework/TestTreeViewAction.java b/platform/testRunner/src/com/intellij/execution/testframework/TestTreeViewAction.java new file mode 100644 index 000000000000..8a700d1b5dbd --- /dev/null +++ b/platform/testRunner/src/com/intellij/execution/testframework/TestTreeViewAction.java @@ -0,0 +1,19 @@ +/* + * Copyright 2000-2014 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.execution.testframework; + +public interface TestTreeViewAction { +} diff --git a/platform/testRunner/src/com/intellij/execution/testframework/TestTreeViewActionsPromoter.java b/platform/testRunner/src/com/intellij/execution/testframework/TestTreeViewActionsPromoter.java new file mode 100644 index 000000000000..445c33c682be --- /dev/null +++ b/platform/testRunner/src/com/intellij/execution/testframework/TestTreeViewActionsPromoter.java @@ -0,0 +1,38 @@ +/* + * Copyright 2000-2014 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.execution.testframework; + +import com.intellij.openapi.actionSystem.ActionPromoter; +import com.intellij.openapi.actionSystem.AnAction; +import com.intellij.openapi.actionSystem.DataContext; + +import java.util.Arrays; +import java.util.Collections; +import java.util.List; + +public class TestTreeViewActionsPromoter implements ActionPromoter { + @Override + public List promote(List actions, DataContext context) { + if (AbstractTestProxy.DATA_KEY.getData(context) != null) { + for (AnAction action : actions) { + if (action instanceof TestTreeViewAction) { + return Arrays.asList(action); + } + } + } + return Collections.emptyList(); + } +} diff --git a/platform/testRunner/src/com/intellij/execution/testframework/actions/ViewAssertEqualsDiffAction.java b/platform/testRunner/src/com/intellij/execution/testframework/actions/ViewAssertEqualsDiffAction.java index fd80ea0154db..ab093eb1bb5a 100644 --- a/platform/testRunner/src/com/intellij/execution/testframework/actions/ViewAssertEqualsDiffAction.java +++ b/platform/testRunner/src/com/intellij/execution/testframework/actions/ViewAssertEqualsDiffAction.java @@ -17,12 +17,13 @@ package com.intellij.execution.testframework.actions; import com.intellij.execution.testframework.AbstractTestProxy; +import com.intellij.execution.testframework.TestTreeViewAction; import com.intellij.openapi.actionSystem.*; import org.jetbrains.annotations.NonNls; import javax.swing.*; -public class ViewAssertEqualsDiffAction extends AnAction { +public class ViewAssertEqualsDiffAction extends AnAction implements TestTreeViewAction { @NonNls public static final String ACTION_ID = "openAssertEqualsDiff"; public void actionPerformed(final AnActionEvent e) { @@ -54,8 +55,4 @@ public class ViewAssertEqualsDiffAction extends AnAction { presentation.setEnabled(enabled); presentation.setVisible(enabled); } - - public static void registerShortcut(final JComponent component) { - ActionManager.getInstance().getAction(ACTION_ID).registerCustomShortcutSet(CommonShortcuts.ALT_ENTER, component); - } } diff --git a/plugins/devkit/src/testAssistant/NavigateToTestDataAction.java b/plugins/devkit/src/testAssistant/NavigateToTestDataAction.java index 89e10e019632..2bcebc807d4e 100644 --- a/plugins/devkit/src/testAssistant/NavigateToTestDataAction.java +++ b/plugins/devkit/src/testAssistant/NavigateToTestDataAction.java @@ -19,6 +19,7 @@ import com.intellij.codeInsight.AnnotationUtil; import com.intellij.execution.Location; import com.intellij.execution.junit.JUnitUtil; import com.intellij.execution.junit2.PsiMemberParameterizedLocation; +import com.intellij.execution.testframework.TestTreeViewAction; import com.intellij.notification.Notification; import com.intellij.notification.NotificationType; import com.intellij.notification.Notifications; @@ -45,7 +46,7 @@ import java.util.List; /** * @author yole */ -public class NavigateToTestDataAction extends AnAction { +public class NavigateToTestDataAction extends AnAction implements TestTreeViewAction { @Override public void actionPerformed(AnActionEvent e) { final DataContext dataContext = e.getDataContext(); diff --git a/resources/src/META-INF/IdeaPlugin.xml b/resources/src/META-INF/IdeaPlugin.xml index ca054922776c..6b889d90a370 100644 --- a/resources/src/META-INF/IdeaPlugin.xml +++ b/resources/src/META-INF/IdeaPlugin.xml @@ -1546,6 +1546,7 @@ implementation="com.intellij.codeInsight.ExternalAnnotationsNonProjectFileWritingAccessExtension"/> + From 147200a14f74671134aaa1681cdf0d1ba420f718 Mon Sep 17 00:00:00 2001 From: "Vladimir.Orlov" Date: Fri, 5 Sep 2014 22:41:38 +0400 Subject: [PATCH 3/9] fixed appInfoFile --- python/edu/build/pycharm_edu_build.gant | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/python/edu/build/pycharm_edu_build.gant b/python/edu/build/pycharm_edu_build.gant index 1c7e5189ff71..356df8c7d4c7 100644 --- a/python/edu/build/pycharm_edu_build.gant +++ b/python/edu/build/pycharm_edu_build.gant @@ -167,7 +167,7 @@ public layoutEducational(String classesPath, Set usedJars) { def appInfo = appInfoFile() if (!dryRun) { - wireBuildDate(${buildNumber}, appInfo) + wireBuildDate(buildNumber, appInfo) } Map args = [ From a55c55e3692921030b19313f9ce7eed9f8ebe2c4 Mon Sep 17 00:00:00 2001 From: Vladimir Krivosheev Date: Fri, 5 Sep 2014 21:08:45 +0200 Subject: [PATCH 4/9] restore API (binary) --- .../configurations/RunConfigurationBase.java | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/platform/lang-api/src/com/intellij/execution/configurations/RunConfigurationBase.java b/platform/lang-api/src/com/intellij/execution/configurations/RunConfigurationBase.java index 0fbf78a09d8f..d0a180114587 100644 --- a/platform/lang-api/src/com/intellij/execution/configurations/RunConfigurationBase.java +++ b/platform/lang-api/src/com/intellij/execution/configurations/RunConfigurationBase.java @@ -24,13 +24,13 @@ import com.intellij.openapi.project.Project; import com.intellij.openapi.util.InvalidDataException; import com.intellij.openapi.util.UserDataHolderBase; import com.intellij.openapi.util.WriteExternalException; -import com.intellij.util.SmartList; import org.jdom.Element; import org.jetbrains.annotations.NonNls; import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import javax.swing.*; +import java.util.ArrayList; import java.util.List; /** @@ -44,8 +44,8 @@ public abstract class RunConfigurationBase extends UserDataHolderBase private final Project myProject; private String myName = ""; - private List myLogFiles = new SmartList(); - private List myPredefinedLogFiles = new SmartList(); + private ArrayList myLogFiles = new ArrayList(); + private ArrayList myPredefinedLogFiles = new ArrayList(); @NonNls private static final String LOG_FILE = "log_file"; @NonNls private static final String PREDEFINED_LOG_FILE_ELEMENT = "predefined_log_file"; @@ -127,8 +127,8 @@ public abstract class RunConfigurationBase extends UserDataHolderBase @Override public RunConfiguration clone() { final RunConfigurationBase runConfiguration = (RunConfigurationBase)super.clone(); - runConfiguration.myLogFiles = new SmartList(myLogFiles); - runConfiguration.myPredefinedLogFiles = new SmartList(myPredefinedLogFiles); + runConfiguration.myLogFiles = new ArrayList(myLogFiles); + runConfiguration.myPredefinedLogFiles = new ArrayList(myPredefinedLogFiles); runConfiguration.myFileOutputPath = myFileOutputPath; runConfiguration.mySaveOutput = mySaveOutput; runConfiguration.myShowConsoleOnStdOut = myShowConsoleOnStdOut; @@ -150,13 +150,13 @@ public abstract class RunConfigurationBase extends UserDataHolderBase myPredefinedLogFiles.add(predefinedLogFile); } - public List getPredefinedLogFiles() { + public ArrayList getPredefinedLogFiles() { return myPredefinedLogFiles; } @NotNull - public List getAllLogFiles() { - List list = new SmartList(myLogFiles); + public ArrayList getAllLogFiles() { + ArrayList list = new ArrayList(myLogFiles); for (PredefinedLogFile predefinedLogFile : myPredefinedLogFiles) { final LogFileOptions options = getOptionsForPredefinedLogFile(predefinedLogFile); if (options != null) { @@ -166,7 +166,7 @@ public abstract class RunConfigurationBase extends UserDataHolderBase return list; } - public List getLogFiles() { + public ArrayList getLogFiles() { return myLogFiles; } From 56fe8cc2ae9dce63776ae638d7bc9c2f08a5641f Mon Sep 17 00:00:00 2001 From: "Gregory.Shrago" Date: Fri, 5 Sep 2014 23:21:24 +0400 Subject: [PATCH 5/9] move all presentation logic to update() --- .../actionSystem/ex/CheckboxAction.java | 20 ++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/platform/platform-api/src/com/intellij/openapi/actionSystem/ex/CheckboxAction.java b/platform/platform-api/src/com/intellij/openapi/actionSystem/ex/CheckboxAction.java index 5f179baad831..3e52f26d0b87 100644 --- a/platform/platform-api/src/com/intellij/openapi/actionSystem/ex/CheckboxAction.java +++ b/platform/platform-api/src/com/intellij/openapi/actionSystem/ex/CheckboxAction.java @@ -43,12 +43,8 @@ public abstract class CheckboxAction extends ToggleAction implements CustomCompo public JComponent createCustomComponent(Presentation presentation) { // this component cannot be stored right here because of action system architecture: // one action can be shown on multiple toolbars simultaneously - JCheckBox checkBox = new JCheckBox(presentation.getText()); + JCheckBox checkBox = new JCheckBox(); checkBox.setOpaque(false); - checkBox.setToolTipText(presentation.getDescription()); - checkBox.setMnemonic(presentation.getMnemonic()); - checkBox.setDisplayedMnemonicIndex(presentation.getDisplayedMnemonicIndex()); - checkBox.setSelected(Boolean.TRUE.equals(presentation.getClientProperty(SELECTED_PROPERTY))); checkBox.addActionListener(new ActionListener() { @Override @@ -69,13 +65,19 @@ public abstract class CheckboxAction extends ToggleAction implements CustomCompo @Override public void update(final AnActionEvent e) { super.update(e); - Object property = e.getPresentation().getClientProperty(CUSTOM_COMPONENT_PROPERTY); + Presentation presentation = e.getPresentation(); + Object property = presentation.getClientProperty(CUSTOM_COMPONENT_PROPERTY); if (property instanceof JCheckBox) { JCheckBox checkBox = (JCheckBox)property; - checkBox.setSelected(Boolean.TRUE.equals(e.getPresentation().getClientProperty(SELECTED_PROPERTY))); - checkBox.setEnabled(e.getPresentation().isEnabled()); - checkBox.setVisible(e.getPresentation().isVisible()); + checkBox.setText(presentation.getText()); + checkBox.setToolTipText(presentation.getDescription()); + checkBox.setMnemonic(presentation.getMnemonic()); + checkBox.setDisplayedMnemonicIndex(presentation.getDisplayedMnemonicIndex()); + checkBox.setSelected(Boolean.TRUE.equals(presentation.getClientProperty(SELECTED_PROPERTY))); + + checkBox.setEnabled(presentation.isEnabled()); + checkBox.setVisible(presentation.isVisible()); } } } From ecad0ccd4c792ed611a5e50a2693ae35df7fe69e Mon Sep 17 00:00:00 2001 From: "Gregory.Shrago" Date: Fri, 5 Sep 2014 23:52:53 +0400 Subject: [PATCH 6/9] perform onProjectClosed() on dispose() --- .../vfs/ex/dummy/DummyCachingFileSystem.java | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/platform/platform-impl/src/com/intellij/openapi/vfs/ex/dummy/DummyCachingFileSystem.java b/platform/platform-impl/src/com/intellij/openapi/vfs/ex/dummy/DummyCachingFileSystem.java index 071a260fe68c..3bcd9aeedee9 100644 --- a/platform/platform-impl/src/com/intellij/openapi/vfs/ex/dummy/DummyCachingFileSystem.java +++ b/platform/platform-impl/src/com/intellij/openapi/vfs/ex/dummy/DummyCachingFileSystem.java @@ -15,12 +15,14 @@ */ package com.intellij.openapi.vfs.ex.dummy; +import com.intellij.openapi.Disposable; import com.intellij.openapi.application.Application; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.project.Project; import com.intellij.openapi.project.ProjectManager; import com.intellij.openapi.project.ProjectManagerAdapter; +import com.intellij.openapi.util.Disposer; import com.intellij.openapi.util.text.StringUtil; import com.intellij.openapi.vfs.VirtualFile; import com.intellij.util.containers.BidirectionalMap; @@ -75,11 +77,13 @@ public abstract class DummyCachingFileSystem extends Dumm @Override public void projectOpened(final Project project) { onProjectOpened(project); - } - - @Override - public void projectClosed(final Project project) { - onProjectClosed(project); + // use Disposer instead of projectClosed() because dispose() is called later + Disposer.register(project, new Disposable() { + @Override + public void dispose() { + onProjectClosed(project); + } + }); } }); initProjectMap(); From 1d440903232e0d239cf5146a34958c666ca4946a Mon Sep 17 00:00:00 2001 From: "Gregory.Shrago" Date: Fri, 5 Sep 2014 23:57:51 +0400 Subject: [PATCH 7/9] compilation fix --- .../actions/AbstractRerunFailedTestsAction.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/platform/testRunner/src/com/intellij/execution/testframework/actions/AbstractRerunFailedTestsAction.java b/platform/testRunner/src/com/intellij/execution/testframework/actions/AbstractRerunFailedTestsAction.java index efbfa4175814..a7d036b33ef7 100644 --- a/platform/testRunner/src/com/intellij/execution/testframework/actions/AbstractRerunFailedTestsAction.java +++ b/platform/testRunner/src/com/intellij/execution/testframework/actions/AbstractRerunFailedTestsAction.java @@ -57,6 +57,7 @@ import javax.swing.*; import java.awt.*; import java.awt.event.InputEvent; import java.awt.event.MouseEvent; +import java.util.ArrayList; import java.util.Collections; import java.util.LinkedHashMap; import java.util.List; @@ -311,18 +312,18 @@ public class AbstractRerunFailedTestsAction extends AnAction implements AnAction } @Override - public List getPredefinedLogFiles() { + public ArrayList getPredefinedLogFiles() { return myConfiguration.getPredefinedLogFiles(); } @NotNull @Override - public List getAllLogFiles() { + public ArrayList getAllLogFiles() { return myConfiguration.getAllLogFiles(); } @Override - public List getLogFiles() { + public ArrayList getLogFiles() { return myConfiguration.getLogFiles(); } } From 2415c61d33e707236aacddc711c8e29675e9f176 Mon Sep 17 00:00:00 2001 From: Sergey Ignatov Date: Sat, 6 Sep 2014 00:13:21 +0400 Subject: [PATCH 8/9] live preview: strikeout --- .../find/impl/livePreview/LivePreview.java | 34 +++++++------------ .../livePreview/LivePreviewController.java | 7 ++-- 2 files changed, 18 insertions(+), 23 deletions(-) diff --git a/platform/lang-impl/src/com/intellij/find/impl/livePreview/LivePreview.java b/platform/lang-impl/src/com/intellij/find/impl/livePreview/LivePreview.java index 995a67ecafa1..e104c1664857 100644 --- a/platform/lang-impl/src/com/intellij/find/impl/livePreview/LivePreview.java +++ b/platform/lang-impl/src/com/intellij/find/impl/livePreview/LivePreview.java @@ -24,7 +24,6 @@ import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.editor.Document; import com.intellij.openapi.editor.Editor; import com.intellij.openapi.editor.SelectionModel; -import com.intellij.openapi.editor.colors.CodeInsightColors; import com.intellij.openapi.editor.colors.EditorColors; import com.intellij.openapi.editor.colors.EditorColorsManager; import com.intellij.openapi.editor.event.*; @@ -53,9 +52,7 @@ import java.io.PrintStream; import java.util.*; import java.util.List; -public class LivePreview extends DocumentAdapter implements SearchResults.SearchResultsListener, - SelectionListener { - +public class LivePreview extends DocumentAdapter implements SearchResults.SearchResultsListener, SelectionListener { private static final Key IN_SELECTION_KEY = Key.create("LivePreview.IN_SELECTION_KEY"); private static final Object IN_SELECTION1 = new Object(); private static final Object IN_SELECTION2 = new Object(); @@ -73,6 +70,13 @@ public class LivePreview extends DocumentAdapter implements SearchResults.Search private String myReplacementPreviewText; private static boolean NotFound; + private final Set myHighlighters = new HashSet(); + private RangeHighlighter myCursorHighlighter; + private final List myVisibleAreaListenersToRemove = new ArrayList(); + private Delegate myDelegate; + private final SearchResults mySearchResults; + private Balloon myReplacementBalloon; + @Override public void selectionChanged(SelectionEvent e) { updateInSelectionHighlighters(); @@ -87,27 +91,15 @@ public class LivePreview extends DocumentAdapter implements SearchResults.Search } public interface Delegate { - @Nullable - String getStringToReplace(Editor editor, FindResult findResult); - + String getStringToReplace(@NotNull Editor editor, @Nullable FindResult findResult); } - private final Set myHighlighters = new HashSet(); - - private RangeHighlighter myCursorHighlighter; - private final List myVisibleAreaListenersToRemove = new ArrayList(); - - private static TextAttributes strikout() { - return EditorColorsManager.getInstance().getGlobalScheme().getAttributes(CodeInsightColors.DEPRECATED_ATTRIBUTES).clone(); + private static TextAttributes strikeout() { + Color color = EditorColorsManager.getInstance().getGlobalScheme().getDefaultForeground(); + return new TextAttributes(null, null, color, EffectType.STRIKEOUT, 0); } - private Delegate myDelegate; - - private final SearchResults mySearchResults; - - private Balloon myReplacementBalloon; - @Override public void searchResultsUpdated(SearchResults sr) { final Project project = mySearchResults.getProject(); @@ -323,7 +315,7 @@ public class LivePreview extends DocumentAdapter implements SearchResults.Search attributes.setEffectColor(attributes.getBackgroundColor()); } if (mySearchResults.isExcluded(range)) { - highlightRange(range, strikout(), myHighlighters); + highlightRange(range, strikeout(), myHighlighters); } else { highlightRange(range, attributes, myHighlighters); } diff --git a/platform/lang-impl/src/com/intellij/find/impl/livePreview/LivePreviewController.java b/platform/lang-impl/src/com/intellij/find/impl/livePreview/LivePreviewController.java index 94a6c3f9c1bc..a894781d5cb1 100644 --- a/platform/lang-impl/src/com/intellij/find/impl/livePreview/LivePreviewController.java +++ b/platform/lang-impl/src/com/intellij/find/impl/livePreview/LivePreviewController.java @@ -19,7 +19,9 @@ import com.intellij.find.*; import com.intellij.find.impl.FindResultImpl; import com.intellij.openapi.application.ApplicationManager; import com.intellij.openapi.diagnostic.Logger; -import com.intellij.openapi.editor.*; +import com.intellij.openapi.editor.Editor; +import com.intellij.openapi.editor.RangeMarker; +import com.intellij.openapi.editor.SelectionModel; import com.intellij.openapi.editor.event.DocumentAdapter; import com.intellij.openapi.editor.event.DocumentEvent; import com.intellij.openapi.editor.event.SelectionEvent; @@ -29,6 +31,7 @@ import com.intellij.openapi.util.Pair; import com.intellij.openapi.util.TextRange; import com.intellij.openapi.vfs.ReadonlyStatusHandler; import com.intellij.util.Alarm; +import org.jetbrains.annotations.NotNull; import org.jetbrains.annotations.Nullable; import java.util.ArrayList; @@ -147,7 +150,7 @@ public class LivePreviewController implements LivePreview.Delegate, FindUtil.Rep } @Override - public String getStringToReplace(Editor editor, FindResult findResult) { + public String getStringToReplace(@NotNull Editor editor, @Nullable FindResult findResult) { if (findResult == null) { return null; } From b4b0900028323a9f0df09ff00aca5318c79a39f3 Mon Sep 17 00:00:00 2001 From: Dennis Ushakov Date: Sat, 6 Sep 2014 00:02:36 +0400 Subject: [PATCH 9/9] escape html characters #WEB-8217 fixed --- .../impl/manipulators/XmlAttributeValueManipulator.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/xml/xml-psi-impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlAttributeValueManipulator.java b/xml/xml-psi-impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlAttributeValueManipulator.java index a32b51f5fc3f..92c287e8fdbe 100644 --- a/xml/xml-psi-impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlAttributeValueManipulator.java +++ b/xml/xml-psi-impl/src/com/intellij/psi/impl/source/resolve/reference/impl/manipulators/XmlAttributeValueManipulator.java @@ -30,6 +30,7 @@ import com.intellij.psi.xml.XmlAttributeValue; import com.intellij.psi.xml.XmlTokenType; import com.intellij.util.CharTable; import com.intellij.util.IncorrectOperationException; +import com.intellij.xml.util.XmlUtil; import org.jetbrains.annotations.NotNull; /** @@ -63,7 +64,7 @@ public class XmlAttributeValueManipulator extends AbstractElementManipulator