Add `name` function to plugin adapter (#463)
Summary: This presents a human-readable name for a plugin. It’s not yet used anywhere. Paired with @decentralion. Test Plan: Flow passes. wchargin-branch: plugin-name
This commit is contained in:
parent
dd063f5203
commit
728a3cdf37
|
@ -7,6 +7,7 @@ export interface Renderer {
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface PluginAdapter {
|
export interface PluginAdapter {
|
||||||
|
name(): string;
|
||||||
graph(): Graph;
|
graph(): Graph;
|
||||||
renderer(): Renderer;
|
renderer(): Renderer;
|
||||||
nodePrefix(): NodeAddressT;
|
nodePrefix(): NodeAddressT;
|
||||||
|
|
|
@ -26,6 +26,9 @@ class PluginAdapter implements IPluginAdapter {
|
||||||
constructor(graph: Graph) {
|
constructor(graph: Graph) {
|
||||||
this._graph = graph;
|
this._graph = graph;
|
||||||
}
|
}
|
||||||
|
name() {
|
||||||
|
return "Git";
|
||||||
|
}
|
||||||
graph() {
|
graph() {
|
||||||
return this._graph;
|
return this._graph;
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,6 +31,9 @@ class PluginAdapter implements IPluginAdapter {
|
||||||
this._view = view;
|
this._view = view;
|
||||||
this._graph = graph;
|
this._graph = graph;
|
||||||
}
|
}
|
||||||
|
name() {
|
||||||
|
return "GitHub";
|
||||||
|
}
|
||||||
graph() {
|
graph() {
|
||||||
return this._graph;
|
return this._graph;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue