some work for loading a workspace
This commit is contained in:
@@ -17,7 +17,7 @@ internal class GitLabRepoWorkspaceFeature : WorkspaceFeature, IPluginFeatureProv
|
||||
Icon = AppGlobals.Symbols.GetSvgImage(AppSymbols.gitlab, SymbolSize.Small);
|
||||
}
|
||||
|
||||
protected override bool OnConfigure(ref IWorkspace workspace)
|
||||
protected override bool OnConfigure(ref IWorkspace? workspace)
|
||||
{
|
||||
var settings = workspace?.Config as GitLabRepoWorkspaceConfig ?? new();
|
||||
|
||||
@@ -25,6 +25,15 @@ internal class GitLabRepoWorkspaceFeature : WorkspaceFeature, IPluginFeatureProv
|
||||
return false;
|
||||
|
||||
workspace = new GitLabRepoWorkspace(settings);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
protected override void OnCreate(out IWorkspace workspace, WorkspaceConfig config)
|
||||
{
|
||||
if (config is not GitLabRepoWorkspaceConfig gitlabConfig)
|
||||
throw new NotImplementedException($"Only configs of type {typeof(GitLabRepoWorkspaceConfig).Name} are allowed.");
|
||||
|
||||
workspace = new GitLabRepoWorkspace(gitlabConfig);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user