//if not only Jsp files found, need to redeploy the module, so return false;
if (partJspFiles == null) return false;
else jspFiles.addAll(partJspFiles);
}
for (IModuleResourceDelta deltaModule : jspFiles) {
IModuleFile moduleFile = (IModuleFile) deltaModule
.getModuleResource();
String target;
String relativePath = moduleFile.getModuleRelativePath()
.toOSString();
if (relativePath != null && relativePath.length() != 0) {
target = moduleTargetPath.concat(ch).concat(relativePath)
.concat(ch).concat(moduleFile.getName());
} else
target = moduleTargetPath.concat(ch).concat(
moduleFile.getName());
File file = new File(target);
switch (deltaModule.getKind()) {
case IModuleResourceDelta.REMOVED:
if (file.exists())
file.delete();
break;
case IModuleResourceDelta.ADDED:
case IModuleResourceDelta.CHANGED:
if (!file.exists())
try {
file.createNewFile();
} catch (IOException e) {
Trace.trace(Trace.SEVERE, "can't create file "
+ file, e);
throw new CoreException(new Status(IStatus.ERROR,
Activator.PLUGIN_ID, "can't create file "
+ file, e));
}
String rootFolder = GeronimoUtils.getVirtualComponent(
module).getRootFolder().getProjectRelativePath()
.toOSString();
String sourceFile = module.getProject().getFile(
rootFolder + ch
+ moduleFile.getModuleRelativePath() + ch
+ moduleFile.getName()).getLocation()
.toString();
try {
FileInputStream in = new FileInputStream(sourceFile);
FileOutputStream out = new FileOutputStream(file);