Skip to content

Commit

Permalink
Core Editor: Rearrange menu items a bit
Browse files Browse the repository at this point in the history
  • Loading branch information
ShadelessFox committed Apr 8, 2024
1 parent b1a1284 commit 2ae0d26
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,10 +141,7 @@ public EditorComponent(@NotNull MutableValueController<Object> controller, @NotN
this.decoration = new ColoredComponent();

final JComponent component = editor.createComponent();
component.setBorder(BorderFactory.createCompoundBorder(
BorderFactory.createMatteBorder(1, 0, 1, 1, UIManager.getColor("List.selectionInactiveBackground")),
BorderFactory.createMatteBorder(1, 1, 1, 1, UIManager.getColor("List.cellFocusColor"))
));
component.setBorder(BorderFactory.createMatteBorder(1, 1, 1, 1, UIManager.getColor("List.cellFocusColor")));

setBackground(UIManager.getColor("Tree.selectionInactiveBackground"));
setLayout(new BorderLayout());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import static com.shade.decima.ui.menu.MenuConstants.*;

@MenuItemRegistration(parent = CTX_MENU_CORE_EDITOR_ID, name = "Copy Name", keystroke = "ctrl shift C", group = CTX_MENU_CORE_EDITOR_GROUP_GENERAL, order = 4000)
@MenuItemRegistration(parent = CTX_MENU_CORE_EDITOR_ID, name = "Copy Attribute Name", keystroke = "ctrl shift C", group = CTX_MENU_CORE_EDITOR_GROUP_GENERAL, order = 4000)
public class CopyNameItem extends MenuItem {
@Override
public void perform(@NotNull MenuItemContext ctx) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

import static com.shade.decima.ui.menu.MenuConstants.*;

@MenuItemRegistration(parent = CTX_MENU_CORE_EDITOR_ID, name = "Export to JSON\u2026", icon = "Action.exportIcon", group = CTX_MENU_CORE_EDITOR_GROUP_EDIT, order = 4000)
@MenuItemRegistration(parent = CTX_MENU_CORE_EDITOR_ID, name = "Export to JSON\u2026", icon = "Action.exportIcon", group = CTX_MENU_CORE_EDITOR_GROUP_INSPECT, order = 2000)
public class ExportToJsonItem extends MenuItem {
@Override
public void perform(@NotNull MenuItemContext ctx) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

import static com.shade.decima.ui.menu.MenuConstants.*;

@MenuItemRegistration(parent = CTX_MENU_CORE_EDITOR_ID, name = "Inspect Value", icon = "Action.searchIcon", keystroke = "ctrl shift I", group = CTX_MENU_CORE_EDITOR_GROUP_EDIT, order = 3000)
@MenuItemRegistration(parent = CTX_MENU_CORE_EDITOR_ID, name = "Inspect Value", icon = "Action.searchIcon", keystroke = "ctrl shift I", group = CTX_MENU_CORE_EDITOR_GROUP_INSPECT, order = 1000)
public class InspectValueItem extends MenuItem {
@Override
public void perform(@NotNull MenuItemContext ctx) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

import static com.shade.decima.ui.menu.MenuConstants.*;

@MenuItemRegistration(parent = CTX_MENU_CORE_EDITOR_ID, name = "Show &Graph", keystroke = "ctrl alt U", group = CTX_MENU_CORE_EDITOR_GROUP_GENERAL, order = 3000)
@MenuItemRegistration(parent = CTX_MENU_CORE_EDITOR_ID, name = "Show &Graph", keystroke = "ctrl alt U", group = CTX_MENU_CORE_EDITOR_GROUP_INSPECT, order = 3000)
public class ShowGraphItem extends MenuItem {
private static final Logger log = LoggerFactory.getLogger(ShowGraphItem.class);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ public interface MenuConstants {
String CTX_MENU_CORE_EDITOR_ID = PlatformMenuConstants.CTX_MENU_ID + ".coreEditor";
String CTX_MENU_CORE_EDITOR_GROUP_EDIT = "1000," + CTX_MENU_CORE_EDITOR_ID + ".edit";
String CTX_MENU_CORE_EDITOR_GROUP_EDIT_ARRAY = "1500," + CTX_MENU_CORE_EDITOR_ID + ".editArray";
String CTX_MENU_CORE_EDITOR_GROUP_INSPECT = "1700," + CTX_MENU_CORE_EDITOR_ID + ".inspect";
String CTX_MENU_CORE_EDITOR_GROUP_GENERAL = "2000," + CTX_MENU_CORE_EDITOR_ID + ".general";
String CTX_MENU_CORE_EDITOR_GROUP_APPEARANCE = "3000," + CTX_MENU_CORE_EDITOR_ID + ".appearance";

Expand Down

0 comments on commit 2ae0d26

Please sign in to comment.