MCPcopy Create free account
hub / github.com/OpenEndedGroup/Field2 / onFileChange

Method onFileChange

src/main/java/field/graphics/Texture.java:93–99  ·  view source on GitHub ↗
(File file)

Source from the content-addressed store, hash-verified

91 FileAlterationObserver o = new FileAlterationObserver(new File(sourceFilename).getParentFile(),
92 new NameFileFilter(name));
93 try {
94 o.initialize();
95 } catch (Exception e) {
96 e.printStackTrace();
97 }
98 o.addListener(new FileAlterationListenerAdaptor() {
99 @Override
100 public void onFileChange(File file) {
101 if (file.getName().equals(name)) {
102 System.out.println(" automatic reload for texture :" + file);

Callers

nothing calls this directly

Calls 4

reloadFromMethod · 0.80
equalsMethod · 0.45
getNameMethod · 0.45
printlnMethod · 0.45

Tested by

no test coverage detected