Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Parameter for dot path #45

Merged
merged 1 commit into from
Mar 21, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/localProcessors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ export class LocalProcessors implements Processor {
}

return [
this.plugin.settings.javaPath, '-jar', '-Djava.awt.headless=true', '"' + jarFullPath + '"', '-charset', 'utf-8'
this.plugin.settings.javaPath, '-jar', '-Djava.awt.headless=true', '"' + jarFullPath + '"', '-charset', 'utf-8', '-graphvizdot', '"' + this.plugin.settings.dotPath + '"'
];
}
}
14 changes: 14 additions & 0 deletions src/settings.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export interface PlantUMLSettings {
debounce: number;
localJar: string;
javaPath: string;
dotPath: string;
defaultProcessor: string;
}

Expand All @@ -16,6 +17,7 @@ export const DEFAULT_SETTINGS: PlantUMLSettings = {
debounce: 3,
localJar: '',
javaPath: 'java',
dotPath: 'dot',
defaultProcessor: "png",
}

Expand Down Expand Up @@ -76,6 +78,18 @@ export class PlantUMLSettingsTab extends PluginSettingTab {
}
)
);

new Setting(containerEl)
.setName("Dot Path")
.setDesc("Path to dot executable")
.addText(text => text.setPlaceholder(DEFAULT_SETTINGS.dotPath)
.setValue(this.plugin.settings.dotPath)
.onChange(async (value) => {
this.plugin.settings.dotPath = value;
await this.plugin.saveSettings();
}
)
);
}

new Setting(containerEl)
Expand Down