Skip to content

Commit

Permalink
fix: use uri for the file path of generated fusion code (#11872) (#11916
Browse files Browse the repository at this point in the history
)

Fixes broken link of file path in the generated Fusion code caused by white space.

Co-authored-by: Haijian Wang <30408303+haijian-vaadin@users.noreply.github.com>
  • Loading branch information
vaadin-bot and haijian-vaadin committed Sep 23, 2021
1 parent cd17bfe commit f8353ed
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -370,7 +370,7 @@ private void parseClass(TypeDeclaration<?> typeDeclaration,
String className = enumDeclaration.getFullyQualifiedName()
.orElse(enumDeclaration.getNameAsString());
qualifiedNameToPath.put(className,
storage.getPath().toString());
storage.getPath().toUri().toString());
});
nonEndpointMap.put(enumDeclaration.resolve().getQualifiedName(),
enumDeclaration);
Expand All @@ -384,7 +384,8 @@ private void parseClass(ClassOrInterfaceDeclaration classDeclaration,
compilationUnit.getStorage().ifPresent(storage -> {
String className = classDeclaration.getFullyQualifiedName()
.orElse(classDeclaration.getNameAsString());
qualifiedNameToPath.put(className, storage.getPath().toString());
qualifiedNameToPath.put(className,
storage.getPath().toUri().toString());
});
if (!GeneratorUtils.hasAnnotation(classDeclaration, compilationUnit,
Endpoint.class)) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ import {Email,Null,NotNull,NotEmpty,NotBlank,AssertTrue,AssertFalse,Negative,Neg
* This module is generated from {{classname}}.
* All changes to this file are overridden. Please consider to make changes in the corresponding Java file if necessary.{{!
}}{{#vendorExtensions.x-vaadin-file-path}}
* @see {@link file://{{vendorExtensions.x-vaadin-file-path}}{{!}}}{{!
* @see {@link {{vendorExtensions.x-vaadin-file-path}}{{!}}}{{!
}}{{/vendorExtensions.x-vaadin-file-path}}
*/
export default class {{{getClassNameFromImports classname ../../imports}}}Model<T extends {{{getClassNameFromImports classname ../../imports}}} = {{{getClassNameFromImports classname ../../imports}}}>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {{~#importAs}} {{importAs}}{{/importAs}}{{~^importAs}} {{className}}{{/im
* This module is generated from {{classname}}.
* All changes to this file are overridden. Please consider to make changes in the corresponding Java file if necessary.{{!
}}{{#vendorExtensions.x-vaadin-file-path}}
* @see {@link file://{{vendorExtensions.x-vaadin-file-path}}{{!}}}{{!
* @see {@link {{vendorExtensions.x-vaadin-file-path}}{{!}}}{{!
}}{{/vendorExtensions.x-vaadin-file-path}}
*/
{{#if vendorExtensions.x-is-enum}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* This module is generated from {{classname}}.java
* All changes to this file are overridden. Please consider to make changes in the corresponding Java file if necessary.{{!
}}{{#vaadinFilePath}}
* @see {@link file://{{vaadinFilePath}}{{!}}}{{/vaadinFilePath}}
* @see {@link {{vaadinFilePath}}{{!}}}{{/vaadinFilePath}}
* @module {{classname}}
*/

Expand Down

0 comments on commit f8353ed

Please sign in to comment.