Java Code Examples for com.intellij.ui.ToolbarDecorator#setEditAction()
The following examples show how to use
com.intellij.ui.ToolbarDecorator#setEditAction() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: LatteVariableSettingsForm.java From intellij-latte with MIT License | 5 votes |
@Nullable @Override public JComponent createComponent() { ToolbarDecorator tablePanel = ToolbarDecorator.createDecorator(this.tableView, new ElementProducer<LatteVariableSettings>() { @Override public LatteVariableSettings createElement() { //IdeFocusManager.getInstance(TwigSettingsForm.this.project).requestFocus(TwigNamespaceDialog.getWindows(), true); return null; } @Override public boolean canCreateElement() { return true; } }); tablePanel.setEditAction(anActionButton -> LatteVariableSettingsForm.this.openVariablePathDialog(LatteVariableSettingsForm.this.tableView.getSelectedObject()) ); tablePanel.setAddAction(anActionButton -> LatteVariableSettingsForm.this.openVariablePathDialog(null) ); tablePanel.disableUpAction(); tablePanel.disableDownAction(); this.panelConfigTableView.add(tablePanel.createPanel()); return this.panel1; }
Example 2
Source File: LatteCustomFunctionSettingsForm.java From intellij-latte with MIT License | 5 votes |
@Nullable @Override public JComponent createComponent() { ToolbarDecorator tablePanel = ToolbarDecorator.createDecorator(this.tableView, new ElementProducer<LatteFunctionSettings>() { @Override public LatteFunctionSettings createElement() { //IdeFocusManager.getInstance(TwigSettingsForm.this.project).requestFocus(TwigNamespaceDialog.getWindows(), true); return null; } @Override public boolean canCreateElement() { return true; } }); tablePanel.setEditAction(anActionButton -> LatteCustomFunctionSettingsForm.this.openFunctionDialog(LatteCustomFunctionSettingsForm.this.tableView.getSelectedObject()) ); tablePanel.setAddAction(anActionButton -> LatteCustomFunctionSettingsForm.this.openFunctionDialog(null) ); tablePanel.disableUpAction(); tablePanel.disableDownAction(); this.panelConfigTableView.add(tablePanel.createPanel()); return this.panel1; }
Example 3
Source File: LatteCustomMacroSettingsForm.java From intellij-latte with MIT License | 5 votes |
@Nullable @Override public JComponent createComponent() { ToolbarDecorator tablePanel = ToolbarDecorator.createDecorator(this.tableView, new ElementProducer<LatteTagSettings>() { @Override public LatteTagSettings createElement() { //IdeFocusManager.getInstance(TwigSettingsForm.this.project).requestFocus(TwigNamespaceDialog.getWindows(), true); return null; } @Override public boolean canCreateElement() { return true; } }); tablePanel.setEditAction(anActionButton -> LatteCustomMacroSettingsForm.this.openMacroDialog(LatteCustomMacroSettingsForm.this.tableView.getSelectedObject()) ); tablePanel.setAddAction(anActionButton -> LatteCustomMacroSettingsForm.this.openMacroDialog(null) ); tablePanel.disableUpAction(); tablePanel.disableDownAction(); this.panelConfigTableView.add(tablePanel.createPanel()); return this.panel1; }
Example 4
Source File: LatteCustomModifierSettingsForm.java From intellij-latte with MIT License | 5 votes |
@Nullable @Override public JComponent createComponent() { ToolbarDecorator tablePanel = ToolbarDecorator.createDecorator(this.tableView, new ElementProducer<LatteFilterSettings>() { @Override public LatteFilterSettings createElement() { //IdeFocusManager.getInstance(TwigSettingsForm.this.project).requestFocus(TwigNamespaceDialog.getWindows(), true); return null; } @Override public boolean canCreateElement() { return true; } }); tablePanel.setEditAction(anActionButton -> LatteCustomModifierSettingsForm.this.openModifierDialog(LatteCustomModifierSettingsForm.this.tableView.getSelectedObject()) ); tablePanel.setAddAction(anActionButton -> LatteCustomModifierSettingsForm.this.openModifierDialog(null) ); tablePanel.disableUpAction(); tablePanel.disableDownAction(); this.panelConfigTableView.add(tablePanel.createPanel()); return this.panel1; }
Example 5
Source File: MethodSignatureTypeSettingsForm.java From idea-php-symfony2-plugin with MIT License | 5 votes |
@Nullable @Override public JComponent createComponent() { ToolbarDecorator tablePanel = ToolbarDecorator.createDecorator(this.tableView, new ElementProducer<MethodSignatureSetting>() { @Override public MethodSignatureSetting createElement() { //IdeFocusManager.getInstance(TwigSettingsForm.this.project).requestFocus(TwigNamespaceDialog.getWindows(), true); return null; } @Override public boolean canCreateElement() { return true; } }); tablePanel.setEditAction(anActionButton -> MethodSignatureTypeSettingsForm.this.openTwigPathDialog(MethodSignatureTypeSettingsForm.this.tableView.getSelectedObject()) ); tablePanel.setAddAction(anActionButton -> MethodSignatureTypeSettingsForm.this.openTwigPathDialog(null) ); tablePanel.disableUpAction(); tablePanel.disableDownAction(); this.panelConfigTableView.add(tablePanel.createPanel()); return this.panel1; }
Example 6
Source File: MethodParameterReferenceSettingsForm.java From idea-php-symfony2-plugin with MIT License | 5 votes |
@Nullable @Override public JComponent createComponent() { ToolbarDecorator tablePanel = ToolbarDecorator.createDecorator(this.tableView, new ElementProducer<MethodParameterSetting>() { @Override public MethodParameterSetting createElement() { //IdeFocusManager.getInstance(TwigSettingsForm.this.project).requestFocus(TwigNamespaceDialog.getWindows(), true); return null; } @Override public boolean canCreateElement() { return true; } }); tablePanel.setEditAction(anActionButton -> MethodParameterReferenceSettingsForm.this.openTwigPathDialog(MethodParameterReferenceSettingsForm.this.tableView.getSelectedObject()) ); tablePanel.setAddAction(anActionButton -> MethodParameterReferenceSettingsForm.this.openTwigPathDialog(null) ); tablePanel.disableUpAction(); tablePanel.disableDownAction(); this.panelConfigTableView.add(tablePanel.createPanel()); return this.panel1; }
Example 7
Source File: UseAliasListForm.java From idea-php-annotation-plugin with MIT License | 4 votes |
@Nullable @Override public JComponent createComponent() { ToolbarDecorator tablePanel = ToolbarDecorator.createDecorator(this.tableView, new ElementProducer<UseAliasOption>() { @Override public UseAliasOption createElement() { return null; } @Override public boolean canCreateElement() { return true; } }); tablePanel.setEditAction(anActionButton -> { UseAliasOption useAliasOption = tableView.getSelectedObject(); if(useAliasOption == null) { return; } UseAliasForm.create(panel1, useAliasOption, option -> { tableView.getTableViewModel().fireTableDataChanged(); changed = true; }); }); tablePanel.setAddAction(anActionButton -> UseAliasForm.create(panel1, option -> { tableView.getListTableModel().addRow(option); changed = true; })); tablePanel.setRemoveAction(anActionButton -> { modelList.removeRow(tableView.getSelectedRow()); tableView.getTableViewModel().fireTableDataChanged(); changed = true; }); tablePanel.disableDownAction(); tablePanel.disableUpAction(); this.panel1.add(tablePanel.createPanel()); return this.panel; }