Skip to content

Commit

Permalink
fix logic for selection of correct XtextResourceSet
Browse files Browse the repository at this point in the history
  • Loading branch information
ernstblechaPT committed Jan 31, 2025
1 parent 62416e1 commit a112451
Showing 1 changed file with 5 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,16 @@ public static void saveBlock(final TypeEntry te, final boolean autoformat, final
.getResourceServiceProvider(SYNTHETIC_URI_GCF);

private static ResourceSet getResourceSet(final TypeEntry te) {
XtextResourceSet resourceSet = null;
XtextResourceSet resourceSet;

if (te.getFile().getFullPath().getFileExtension().equalsIgnoreCase(TypeLibraryTags.FC_TYPE_FILE_ENDING)) {
resourceSet = SERVICE_PROVIDER_FCT.get(XtextResourceSet.class);
}
if (te.getFile().getFullPath().getFileExtension().equalsIgnoreCase(TypeLibraryTags.GLOBAL_CONST_FILE_ENDING)) {
} else if (te.getFile().getFullPath().getFileExtension()
.equalsIgnoreCase(TypeLibraryTags.GLOBAL_CONST_FILE_ENDING)) {
resourceSet = SERVICE_PROVIDER_GCF.get(XtextResourceSet.class);
} else {
resourceSet = SERVICE_PROVIDER_FBT.get(XtextResourceSet.class);
}
resourceSet = SERVICE_PROVIDER_FBT.get(XtextResourceSet.class);

resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put( //
TypeLibraryTags.FB_TYPE_FILE_ENDING.toLowerCase(), //
Expand Down

0 comments on commit a112451

Please sign in to comment.