1 11 package org.eclipse.ui.internal.ide.dialogs; 12 13 import java.io.PrintWriter ; 14 import java.net.URL ; 15 import com.ibm.icu.text.DateFormat; 16 import java.util.Date ; 17 18 import org.eclipse.osgi.util.NLS; 19 import org.eclipse.ui.about.ISystemSummarySection; 20 import org.eclipse.ui.internal.ide.IDEWorkbenchMessages; 21 import org.eclipse.update.configurator.ConfiguratorUtils; 22 import org.eclipse.update.configurator.IPlatformConfiguration; 23 import org.eclipse.update.configurator.IPlatformConfiguration.IFeatureEntry; 24 import org.eclipse.update.configurator.IPlatformConfiguration.ISiteEntry; 25 26 31 public class ConfigurationLogUpdateSection implements ISystemSummarySection { 32 public void write(PrintWriter writer) { 33 34 IPlatformConfiguration platformConf = ConfiguratorUtils.getCurrentPlatformConfiguration(); 35 writer.println(IDEWorkbenchMessages.ConfigurationLogUpdateSection_installConfiguration); 36 writer.println(" " + NLS.bind( IDEWorkbenchMessages.ConfigurationLogUpdateSection_lastChangedOn, DateFormat.getDateInstance().format(new Date (platformConf.getChangeStamp())))); writer.println(" " + NLS.bind( IDEWorkbenchMessages.ConfigurationLogUpdateSection_location, platformConf.getConfigurationLocation())); 39 ISiteEntry[] sites = platformConf.getConfiguredSites(); 40 writer.println(); 41 writer.println(" " + IDEWorkbenchMessages.ConfigurationLogUpdateSection_configurationSites); for(int i = 0; i < sites.length; i++){ 43 writer.println(" " + sites[i].getURL().toExternalForm()); } 45 46 writer.println(); 47 writer.println(" " + IDEWorkbenchMessages.ConfigurationLogUpdateSection_configurationFeatures); IFeatureEntry[] features = platformConf.getConfiguredFeatureEntries(); 49 for(int i = 0; i < features.length; i++){ 50 writer.println(" " + NLS.bind( IDEWorkbenchMessages.ConfigurationLogUpdateSection_featureIdAndVersion, features[i].getFeaturePluginIdentifier(), features[i].getFeaturePluginVersion())); } 52 53 writer.println(); 54 URL [] urls = platformConf.getPluginPath(); 55 writer.println(" " + IDEWorkbenchMessages.ConfigurationLogUpdateSection_plugins); for(int j = 0; j < urls.length; j++){ 57 writer.println(" " + urls[j].toExternalForm()); } 59 } 60 } 61 | Popular Tags |