Skip to content

Commit cf63868

Browse files
authored
Revert "hide formatter setting entries (#632)" (#635)
This reverts commit 57a94ff.
1 parent 585be0f commit cf63868

File tree

2 files changed

+22
-2
lines changed

2 files changed

+22
-2
lines changed

package.json

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@
5050
"onWebviewPanel:java.welcome",
5151
"onCommand:java.classpathConfiguration",
5252
"onWebviewPanel:java.classpathConfiguration",
53-
"onWebviewPanel:java.markdownPreview"
53+
"onWebviewPanel:java.markdownPreview",
54+
"onCommand:java.formatterSettings"
5455
],
5556
"contributes": {
5657
"walkthroughs": [
@@ -193,6 +194,11 @@
193194
"command": "java.extGuide",
194195
"category": "Java",
195196
"title": "Extension Guide"
197+
},
198+
{
199+
"command": "java.formatterSettings",
200+
"category": "Java",
201+
"title": "Open Java Formatter Settings with Preview"
196202
}
197203
],
198204
"configuration": {
@@ -248,7 +254,19 @@
248254
"when": "view == javaProjectExplorer && viewItem =~ /java:project(?=.*?\\b\\+unmanagedFolder\\b)(?=.*?\\b\\+uri\\b)/"
249255
}
250256
]
251-
}
257+
},
258+
"customEditors": [
259+
{
260+
"viewType": "java.formatterSettingsEditor",
261+
"displayName": "Java Formatter Settings Editor",
262+
"selector": [
263+
{
264+
"filenamePattern": "*.xml"
265+
}
266+
],
267+
"priority": "option"
268+
}
269+
]
252270
},
253271
"scripts": {
254272
"vscode:prepublish": "npm run build",

src/commands/index.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { showClasspathConfigurationPage } from "../classpath/classpathConfigurat
1515
import { markdownPreviewProvider } from "../classpath/markdownPreviewProvider";
1616
import { getExpService } from "../exp";
1717
import { TreatmentVariables } from "../exp/TreatmentVariables";
18+
import { javaFormatterSettingsEditorProvider } from "../formatter-settings";
1819

1920
export function initialize(context: vscode.ExtensionContext) {
2021
context.subscriptions.push(vscode.commands.registerCommand("java.overview", instrumentCommand(context, "java.overview", instrumentCommand(context, "java.helper.overview", overviewCmdHandler))));
@@ -31,6 +32,7 @@ export function initialize(context: vscode.ExtensionContext) {
3132
context.subscriptions.push(vscode.commands.registerCommand("java.extGuide", instrumentCommand(context, "java.extGuide", javaExtGuideCmdHandler)));
3233
context.subscriptions.push(instrumentOperationAsVsCodeCommand("java.webview.runCommand", webviewCmdLinkHandler));
3334
context.subscriptions.push(vscode.commands.registerCommand("java.welcome", instrumentCommand(context, "java.welcome", showWelcomeWebview)));
35+
context.subscriptions.push(vscode.commands.registerCommand("java.formatterSettings", instrumentCommand(context, "java.formatterSettings", () => javaFormatterSettingsEditorProvider.showFormatterSettingsEditor())));
3436
context.subscriptions.push(vscode.commands.registerCommand("java.classpathConfiguration", instrumentCommand(context, "java.classpathConfiguration", async () => {
3537
const showCustomizedView: boolean = await getExpService()?.getTreatmentVariableAsync(TreatmentVariables.VSCodeConfig, TreatmentVariables.CustomizedClasspathConfigurationView, true /*checkCache*/) || false;
3638
if (showCustomizedView) {

0 commit comments

Comments
 (0)