multiline scope presentation (IDEA-143537)

This commit is contained in:
Anna Kozlova
2018-01-22 11:45:42 +03:00
parent 35933a089b
commit 33ec83966d
2 changed files with 7 additions and 1 deletions
@@ -100,7 +100,7 @@
</component>
</children>
</grid>
<component id="8e71a" class="com.intellij.ui.RawCommandLineEditor" binding="myPatternField">
<component id="8e71a" class="com.intellij.ui.RawCommandLineEditor" binding="myPatternField" custom-create="true">
<constraints>
<grid row="0" column="1" row-span="1" col-span="1" vsize-policy="0" hsize-policy="7" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
</constraints>
@@ -59,6 +59,7 @@ import java.awt.event.ActionListener;
import java.awt.event.FocusEvent;
import java.awt.event.FocusListener;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.concurrent.CompletableFuture;
import java.util.concurrent.Future;
import java.util.concurrent.TimeUnit;
@@ -212,6 +213,11 @@ public class ScopeEditorPanel {
}
}
private void createUIComponents() {
myPatternField = new RawCommandLineEditor(text -> Arrays.asList(text.split("\\|\\|")),
strings -> StringUtil.join(strings, "||"));
}
private static boolean invalidScopeInside(PackageSet currentScope) {
if (currentScope instanceof InvalidPackageSet) return true;
if (currentScope instanceof UnionPackageSet) {