Skip to content

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
Signed-off-by: Shi Chen <[email protected]>
  • Loading branch information
CsCherrYY committed Mar 5, 2021
1 parent 51179dc commit 5d078e9
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -737,8 +737,9 @@ public void testUpdateFormatterVersion() throws Exception {
Bundle bundle = Platform.getBundle(JavaLanguageServerTestPlugin.PLUGIN_ID);
URL testFormatter = bundle.getEntry("/formatter resources/version13.xml");
URL url = FileLocator.resolve(testFormatter);
preferenceManager.getPreferences().setFormatterUrl(url.toExternalForm());
FormatterManager.configureFormatter(preferenceManager, projectsManager);
File file = ResourceUtils.toFile(URIUtil.toURI(url));
preferences.setFormatterUrl(file.getAbsolutePath());
FormatterManager.configureFormatter(preferences);
List<? extends TextEdit> edits = server.formatting(params).get();
assertNotNull(edits);
String newText = TextEditUtil.apply(unit, edits);
Expand Down

0 comments on commit 5d078e9

Please sign in to comment.