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

Method setWorkspace

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

@param workspace Workspace to set.

(Workspace workspace)

Source from the content-addressed store, hash-verified

47 * @param workspace Workspace to set.
48 */
49 public void setWorkspace(Workspace workspace) {
50 Collection<WorkspacePlugin> plugins = PluginsManager.getInstance().ofType(WorkspacePlugin.class);
51 Workspace old = this.workspace;
52 if (old != null) {
53 plugins.forEach(plugin -> plugin.onClosed(old));
54 }
55 this.workspace = workspace;
56 Recaf.setCurrentWorkspace(workspace);
57 plugins.forEach(plugin -> plugin.onOpened(workspace));
58 }
59
60 /**
61 * @return Current workspace.

Callers 4

loadInitialWorkspaceMethod · 0.95
setupControllerMethod · 0.45
onStartMethod · 0.45
promptPrimaryMethod · 0.45

Calls 5

getInstanceMethod · 0.95
setCurrentWorkspaceMethod · 0.95
ofTypeMethod · 0.80
onClosedMethod · 0.65
onOpenedMethod · 0.65

Tested by 1

setupControllerMethod · 0.36