private String computeDefaultConfigurationLocation() { // 1) We store the config state relative to the 'eclipse' directory if possible // 2) If this directory is read-only // we store the state in <user.home>/.eclipse/<application-id>_<version> where <user.home> // is unique for each local user, and <application-id> is the one // defined in .eclipseproduct marker file. If .eclipseproduct does not // exist, use "eclipse" as the application-id. URL installURL = computeInstallConfigurationLocation(); if (installURL != null && "file".equals(installURL.getProtocol())) { //$NON-NLS-1$ File installDir = new File(installURL.getFile()); File defaultConfigDir = new File(installDir, CONFIG_DIR); if (!defaultConfigDir.exists()) defaultConfigDir.mkdirs(); if (defaultConfigDir.exists() && StorageUtil.canWrite(defaultConfigDir)) return defaultConfigDir.getAbsolutePath(); } // We can't write in the eclipse install dir so try for some place in the user's home dir return computeDefaultUserAreaLocation(CONFIG_DIR); }
private String computeDefaultConfigurationLocation() { // 1) We store the config state relative to the 'eclipse' directory if possible // 2) If this directory is read-only // we store the state in <user.home>/.eclipse/<application-id>_<version> where <user.home> // is unique for each local user, and <application-id> is the one // defined in .eclipseproduct marker file. If .eclipseproduct does not // exist, use "eclipse" as the application-id. URL installURL = computeInstallConfigurationLocation(); if (installURL != null && "file".equals(installURL.getProtocol())) { //$NON-NLS-1$ File installDir = new File(installURL.getFile()); File defaultConfigDir = new File(installDir, CONFIG_DIR); if (!defaultConfigDir.exists()) defaultConfigDir.mkdirs(); if (defaultConfigDir.exists() && StorageUtil.canWrite(defaultConfigDir)) return defaultConfigDir.getAbsolutePath(); } // We can't write in the eclipse install dir so try for some place in the user's home dir return computeDefaultUserAreaLocation(CONFIG_DIR); }
private String computeDefaultConfigurationLocation() { // 1) We store the config state relative to the 'eclipse' directory if possible // 2) If this directory is read-only // we store the state in <user.home>/.eclipse/<application-id>_<version> where <user.home> // is unique for each local user, and <application-id> is the one // defined in .eclipseproduct marker file. If .eclipseproduct does not // exist, use "eclipse" as the application-id. URL installURL = computeInstallConfigurationLocation(); if (installURL != null && "file".equals(installURL.getProtocol())) { //$NON-NLS-1$ File installDir = new File(installURL.getPath()); File defaultConfigDir = new File(installDir, CONFIG_DIR); if (!defaultConfigDir.exists()) defaultConfigDir.mkdirs(); if (defaultConfigDir.exists() && StorageUtil.canWrite(defaultConfigDir)) return defaultConfigDir.getAbsolutePath(); } // We can't write in the eclipse install dir so try for some place in the user's home dir return computeDefaultUserAreaLocation(CONFIG_DIR); }
private String computeDefaultConfigurationLocation() { // 1) We store the config state relative to the 'eclipse' directory if possible // 2) If this directory is read-only // we store the state in <user.home>/.eclipse/<application-id>_<version> where <user.home> // is unique for each local user, and <application-id> is the one // defined in .eclipseproduct marker file. If .eclipseproduct does not // exist, use "eclipse" as the application-id. URL installURL = computeInstallConfigurationLocation(); if (installURL != null && "file".equals(installURL.getProtocol())) { //$NON-NLS-1$ File installDir = new File(installURL.getPath()); File defaultConfigDir = new File(installDir, CONFIG_DIR); if (!defaultConfigDir.exists()) defaultConfigDir.mkdirs(); if (defaultConfigDir.exists() && StorageUtil.canWrite(defaultConfigDir)) return defaultConfigDir.getAbsolutePath(); } // We can't write in the eclipse install dir so try for some place in the user's home dir return computeDefaultUserAreaLocation(CONFIG_DIR); }
private String computeDefaultConfigurationLocation() { // 1) We store the config state relative to the 'eclipse' directory if possible // 2) If this directory is read-only // we store the state in <user.home>/.eclipse/<application-id>_<version> where <user.home> // is unique for each local user, and <application-id> is the one // defined in .eclipseproduct marker file. If .eclipseproduct does not // exist, use "eclipse" as the application-id. URL installURL = computeInstallConfigurationLocation(); if (installURL != null && "file".equals(installURL.getProtocol())) { //$NON-NLS-1$ File installDir = new File(installURL.getFile()); File defaultConfigDir = new File(installDir, CONFIG_DIR); if (!defaultConfigDir.exists()) defaultConfigDir.mkdirs(); if (defaultConfigDir.exists() && StorageUtil.canWrite(defaultConfigDir)) return defaultConfigDir.getAbsolutePath(); } // We can't write in the eclipse install dir so try for some place in the user's home dir return computeDefaultUserAreaLocation(CONFIG_DIR); }
private String computeDefaultConfigurationLocation() { // 1) We store the config state relative to the 'eclipse' directory if possible // 2) If this directory is read-only // we store the state in <user.home>/.eclipse/<application-id>_<version> where <user.home> // is unique for each local user, and <application-id> is the one // defined in .eclipseproduct marker file. If .eclipseproduct does not // exist, use "eclipse" as the application-id. URL installURL = computeInstallConfigurationLocation(); if (installURL != null && "file".equals(installURL.getProtocol())) { //$NON-NLS-1$ File installDir = new File(installURL.getFile()); File defaultConfigDir = new File(installDir, CONFIG_DIR); if (!defaultConfigDir.exists()) defaultConfigDir.mkdirs(); if (defaultConfigDir.exists() && StorageUtil.canWrite(defaultConfigDir)) return defaultConfigDir.getAbsolutePath(); } // We can't write in the eclipse install dir so try for some place in the user's home dir return computeDefaultUserAreaLocation(CONFIG_DIR); }