Update of /cvsroot/spindle/com.iw.plugins.spindle.core/src/com/iw/plugins/spindle/core/scanning
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31372/src/com/iw/plugins/spindle/core/scanning
Modified Files:
SpecificationValidator.java
Log Message:
Index: SpecificationValidator.java
===================================================================
RCS file: /cvsroot/spindle/com.iw.plugins.spindle.core/src/com/iw/plugins/spindle/core/scanning/SpecificationValidator.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** SpecificationValidator.java 13 Nov 2005 02:26:33 -0000 1.18
--- SpecificationValidator.java 22 Nov 2005 18:50:26 -0000 1.19
***************
*** 444,476 ****
.getRelativeLocation(assetPath);
String fileName = relative.getName();
!
! if (relative.getStorage() == null)
{
! IResourceWorkspaceLocation[] I18NEquivalents = getI18NAssetEquivalents(
! relative,
! fileName);
!
! if (I18NEquivalents.length > 0)
{
! int handleI18NPriority = TapestryCore.getDefault().getHandleAssetProblemPriority();
! if (handleI18NPriority >= 0)
{
! addProblem(handleI18NPriority, errorLoc, TapestryCore.getString(
! "scan-component-missing-asset-but-has-i18n",
assetSpecName.startsWith(getDummyStringPrefix()) ? "not specified"
: assetSpecName,
! relative.toString()), true, IProblem.NOT_QUICK_FIXABLE);
! }
! }
! else
! {
! addProblem(IProblem.ERROR, errorLoc, TapestryCore.getString(
! "scan-component-missing-asset",
! assetSpecName.startsWith(getDummyStringPrefix()) ? "not specified"
! : assetSpecName,
! relative.toString()), true, IProblem.COMPONENT_MISSING_ASSET);
}
! return false;
}
--- 444,488 ----
.getRelativeLocation(assetPath);
String fileName = relative.getName();
! try
{
! if (relative.getStorage() == null)
{
! IResourceWorkspaceLocation[] I18NEquivalents = getI18NAssetEquivalents(
! relative,
! fileName);
!
! if (I18NEquivalents.length > 0)
{
! int handleI18NPriority = TapestryCore.getDefault()
! .getHandleAssetProblemPriority();
! if (handleI18NPriority >= 0)
! {
! addProblem(handleI18NPriority, errorLoc, TapestryCore.getString(
! "scan-component-missing-asset-but-has-i18n",
! assetSpecName.startsWith(getDummyStringPrefix()) ? "not specified"
! : assetSpecName,
! relative.toString()), true, IProblem.NOT_QUICK_FIXABLE);
! }
! }
! else
! {
! addProblem(IProblem.ERROR, errorLoc, TapestryCore.getString(
! "scan-component-missing-asset",
assetSpecName.startsWith(getDummyStringPrefix()) ? "not specified"
: assetSpecName,
! relative.toString()), true, IProblem.COMPONENT_MISSING_ASSET);
+ }
+ return false;
}
! }
! catch (RuntimeException e)
! {
! TapestryCore.log(e);
! addProblem(IProblem.ERROR, errorLoc, TapestryCore.getString(
! "scan-component-missing-asset",
! assetSpecName.startsWith(getDummyStringPrefix()) ? "not specified"
! : assetSpecName,
! relative.toString()), true, IProblem.COMPONENT_MISSING_ASSET);
}
***************
*** 606,616 ****
}
! public boolean validateLibraryResourceLocation(IResourceLocation parentSpecLocation, String path,
! String errorKey, ISourceLocation source) throws ScannerException
{
IResourceWorkspaceLocation baseLocation = (IResourceWorkspaceLocation) parentSpecLocation;
!
! IResourceWorkspaceLocation libraryLocation = (IResourceWorkspaceLocation) baseLocation.getRelativeLocation(path);
!
if (libraryLocation.getStorage() == null && path.startsWith("/"))
baseLocation = fClasspathRoot;
--- 618,629 ----
}
! public boolean validateLibraryResourceLocation(IResourceLocation parentSpecLocation,
! String path, String errorKey, ISourceLocation source) throws ScannerException
{
IResourceWorkspaceLocation baseLocation = (IResourceWorkspaceLocation) parentSpecLocation;
!
! IResourceWorkspaceLocation libraryLocation = (IResourceWorkspaceLocation) baseLocation
! .getRelativeLocation(path);
!
if (libraryLocation.getStorage() == null && path.startsWith("/"))
baseLocation = fClasspathRoot;
|