Skip to content

Commit

Permalink
config - add method to get known configuration keys
Browse files Browse the repository at this point in the history
  • Loading branch information
bpasero committed Aug 24, 2016
1 parent 8c4bf4a commit 673d75e
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions src/vs/platform/configuration/common/model.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,17 @@ export function flatten(contents: any): any {
}

return root;
}

export function getConfigurationKeys(): string[] {
const keys: string[] = [];

const configurations = Registry.as<IConfigurationRegistry>(Extensions.Configuration).getConfigurations();
configurations.forEach(config => {
if (config.properties) {
keys.push(...Object.keys(config.properties));
}
});

return keys;
}

0 comments on commit 673d75e

Please sign in to comment.