Skip to content

Commit

Permalink
Fixes #417
Browse files Browse the repository at this point in the history
  • Loading branch information
Riduidel committed Feb 13, 2024
1 parent 4ce8cd4 commit 5cd762b
Showing 1 changed file with 13 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,25 +51,26 @@ private RelationshipFinder createRelationshipDescriptionFinder(Workspace workspa
ModelElementKeys.ConfigProperties.RelationshipNames.NAME,
ModelElementKeys.ConfigProperties.RelationshipNames.VALUE));
Properties returned = new Properties();
if(!propertiesFile.exists()) {
if(propertiesFile.exists()) {
try {
try(InputStream input = new FileInputStream(propertiesFile)) {
returned.load(input);
}
} catch(IOException e) {
logger.log(Level.WARNING,
String.format("Unable to read descriptions.\nworkspace is %s.\nAssociated file is %s" ,
workspace.getName(),
propertiesFile.getAbsolutePath()),
e);
}
} else {
logger.log(Level.FINE,
String.format("If you want to customize descriptions in %s,"
+ " create file %s"
+ "(keys are relationships - INPUT->OUTPUT - values are descriptions",
workspace.getName(),
propertiesFile.getAbsolutePath()));
}
try {
try(InputStream input = new FileInputStream(propertiesFile)) {
returned.load(input);
}
} catch(IOException e) {
logger.log(Level.WARNING,
String.format("Unable to read descriptions.\nworkspace is %s.\nAssociated file is %s" ,
workspace.getName(),
propertiesFile.getAbsolutePath()),
e);
}
return new RelationshipFinder(returned);
}

Expand Down

0 comments on commit 5cd762b

Please sign in to comment.