src/extensions/default/RecentProjects/main.js
function add() {
        var root = FileUtils.stripTrailingSlash(ProjectManager.getProjectRoot().fullPath),
            recentProjects = getRecentProjects(),
            index = recentProjects.indexOf(root);

        if (index !== -1) {
            recentProjects.splice(index, 1);
        }
        recentProjects.unshift(root);
        if (recentProjects.length > MAX_PROJECTS) {
            recentProjects = recentProjects.slice(0, MAX_PROJECTS);
        }
        PreferencesManager.setViewState("recentProjects", recentProjects);
    }
function add() {
        var root = FileUtils.stripTrailingSlash(ProjectManager.getProjectRoot().fullPath),
            recentProjects = getRecentProjects(),
            index = recentProjects.indexOf(root);

        if (index !== -1) {
            recentProjects.splice(index, 1);
        }
        recentProjects.unshift(root);
        if (recentProjects.length > MAX_PROJECTS) {
            recentProjects = recentProjects.slice(0, MAX_PROJECTS);
        }
        PreferencesManager.setViewState("recentProjects", recentProjects);
    }
function add ( ) { var root = FileUtils . stripTrailingSlash ( ProjectManager . getProjectRoot ( ) . fullPath ) , recentProjects = getRecentProjects ( ) , index = recentProjects . indexOf ( root ) ; if ( index !== - 1 ) { recentProjects . splice ( index , 1 ) ; } recentProjects . unshift ( root ) ; if ( recentProjects . length > MAX_PROJECTS ) { recentProjects = recentProjects . slice ( 0 , MAX_PROJECTS ) ; } PreferencesManager . setViewState ( "recentProjects" , recentProjects ) ; }
Add a project to the stored list of recent projects, up to MAX_PROJECTS.
Add a project to the stored list of recent projects up to MAX_PROJECTS .