Skip to content
Browse files

fixed reloading of newly added files

  • Loading branch information...
1 parent 16451f1 commit 63f91129091573c41a2e20fc98bd9b07ea4e4d30 @graemerocher graemerocher committed
View
8 grails-core/src/main/groovy/org/codehaus/groovy/grails/compiler/GrailsProjectWatcher.java
@@ -93,14 +93,14 @@ public void run() {
public void onChange(File file) {
LOG.info("File ["+file+"] changed. Applying changes to application.");
compileIfSource(file);
- informPluginManager(file);
+ informPluginManager(file, false);
}
public void onNew(File file) {
LOG.info("File ["+file+"] added. Applying changes to application.");
sleep(5000);
compileIfSource(file);
- informPluginManager(file);
+ informPluginManager(file, true);
}
});
@@ -123,8 +123,8 @@ else if(watchPattern.getDirectory() != null) {
super.run();
}
- private void informPluginManager(final File file) {
- if(!isSourceFile(file)) {
+ private void informPluginManager(final File file, boolean isNew) {
+ if(!isSourceFile(file) || isNew) {
try {
pluginManager.informOfFileChange(file);
} catch (Exception e) {

0 comments on commit 63f9112

Please sign in to comment.
Something went wrong with that request. Please try again.