in src/net/sourceforge/transparent/actions/SynchActivitiesAction.java [78:109]
private static void relocateChangedFiles( Project project, TransparentVcs host )
{
CCaseViewsManager viewsManager = CCaseViewsManager.getInstance( project );
ChangeListManager mgr = ChangeListManager.getInstance( project );
List<VirtualFile> files = mgr.getAffectedFiles();
List<String> files2Analyze = new ArrayList<>();
for( VirtualFile vfile : files )
{
if( mgr.getStatus( vfile ) == FileStatus.MODIFIED && host.fileIsUnderVcs( vfile.getPath() ))
files2Analyze.add( vfile.getPath() );
}
final CCaseChangeProvider changeProvider = (CCaseChangeProvider)host.getChangeProvider();
assert changeProvider != null;
changeProvider.setActivityInfoOnChangedFiles( files2Analyze );
for( VirtualFile vfile : files )
{
if( mgr.getStatus( vfile ) == FileStatus.MODIFIED && host.fileIsUnderVcs( vfile.getPath() ))
{
Change change = mgr.getChange( vfile );
LocalChangeList list = mgr.getChangeList( change );
String hostedActivity = viewsManager.getCheckoutActivityForFile( vfile.getPath() );
if( hostedActivity != null && !hostedActivity.equals( list.getName() ) )
{
mgr.moveChangesTo( mgr.findChangeList( hostedActivity ), new Change[]{ change } );
}
}
}
}