Hi Giulio, Use isDerived can judge one file is generated by Maven or not, this will real work in this situation. But tml file in source code and java file in source code are in the same root directory, my search algorithm should find tml file in source code file first, then return. Currently, it found tml in target file first, i will also correct this issue.
2012/4/14 Giulio Micali <giulio.mic...@gmail.com>: > Hi Gavin, > I gave a look at the code compared to my old patch, looks like 2 lines of > code are missing (the dirty ones in my patch): > > ### Eclipse Workspace Patch 1.0 > #P org.apache.tapestrytools.ui > Index: > src/org/eclipse/wst/xml/ui/internal/actions/FindCorrespondingFileAction.java > =================================================================== > --- > src/org/eclipse/wst/xml/ui/internal/actions/FindCorrespondingFileAction.java > (revision 301) > +++ > src/org/eclipse/wst/xml/ui/internal/actions/FindCorrespondingFileAction.java > (working copy) > @@ -114,6 +114,9 @@ > private void travelAllFolder(IResource[] fileList, String fileName) > throws CoreException{ > for(int i=0; i<fileList.length; i++){ > IResource eachFile = fileList[i]; > + boolean isTargetFolder = eachFile.isDerived(); > + if (isTargetFolder) continue; // we should skip non-source > paths > + > if(eachFile.getType() == IResource.FILE && > eachFile.getName().equals(fileName)){ > this.partenerFile = eachFile.getFullPath().toString(); > return ; > > > I'm not sure if "isDerived()" is the right method or if the condition must > be more complicated, but it seems to work for me now. > > > Cheers, > Giulio -- --------------------------------- Best Regards Gavin Lei (雷银) Email: gavingui2...@gmail.com --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org For additional commands, e-mail: users-h...@tapestry.apache.org