mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
show "XML Zen Coding" item at the bottom of popup
This commit is contained in:
+7
-5
@@ -80,15 +80,17 @@ public class PopupActionChooser {
|
||||
applicable.addSeparator("Live templates");
|
||||
}
|
||||
|
||||
for (CustomLiveTemplate customTemplate : customTemplates) {
|
||||
applicable.add(new WrapWithCustomTemplateAction(customTemplate, editor, file, usedMnemonicsSet));
|
||||
hasEnabledSurrounders = true;
|
||||
}
|
||||
for (TemplateImpl template : templates) {
|
||||
applicable.add(new InvokeTemplateAction(template, editor, project, usedMnemonicsSet));
|
||||
hasEnabledSurrounders = true;
|
||||
}
|
||||
if (!templates.isEmpty()) {
|
||||
|
||||
for (CustomLiveTemplate customTemplate : customTemplates) {
|
||||
applicable.add(new WrapWithCustomTemplateAction(customTemplate, editor, file, usedMnemonicsSet));
|
||||
hasEnabledSurrounders = true;
|
||||
}
|
||||
|
||||
if (!templates.isEmpty() || !customTemplates.isEmpty()) {
|
||||
applicable.addSeparator();
|
||||
applicable.add(new ConfigureTemplatesAction());
|
||||
}
|
||||
|
||||
+5
-3
@@ -54,13 +54,15 @@ public class SurroundWithTemplateHandler implements CodeInsightActionHandler {
|
||||
|
||||
Set<Character> usedMnemonicsSet = new HashSet<Character>();
|
||||
DefaultActionGroup group = new DefaultActionGroup();
|
||||
for (CustomLiveTemplate customTemplate : customTemplates) {
|
||||
group.add(new WrapWithCustomTemplateAction(customTemplate, editor, file, usedMnemonicsSet));
|
||||
}
|
||||
|
||||
for (TemplateImpl template : templates) {
|
||||
group.add(new InvokeTemplateAction(template, editor, project, usedMnemonicsSet));
|
||||
}
|
||||
|
||||
for (CustomLiveTemplate customTemplate : customTemplates) {
|
||||
group.add(new WrapWithCustomTemplateAction(customTemplate, editor, file, usedMnemonicsSet));
|
||||
}
|
||||
|
||||
final ListPopup popup = JBPopupFactory.getInstance()
|
||||
.createActionGroupPopup(CodeInsightBundle.message("templates.select.template.chooser.title"), group,
|
||||
DataManager.getInstance().getDataContext(editor.getContentComponent()),
|
||||
|
||||
Reference in New Issue
Block a user