Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Compatibility with older AJDT versions

Hi,

since I am migrating a code base from AJDT 1.5.3 to 1.6.3 / 1.6.4 I want
to tell you one small annoyance I found.

With AJDT 1.5.3 the AspectJ Build settings were stored in preference
files. In AJDT, some of this information is now stored in .classpath.

I looked at the code in AspectJCorePreferences and found the following:

private static String[] internalGetProjectPath(IProject project,
IClasspathAttribute attribute, boolean useResolvedPath) {
        if (isAspectPathAttribute(attribute)) {
    		String[] old = getOldProjectAspectPath(project);
    		if (old != null) {
    			AJLog.log("Migrating aspect path settings for
project "+project.getName()); //$NON-NLS-1$
 
setProjectAspectPath(project,old[0],old[1],old[2]);
    			removeOldAspectPathSetting(project);
    		}
        } else { // INPATH_ATTRIBUTE
            String[] old = getOldProjectInPath(project);
            if (old != null) {
                AJLog.log("Migrating inpath settings for project
"+project.getName()); //$NON-NLS-1$
                setProjectInPath(project,old[0],old[1],old[2]);
                removeOldInPathSetting(project);
            }	        
        }


This tells me whenever an old settings file is found it is migrated to
the and the old file is deleted.

Now, I would like to suggest a different algorithm:

1. Look for the new settings. If found, just use them.
2. Otherwise look for old settings an migrate them and delete the old
settings (just like the code does today)

With this additional step it would be possible to keep both the old and
the new settings (I could manually restore the old files) and also keep
the new ones. This would make the migration from AJDT 1.5.x to 1.6.x
much easier because some of the developers could switch to 1.6 and test
the new environment extensively before the complete dev team needs to
migrate. Of course, one would need to update both files in case changes
need to be made to the aspect build settings but this would only be
until all developers have migrated.

Could this be still considered for 1.6.4 final?

Thanks for listening.

Thomas



Back to the top