MCPcopy
hub / github.com/Col-E/Recaf / setup

Method setup

src/main/java/me/coley/recaf/control/Controller.java:122–148  ·  view source on GitHub ↗

Setup config and commands. @return true if successful.

()

Source from the content-addressed store, hash-verified

120 * @return {@code true} if successful.
121 */
122 public boolean setup() {
123 // Load config
124 boolean success = true;
125 try {
126 config().initialize();
127 } catch (IOException ex) {
128 error(ex, "Error initializing ConfigManager");
129 success = false;
130 }
131 // Register commands
132 register(LoadWorkspace.class);
133 register(WorkspaceInfo.class);
134 register(Disassemble.class);
135 register(Decompile.class);
136 register(Assemble.class);
137 register(Export.class);
138 register(Search.class);
139 register(Remap.class);
140 register(Help.class);
141 register(Quit.class);
142 register(Wait.class);
143 register(Run.class);
144 // Load command plugins
145 PluginsManager.getInstance().ofType(CommandPlugin.class)
146 .forEach(commandPlugin -> register(commandPlugin.getClass()));
147 return success;
148 }
149
150 /**
151 * Register a command class so it can be invoked by the controller.

Callers 1

runMethod · 0.45

Calls 7

configMethod · 0.95
registerMethod · 0.95
getInstanceMethod · 0.95
initializeMethod · 0.80
ofTypeMethod · 0.80
getClassMethod · 0.80
errorMethod · 0.45

Tested by

no test coverage detected