nl
diff --git a/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/ConfigurationActivator.java b/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/ConfigurationActivator.java
index f74ca7e..fb0df43 100644
--- a/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/ConfigurationActivator.java
+++ b/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/ConfigurationActivator.java
@@ -153,7 +153,7 @@
Utils.debug("Installing bundles..."); //$NON-NLS-1$
ServiceReference reference = context.getServiceReference(StartLevel.class.getName());
int startLevel = 4;
- String defaultStartLevel = System.getProperty("osgi.bundles.defaultStartLevel");
+ String defaultStartLevel = System.getProperty("osgi.bundles.defaultStartLevel"); //$NON-NLS-1$
if (defaultStartLevel != null) {
try {
startLevel = Integer.parseInt(defaultStartLevel);
diff --git a/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/ConfigurationParser.java b/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/ConfigurationParser.java
index 46b72ed..95c2f7d 100644
--- a/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/ConfigurationParser.java
+++ b/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/ConfigurationParser.java
@@ -44,10 +44,10 @@
parserFactory.setNamespaceAware(true);
this.parser = parserFactory.newSAXParser();
} catch (ParserConfigurationException e) {
- Utils.log(Utils.newStatus("ConfigurationParser", e));
+ Utils.log(Utils.newStatus("ConfigurationParser", e)); //$NON-NLS-1$
throw new InvocationTargetException(e);
} catch (SAXException e) {
- Utils.log(Utils.newStatus("ConfigurationParser", e));
+ Utils.log(Utils.newStatus("ConfigurationParser", e)); //$NON-NLS-1$
throw new InvocationTargetException(e);
}
}
@@ -59,7 +59,7 @@
long lastModified = 0;
try {
configURL = url;
- if ("file".equals(url.getProtocol())) {
+ if ("file".equals(url.getProtocol())) { //$NON-NLS-1$
File inputFile = new File(url.getFile());
if (!inputFile.exists() || !inputFile.canRead())
return null;
@@ -70,7 +70,7 @@
parser.parse(new InputSource(input), this);
return config;
} catch (Exception e) {
- Utils.log(Utils.newStatus("ConfigurationParser.parse() error:", e));
+ Utils.log(Utils.newStatus("ConfigurationParser.parse() error:", e)); //$NON-NLS-1$
throw e;
} finally {
if (config != null)
@@ -175,7 +175,7 @@
policyType = i;
String pluginList = attributes.getValue(CFG_LIST);
if (pluginList != null) {
- StringTokenizer st = new StringTokenizer(pluginList,",");
+ StringTokenizer st = new StringTokenizer(pluginList,","); //$NON-NLS-1$
policyList = new String[st.countTokens()];
for (i=0; i<policyList.length; i++)
policyList[i] = st.nextToken();
@@ -195,7 +195,7 @@
}
flag = attributes.getValue(CFG_ENABLED); //$NON-NLS-1$
- if (flag != null && flag.equals("false"))
+ if (flag != null && flag.equals("false")) //$NON-NLS-1$
site.setEnabled(false);
else
site.setEnabled(true);
@@ -234,7 +234,7 @@
// get install locations
String locations = attributes.getValue(CFG_FEATURE_ENTRY_ROOT);
- StringTokenizer st = locations != null ? new StringTokenizer(locations,",") : new StringTokenizer("");
+ StringTokenizer st = locations != null ? new StringTokenizer(locations,",") : new StringTokenizer(""); //$NON-NLS-1$ //$NON-NLS-2$
ArrayList rootList = new ArrayList(st.countTokens());
while (st.hasMoreTokens()){
try{
@@ -284,7 +284,7 @@
config = new Configuration(new Date(time));
} catch (NumberFormatException e1) {
time = new Date().getTime();
- Utils.log(Messages.getString("InstalledSiteParser.date", date));
+ Utils.log(Messages.getString("InstalledSiteParser.date", date)); //$NON-NLS-1$
config = new Configuration(); // constructed with current date
}
}
@@ -302,12 +302,12 @@
}
} catch (Exception e) {
// could not load from shared install
- Utils.log(Utils.newStatus("Could not load from shared install", e));
+ Utils.log(Utils.newStatus(Messages.getString("ConfigurationParser.cannotLoadSharedInstall"), e)); //$NON-NLS-1$
}
String flag = attributes.getValue(CFG_TRANSIENT);
if (flag != null) {
- config.setTransient(flag.equals("true"));
+ config.setTransient(flag.equals("true")); //$NON-NLS-1$
}
// DEBUG:
diff --git a/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/PlatformConfiguration.java b/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/PlatformConfiguration.java
index 69dc5b0..583107c 100644
--- a/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/PlatformConfiguration.java
+++ b/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/PlatformConfiguration.java
@@ -58,8 +58,8 @@
private static final String ECLIPSE = "eclipse"; //$NON-NLS-1$
private static final String CONFIG_HISTORY = "history"; //$NON-NLS-1$
private static final String PLATFORM_XML = "platform.xml"; //$NON-NLS-1$
- private static final String CONFIG_NAME = ConfigurationActivator.NAME_SPACE + "/" + PLATFORM_XML;
- private static final String CONFIG_INI = "config.ini"; //NON-NLS-1$
+ private static final String CONFIG_NAME = ConfigurationActivator.NAME_SPACE + "/" + PLATFORM_XML; //$NON-NLS-1$
+ private static final String CONFIG_INI = "config.ini"; //NON-NLS-1$ //$NON-NLS-1$
private static final String CONFIG_FILE_LOCK_SUFFIX = ".lock"; //$NON-NLS-1$
private static final String CONFIG_FILE_TEMP_SUFFIX = ".tmp"; //$NON-NLS-1$
private static final String LINKS = "links"; //$NON-NLS-1$
@@ -217,7 +217,7 @@
SiteEntry result = config.getSiteEntry(key);
if (result == null) { // retry with decoded URL string
try {
- key = URLDecoder.decode(key, "UTF-8");
+ key = URLDecoder.decode(key, "UTF-8"); //$NON-NLS-1$
} catch (UnsupportedEncodingException e) {
// ignore
}
@@ -254,11 +254,11 @@
for (int i=0; i<sites.length; i++) {
// find out what site contains the feature and configure it
try {
- URL url = new URL(sites[i].getURL(), FEATURES + "/" + entry.getFeatureIdentifier()+ "_" + entry.getFeatureVersion() + "/");
+ URL url = new URL(sites[i].getURL(), FEATURES + "/" + entry.getFeatureIdentifier()+ "_" + entry.getFeatureVersion() + "/"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
if (new File(url.getFile()).exists())
sites[i].addFeatureEntry(entry);
else {
- url = new URL(sites[i].getURL(), FEATURES + "/" + entry.getFeatureIdentifier() + "/");
+ url = new URL(sites[i].getURL(), FEATURES + "/" + entry.getFeatureIdentifier() + "/"); //$NON-NLS-1$ //$NON-NLS-2$
if (new File(url.getFile()).exists())
sites[i].addFeatureEntry(entry);
}
@@ -416,7 +416,7 @@
ISiteEntry[] sites = getConfiguredSites();
for (int i = 0; i < sites.length; i++) {
if (!(sites[i] instanceof SiteEntry)) {
- Utils.debug("Site " + sites[i].getURL() + " is not a SiteEntry");
+ Utils.debug("Site " + sites[i].getURL() + " is not a SiteEntry"); //$NON-NLS-1$ //$NON-NLS-2$
continue;
}
PluginEntry[] plugins = ((SiteEntry)sites[i]).getPluginEntries();
@@ -516,7 +516,7 @@
File cfigFile = new File(url.getFile().replace('/', File.separatorChar));
if (!cfigFile.getName().equals(PLATFORM_XML)) {
if (cfigFile.exists() && cfigFile.isFile()) {
- Utils.log("Either specify the configuration directory or a file named platform.xml, not " + cfigFile.getName());
+ Utils.log(Messages.getString("PlatformConfiguration.expectingPlatformXMLorDirectory") + cfigFile.getName()); //$NON-NLS-1$
cfigFile = cfigFile.getParentFile();
}
cfigFile = new File(cfigFile, CONFIG_NAME);
@@ -538,16 +538,16 @@
if (!backupDir.exists())
backupDir.mkdir();
long timestamp = cfigFile.lastModified();
- File preservedFile = new File(backupDir, String.valueOf(timestamp)+".xml");
+ File preservedFile = new File(backupDir, String.valueOf(timestamp)+".xml"); //$NON-NLS-1$
// If the target file exists, increment the timestamp. Try at most 100 times.
long increment = 1;
while (preservedFile.exists() && increment < 100){
- preservedFile = new File(backupDir, String.valueOf(timestamp+increment++)+".xml");
+ preservedFile = new File(backupDir, String.valueOf(timestamp+increment++)+".xml"); //$NON-NLS-1$
}
if (!preservedFile.exists()) {
// try renaming current config to backup copy
if (!cfigFile.renameTo(preservedFile))
- Utils.log("Cannot backup current configuration");
+ Utils.log(Messages.getString("PlatformConfiguration.cannotBackupConfig")); //$NON-NLS-1$
}
}
@@ -571,7 +571,7 @@
os.close();
os = null;
} catch (IOException e1) {
- Utils.log("Could not close output stream for " + cfigTmp);
+ Utils.log(Messages.getString("PlatformConfiguration.cannotCloseStream") + cfigTmp); //$NON-NLS-1$
Utils.log(e1.getMessage());
}
// set file time stamp to match that of the config element
@@ -588,7 +588,7 @@
try {
os.close();
} catch (IOException e1) {
- Utils.log("Could not close output stream for temp file " + cfigTmp);
+ Utils.log(Messages.getString("PlatformConfiguration.cannotCloseTempFile") + cfigTmp); //$NON-NLS-1$
}
}
@@ -601,7 +601,7 @@
// with "tmp" (latest), then "bak" (the previous). We can also end up
// here if we failed to rename the current config to "bak". In that
// case we will restart with the previous state.
- Utils.log("Could not rename configuration temp file");
+ Utils.log(Messages.getString("PlatformConfiguration.cannotRenameTempFile")); //$NON-NLS-1$
throw new IOException(Messages.getString("cfig.unableToSave", cfigTmp.getAbsolutePath())); //$NON-NLS-1$
}
@@ -616,7 +616,7 @@
copy(configIniURL, configIni);
}
} catch (Exception e) {
- System.out.println(Messages.getString("cfg.unableToCreateConfig.ini"));
+ System.out.println(Messages.getString("cfg.unableToCreateConfig.ini")); //$NON-NLS-1$
}
}
@@ -634,7 +634,7 @@
if (currentPlatformConfiguration == null) {
currentPlatformConfiguration = new PlatformConfiguration(platformConfigLocation);
if (currentPlatformConfiguration.config == null)
- throw new Exception("Cannot load configuration from " + platformConfigLocation.getURL());
+ throw new Exception(Messages.getString("PlatformConfiguration.cannotLoadConfig") + platformConfigLocation.getURL()); //$NON-NLS-1$
if (currentPlatformConfiguration.config.isDirty())
// If this is a transient config (generated by PDE),do nothing
// otherwise, save the configuration with proper date
@@ -699,7 +699,7 @@
}
return;
} catch (Exception ioe) {
- Utils.debug("Creating default configuration from " + configFileURL.toExternalForm());
+ Utils.debug("Creating default configuration from " + configFileURL.toExternalForm()); //$NON-NLS-1$
createDefaultConfiguration(configFileURL);
}
}
@@ -738,7 +738,7 @@
// parse the site directory to discover features
defaultSite.loadFromDisk(0);
} catch (CoreException e1) {
- Utils.log("Cannot load default site " + defaultSite.getResolvedURL());
+ Utils.log(Messages.getString("PlatformConfiguration.cannotLoadDefaultSite") + defaultSite.getResolvedURL()); //$NON-NLS-1$
return;
}
}
@@ -747,7 +747,7 @@
ISitePolicy defaultPolicy = createSitePolicy(DEFAULT_POLICY_TYPE, DEFAULT_POLICY_LIST);
URL siteURL = null;
try {
- siteURL = new URL(PlatformURLHandler.PROTOCOL + PlatformURLHandler.PROTOCOL_SEPARATOR + "/" + "base" + "/"); //$NON-NLS-1$ //$NON-NLS-2$ // try using platform-relative URL
+ siteURL = new URL(PlatformURLHandler.PROTOCOL + PlatformURLHandler.PROTOCOL_SEPARATOR + "/" + "base" + "/"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ // try using platform-relative URL
} catch (MalformedURLException e) {
siteURL = getInstallURL(); // ensure we come up ... use absolute file URL
}
@@ -766,7 +766,7 @@
File lockFile = new File(url.getFile(), ConfigurationActivator.NAME_SPACE+ File.separator+CONFIG_FILE_LOCK_SUFFIX);
verifyPath(url);
try {
- RandomAccessFile raf = new RandomAccessFile(lockFile, "rw");
+ RandomAccessFile raf = new RandomAccessFile(lockFile, "rw"); //$NON-NLS-1$
lock = raf.getChannel().lock();
} catch (IOException ioe) {
lock = null;
@@ -961,8 +961,8 @@
// modify config.ini and platform.xml to only link original files
File configIni = new File(newConfigIniURL.getFile());
Properties props = new Properties();
- props.put("osgi.sharedConfiguration.area", sharedConfigLocation.getURL().toExternalForm());
- props.store(new FileOutputStream(configIni), "Linked configuration");
+ props.put("osgi.sharedConfiguration.area", sharedConfigLocation.getURL().toExternalForm()); //$NON-NLS-1$
+ props.store(new FileOutputStream(configIni), "Linked configuration"); //$NON-NLS-1$
config = new Configuration(new Date());
config.setURL(new URL(newConfigLocation.getURL(), CONFIG_NAME));
@@ -1021,7 +1021,7 @@
try {
config = parser.parse(url);
if (config == null)
- throw new Exception("Platform configuration file cannot be found");
+ throw new Exception(Messages.getString("PlatformConfiguration.cannotFindConfigFile")); //$NON-NLS-1$
} catch (Exception e1) {
// check for save failures, so open temp and backup configurations
originalException = e1;
@@ -1035,13 +1035,13 @@
} catch (Exception e2) {
try {
// check the backup
- if ("file".equals(url.getProtocol())) {
+ if ("file".equals(url.getProtocol())) { //$NON-NLS-1$
File cfigFile = new File(url.getFile().replace('/', File.separatorChar));
File workingDir = cfigFile.getParentFile();
if (workingDir != null && workingDir.exists()) {
File[] backups = workingDir.listFiles(new FileFilter(){
public boolean accept(File pathname) {
- return pathname.isFile() && pathname.getName().endsWith(".xml");
+ return pathname.isFile() && pathname.getName().endsWith(".xml"); //$NON-NLS-1$
}});
if (backups != null && backups.length > 0) {
URL backupUrl = backups[backups.length-1].toURL();
@@ -1131,19 +1131,19 @@
Document doc = docBuilder.newDocument();
if (config == null)
- throw Utils.newCoreException("Configuration cannot be saved because it does not exist",null);
+ throw Utils.newCoreException(Messages.getString("PlatformConfiguration.cannotSaveNonExistingConfig"),null); //$NON-NLS-1$
config.setDate(new Date());
- doc.appendChild(doc.createComment("Created on " + config.getDate().toString()));
+ doc.appendChild(doc.createComment("Created on " + config.getDate().toString())); //$NON-NLS-1$
Element configElement = config.toXML(doc);
doc.appendChild(configElement);
// Write out to a file
Transformer transformer=transformerFactory.newTransformer();
- transformer.setOutputProperty(OutputKeys.METHOD, "xml");
- transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
- transformer.setOutputProperty(OutputKeys.INDENT, "yes");
+ transformer.setOutputProperty(OutputKeys.METHOD, "xml"); //$NON-NLS-1$
+ transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8"); //$NON-NLS-1$
+ transformer.setOutputProperty(OutputKeys.INDENT, "yes"); //$NON-NLS-1$
DOMSource source = new DOMSource(doc);
result = new StreamResult(stream);
@@ -1151,7 +1151,7 @@
//will close the stream in the caller
//stream.close();
} catch (Exception e) {
- throw Utils.newCoreException("", e);
+ throw Utils.newCoreException("", e); //$NON-NLS-1$
} finally {
result.setOutputStream(null);
result = null;
diff --git a/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/SiteEntry.java b/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/SiteEntry.java
index 4221977..57553f8 100644
--- a/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/SiteEntry.java
+++ b/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/SiteEntry.java
@@ -47,7 +47,7 @@
public SiteEntry(URL url, ISitePolicy policy) {
if (url == null)
try {
- url = new URL(PlatformURLHandler.PROTOCOL + PlatformURLHandler.PROTOCOL_SEPARATOR + "/" + "base" + "/"); //$NON-NLS-1$ //$NON-NLS-2$ // try using platform-relative URL
+ url = new URL(PlatformURLHandler.PROTOCOL + PlatformURLHandler.PROTOCOL_SEPARATOR + "/" + "base" + "/"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ // try using platform-relative URL
} catch (MalformedURLException e) {
url = PlatformConfiguration.getInstallURL(); // ensure we come up ... use absolute file URL
}
@@ -55,7 +55,7 @@
if (policy == null)
policy = new SitePolicy(DEFAULT_POLICY_TYPE, DEFAULT_POLICY_LIST);
- if (url.getProtocol().equals("file")) {
+ if (url.getProtocol().equals("file")) { //$NON-NLS-1$
try {
// TODO remove this when platform fixes local file url's
this.url = new File(url.getFile()).toURL();
@@ -229,7 +229,7 @@
public boolean accept(File f) {
boolean valid = f.isDirectory() && (new File(f,FEATURE_XML).exists());
if (!valid)
- System.out.println("Unable to find feature.xml in directory:" + f.getAbsolutePath());
+ Utils.log(Messages.getString("SiteEntry.cannotFindFeatureInDir", f.getAbsolutePath())); //$NON-NLS-1$
return valid;
}
});
@@ -276,7 +276,7 @@
for (int i = 0; i < files.length; i++) {
if(files[i].isDirectory()){
detectUnpackedPlugin(files[i], compareTimeStamps);
- }else if(files[i].getName().endsWith(".jar")){
+ }else if(files[i].getName().endsWith(".jar")){ //$NON-NLS-1$
detectPackedPlugin(files[i], compareTimeStamps);
}else{
// not bundle file
@@ -300,7 +300,7 @@
ZipFile z = null;
InputStream bundleManifestIn = null;
InputStream pluginManifestIn = null;
- String pluginURL = PLUGINS + "/" + file.getName();
+ String pluginURL = PLUGINS + "/" + file.getName(); //$NON-NLS-1$
try {
// First, check if has valid bundle manifest
z = new ZipFile(file);
@@ -325,11 +325,11 @@
addPluginEntry(entry1);
}
} catch (IOException e5) {
- String pluginFileString2 = pluginURL + "!" + entryName;
- Utils.log(Messages.getString("InstalledSiteParser.ErrorAccessing",
+ String pluginFileString2 = pluginURL + "!" + entryName; //$NON-NLS-1$
+ Utils.log(Messages.getString("InstalledSiteParser.ErrorAccessing", //$NON-NLS-1$
pluginFileString2)); //$NON-NLS-1$
} catch (SAXException e3) {
- String pluginFileString1 = pluginURL + "!" + entryName;
+ String pluginFileString1 = pluginURL + "!" + entryName; //$NON-NLS-1$
Utils.log(Messages.getString(
"InstalledSiteParser.ErrorParsingFile", pluginFileString1)); //$NON-NLS-1$
} finally {
@@ -399,7 +399,7 @@
Utils.log(Utils.newStatus(Messages.getString(
"InstalledSiteParser.ErrorParsingFile", pluginFileString), e));//$NON-NLS-1$
else
- Utils.log(Messages.getString("InstalledSiteParser.ErrorAccessing",
+ Utils.log(Messages.getString("InstalledSiteParser.ErrorAccessing", //$NON-NLS-1$
pluginFileString)); //$NON-NLS-1$
} catch (SAXException e) {
String pluginFileString = pluginFile.getAbsolutePath();
@@ -468,7 +468,7 @@
return pluginsChangeStamp;
if (!PlatformConfiguration.supportsDetection(resolvedURL)) {
- Utils.log(Messages.getString("SiteEntry.computePluginStamp", resolvedURL.toExternalForm()));
+ Utils.log(Messages.getString("SiteEntry.computePluginStamp", resolvedURL.toExternalForm())); //$NON-NLS-1$
return 0;
}
long start = 0;
@@ -478,7 +478,7 @@
File root = new File(resolvedURL.getFile().replace('/', File.separatorChar));
File pluginsDir = new File(root, PLUGINS);
if (!pluginsDir.exists() || !pluginsDir.isDirectory()) {
- Utils.log(Messages.getString("SiteEntry.pluginsDir", pluginsDir.getAbsolutePath()));
+ Utils.log(Messages.getString("SiteEntry.pluginsDir", pluginsDir.getAbsolutePath())); //$NON-NLS-1$
return 0;
}
@@ -492,9 +492,9 @@
ArrayList detectedPlugins = new ArrayList(files.length);
for (int i = 0; i < files.length; i++) {
if(files[i].isDirectory())
- detectedPlugins.add(PLUGINS + "/" + files[i].getName() + "/");
- else if(files[i].getName().endsWith(".jar"))
- detectedPlugins.add(PLUGINS + "/" + files[i].getName());
+ detectedPlugins.add(PLUGINS + "/" + files[i].getName() + "/"); //$NON-NLS-1$ //$NON-NLS-2$
+ else if(files[i].getName().endsWith(".jar")) //$NON-NLS-1$
+ detectedPlugins.add(PLUGINS + "/" + files[i].getName()); //$NON-NLS-1$
}
String[] excludedPlugins = policy.getList();
@@ -589,7 +589,7 @@
// log error if same feature version/id but a different url
if (feature instanceof FeatureEntry && existing instanceof FeatureEntry &&
!((FeatureEntry)feature).getURL().equals(((FeatureEntry)existing).getURL()))
- Utils.log("Duplicate feature found on site "+getURL() + " : " + existing.getFeatureIdentifier());
+ Utils.log(Messages.getString("SiteEntry.duplicateFeature",getURL().toExternalForm(), existing.getFeatureIdentifier())); //$NON-NLS-1$ //$NON-NLS-2$
}
} else {
featureEntries.put(feature.getFeatureIdentifier(), feature);
@@ -640,8 +640,8 @@
if (getURL().toString() != null)
siteElement.setAttribute(CFG_URL, getURL().toString());
- siteElement.setAttribute(CFG_ENABLED, isEnabled() ? "true" : "false");
- siteElement.setAttribute(CFG_UPDATEABLE, isUpdateable() ? "true" : "false");
+ siteElement.setAttribute(CFG_ENABLED, isEnabled() ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$
+ siteElement.setAttribute(CFG_UPDATEABLE, isUpdateable() ? "true" : "false"); //$NON-NLS-1$ //$NON-NLS-2$
if (isExternallyLinkedSite())
siteElement.setAttribute(CFG_LINK_FILE, getLinkFileName().trim().replace(File.separatorChar, '/'));
diff --git a/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/branding/IniFileReader.java b/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/branding/IniFileReader.java
index d4d6fe0..7f2f1e0 100644
--- a/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/branding/IniFileReader.java
+++ b/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/branding/IniFileReader.java
@@ -27,7 +27,7 @@
* properties file - format being "n = some text", where n is a number.
*/
public class IniFileReader {
- private static final String PID = "org.eclipse.update.configurator";
+ private static final String PID = "org.eclipse.update.configurator"; //$NON-NLS-1$
private static final Status OK_STATUS = new Status(IStatus.OK, PID, 0, "", null); //$NON-NLS-1$
private static final String KEY_PREFIX = "%"; //$NON-NLS-1$
private static final String KEY_DOUBLE_PREFIX = "%%"; //$NON-NLS-1$
@@ -81,7 +81,7 @@
bundle = Platform.getBundle(pluginId);
if (bundle == null || bundle.getState() == Bundle.UNINSTALLED || bundle.getState() == Bundle.INSTALLED) {
bundle = null; // make it null for other test down the road
- String message = Messages.getString("IniFileReader.MissingDesc", featureId);
+ String message = Messages.getString("IniFileReader.MissingDesc", featureId); //$NON-NLS-1$
return new Status(IStatus.ERROR, PID, 0, message, null);
}
@@ -96,7 +96,7 @@
ioe = e;
}
if (iniURL == null) {
- String message = Messages.getString("IniFileReader.OpenINIError", iniFilename);
+ String message = Messages.getString("IniFileReader.OpenINIError", iniFilename); //$NON-NLS-1$
return new Status(IStatus.ERROR, PID, 0, message, ioe);
}
diff --git a/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/messages.properties b/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/messages.properties
index f370074..4518b39 100644
--- a/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/messages.properties
+++ b/update/org.eclipse.update.configurator/src/org/eclipse/update/internal/configurator/messages.properties
@@ -60,6 +60,7 @@
ConfigurationActivator.initialize=Cannot initialize the Update Configurator
ConfigurationActivator.createConfig=Cannot create configuration in {0}
ConfigurationActivator.uninstallBundle=Could not uninstall unused bundle {0}
+ConfigurationParser.cannotLoadSharedInstall=Could not load from shared install
ConfigurationActivator.installBundle=Could not install bundle {0}
PluginEntry.versionError=Unable to create versioned identifier: {0} {1}
@@ -72,4 +73,17 @@
IniFileReader.ReadMapError = Error reading mapping files {0}
SiteEntry.computePluginStamp = Cannot compute plugins change stamp for site {0} because it does not support plugin detection.
-SiteEntry.pluginsDir = {0} is not a valid plugins directory.
\ No newline at end of file
+SiteEntry.cannotFindFeatureInDir=Unable to find feature.xml in directory: {0}
+SiteEntry.duplicateFeature=Duplicate feature found on site {0} : {1}
+SiteEntry.pluginsDir = {0} is not a valid plugins directory.
+PlatformConfiguration.expectingPlatformXMLorDirectory=Either specify the configuration directory or a file named platform.xml, not
+PlatformConfiguration.cannotBackupConfig=Cannot backup current configuration
+PlatformConfiguration.cannotCloseStream=Could not close output stream for
+PlatformConfiguration.cannotCloseTempFile=Could not close output stream for temp file
+PlatformConfiguration.cannotRenameTempFile=Could not rename configuration temp file
+PlatformConfiguration.cannotLoadConfig=Cannot load configuration from
+PlatformConfiguration.cannotLoadDefaultSite=Cannot load default site
+PlatformConfiguration.cannotFindConfigFile=Platform configuration file cannot be found
+PlatformConfiguration.cannotSaveNonExistingConfig=Configuration cannot be saved because it does not exist
+HttpResponse.rangeExpected=Server returned full content instead of a range.
+HttpResponse.wrongRange=Server returned wrong range
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/configuration/LocalSystemInfo.java b/update/org.eclipse.update.core/src/org/eclipse/update/configuration/LocalSystemInfo.java
index 7066318..f716d9b 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/configuration/LocalSystemInfo.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/configuration/LocalSystemInfo.java
@@ -279,7 +279,7 @@
vol[i].markReadOnly();
}
} else {
- UpdateCore.warn("Unable to find mount points");
+ UpdateCore.warn("Unable to find mount points"); //$NON-NLS-1$
// fallback
File [] roots = File.listRoots();
if (roots.length == 1) {
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/core/ContentReference.java b/update/org.eclipse.update.core/src/org/eclipse/update/core/ContentReference.java
index 742eb4a..78a39fc 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/core/ContentReference.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/core/ContentReference.java
@@ -156,7 +156,7 @@
* @since 2.0
*/
InputStream getPartialInputStream(long offset) throws IOException {
- if (url != null && "http".equals(url.getProtocol())) {
+ if (url != null && "http".equals(url.getProtocol())) { //$NON-NLS-1$
URL resolvedURL = URLEncoder.encode(url);
response = UpdateCore.getPlugin().get(resolvedURL);
if(response instanceof HttpResponse)
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/core/Feature.java b/update/org.eclipse.update.core/src/org/eclipse/update/core/Feature.java
index 4897b1f..c4114a3 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/core/Feature.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/core/Feature.java
@@ -97,7 +97,7 @@
return versionId;
} catch (Exception e) {
UpdateCore.warn(
- "Unable to create versioned identifier:" + id + ":" + ver);
+ "Unable to create versioned identifier:" + id + ":" + ver); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -126,7 +126,7 @@
try {
contentProvider = getFeatureContentProvider();
} catch (CoreException e) {
- UpdateCore.warn("No content Provider", e);
+ UpdateCore.warn("No content Provider", e); //$NON-NLS-1$
}
return (contentProvider != null) ? contentProvider.getURL() : null;
}
@@ -256,7 +256,7 @@
throws InstallAbortedException, CoreException {
//DEBUG
- debug("Installing...:" + getURL().toExternalForm());
+ debug("Installing...:" + getURL().toExternalForm()); //$NON-NLS-1$
ErrorRecoveryLog recoveryLog = ErrorRecoveryLog.getLog();
// make sure we have an InstallMonitor
@@ -295,7 +295,7 @@
IPluginEntry[] sourceFeaturePluginEntries = getPluginEntries();
ISite targetSite = targetFeature.getSite();
if (targetSite == null) {
- debug("The site to install in is null");
+ debug("The site to install in is null"); //$NON-NLS-1$
targetSitePluginEntries = new IPluginEntry[0];
} else {
targetSitePluginEntries = targetSite.getPluginEntries();
@@ -326,7 +326,7 @@
+ nonPluginsToInstall.length
+ 1
+ 5 * children.length;
- monitor.beginTask("", taskCount);
+ monitor.beginTask("", taskCount); //$NON-NLS-1$
SubProgressMonitor subMonitor = null;
// start log
@@ -421,12 +421,12 @@
monitor);
}
- String msg = "";
+ String msg = ""; //$NON-NLS-1$
subMonitor = new SubProgressMonitor(monitor, 1);
VersionedIdentifier pluginVerId =
pluginsToInstall[i].getVersionedIdentifier();
String pluginID =
- (pluginVerId == null) ? "" : pluginVerId.getIdentifier();
+ (pluginVerId == null) ? "" : pluginVerId.getIdentifier(); //$NON-NLS-1$
msg = Policy.bind("Feature.TaskInstallPluginFiles", pluginID); //$NON-NLS-1$
for (int j = 0; j < references.length; j++) {
@@ -450,14 +450,14 @@
//Install feature files
references = provider.getFeatureEntryContentReferences(monitor);
- String msg = "";
+ String msg = ""; //$NON-NLS-1$
subMonitor = new SubProgressMonitor(monitor, 1);
msg = Policy.bind("Feature.TaskInstallFeatureFiles"); //$NON-NLS-1$
for (int i = 0; i < references.length; i++) {
setMonitorTaskName(
subMonitor,
- msg + " " + references[i].getIdentifier());
+ msg + " " + references[i].getIdentifier()); //$NON-NLS-1$
consumer.store(references[i], subMonitor);
}
InstallRegistry.registerFeature(this);
@@ -511,13 +511,13 @@
// and an error occured during abort
if (originalException != null) {
throw Utilities.newCoreException(
- Policy.bind("InstallHandler.error", this.getLabel()),
+ Policy.bind("InstallHandler.error", this.getLabel()), //$NON-NLS-1$
originalException);
}
if (newException != null)
throw Utilities.newCoreException(
- Policy.bind("InstallHandler.error", this.getLabel()),
+ Policy.bind("InstallHandler.error", this.getLabel()), //$NON-NLS-1$
newException);
if (abortedException != null) {
@@ -743,7 +743,7 @@
public void setSite(ISite site) throws CoreException {
if (this.site != null) {
String featureURLString =
- (getURL() != null) ? getURL().toExternalForm() : "";
+ (getURL() != null) ? getURL().toExternalForm() : ""; //$NON-NLS-1$
throw Utilities.newCoreException(
Policy.bind("Feature.SiteAlreadySet", featureURLString), //$NON-NLS-1$
null);
@@ -779,8 +779,8 @@
"Feature.FeatureVersionToString", //$NON-NLS-1$
URLString,
getVersionedIdentifier().toString());
- String label = getLabel() == null ? "" : getLabel();
- return verString + " [" + label + "]";
+ String label = getLabel() == null ? "" : getLabel(); //$NON-NLS-1$
+ return verString + " [" + label + "]"; //$NON-NLS-1$ //$NON-NLS-2$
}
/*
@@ -831,7 +831,7 @@
// too long to compute if not a file system
// other solution would be to parse feature.xml
// when parsing file system to create archive features/FeatureId_Ver.jar
- if ("file".equals(site.getURL().getProtocol())) {
+ if ("file".equals(site.getURL().getProtocol())) { //$NON-NLS-1$
// check if declared on the Site
if (refs != null) {
for (int ref = 0; ref < refs.length; ref++) {
@@ -865,7 +865,7 @@
newRef.setType(((FeatureReference) parentRef).getType());
}
String featureID =
- Site.DEFAULT_FEATURE_PATH + identifier.toString() + ".jar";
+ Site.DEFAULT_FEATURE_PATH + identifier.toString() + ".jar"; //$NON-NLS-1$
URL featureURL =
getSite().getSiteContentProvider().getArchiveReference(featureID);
newRef.setURL(featureURL);
@@ -878,7 +878,7 @@
} catch (Exception e) {
throw Utilities.newCoreException(
Policy.bind(
- "Feature.UnableToInitializeFeatureReference",
+ "Feature.UnableToInitializeFeatureReference", //$NON-NLS-1$
identifier.toString()),
e);
}
@@ -974,9 +974,9 @@
}
UpdateCore.warn(
- "ValidateAlreadyInstalled:Feature "
+ "ValidateAlreadyInstalled:Feature " //$NON-NLS-1$
+ this
- + " not found on site:"
+ + " not found on site:" //$NON-NLS-1$
+ this.getURL());
return null;
}
@@ -992,7 +992,7 @@
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_CONFIGURATION)
UpdateCore.debug(
- "Re initialize feature reference:" + referenceToReinitialize);
+ "Re initialize feature reference:" + referenceToReinitialize); //$NON-NLS-1$
IFeature feature = null;
try {
@@ -1008,7 +1008,7 @@
URL url = site.getURL();
if (url == null)
return;
- if ("file".equals(url.getProtocol())) {
+ if ("file".equals(url.getProtocol())) { //$NON-NLS-1$
IFeatureReference[] included =
feature.getIncludedFeatureReferences();
for (int i = 0; i < included.length; i++) {
@@ -1016,7 +1016,7 @@
}
}
} catch (CoreException e) {
- UpdateCore.warn("", e);
+ UpdateCore.warn("", e); //$NON-NLS-1$
}
}
@@ -1045,7 +1045,7 @@
else {
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_WARNINGS) {
UpdateCore.warn(
- "Filtered out feature reference:" + included);
+ "Filtered out feature reference:" + included); //$NON-NLS-1$
}
}
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/core/FeatureReference.java b/update/org.eclipse.update.core/src/org/eclipse/update/core/FeatureReference.java
index 3a51826..dba2ac8 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/core/FeatureReference.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/core/FeatureReference.java
@@ -54,7 +54,7 @@
try {
setURL(ref.getURL());
} catch (CoreException e) {
- UpdateCore.warn("", e);
+ UpdateCore.warn("", e); //$NON-NLS-1$
}
}
@@ -67,7 +67,7 @@
try {
setURL(ref.getURL());
} catch (CoreException e) {
- UpdateCore.warn("", e);
+ UpdateCore.warn("", e); //$NON-NLS-1$
}
}
@@ -179,7 +179,7 @@
versionId = new VersionedIdentifier(id, ver);
return versionId;
} catch (Exception e) {
- UpdateCore.warn("Unable to create versioned identifier:" + id + ":" + ver);
+ UpdateCore.warn("Unable to create versioned identifier:" + id + ":" + ver); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -188,7 +188,7 @@
try {
versionId = getFeature(null).getVersionedIdentifier();
} catch (CoreException e) {
- UpdateCore.warn("", e);
+ UpdateCore.warn("", e); //$NON-NLS-1$
}
return versionId;
}
@@ -282,7 +282,7 @@
} catch (CoreException e) {
return false;
}
- return "true".equalsIgnoreCase(super.getPatch());
+ return "true".equalsIgnoreCase(super.getPatch()); //$NON-NLS-1$
}
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/core/Import.java b/update/org.eclipse.update.core/src/org/eclipse/update/core/Import.java
index d5502df..c6fa357 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/core/Import.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/core/Import.java
@@ -47,12 +47,12 @@
versionId = new VersionedIdentifier(id, ver);
return versionId;
} catch (Exception e) {
- UpdateCore.warn("Unable to create versioned identifier:" + id + ":" + ver);
+ UpdateCore.warn("Unable to create versioned identifier:" + id + ":" + ver); //$NON-NLS-1$ //$NON-NLS-2$
}
}
- versionId = new VersionedIdentifier("",null);
+ versionId = new VersionedIdentifier("",null); //$NON-NLS-1$
return versionId;
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/core/JarContentReference.java b/update/org.eclipse.update.core/src/org/eclipse/update/core/JarContentReference.java
index 485dc64..3a0865f 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/core/JarContentReference.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/core/JarContentReference.java
@@ -134,9 +134,9 @@
if (this.jarFile == null) {
File file = asFile();
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_INSTALL)
- UpdateCore.debug("asJarFile :" + file);
+ UpdateCore.debug("asJarFile :" + file); //$NON-NLS-1$
if (file != null && !file.exists()) {
- UpdateCore.warn("JarFile does not exits:" + file);
+ UpdateCore.warn("JarFile does not exits:" + file); //$NON-NLS-1$
throw new FileNotFoundException(file.getAbsolutePath());
}
this.jarFile = new JarFile(file);
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/core/PluginEntry.java b/update/org.eclipse.update.core/src/org/eclipse/update/core/PluginEntry.java
index 90403ed..169f9f5 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/core/PluginEntry.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/core/PluginEntry.java
@@ -57,11 +57,11 @@
versionId = new VersionedIdentifier(id, ver);
return versionId;
} catch (Exception e) {
- UpdateCore.warn("Unable to create versioned identifier:" + id + ":" + ver);
+ UpdateCore.warn("Unable to create versioned identifier:" + id + ":" + ver); //$NON-NLS-1$ //$NON-NLS-2$
}
}
- versionId = new VersionedIdentifier("",null);
+ versionId = new VersionedIdentifier("",null); //$NON-NLS-1$
return versionId;
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/core/Site.java b/update/org.eclipse.update.core/src/org/eclipse/update/core/Site.java
index ccc763d..4313db3 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/core/Site.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/core/Site.java
@@ -160,7 +160,7 @@
//DEBUG:
if (!found) {
- String URLString = (this.getURL() != null) ? this.getURL().toExternalForm() : "<no site url>";
+ String URLString = (this.getURL() != null) ? this.getURL().toExternalForm() : "<no site url>"; //$NON-NLS-1$
UpdateCore.warn(Policy.bind("Site.CannotFindCategory", key, URLString)); //$NON-NLS-1$ //$NON-NLS-2$
if (getCategoryModels().length <= 0)
UpdateCore.warn(Policy.bind("Site.NoCategories")); //$NON-NLS-1$
@@ -211,7 +211,7 @@
list.add(included);
else{
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_WARNINGS){
- UpdateCore.warn("Filtered out feature reference:"+included);
+ UpdateCore.warn("Filtered out feature reference:"+included); //$NON-NLS-1$
}
}
}
@@ -234,7 +234,7 @@
public ISiteFeatureReference getFeatureReference(IFeature feature) {
if (feature == null) {
- UpdateCore.warn("Site:getFeatureReference: The feature is null");
+ UpdateCore.warn("Site:getFeatureReference: The feature is null"); //$NON-NLS-1$
return null;
}
@@ -246,7 +246,7 @@
return currentReference;
}
- UpdateCore.warn("Feature " + feature + " not found on site" + this.getURL());
+ UpdateCore.warn("Feature " + feature + " not found on site" + this.getURL()); //$NON-NLS-1$ //$NON-NLS-2$
return null;
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/core/SiteFeatureReference.java b/update/org.eclipse.update.core/src/org/eclipse/update/core/SiteFeatureReference.java
index 90500ce..31d5175 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/core/SiteFeatureReference.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/core/SiteFeatureReference.java
@@ -67,7 +67,7 @@
categories.add(siteCat);
else {
String siteURL = getSite().getURL() != null ? getSite().getURL().toExternalForm() : null;
- UpdateCore.warn("Category " + categoriesAsString[i] + " not found in Site:" + siteURL);
+ UpdateCore.warn("Category " + categoriesAsString[i] + " not found in Site:" + siteURL); //$NON-NLS-1$ //$NON-NLS-2$
}
}
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/core/SiteManager.java b/update/org.eclipse.update.core/src/org/eclipse/update/core/SiteManager.java
index 1baea89..e7b34fa 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/core/SiteManager.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/core/SiteManager.java
@@ -42,9 +42,9 @@
private static String nl;
private static boolean isHttpProxyEnable;
- private static final String P_HTTP_HOST = "http.proxyHost";
- private static final String P_HTTP_PORT = "http.proxyPort";
- private static final String P_HTTP_PROXY = "http.proxySet";
+ private static final String P_HTTP_HOST = "http.proxyHost"; //$NON-NLS-1$
+ private static final String P_HTTP_PORT = "http.proxyPort"; //$NON-NLS-1$
+ private static final String P_HTTP_PROXY = "http.proxySet"; //$NON-NLS-1$
private SiteManager() {
}
@@ -290,7 +290,7 @@
System.getProperties().remove(P_HTTP_PORT);
System.getProperties().remove(P_HTTP_PROXY);
//if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_WARNINGS)
- UpdateCore.warn("Remove proxy server info");
+ UpdateCore.warn("Remove proxy server info"); //$NON-NLS-1$
UpdateCore.getPlugin().getPluginPreferences().setValue(UpdateCore.HTTP_PROXY_ENABLE, isHttpProxyEnable());
UpdateCore.getPlugin().savePluginPreferences();
return;
@@ -300,11 +300,11 @@
//System.getProperties().put("proxyHost", proxyHost);
//System.getProperties().put("proxyPort", proxyPort);
- System.getProperties().setProperty(P_HTTP_PROXY, enable?"true":"false");
+ System.getProperties().setProperty(P_HTTP_PROXY, enable?"true":"false"); //$NON-NLS-1$ //$NON-NLS-2$
System.getProperties().setProperty(P_HTTP_HOST, httpProxyServer);
System.getProperties().setProperty(P_HTTP_PORT, httpProxyPort);
//if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_WARNINGS)
- UpdateCore.warn("Added proxy server info:" + httpProxyServer + ":" + httpProxyPort);
+ UpdateCore.warn("Added proxy server info:" + httpProxyServer + ":" + httpProxyPort); //$NON-NLS-1$ //$NON-NLS-2$
UpdateCore.getPlugin().getPluginPreferences().setValue(UpdateCore.HTTP_PROXY_HOST, getHttpProxyServer());
UpdateCore.getPlugin().getPluginPreferences().setValue(UpdateCore.HTTP_PROXY_PORT, getHttpProxyPort());
UpdateCore.getPlugin().getPluginPreferences().setValue(UpdateCore.HTTP_PROXY_ENABLE, isHttpProxyEnable());
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/core/model/DefaultFeatureParser.java b/update/org.eclipse.update.core/src/org/eclipse/update/core/model/DefaultFeatureParser.java
index 9d645f3..324e114 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/core/model/DefaultFeatureParser.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/core/model/DefaultFeatureParser.java
@@ -482,7 +482,7 @@
*/
private String cleanupText(String text) {
text = text.trim();
- if ("".equals(text)) return null;
+ if ("".equals(text)) return null; //$NON-NLS-1$
return text;
}
@@ -492,7 +492,7 @@
* @since 2.0
*/
public void characters(char[] ch, int start, int length) {
- String text = "";
+ String text = ""; //$NON-NLS-1$
boolean valid = true;
if (valid) {
@@ -722,7 +722,7 @@
feature.setAffinityFeature(affinity);
// primary plugin
- String plugin = attributes.getValue("plugin");
+ String plugin = attributes.getValue("plugin"); //$NON-NLS-1$
feature.setPrimaryPluginID(plugin);
objectStack.push(feature);
@@ -835,8 +835,8 @@
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_PARSING) {
debug("End process Includes tag: id:" //$NON-NLS-1$
+id + " ver:" + ver); //$NON-NLS-1$
- debug("name =" + name + " optional=" + optional + " search-location=" + locationName);
- debug("os=" + os + " ws=" + ws + " arch=" + arch);
+ debug("name =" + name + " optional=" + optional + " search-location=" + locationName); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
+ debug("os=" + os + " ws=" + ws + " arch=" + arch); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
}
}
@@ -851,7 +851,7 @@
inf.setURLString(infoURL);
inf.setAnnotation(label);
- if ("web".equalsIgnoreCase(type))
+ if ("web".equalsIgnoreCase(type)) //$NON-NLS-1$
inf.setType(IURLEntry.WEB_SITE);
else
inf.setType(IURLEntry.UPDATE_SITE);
@@ -871,7 +871,7 @@
String idMatch = attributes.getValue("id-match"); //$NON-NLS-1$
if (!(pluginID == null ^ featureID == null)) {
- internalError(Policy.bind("DefaultFeatureParser.PluginAndFeatureId"));
+ internalError(Policy.bind("DefaultFeatureParser.PluginAndFeatureId")); //$NON-NLS-1$
return;
}
@@ -889,21 +889,21 @@
ImportModel imp = factory.createImportModel();
String ver = attributes.getValue("version"); //$NON-NLS-1$
String match = attributes.getValue("match"); //$NON-NLS-1$
- String patch = attributes.getValue("patch");
+ String patch = attributes.getValue("patch"); //$NON-NLS-1$
- imp.setPatch(patch != null && patch.equalsIgnoreCase("true"));
+ imp.setPatch(patch != null && patch.equalsIgnoreCase("true")); //$NON-NLS-1$
if (ver == null) {
if (imp.isPatch()) {
- internalError(Policy.bind("DefaultFeatureParser.MissingPatchVersion"));
+ internalError(Policy.bind("DefaultFeatureParser.MissingPatchVersion")); //$NON-NLS-1$
}
- ver = "0.0.0";
- match = "greaterOrEqual";
+ ver = "0.0.0"; //$NON-NLS-1$
+ match = "greaterOrEqual"; //$NON-NLS-1$
} else if (match == null) {
if (imp.isPatch())
- match = "perfect";
+ match = "perfect"; //$NON-NLS-1$
else
- match = "compatible";
+ match = "compatible"; //$NON-NLS-1$
}
imp.setIdentifier(id);
@@ -914,23 +914,23 @@
if (imp.isPatch()) {
// patch reference must be perfect.
- if (match != null && !match.equalsIgnoreCase("perfect")) {
- internalError(Policy.bind("DefaultFeatureParser.wrongMatchForPatch"));
+ if (match != null && !match.equalsIgnoreCase("perfect")) { //$NON-NLS-1$
+ internalError(Policy.bind("DefaultFeatureParser.wrongMatchForPatch")); //$NON-NLS-1$
}
if (imp.isFeatureImport() == false) {
imp.setPatch(false);
- internalError(Policy.bind("DefaultFeatureParser.patchWithPlugin"));
+ internalError(Policy.bind("DefaultFeatureParser.patchWithPlugin")); //$NON-NLS-1$
}
}
// os arch ws
- String os = attributes.getValue("os");
+ String os = attributes.getValue("os"); //$NON-NLS-1$
imp.setOS(os);
- String ws = attributes.getValue("ws");
+ String ws = attributes.getValue("ws"); //$NON-NLS-1$
imp.setWS(ws);
- String arch = attributes.getValue("arch");
+ String arch = attributes.getValue("arch"); //$NON-NLS-1$
imp.setOSArch(arch);
objectStack.push(imp);
@@ -984,7 +984,7 @@
// setUnpack
String unpack = attributes.getValue("unpack"); //$NON-NLS-1$
- pluginEntry.setUnpack(!"false".equalsIgnoreCase(unpack));
+ pluginEntry.setUnpack(!"false".equalsIgnoreCase(unpack)); //$NON-NLS-1$
// download size
long download_size = ContentEntryModel.UNKNOWN_SIZE;
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/core/model/DefaultSiteParser.java b/update/org.eclipse.update.core/src/org/eclipse/update/core/model/DefaultSiteParser.java
index 4f740e6..ba495d7 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/core/model/DefaultSiteParser.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/core/model/DefaultSiteParser.java
@@ -258,11 +258,11 @@
// add text, preserving at most one space between text fragments
String newText = (String) objectStack.pop();
if (trailingSpace(newText) && !leadingSpace(text)) {
- text = " " + text;
+ text = " " + text; //$NON-NLS-1$
}
text = newText.trim() + text;
if (leadingSpace(newText) && !leadingSpace(text)) {
- text = " " + text;
+ text = " " + text; //$NON-NLS-1$
}
}
text = text.trim();
@@ -288,11 +288,11 @@
// add text, preserving at most one space between text fragments
String newText = (String) objectStack.pop();
if (trailingSpace(newText) && !leadingSpace(text)) {
- text = " " + text;
+ text = " " + text; //$NON-NLS-1$
}
text = newText.trim() + text;
if (leadingSpace(newText) && !leadingSpace(text)) {
- text = " " + text;
+ text = " " + text; //$NON-NLS-1$
}
}
text = text.trim();
@@ -506,7 +506,7 @@
// get label if it exists
String label = attributes.getValue("label"); //$NON-NLS-1$
if (label != null) {
- if ("".equals(label.trim()))
+ if ("".equals(label.trim())) //$NON-NLS-1$
label = null;
}
feature.setLabel(label);
@@ -528,7 +528,7 @@
feature.setArch(arch);
//patch
- String patch = attributes.getValue("patch");
+ String patch = attributes.getValue("patch"); //$NON-NLS-1$
feature.setPatch(patch);
SiteModel site = (SiteModel) objectStack.peek();
@@ -616,7 +616,7 @@
*
*/
private void debug(String s) {
- UpdateCore.debug("DefaultSiteParser" + s);
+ UpdateCore.debug("DefaultSiteParser" + s); //$NON-NLS-1$
}
/*
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/core/model/FeatureModel.java b/update/org.eclipse.update.core/src/org/eclipse/update/core/model/FeatureModel.java
index 59cce96..90ed7b4 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/core/model/FeatureModel.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/core/model/FeatureModel.java
@@ -903,7 +903,7 @@
try {
imageURL = resolveURL(base,bundleURL, imageURLString);
} catch (MalformedURLException e){
- UpdateCore.warn("",e);
+ UpdateCore.warn("",e); //$NON-NLS-1$
}
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/core/model/FeatureReferenceModel.java b/update/org.eclipse.update.core/src/org/eclipse/update/core/model/FeatureReferenceModel.java
index 99d9441..6df2258 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/core/model/FeatureReferenceModel.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/core/model/FeatureReferenceModel.java
@@ -254,7 +254,7 @@
try {
url = resolveURL(base, bundleURL, urlString);
} catch (MalformedURLException e){
- UpdateCore.warn("",e);
+ UpdateCore.warn("",e); //$NON-NLS-1$
}
}
@@ -263,8 +263,8 @@
*/
public String toString() {
StringBuffer buffer = new StringBuffer();
- buffer.append(getClass().toString() + " :");
- buffer.append(" at ");
+ buffer.append(getClass().toString() + " :"); //$NON-NLS-1$
+ buffer.append(" at "); //$NON-NLS-1$
if (url != null)
buffer.append(url.toExternalForm());
return buffer.toString();
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/core/model/InstallAbortedException.java b/update/org.eclipse.update.core/src/org/eclipse/update/core/model/InstallAbortedException.java
index c386cfd..de0d1a9 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/core/model/InstallAbortedException.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/core/model/InstallAbortedException.java
@@ -30,6 +30,6 @@
* @since 2.0
*/
public InstallAbortedException(String msg,Exception e) {
- super(new Status(IStatus.INFO,"org.eclipse.update.core",IStatus.OK,msg,e));
+ super(new Status(IStatus.INFO,"org.eclipse.update.core",IStatus.OK,msg,e)); //$NON-NLS-1$
}
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/core/model/ModelObject.java b/update/org.eclipse.update.core/src/org/eclipse/update/core/model/ModelObject.java
index 475cdb2..6a62c1c 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/core/model/ModelObject.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/core/model/ModelObject.java
@@ -192,19 +192,19 @@
* @return String
*/
private String resolvePlatfromConfiguration(String resolvedUrlString) {
- int osIndex = resolvedUrlString.indexOf("$os$");
+ int osIndex = resolvedUrlString.indexOf("$os$"); //$NON-NLS-1$
if (osIndex != -1)
return getExtendedString(resolvedUrlString);
- int wsIndex = resolvedUrlString.indexOf("$ws$");
+ int wsIndex = resolvedUrlString.indexOf("$ws$"); //$NON-NLS-1$
if (wsIndex != -1)
return getExtendedString(resolvedUrlString);
- int nlIndex = resolvedUrlString.indexOf("$nl$");
+ int nlIndex = resolvedUrlString.indexOf("$nl$"); //$NON-NLS-1$
if (nlIndex != -1)
return getExtendedString(resolvedUrlString);
- int archIndex = resolvedUrlString.indexOf("$arch$");
+ int archIndex = resolvedUrlString.indexOf("$arch$"); //$NON-NLS-1$
if (archIndex != -1)
return getExtendedString(resolvedUrlString);
@@ -215,7 +215,7 @@
IPath path = new Path(resolvedUrlString);
path = getExpandedPath(path);
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_WARNINGS) {
- UpdateCore.warn("Resolved :" + resolvedUrlString + " as:" + path.toOSString());
+ UpdateCore.warn("Resolved :" + resolvedUrlString + " as:" + path.toOSString()); //$NON-NLS-1$ //$NON-NLS-2$
}
return path.toOSString();
@@ -225,13 +225,13 @@
String first = path.segment(0);
if (first != null) {
IPath rest = getExpandedPath(path.removeFirstSegments(1));
- if (first.equals("$ws$")) {
+ if (first.equals("$ws$")) { //$NON-NLS-1$
path = new Path(SiteManager.getWS()).append(rest);
- } else if (first.equals("$os$")) {
+ } else if (first.equals("$os$")) { //$NON-NLS-1$
path = new Path(SiteManager.getOS()).append(rest);
- } else if (first.equals("$nl$")) {
+ } else if (first.equals("$nl$")) { //$NON-NLS-1$
path = new Path(SiteManager.getNL()).append(rest);
- } else if (first.equals("$arch$")) {
+ } else if (first.equals("$arch$")) { //$NON-NLS-1$
path = new Path(SiteManager.getOSArch()).append(rest);
}
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/core/model/PluginEntryModel.java b/update/org.eclipse.update.core/src/org/eclipse/update/core/model/PluginEntryModel.java
index fa1d87b..59154d0 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/core/model/PluginEntryModel.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/core/model/PluginEntryModel.java
@@ -154,9 +154,9 @@
* @see Object#toString()
*/
public String toString() {
- String msg = (getPluginIdentifier()!=null)?getPluginIdentifier().toString():"";
- msg += getPluginVersion()!=null?" "+getPluginVersion().toString():"";
- msg += isFragment()?" fragment":" plugin";
+ String msg = (getPluginIdentifier()!=null)?getPluginIdentifier().toString():""; //$NON-NLS-1$
+ msg += getPluginVersion()!=null?" "+getPluginVersion().toString():""; //$NON-NLS-1$ //$NON-NLS-2$
+ msg += isFragment()?" fragment":" plugin"; //$NON-NLS-1$ //$NON-NLS-2$
return msg;
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/core/model/URLEntryModel.java b/update/org.eclipse.update.core/src/org/eclipse/update/core/model/URLEntryModel.java
index dbdca6a..7f81e6c 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/core/model/URLEntryModel.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/core/model/URLEntryModel.java
@@ -157,7 +157,7 @@
try {
url = resolveURL(base,bundleURL, urlString);
} catch (MalformedURLException e){
- UpdateCore.warn("",e);
+ UpdateCore.warn("",e); //$NON-NLS-1$
}
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/ConfigurationPolicy.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/ConfigurationPolicy.java
index 71bcea6..5e14307 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/ConfigurationPolicy.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/ConfigurationPolicy.java
@@ -87,7 +87,7 @@
return;
if (featureReference == null) {
- UpdateCore.warn("The feature reference to configure is null");
+ UpdateCore.warn("The feature reference to configure is null"); //$NON-NLS-1$
return;
}
@@ -97,15 +97,15 @@
} catch (CoreException e) {
if (!UpdateManagerUtils.isOptional(featureReference)) {
URL url = featureReference.getURL();
- String urlString = (url != null) ? url.toExternalForm() : "<no feature reference url>";
- UpdateCore.warn("Error retrieving feature:" + urlString, e);
+ String urlString = (url != null) ? url.toExternalForm() : "<no feature reference url>"; //$NON-NLS-1$
+ UpdateCore.warn("Error retrieving feature:" + urlString, e); //$NON-NLS-1$
return;
}
}
if (feature == null) {
URL url = featureReference.getURL();
- String urlString = (url != null) ? url.toExternalForm() : "<no feature reference url>";
- UpdateCore.warn("The feature to unconfigure is null: feature reference is:" + urlString);
+ String urlString = (url != null) ? url.toExternalForm() : "<no feature reference url>"; //$NON-NLS-1$
+ UpdateCore.warn("The feature to unconfigure is null: feature reference is:" + urlString); //$NON-NLS-1$
}
// Setup optional install handler
@@ -151,9 +151,9 @@
newException = t;
}
if (originalException != null) // original exception wins
- throw Utilities.newCoreException(Policy.bind("InstallHandler.error", feature.getLabel()), originalException);
+ throw Utilities.newCoreException(Policy.bind("InstallHandler.error", feature.getLabel()), originalException); //$NON-NLS-1$
if (newException != null)
- throw Utilities.newCoreException(Policy.bind("InstallHandler.error", feature.getLabel()), newException);
+ throw Utilities.newCoreException(Policy.bind("InstallHandler.error", feature.getLabel()), newException); //$NON-NLS-1$
}
}
@@ -164,12 +164,12 @@
public boolean unconfigure(IFeatureReference featureReference, boolean callInstallHandler, boolean createActivity) throws CoreException {
if (isUnconfigured(featureReference)) {
- UpdateCore.warn("Feature already unconfigured");
+ UpdateCore.warn("Feature already unconfigured"); //$NON-NLS-1$
return true;
}
if (featureReference == null) {
- UpdateCore.warn("The feature reference to unconfigure is null");
+ UpdateCore.warn("The feature reference to unconfigure is null"); //$NON-NLS-1$
return false;
}
@@ -179,16 +179,16 @@
} catch (CoreException e) {
if (!UpdateManagerUtils.isOptional(featureReference)) {
URL url = featureReference.getURL();
- String urlString = (url != null) ? url.toExternalForm() : "<no feature reference url>";
- UpdateCore.warn("Error retrieving feature:" + urlString, e);
+ String urlString = (url != null) ? url.toExternalForm() : "<no feature reference url>"; //$NON-NLS-1$
+ UpdateCore.warn("Error retrieving feature:" + urlString, e); //$NON-NLS-1$
return false;
}
}
if (feature == null) {
URL url = featureReference.getURL();
- String urlString = (url != null) ? url.toExternalForm() : "<no feature reference url>";
- UpdateCore.warn("The feature to unconfigure is null: feature reference is:" + urlString);
+ String urlString = (url != null) ? url.toExternalForm() : "<no feature reference url>"; //$NON-NLS-1$
+ UpdateCore.warn("The feature to unconfigure is null: feature reference is:" + urlString); //$NON-NLS-1$
return false;
}
@@ -251,15 +251,15 @@
newException = t;
}
if (originalException != null) // original exception wins
- throw Utilities.newCoreException(Policy.bind("InstallHandler.error", feature.getLabel()), originalException);
+ throw Utilities.newCoreException(Policy.bind("InstallHandler.error", feature.getLabel()), originalException); //$NON-NLS-1$
if (newException != null)
- throw Utilities.newCoreException(Policy.bind("InstallHandler.error", feature.getLabel()), newException);
+ throw Utilities.newCoreException(Policy.bind("InstallHandler.error", feature.getLabel()), newException); //$NON-NLS-1$
}
if (!success) {
URL url = featureReference.getURL();
- String urlString = (url != null) ? url.toExternalForm() : "<no feature reference url>";
- UpdateCore.warn("Unable to unconfigure:" + urlString);
+ String urlString = (url != null) ? url.toExternalForm() : "<no feature reference url>"; //$NON-NLS-1$
+ UpdateCore.warn("Unable to unconfigure:" + urlString); //$NON-NLS-1$
}
return success;
}
@@ -306,11 +306,11 @@
//TRACE
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_RECONCILER) {
UpdateCore
- .debug("GetPluginPath for: "
- + ((site == null) ? "<No site>" : site.getURL()
+ .debug("GetPluginPath for: " //$NON-NLS-1$
+ + ((site == null) ? "<No site>" : site.getURL() //$NON-NLS-1$
.toString()));
for (int i = 0; i < pluginPaths.length; i++) {
- UpdateCore.debug("To write:" + pluginPaths[i]);
+ UpdateCore.debug("To write:" + pluginPaths[i]); //$NON-NLS-1$
}
}
return pluginPaths;
@@ -414,7 +414,7 @@
*/
private String[] getConfiguredPluginStrings(ISite site, PatchedFeature[] features) throws CoreException {
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_CONFIGURATION){
- UpdateCore.warn("CONFIGURED PLUGINS");
+ UpdateCore.warn("CONFIGURED PLUGINS"); //$NON-NLS-1$
}
// Use set to eliminate plugins with same ID and version.
@@ -432,7 +432,7 @@
*/
private String[] getAllKnownPluginStrings(ISite site, IFeatureReference[] configured,IFeatureReference[] unconfigured) throws CoreException {
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_CONFIGURATION){
- UpdateCore.warn("ALL PLUGINS");
+ UpdateCore.warn("ALL PLUGINS"); //$NON-NLS-1$
}
// Add features, patched features, or patches
IFeatureReference[] all=new IFeatureReference[configured.length+unconfigured.length];
@@ -444,7 +444,7 @@
try {
IFeature feature = all[i].getFeature(null);
if (feature == null) {
- UpdateCore.warn("Null Feature", new Exception());
+ UpdateCore.warn("Null Feature", new Exception()); //$NON-NLS-1$
continue;
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/ConnectionThreadManager.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/ConnectionThreadManager.java
index fe134a6..f1481bf 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/ConnectionThreadManager.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/ConnectionThreadManager.java
@@ -36,9 +36,9 @@
*/
public class ConnectionThreadManager {
// set connection timeout to 1 minute
- private static final String CONNECT_TIMEOUT = "60000";
+ private static final String CONNECT_TIMEOUT = "60000"; //$NON-NLS-1$
// set read timeout to 1 minute
- private static final String READ_TIMEOUT = "60000";
+ private static final String READ_TIMEOUT = "60000"; //$NON-NLS-1$
// max number of active threads
private static final int MAX_COUNT = 9;
private Vector threads;
@@ -98,7 +98,7 @@
class ConnectionThread extends Thread {
private StreamRunnable runnable;
public ConnectionThread(StreamRunnable runnable) {
- super(runnable, "update-connection");
+ super(runnable, "update-connection"); //$NON-NLS-1$
this.runnable = runnable;
}
@@ -109,13 +109,13 @@
public ConnectionThreadManager() {
// In case we are running Sun's code.
- setIfNotDefaultProperty("sun.net.client.defaultConnectTimeout", CONNECT_TIMEOUT);
- setIfNotDefaultProperty("sun.net.client.defaultReadTimeout", READ_TIMEOUT);
+ setIfNotDefaultProperty("sun.net.client.defaultConnectTimeout", CONNECT_TIMEOUT); //$NON-NLS-1$
+ setIfNotDefaultProperty("sun.net.client.defaultReadTimeout", READ_TIMEOUT); //$NON-NLS-1$
}
private void setIfNotDefaultProperty(String key, String value) {
String oldValue = System.getProperty(key);
- if (oldValue==null || oldValue.equals("-1"))
+ if (oldValue==null || oldValue.equals("-1")) //$NON-NLS-1$
System.setProperty(key, value);
}
@@ -153,7 +153,7 @@
pluginId,
IStatus.OK,
Policy.bind(
- "ConnectionThreadManager.unresponsiveURL",
+ "ConnectionThreadManager.unresponsiveURL", //$NON-NLS-1$
url),
null);
children.add(status);
@@ -163,7 +163,7 @@
pluginId,
IStatus.OK,
(IStatus[]) children.toArray(new IStatus[children.size()]),
- Policy.bind("ConnectionThreadManager.tooManyConnections"),
+ Policy.bind("ConnectionThreadManager.tooManyConnections"), //$NON-NLS-1$
null);
throw new CoreException(parentStatus);
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/DefaultInstallHandler.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/DefaultInstallHandler.java
index 0e69526..e0fcd8d 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/DefaultInstallHandler.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/DefaultInstallHandler.java
@@ -53,7 +53,7 @@
// see if the data entry is a jar
ContentReference archive = archives[j];
if (!(archives[j] instanceof JarContentReference)
- && archives[j].getIdentifier().endsWith(".jar")) {
+ && archives[j].getIdentifier().endsWith(".jar")) { //$NON-NLS-1$
try {
archive =
new JarContentReference(archives[j].getIdentifier(), archives[j].asFile());
@@ -87,12 +87,12 @@
IContentConsumer nonPluginConsumer = consumer.open(nonPluginEntries[i]);
for (int j = 0; j < archive.length; j++) {
String id = archive[j].getIdentifier();
- if (id.endsWith(".jar")) {
+ if (id.endsWith(".jar")) { //$NON-NLS-1$
// the non-plugin archive is a jar. Unpack it into
// a directory constructed using the archive id
try {
- final String prefix = id.substring(0, id.length() - 4) + "/";
- JarContentReference jarRef = new JarContentReference("", archive[j].asFile());
+ final String prefix = id.substring(0, id.length() - 4) + "/"; //$NON-NLS-1$
+ JarContentReference jarRef = new JarContentReference("", archive[j].asFile()); //$NON-NLS-1$
ContentSelector selector = new ContentSelector() {
public String defineIdentifier(JarEntry entry) {
if (entry == null)
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/DeltaInstallHandler.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/DeltaInstallHandler.java
index e59faba..3c1848e 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/DeltaInstallHandler.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/DeltaInstallHandler.java
@@ -23,8 +23,8 @@
* The new plugin should only contain files that have changed.
*/
public class DeltaInstallHandler extends BaseInstallHandler {
- private final static String PLUGIN_XML = "plugin.xml";
- private final static String FRAGMENT_XML = "fragment.xml";
+ private final static String PLUGIN_XML = "plugin.xml"; //$NON-NLS-1$
+ private final static String FRAGMENT_XML = "fragment.xml"; //$NON-NLS-1$
private final static String META_MANIFEST = "META-INF/MANIFEST.MF"; //$NON-NLS-1$
protected IFeature oldFeature;
@@ -64,7 +64,7 @@
Status.ERROR,
UpdateUtils.getPluginId(),
1,
- "",
+ "", //$NON-NLS-1$
e));
}
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FeatureDownloadException.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FeatureDownloadException.java
index ee03bc0..fb8f679 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FeatureDownloadException.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FeatureDownloadException.java
@@ -27,7 +27,7 @@
super(
new Status(
IStatus.INFO,
- "org.eclipse.update.core",
+ "org.eclipse.update.core", //$NON-NLS-1$
IStatus.OK,
msg,
e));
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FeatureExecutableContentProvider.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FeatureExecutableContentProvider.java
index 0a80c5b..0a6630e 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FeatureExecutableContentProvider.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FeatureExecutableContentProvider.java
@@ -42,7 +42,7 @@
URL fileURL = provider.getArchiveReference(getPathID(pluginEntry));
String result = fileURL.getFile();
- if (!result.endsWith(".jar") && !result.endsWith(File.separator))
+ if (!result.endsWith(".jar") && !result.endsWith(File.separator)) //$NON-NLS-1$
result += File.separator;
File pluginPath = new File(result);
if (!pluginPath.exists())
@@ -119,7 +119,7 @@
throw Utilities.newCoreException(
Policy.bind(
"FeatureExecutableContentProvider.UnableToCreateURLFor", //$NON-NLS-1$
- getURL().toExternalForm() + " " + Feature.FEATURE_XML),
+ getURL().toExternalForm() + " " + Feature.FEATURE_XML), //$NON-NLS-1$
e);
}
return result;
@@ -145,7 +145,7 @@
String archiveID = getPathID(pluginEntry);
try {
File archiveFile = new File(getPath(pluginEntry));
- if(!archiveFile.isDirectory() && archiveFile.getName().endsWith(".jar")){
+ if(!archiveFile.isDirectory() && archiveFile.getName().endsWith(".jar")){ //$NON-NLS-1$
result[0] = new JarContentReference(archiveID, archiveFile);
} else {
result[0] =
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FeaturePlugin.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FeaturePlugin.java
index ff2ca4e..3c3d854 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FeaturePlugin.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FeaturePlugin.java
@@ -41,6 +41,6 @@
return getEntry().getVersionedIdentifier().hashCode();
}
public String toString() {
- return pluginEntry + " in " + feature;
+ return pluginEntry + " in " + feature; //$NON-NLS-1$
}
}
\ No newline at end of file
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FileResponse.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FileResponse.java
index 2c25443..d1bf021 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FileResponse.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FileResponse.java
@@ -41,14 +41,14 @@
}
public String getStatusMessage() {
- return "";
+ return ""; //$NON-NLS-1$
}
public long getLastModified() {
if (lastModified == 0) {
File f = new File(url.getFile());
if (f.isDirectory())
- f = new File(f, "site.xml");
+ f = new File(f, "site.xml"); //$NON-NLS-1$
lastModified = f.lastModified();
}
return lastModified;
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FragmentEntry.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FragmentEntry.java
index 9e9f5f7..4afac79 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FragmentEntry.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/FragmentEntry.java
@@ -64,8 +64,8 @@
* @see Object#toString()
*/
public String toString() {
- String msg = (getPluginIdentifier()!=null)?getPluginIdentifier().toString():"";
- msg += getPluginVersion()!=null?" "+getPluginVersion().toString():"";
+ String msg = (getPluginIdentifier()!=null)?getPluginIdentifier().toString():""; //$NON-NLS-1$
+ msg += getPluginVersion()!=null?" "+getPluginVersion().toString():""; //$NON-NLS-1$ //$NON-NLS-2$
return msg;
}
}
\ No newline at end of file
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/HttpResponse.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/HttpResponse.java
index 2995cdc..e9ac119 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/HttpResponse.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/HttpResponse.java
@@ -31,7 +31,7 @@
if (in == null && url != null) {
connection = url.openConnection();
if (offset > 0)
- connection.setRequestProperty("Range", "bytes=" + offset + "-");
+ connection.setRequestProperty("Range", "bytes=" + offset + "-"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
in = connection.getInputStream();
checkOffset();
}
@@ -45,7 +45,7 @@
if (in == null && url != null) {
connection = url.openConnection();
if (offset > 0)
- connection.setRequestProperty("Range", "bytes=" + offset + "-");
+ connection.setRequestProperty("Range", "bytes=" + offset + "-"); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
if (monitor != null) {
this.in =
@@ -77,7 +77,7 @@
try {
return ((HttpURLConnection) connection).getResponseCode();
} catch (IOException e) {
- UpdateCore.warn("", e);
+ UpdateCore.warn("", e); //$NON-NLS-1$
}
}
return IStatusCodes.HTTP_OK;
@@ -88,10 +88,10 @@
try {
return ((HttpURLConnection) connection).getResponseMessage();
} catch (IOException e) {
- UpdateCore.warn("", e);
+ UpdateCore.warn("", e); //$NON-NLS-1$
}
}
- return "";
+ return ""; //$NON-NLS-1$
}
public long getLastModified() {
@@ -150,14 +150,14 @@
private void checkOffset() throws IOException {
if (offset == 0)
return;
- String range = connection.getHeaderField("Content-Range");
+ String range = connection.getHeaderField("Content-Range"); //$NON-NLS-1$
//System.out.println("Content-Range=" + range);
if (range == null) {
//System.err.println("Server does not support ranges");
- throw new IOException("Server returned full content instead of a range.");
- } else if (!range.startsWith("bytes " + offset + "-")) {
+ throw new IOException(Policy.bind("HttpResponse.rangeExpected")); //$NON-NLS-1$
+ } else if (!range.startsWith("bytes " + offset + "-")) { //$NON-NLS-1$ //$NON-NLS-2$
//System.err.println("Server returned wrong range");
- throw new IOException("Server returned wrong range.");
+ throw new IOException(Policy.bind("HttpResponse.wrongRange")); //$NON-NLS-1$
}
}
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/InstallConfiguration.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/InstallConfiguration.java
index 09dda52..a37fccc 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/InstallConfiguration.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/InstallConfiguration.java
@@ -30,7 +30,7 @@
*/
public class InstallConfiguration extends InstallConfigurationModel implements IInstallConfiguration {
- private static boolean isWindows = System.getProperty("os.name").startsWith("Win");
+ private static boolean isWindows = System.getProperty("os.name").startsWith("Win"); //$NON-NLS-1$ //$NON-NLS-2$
private ListenersList listeners = new ListenersList();
/*
@@ -109,13 +109,13 @@
*/
public IConfiguredSite createConfiguredSite(File file) throws CoreException {
- if (!file.getName().equals("eclipse")) {
- file = new File(file, "eclipse");
+ if (!file.getName().equals("eclipse")) { //$NON-NLS-1$
+ file = new File(file, "eclipse"); //$NON-NLS-1$
file.mkdirs();
}
if (isDuplicateSite(file))
- throw Utilities.newCoreException(Policy.bind("InstallConfiguration.location.exists", file.getPath()),null);
+ throw Utilities.newCoreException(Policy.bind("InstallConfiguration.location.exists", file.getPath()),null); //$NON-NLS-1$
ISite site = InternalSiteManager.createSite(file);
//create a config site around the site
@@ -124,11 +124,11 @@
ConfiguredSite configSite = (ConfiguredSite) factory.createConfigurationSiteModel((SiteModel) site, getDefaultPolicy());
if (configSite.isNativelyLinked()) {
- throw Utilities.newCoreException("InstallConfiguration.AlreadyNativelyLinked", null);
+ throw Utilities.newCoreException("InstallConfiguration.AlreadyNativelyLinked", null); //$NON-NLS-1$
}
if (configSite.isProductSite()) {
- throw Utilities.newCoreException("InstallConfiguration.AlreadyProductSite", null);
+ throw Utilities.newCoreException("InstallConfiguration.AlreadyProductSite", null); //$NON-NLS-1$
}
if (site != null) {
@@ -217,8 +217,8 @@
for (int i = 0; i < newFeaturesRef.length; i++) {
// TRACE
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_RECONCILER) {
- String reconciliationType = "enable (optimistic)";
- UpdateCore.debug("New Linked Site:New Feature: " + newFeaturesRef[i].getURL() + " as " + reconciliationType);
+ String reconciliationType = "enable (optimistic)"; //$NON-NLS-1$
+ UpdateCore.debug("New Linked Site:New Feature: " + newFeaturesRef[i].getURL() + " as " + reconciliationType); //$NON-NLS-1$ //$NON-NLS-2$
}
ConfigurationPolicy policy = linkedSite.getConfigurationPolicy();
policy.configure(newFeaturesRef[i], true, false);
@@ -385,13 +385,13 @@
runtimeConfiguration.save();
// log configuration and activities
this.date = new Date(runtimeConfiguration.getChangeStamp());
- if ("file".equalsIgnoreCase(getURL().getProtocol()))
+ if ("file".equalsIgnoreCase(getURL().getProtocol())) //$NON-NLS-1$
UpdateCore.log(this);
resetActivities();
return isRestartNeeded(runtimeConfiguration);
} catch (IOException e) {
CoreException exc = Utilities.newCoreException(Policy.bind("InstallConfiguration.UnableToSavePlatformConfiguration", runtimeConfiguration.getConfigurationLocation().toExternalForm()), e); //$NON-NLS-1$
- UpdateCore.warn("",exc);
+ UpdateCore.warn("",exc); //$NON-NLS-1$
}
return true;
}
@@ -654,10 +654,10 @@
URL pluginEntryfullURL = siteContentProvider.getArchiveReference(pluginPathID);
//
- if (!rootString.startsWith("platform")) {
+ if (!rootString.startsWith("platform")) { //$NON-NLS-1$
// DEBUG:
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_CONFIGURATION)
- UpdateCore.debug("getRuntimeConfiguration Plugin Entry Full URL:" + pluginEntryfullURL + " Platform String:" + rootString + " [NON PLATFORM URL].");
+ UpdateCore.debug("getRuntimeConfiguration Plugin Entry Full URL:" + pluginEntryfullURL + " Platform String:" + rootString + " [NON PLATFORM URL]."); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
return pluginEntryfullURL;
}
@@ -673,15 +673,15 @@
// DEBUG:
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_CONFIGURATION)
- UpdateCore.debug("getRuntimeConfiguration plugin Entry Full URL:" + pluginEntryfullURL + " Platform String:" + rootString + " Site URL:" + pluginEntryRootURL + " Relative:" + relativeString);
+ UpdateCore.debug("getRuntimeConfiguration plugin Entry Full URL:" + pluginEntryfullURL + " Platform String:" + rootString + " Site URL:" + pluginEntryRootURL + " Relative:" + relativeString); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ //$NON-NLS-4$
// verify we are about to write a valid file URL
// check with fullURL as it is not resolved to platform:base/
if (pluginEntryfullURL != null) {
- if ("file".equals(pluginEntryfullURL.getProtocol())) {
+ if ("file".equals(pluginEntryfullURL.getProtocol())) { //$NON-NLS-1$
String fileString = pluginEntryfullURL.getFile();
if (!new File(fileString).exists()) {
- UpdateCore.warn("The URL:" + result + " doesn't point to a valid platform plugin.The URL will not be written in the platform configuration", new Exception());
+ UpdateCore.warn("The URL:" + result + " doesn't point to a valid platform plugin.The URL will not be written in the platform configuration", new Exception()); //$NON-NLS-1$ //$NON-NLS-2$
return null;
}
}
@@ -738,19 +738,19 @@
// try to determine if supplied URL can be recast as install-relative
if (install.getProtocol().equals(url.getProtocol())) {
- if (install.getProtocol().equals("file")) {
+ if (install.getProtocol().equals("file")) { //$NON-NLS-1$
String installS = new File(install.getFile()).getAbsolutePath().replace(File.separatorChar, '/');
- if (!installS.endsWith("/"))
- installS += "/";
+ if (!installS.endsWith("/")) //$NON-NLS-1$
+ installS += "/"; //$NON-NLS-1$
String urlS = new File(url.getFile()).getAbsolutePath().replace(File.separatorChar, '/');
- if (!urlS.endsWith("/"))
- urlS += "/";
- int ix = installS.lastIndexOf("/");
+ if (!urlS.endsWith("/")) //$NON-NLS-1$
+ urlS += "/"; //$NON-NLS-1$
+ int ix = installS.lastIndexOf("/"); //$NON-NLS-1$
if (ix != -1) {
installS = installS.substring(0, ix + 1);
if (urlS.startsWith(installS)) {
try {
- return new URL("platform:/base/" + urlS.substring(installS.length()));
+ return new URL("platform:/base/" + urlS.substring(installS.length())); //$NON-NLS-1$
} catch (MalformedURLException e) {
}
}
@@ -830,7 +830,7 @@
continue;
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_CONFIGURATION)
- UpdateCore.debug("Bundle " + oldBundleLocation + " has been removed");
+ UpdateCore.debug("Bundle " + oldBundleLocation + " has been removed"); //$NON-NLS-1$ //$NON-NLS-2$
return true;
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/InstallHandlerProxy.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/InstallHandlerProxy.java
index 1fd92da..115a130 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/InstallHandlerProxy.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/InstallHandlerProxy.java
@@ -24,8 +24,8 @@
private IStatus savedStatus = null;
private boolean DEBUG = false;
- private static final String EXT_PLUGIN = "org.eclipse.update.core";
- private static final String EXT_POINT = "installHandlers";
+ private static final String EXT_PLUGIN = "org.eclipse.update.core"; //$NON-NLS-1$
+ private static final String EXT_POINT = "installHandlers"; //$NON-NLS-1$
private InstallHandlerProxy() {
}
@@ -60,25 +60,25 @@
// check if we have a handler entry specified in the feature.xml
if (entry == null) {
if (DEBUG)
- debug("not specified");
+ debug("not specified"); //$NON-NLS-1$
return; // no handler entry
}
String library = entry.getLibrary();
String handlerName = entry.getHandlerName();
- if (handlerName == null || handlerName.trim().equals("")) {
+ if (handlerName == null || handlerName.trim().equals("")) { //$NON-NLS-1$
if (DEBUG)
- debug("not specified");
+ debug("not specified"); //$NON-NLS-1$
return; // no handler class spacified in entry
}
if (DEBUG) {
- debug("handler=" + handlerName);
- debug("path= " + library);
+ debug("handler=" + handlerName); //$NON-NLS-1$
+ debug("path= " + library); //$NON-NLS-1$
}
// get handler instance
try {
- if (library == null || library.trim().equals(""))
+ if (library == null || library.trim().equals("")) //$NON-NLS-1$
this.handler = getGlobalHandler(handlerName);
else
this.handler = getLocalHandler(library, handlerName);
@@ -113,7 +113,7 @@
else {
try {
if (DEBUG)
- debug("calling installInitiated()");
+ debug("calling installInitiated()"); //$NON-NLS-1$
handler.installInitiated();
} catch (Throwable e) {
handleExceptionInCall(e, feature);
@@ -130,7 +130,7 @@
else {
try {
if (DEBUG)
- debug("calling pluginsDownloaded()");
+ debug("calling pluginsDownloaded()"); //$NON-NLS-1$
handler.pluginsDownloaded(plugins);
} catch (Throwable e) {
handleExceptionInCall(e, feature);
@@ -148,7 +148,7 @@
else {
try {
if (DEBUG)
- debug("calling completeInstall()");
+ debug("calling completeInstall()"); //$NON-NLS-1$
handler.completeInstall(consumer);
} catch (Throwable e) {
handleExceptionInCall(e, feature);
@@ -168,7 +168,7 @@
else {
try {
if (DEBUG)
- debug("calling nonPluginDataDownloaded()");
+ debug("calling nonPluginDataDownloaded()"); //$NON-NLS-1$
handler.nonPluginDataDownloaded(nonPluginData, listener);
} catch (Throwable e) {
handleExceptionInCall(e, feature);
@@ -185,7 +185,7 @@
else {
try {
if (DEBUG)
- debug("calling installCompleted()");
+ debug("calling installCompleted()"); //$NON-NLS-1$
handler.installCompleted(success);
} catch (Throwable e) {
handleExceptionInCall(e, feature);
@@ -202,7 +202,7 @@
else {
try {
if (DEBUG)
- debug("calling configureInitiated()");
+ debug("calling configureInitiated()"); //$NON-NLS-1$
handler.configureInitiated();
} catch (Throwable e) {
handleExceptionInCall(e, feature);
@@ -219,7 +219,7 @@
else {
try {
if (DEBUG)
- debug("calling completeConfigure()");
+ debug("calling completeConfigure()"); //$NON-NLS-1$
handler.completeConfigure();
} catch (Throwable e) {
handleExceptionInCall(e, feature);
@@ -236,7 +236,7 @@
else {
try {
if (DEBUG)
- debug("calling configureCompleted()");
+ debug("calling configureCompleted()"); //$NON-NLS-1$
handler.configureCompleted(success);
} catch (Throwable e) {
handleExceptionInCall(e, feature);
@@ -253,7 +253,7 @@
else {
try {
if (DEBUG)
- debug("calling unconfigureInitiated()");
+ debug("calling unconfigureInitiated()"); //$NON-NLS-1$
handler.unconfigureInitiated();
} catch (Throwable e) {
handleExceptionInCall(e, feature);
@@ -270,7 +270,7 @@
else {
try {
if (DEBUG)
- debug("calling completeUnconfigure()");
+ debug("calling completeUnconfigure()"); //$NON-NLS-1$
handler.completeUnconfigure();
} catch (Throwable e) {
handleExceptionInCall(e, feature);
@@ -290,7 +290,7 @@
} else {
try {
if (DEBUG)
- debug("calling unconfigureCompleted()");
+ debug("calling unconfigureCompleted()"); //$NON-NLS-1$
handler.unconfigureCompleted(success);
} catch (Throwable e) {
handleExceptionInCall(e, feature);
@@ -309,7 +309,7 @@
else {
try {
if (DEBUG)
- debug("calling uninstallInitiated()");
+ debug("calling uninstallInitiated()"); //$NON-NLS-1$
handler.uninstallInitiated();
} catch (Throwable e) {
handleExceptionInCall(e, feature);
@@ -326,7 +326,7 @@
else {
try {
if (DEBUG)
- debug("calling completeUninstall()");
+ debug("calling completeUninstall()"); //$NON-NLS-1$
handler.completeUninstall();
} catch (Throwable e) {
handleExceptionInCall(e, feature);
@@ -346,7 +346,7 @@
} else {
try {
if (DEBUG)
- debug("calling uninstallCompleted()");
+ debug("calling uninstallCompleted()"); //$NON-NLS-1$
handler.uninstallCompleted(success);
} catch (Throwable e) {
handleExceptionInCall(e, feature);
@@ -449,7 +449,7 @@
if (this.type == IInstallHandler.HANDLER_ACTION_UNINSTALL) {
// check if we are doing uninstall
// ... need to make temp copy of library (being removed)
- File tempLib = File.createTempFile("tmp", ".jar");
+ File tempLib = File.createTempFile("tmp", ".jar"); //$NON-NLS-1$ //$NON-NLS-2$
tempLib.deleteOnExit();
FileOutputStream fos = null;
InputStream is = null;
@@ -493,11 +493,11 @@
Policy.bind("InstallHandler.unableToCreateHandler", this.feature.getLabel()), //$NON-NLS-1$
null);
- return (IInstallHandler) handlerExtension[0].createExecutableExtension("class");
+ return (IInstallHandler) handlerExtension[0].createExecutableExtension("class"); //$NON-NLS-1$
}
private void debug(String s) {
- String pfx = (feature==null) ? "" : feature.getVersionedIdentifier().toString();
+ String pfx = (feature==null) ? "" : feature.getVersionedIdentifier().toString(); //$NON-NLS-1$
System.out.println("InstallHandler["+pfx+"]: " + s); //$NON-NLS-1$ //$NON-NLS-2$
}
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/InstallLogParser.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/InstallLogParser.java
index 3b3c5d8..1c4e090 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/InstallLogParser.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/InstallLogParser.java
@@ -50,7 +50,7 @@
public InstallLogParser(){
String loc = ConfiguratorUtils.getCurrentPlatformConfiguration().getConfigurationLocation().getFile();
- logPath = new Path(loc).removeLastSegments(1).append("install.log");
+ logPath = new Path(loc).removeLastSegments(1).append("install.log"); //$NON-NLS-1$
installConfigMap = new HashMap();
try {
InstallConfiguration[] configs = (InstallConfiguration[])SiteManager.getLocalSite().getConfigurationHistory();
@@ -133,10 +133,10 @@
String time = htmlCode.nextToken();
String date;
StringBuffer target = new StringBuffer();
- date = htmlCode.nextToken(".");
- htmlCode.nextToken(" ");
+ date = htmlCode.nextToken("."); //$NON-NLS-1$
+ htmlCode.nextToken(" "); //$NON-NLS-1$
while (htmlCode.countTokens() > 2){
- target.append(" ");
+ target.append(" "); //$NON-NLS-1$
target.append(htmlCode.nextToken());
}
@@ -149,7 +149,7 @@
date = new StringBuffer();
while (htmlCode.countTokens() > 0){
if (date.length() != 0)
- date.append(" ");
+ date.append(" "); //$NON-NLS-1$
date.append(htmlCode.nextToken());
}
currentConfiguration = (InstallConfiguration)installConfigMap.get(new Long(time));
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/InstallRegistry.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/InstallRegistry.java
index 176e1f4..373853d 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/InstallRegistry.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/InstallRegistry.java
@@ -27,7 +27,7 @@
*/
public class InstallRegistry extends Properties {
private File file = null;
- private final static String REGISTRY = "registry";
+ private final static String REGISTRY = "registry"; //$NON-NLS-1$
private static InstallRegistry instance;
// plugins installed in this eclipse session
@@ -95,7 +95,7 @@
boolean ret = false;
try {
out = new FileOutputStream(file);
- super.store(out, "This is a generated file; do not edit.");
+ super.store(out, "This is a generated file; do not edit."); //$NON-NLS-1$
ret = true;
} catch (IOException e) {
UpdateCore.log(e);
@@ -115,7 +115,7 @@
* @param feature feature to register.
*/
public static synchronized void registerFeature(IFeature feature) {
- String name = "feature_"+feature.getVersionedIdentifier();
+ String name = "feature_"+feature.getVersionedIdentifier(); //$NON-NLS-1$
if (InstallRegistry.getInstance().get(name) == null) {
InstallRegistry.getInstance().put(name, name);
// we save after each registration
@@ -128,7 +128,7 @@
* @param pluginEntry plugin to register.
*/
public static synchronized void registerPlugin(IPluginEntry pluginEntry) {
- String name = "plugin_"+pluginEntry.getVersionedIdentifier();
+ String name = "plugin_"+pluginEntry.getVersionedIdentifier(); //$NON-NLS-1$
if (InstallRegistry.getInstance().get(name) == null) {
InstallRegistry.getInstance().put(name, name);
// we save after each registration
@@ -144,7 +144,7 @@
*
*/
public static synchronized void unregisterFeature(IFeature feature) {
- String name = "feature_"+feature.getVersionedIdentifier();
+ String name = "feature_"+feature.getVersionedIdentifier(); //$NON-NLS-1$
InstallRegistry.getInstance().remove(name);
}
@@ -153,7 +153,7 @@
*
*/
public static synchronized void unregisterPlugin(IPluginEntry pluginEntry) {
- String name = "plugin_"+pluginEntry.getVersionedIdentifier();
+ String name = "plugin_"+pluginEntry.getVersionedIdentifier(); //$NON-NLS-1$
InstallRegistry.getInstance().remove(name);
// remove the plugin from the list of just installed plugins (if needed).
@@ -166,7 +166,7 @@
* @return
*/
public boolean isPluginJustInstalled(IPluginEntry pluginEntry) {
- String name = "plugin_"+pluginEntry.getVersionedIdentifier();
+ String name = "plugin_"+pluginEntry.getVersionedIdentifier(); //$NON-NLS-1$
return InstallRegistry.getInstance().justInstalledPlugins.get(name) != null;
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/InternalSiteManager.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/InternalSiteManager.java
index e5fe36e..918fd7e 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/InternalSiteManager.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/InternalSiteManager.java
@@ -101,10 +101,10 @@
}
// try adding "eclipse" to the site url, in case this is an extension site
- if ("file".equals(siteURL.getProtocol()) ) {
+ if ("file".equals(siteURL.getProtocol()) ) { //$NON-NLS-1$
File f = new File(siteURL.getFile());
- if (f.isDirectory() && !"eclipse".equals(f.getName())) {
- f = new File(f, "eclipse");
+ if (f.isDirectory() && !"eclipse".equals(f.getName())) { //$NON-NLS-1$
+ f = new File(f, "eclipse"); //$NON-NLS-1$
try {
if ((useCache && globalUseCache) && isValidCachedSite(f.toURL())) {
site = (ISite) sites.get(f.toURL().toExternalForm());
@@ -119,7 +119,7 @@
// and no site.xml exist
// if the user points to a file, consider DEFAULT_SITE_TYPE
// site.xml will have to specify the type
- boolean fileProtocol = "file".equalsIgnoreCase(siteURL.getProtocol());
+ boolean fileProtocol = "file".equalsIgnoreCase(siteURL.getProtocol()); //$NON-NLS-1$
boolean directoryExists = false;
if (fileProtocol) {
File dir;
@@ -131,7 +131,7 @@
}
//PERF: if file: <path>/ and directory exists then consider executable
- monitor.beginTask(Policy.bind("InternalSiteManager.ConnectingToSite"), 8);
+ monitor.beginTask(Policy.bind("InternalSiteManager.ConnectingToSite"), 8); //$NON-NLS-1$
if (fileProtocol && directoryExists) {
site = attemptCreateSite(DEFAULT_EXECUTABLE_SITE_TYPE, siteURL, monitor);
monitor.worked(4); // only one attempt
@@ -202,7 +202,7 @@
// attempt to use this type instead
//DEBUG:
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_TYPE) {
- UpdateCore.debug("The Site :" + siteURL.toExternalForm() + " is a different type than the guessed type based on the protocol. new Type:" + e.getNewType()); //$NON-NLS-1$
+ UpdateCore.debug("The Site :" + siteURL.toExternalForm() + " is a different type than the guessed type based on the protocol. new Type:" + e.getNewType()); //$NON-NLS-1$ //$NON-NLS-2$
}
try {
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/NonPluginEntryContentConsumer.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/NonPluginEntryContentConsumer.java
index 4fb6986..a24168b 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/NonPluginEntryContentConsumer.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/NonPluginEntryContentConsumer.java
@@ -36,7 +36,7 @@
if (!closed){
contentConsumer.store( contentReference,monitor);
} else {
- UpdateCore.warn("Attempt to store in a closed NonPluginEntryContentConsumer",new Exception());
+ UpdateCore.warn("Attempt to store in a closed NonPluginEntryContentConsumer",new Exception()); //$NON-NLS-1$
}
}
@@ -48,7 +48,7 @@
closed = true;
contentConsumer.close();
} else {
- UpdateCore.warn("Attempt to close a closed NonPluginEntryContentConsumer",new Exception());
+ UpdateCore.warn("Attempt to close a closed NonPluginEntryContentConsumer",new Exception()); //$NON-NLS-1$
}
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/OtherResponse.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/OtherResponse.java
index 16dea7a..223bec1 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/OtherResponse.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/OtherResponse.java
@@ -50,7 +50,7 @@
}
public String getStatusMessage() {
- return "";
+ return ""; //$NON-NLS-1$
}
public long getLastModified() {
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/PatchedFeature.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/PatchedFeature.java
index 0999942..f6d6edb 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/PatchedFeature.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/PatchedFeature.java
@@ -67,7 +67,7 @@
try {
IFeature feature = featureRefs[i].getFeature(null);
if (feature == null) {
- UpdateCore.warn("Null Feature", new Exception());
+ UpdateCore.warn("Null Feature", new Exception()); //$NON-NLS-1$
continue;
}
// get plugin entries
@@ -94,7 +94,7 @@
StringBuffer str = new StringBuffer(feature.toString());
IFeatureReference[] patches = getFeatureAndPatches();
for (int i = 0; i < patches.length; i++) {
- str.append(" +patch=" + patches[i].toString() + " ");
+ str.append(" +patch=" + patches[i].toString() + " "); //$NON-NLS-1$ //$NON-NLS-2$
}
return str.toString();
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/PluginEntryContentConsumer.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/PluginEntryContentConsumer.java
index 2f3c6b1..f99c265 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/PluginEntryContentConsumer.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/PluginEntryContentConsumer.java
@@ -36,7 +36,7 @@
if (!closed){
contentConsumer.store(contentReference,monitor);
} else {
- UpdateCore.warn("Attempt to store in a closed PluginEntryContentConsumer",new Exception());
+ UpdateCore.warn("Attempt to store in a closed PluginEntryContentConsumer",new Exception()); //$NON-NLS-1$
}
}
@@ -48,7 +48,7 @@
closed = true;
contentConsumer.close();
} else {
- UpdateCore.warn("Attempt to close a closed PluginEntryContentConsumer",new Exception());
+ UpdateCore.warn("Attempt to close a closed PluginEntryContentConsumer",new Exception()); //$NON-NLS-1$
}
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteFileContentConsumer.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteFileContentConsumer.java
index a2a08de..4fdbe14 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteFileContentConsumer.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteFileContentConsumer.java
@@ -91,7 +91,7 @@
public void store(ContentReference contentReference, IProgressMonitor monitor) throws CoreException {
if (closed) {
- UpdateCore.warn("Attempt to store in a closed SiteFileContentConsumer", new Exception());
+ UpdateCore.warn("Attempt to store in a closed SiteFileContentConsumer", new Exception()); //$NON-NLS-1$
return;
}
@@ -101,11 +101,11 @@
featurePath += contentKey;
// error recovery
- if (featurePath.endsWith("\\"+Feature.FEATURE_XML) || featurePath.endsWith("/"+Feature.FEATURE_XML)) {
+ if (featurePath.endsWith("\\"+Feature.FEATURE_XML) || featurePath.endsWith("/"+Feature.FEATURE_XML)) { //$NON-NLS-1$ //$NON-NLS-2$
oldPath = featurePath.replace(File.separatorChar, '/');
File localFile = new File(oldPath);
if (localFile.exists()) {
- throw Utilities.newCoreException(Policy.bind("UpdateManagerUtils.FileAlreadyExists", new Object[] { localFile }), null);
+ throw Utilities.newCoreException(Policy.bind("UpdateManagerUtils.FileAlreadyExists", new Object[] { localFile }), null); //$NON-NLS-1$
}
featurePath = ErrorRecoveryLog.getLocalRandomIdentifier(featurePath);
newPath = featurePath;
@@ -137,7 +137,7 @@
public IFeatureReference close() throws CoreException {
if (closed)
- UpdateCore.warn("Attempt to close a closed SiteFileContentConsumer", new Exception());
+ UpdateCore.warn("Attempt to close a closed SiteFileContentConsumer", new Exception()); //$NON-NLS-1$
// create a new Feature reference to be added to the site
SiteFeatureReference ref = new SiteFeatureReference();
@@ -160,12 +160,12 @@
File renamedFile = new File(oldPath);
if (renamedFile.exists()) {
UpdateManagerUtils.removeFromFileSystem(renamedFile);
- UpdateCore.warn("Removing already existing file:" + oldPath);
+ UpdateCore.warn("Removing already existing file:" + oldPath); //$NON-NLS-1$
}
sucess = fileToRename.renameTo(renamedFile);
}
if (!sucess) {
- String msg = Policy.bind("ContentConsumer.UnableToRename", newPath, oldPath);
+ String msg = Policy.bind("ContentConsumer.UnableToRename", newPath, oldPath); //$NON-NLS-1$
throw Utilities.newCoreException(msg, new Exception(msg));
}
}
@@ -197,7 +197,7 @@
public void abort() throws CoreException {
if (closed) {
- UpdateCore.warn("Attempt to abort a closed SiteFileContentConsumer", new Exception());
+ UpdateCore.warn("Attempt to abort a closed SiteFileContentConsumer", new Exception()); //$NON-NLS-1$
return;
}
@@ -222,7 +222,7 @@
}
if (!sucess) {
- String msg = Policy.bind("Unable to delete", oldPath);
+ String msg = Policy.bind("Unable to delete", oldPath); //$NON-NLS-1$
UpdateCore.log(msg, null);
} else {
// remove the feature files;
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteFileFactory.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteFileFactory.java
index df988ff..6be1b9c 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteFileFactory.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteFileFactory.java
@@ -82,7 +82,7 @@
// Do not set read only as may install in it
//site.markReadOnly();
} catch (MalformedURLException e) {
- throw Utilities.newCoreException(Policy.bind("SiteFileFactory.UnableToCreateURL", url == null ? "" : url.toExternalForm()), e); //$NON-NLS-1$
+ throw Utilities.newCoreException(Policy.bind("SiteFileFactory.UnableToCreateURL", url == null ? "" : url.toExternalForm()), e); //$NON-NLS-1$ //$NON-NLS-2$
} catch (IOException e) {
throw Utilities.newCoreException(Policy.bind("SiteFileFactory.UnableToAccessSite"),ISite.SITE_ACCESS_EXCEPTION, e);//$NON-NLS-1$
} finally {
@@ -140,12 +140,12 @@
for (int index = 0; index < dir.length; index++) {
// the URL must ends with '/' for the bundle to be resolved
- newFilePath = dir[index] + (dir[index].endsWith("/") ? "/" : "");
+ newFilePath = dir[index] + (dir[index].endsWith("/") ? "/" : ""); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
currentFeatureDir = new File(featureDir, newFilePath);
// check if feature.xml exists
File featureXMLFile = new File(currentFeatureDir, Feature.FEATURE_XML);
if (!featureXMLFile.exists()) {
- UpdateCore.warn("Unable to find feature.xml in directory:" + currentFeatureDir);
+ UpdateCore.warn("Unable to find feature.xml in directory:" + currentFeatureDir); //$NON-NLS-1$
} else {
// PERF: remove code
//SiteFileFactory archiveFactory = new SiteFileFactory();
@@ -185,15 +185,15 @@
// check if the JAR file contains a feature.xml
currentFeatureFile = new File(featureDir, dir[index]);
- JarContentReference ref = new JarContentReference("", currentFeatureFile);
+ JarContentReference ref = new JarContentReference("", currentFeatureFile); //$NON-NLS-1$
ContentReference result = null;
try {
result = ref.peek(Feature.FEATURE_XML, null, null);
} catch (IOException e) {
- UpdateCore.warn("Exception retrieving feature.xml in file:" + currentFeatureFile, e);
+ UpdateCore.warn("Exception retrieving feature.xml in file:" + currentFeatureFile, e); //$NON-NLS-1$
}
if (result == null) {
- UpdateCore.warn("Unable to find feature.xml in file:" + currentFeatureFile);
+ UpdateCore.warn("Unable to find feature.xml in file:" + currentFeatureFile); //$NON-NLS-1$
} else {
featureURL = currentFeatureFile.toURL();
// PERF: remove code
@@ -230,7 +230,7 @@
});
DefaultPluginParser parser = new DefaultPluginParser();
for (int i = 0; i < dirs.length; i++) {
- File pluginFile = new File(dirs[i], "META-INF/MANIFEST.MF");
+ File pluginFile = new File(dirs[i], "META-INF/MANIFEST.MF"); //$NON-NLS-1$
InputStream in = null;
try {
BundleManifest bundleManifest = new BundleManifest(pluginFile);
@@ -238,7 +238,7 @@
PluginEntry entry = bundleManifest.getPluginEntry();
addParsedPlugin(entry, dirs[i]);
} else {
- if (!(pluginFile = new File(dirs[i], "plugin.xml"))
+ if (!(pluginFile = new File(dirs[i], "plugin.xml")) //$NON-NLS-1$
.exists()) { //$NON-NLS-1$
pluginFile = new File(dirs[i], "fragment.xml"); //$NON-NLS-1$
}
@@ -301,7 +301,7 @@
// TRACE
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_PARSING) {
- UpdateCore.debug("Added archive to site:" + pluginID + " pointing to: " + location);
+ UpdateCore.debug("Added archive to site:" + pluginID + " pointing to: " + location); //$NON-NLS-1$ //$NON-NLS-2$
}
}
} catch (MalformedURLException e) {
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteFileNonPluginContentConsumer.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteFileNonPluginContentConsumer.java
index 4efea42..0b165ff 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteFileNonPluginContentConsumer.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteFileNonPluginContentConsumer.java
@@ -35,7 +35,7 @@
public void store(ContentReference contentReference, IProgressMonitor monitor) throws CoreException {
if (closed) {
- UpdateCore.warn("Attempt to store in a closed SiteFileNonPluginContentConsumer", new Exception());
+ UpdateCore.warn("Attempt to store in a closed SiteFileNonPluginContentConsumer", new Exception()); //$NON-NLS-1$
return;
}
@@ -66,7 +66,7 @@
*/
public void close() {
if (closed) {
- UpdateCore.warn("Attempt to close a closed SiteFileNonPluginContentConsumer", new Exception());
+ UpdateCore.warn("Attempt to close a closed SiteFileNonPluginContentConsumer", new Exception()); //$NON-NLS-1$
return;
}
closed = true;
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteFilePackedPluginContentConsumer.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteFilePackedPluginContentConsumer.java
index 5bbd500..fb3de3d 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteFilePackedPluginContentConsumer.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteFilePackedPluginContentConsumer.java
@@ -42,20 +42,20 @@
InputStream inStream = null;
if (closed) {
- UpdateCore.warn("Attempt to store in a closed SiteFilePluginContentConsumer", new Exception());
+ UpdateCore.warn("Attempt to store in a closed SiteFilePluginContentConsumer", new Exception()); //$NON-NLS-1$
return;
}
try {
- URL newURL = new URL(site.getURL(), Site.DEFAULT_PLUGIN_PATH + pluginEntry.getVersionedIdentifier().toString() + ".jar");
+ URL newURL = new URL(site.getURL(), Site.DEFAULT_PLUGIN_PATH + pluginEntry.getVersionedIdentifier().toString() + ".jar"); //$NON-NLS-1$
inStream = contentReference.getInputStream();
jarPath = newURL.getFile().replace(File.separatorChar, '/');
File jarFile = new File(jarPath);
if (jarFile.exists()) {
- throw Utilities.newCoreException(Policy.bind("UpdateManagerUtils.FileAlreadyExists", new Object[] { jarFile }), null);
+ throw Utilities.newCoreException(Policy.bind("UpdateManagerUtils.FileAlreadyExists", new Object[] { jarFile }), null); //$NON-NLS-1$
}
// error recovery
- tempPath= ErrorRecoveryLog.getLocalRandomIdentifier(jarPath+".tmp");
+ tempPath= ErrorRecoveryLog.getLocalRandomIdentifier(jarPath+".tmp"); //$NON-NLS-1$
ErrorRecoveryLog.getLog().appendPath(ErrorRecoveryLog.BUNDLE_JAR_ENTRY, tempPath);
//
UpdateManagerUtils.copyToLocal(inStream, tempPath, null);
@@ -78,7 +78,7 @@
public void close() throws CoreException {
if (closed) {
- UpdateCore.warn("Attempt to close a closed SiteFilePluginContentConsumer", new Exception());
+ UpdateCore.warn("Attempt to close a closed SiteFilePluginContentConsumer", new Exception()); //$NON-NLS-1$
return;
}
@@ -92,7 +92,7 @@
sucess = fileToRename.renameTo(renamedFile);
}
if (!sucess) {
- String msg = Policy.bind("ContentConsumer.UnableToRename", tempPath, jarPath);
+ String msg = Policy.bind("ContentConsumer.UnableToRename", tempPath, jarPath); //$NON-NLS-1$
throw Utilities.newCoreException(msg, new Exception(msg));
}
}
@@ -108,7 +108,7 @@
public void abort() throws CoreException {
if (closed) {
- UpdateCore.warn("Attempt to abort a closed SiteFilePluginContentConsumer", new Exception());
+ UpdateCore.warn("Attempt to abort a closed SiteFilePluginContentConsumer", new Exception()); //$NON-NLS-1$
return;
}
@@ -125,7 +125,7 @@
}
if (!sucess) {
- String msg = Policy.bind("Unable to delete", jarPath);
+ String msg = Policy.bind("Unable to delete", jarPath); //$NON-NLS-1$
UpdateCore.log(msg, null);
}
closed = true;
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteFilePluginContentConsumer.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteFilePluginContentConsumer.java
index 1e7ae92..282f53b 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteFilePluginContentConsumer.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteFilePluginContentConsumer.java
@@ -50,7 +50,7 @@
String pluginPath = null;
if (closed) {
- UpdateCore.warn("Attempt to store in a closed SiteFilePluginContentConsumer", new Exception());
+ UpdateCore.warn("Attempt to store in a closed SiteFilePluginContentConsumer", new Exception()); //$NON-NLS-1$
return;
}
@@ -63,18 +63,18 @@
// error recovery
String logEntry=null;
- if ("plugin.xml".equals(contentKey)) {
+ if ("plugin.xml".equals(contentKey)) { //$NON-NLS-1$
logEntry=ErrorRecoveryLog.PLUGIN_ENTRY;
- } else if ("fragment.xml".equals(contentKey)) {
+ } else if ("fragment.xml".equals(contentKey)) { //$NON-NLS-1$
logEntry=ErrorRecoveryLog.FRAGMENT_ENTRY;
- } else if ("META-INF/MANIFEST.MF".equals(contentKey)) {
+ } else if ("META-INF/MANIFEST.MF".equals(contentKey)) { //$NON-NLS-1$
logEntry=ErrorRecoveryLog.BUNDLE_MANIFEST_ENTRY;
}
if (logEntry!=null) {
String originalName = pluginPath.replace(File.separatorChar, '/');
File localFile = new File(originalName);
if (localFile.exists()) {
- throw Utilities.newCoreException(Policy.bind("UpdateManagerUtils.FileAlreadyExists", new Object[] { localFile }), null);
+ throw Utilities.newCoreException(Policy.bind("UpdateManagerUtils.FileAlreadyExists", new Object[] { localFile }), null); //$NON-NLS-1$
}
pluginPath = ErrorRecoveryLog.getLocalRandomIdentifier(pluginPath);
renames.put(pluginPath, originalName);
@@ -103,7 +103,7 @@
public void close() throws CoreException {
if (closed) {
- UpdateCore.warn("Attempt to close a closed SiteFilePluginContentConsumer", new Exception());
+ UpdateCore.warn("Attempt to close a closed SiteFilePluginContentConsumer", new Exception()); //$NON-NLS-1$
return;
}
@@ -120,7 +120,7 @@
sucess = fileToRename.renameTo(renamedFile);
}
if (!sucess) {
- String msg = Policy.bind("ContentConsumer.UnableToRename", temporary, original);
+ String msg = Policy.bind("ContentConsumer.UnableToRename", temporary, original); //$NON-NLS-1$
throw Utilities.newCoreException(msg, new Exception(msg));
}
}
@@ -136,7 +136,7 @@
public void abort() throws CoreException {
if (closed) {
- UpdateCore.warn("Attempt to abort a closed SiteFilePluginContentConsumer", new Exception());
+ UpdateCore.warn("Attempt to abort a closed SiteFilePluginContentConsumer", new Exception()); //$NON-NLS-1$
return;
}
@@ -149,7 +149,7 @@
File fileToRemove = new File(originalName);
if (fileToRemove.exists()) {
if(!fileToRemove.delete()){
- String msg = Policy.bind("Unable to delete", originalName);
+ String msg = Policy.bind("Unable to delete", originalName); //$NON-NLS-1$
UpdateCore.log(msg, null);
success = false;
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteReconciler.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteReconciler.java
index 875954e..30edeb0 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteReconciler.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteReconciler.java
@@ -62,7 +62,7 @@
// TRACE
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_RECONCILER) {
- UpdateCore.debug("Compare features within :" + configuredSite.getSite().getURL());
+ UpdateCore.debug("Compare features within :" + configuredSite.getSite().getURL()); //$NON-NLS-1$
}
for (int indexConfiguredFeatures = 0; indexConfiguredFeatures < configuredFeatures.length - 1; indexConfiguredFeatures++) {
@@ -95,7 +95,7 @@
// TRACE
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_RECONCILER) {
- UpdateCore.debug("Compare: " + featureRef1 + " && " + featureRef2);
+ UpdateCore.debug("Compare: " + featureRef1 + " && " + featureRef2); //$NON-NLS-1$ //$NON-NLS-2$
}
if (featureRef1 == null)
@@ -157,7 +157,7 @@
ConfiguredSite cSite = (ConfiguredSite) configuredSite;
// debug
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_RECONCILER) {
- UpdateCore.debug("Validate configuration of site " + cSite.getSite().getURL());
+ UpdateCore.debug("Validate configuration of site " + cSite.getSite().getURL()); //$NON-NLS-1$
}
IFeatureReference[] configuredRefs = cSite.getConfiguredFeatures();
ArrayList allPossibleConfiguredFeatures = new ArrayList();
@@ -167,10 +167,10 @@
allPossibleConfiguredFeatures.add(feature);
// debug
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_RECONCILER) {
- UpdateCore.debug(" configured feature " + feature.getVersionedIdentifier().toString());
+ UpdateCore.debug(" configured feature " + feature.getVersionedIdentifier().toString()); //$NON-NLS-1$
}
} catch (CoreException e) {
- UpdateCore.warn("", e);
+ UpdateCore.warn("", e); //$NON-NLS-1$
}
}
@@ -213,10 +213,10 @@
cPolicy.unconfigure(ref, true, false);
// debug
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_RECONCILER) {
- UpdateCore.debug("Unconfiguring \"extra\" feature " + feature.getVersionedIdentifier().toString());
+ UpdateCore.debug("Unconfiguring \"extra\" feature " + feature.getVersionedIdentifier().toString()); //$NON-NLS-1$
}
} catch (CoreException e) {
- UpdateCore.warn("", e);
+ UpdateCore.warn("", e); //$NON-NLS-1$
}
}
}
@@ -241,20 +241,20 @@
topFeatures.remove(children[j].getVersionedIdentifier());
} catch (CoreException e1) {
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_WARNINGS)
- UpdateCore.warn("", e1);
+ UpdateCore.warn("", e1); //$NON-NLS-1$
}
}
} catch (CoreException e) {
- UpdateCore.warn("", e);
+ UpdateCore.warn("", e); //$NON-NLS-1$
}
}
ArrayList list = new ArrayList();
list.addAll(topFeatures.values());
// debug
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_RECONCILER) {
- UpdateCore.debug("Computed top-level features");
+ UpdateCore.debug("Computed top-level features"); //$NON-NLS-1$
for (int i = 0; i < topFeatures.size(); i++) {
- UpdateCore.debug(" " + ((IFeature) list.get(i)).getVersionedIdentifier().toString());
+ UpdateCore.debug(" " + ((IFeature) list.get(i)).getVersionedIdentifier().toString()); //$NON-NLS-1$
}
}
return list;
@@ -284,7 +284,7 @@
features.add(feature);
// debug
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_RECONCILER) {
- UpdateCore.debug("Retaining configured feature " + feature.getVersionedIdentifier().toString());
+ UpdateCore.debug("Retaining configured feature " + feature.getVersionedIdentifier().toString()); //$NON-NLS-1$
}
}
@@ -293,7 +293,7 @@
try {
children = feature.getIncludedFeatureReferences();
} catch (CoreException e) {
- UpdateCore.warn("", e);
+ UpdateCore.warn("", e); //$NON-NLS-1$
return;
}
@@ -303,7 +303,7 @@
child = children[j].getFeature(null);
} catch (CoreException e) {
if (!UpdateManagerUtils.isOptional(children[j]))
- UpdateCore.warn("", e);
+ UpdateCore.warn("", e); //$NON-NLS-1$
// 25202 do not return right now, the peer children may be ok
}
if (child != null)
@@ -342,7 +342,7 @@
if (element.getImports()[i].isPatch()) {
VersionedIdentifier id = element.getImports()[i].getVersionedIdentifier();
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_RECONCILER)
- UpdateCore.debug("Found patch " + element + " for feature identifier " + id);
+ UpdateCore.debug("Found patch " + element + " for feature identifier " + id); //$NON-NLS-1$ //$NON-NLS-2$
patchedFeaturesID.add(id);
}
}
@@ -387,10 +387,10 @@
if (!toEnable) {
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_RECONCILER)
- UpdateCore.debug("The Patch " + efixFeature + " does not patch any enabled features: it will be disabled");
+ UpdateCore.debug("The Patch " + efixFeature + " does not patch any enabled features: it will be disabled"); //$NON-NLS-1$ //$NON-NLS-2$
} else {
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_RECONCILER)
- UpdateCore.debug("The patch " + efixFeature + " will be enabled.");
+ UpdateCore.debug("The patch " + efixFeature + " will be enabled."); //$NON-NLS-1$ //$NON-NLS-2$
result.add(efixFeature);
}
}
@@ -430,7 +430,7 @@
features.add(feature);
// debug
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_RECONCILER) {
- UpdateCore.debug("Retaining configured feature " + feature.getVersionedIdentifier().toString());
+ UpdateCore.debug("Retaining configured feature " + feature.getVersionedIdentifier().toString()); //$NON-NLS-1$
}
}
@@ -439,7 +439,7 @@
try {
children = feature.getIncludedFeatureReferences();
} catch (CoreException e) {
- UpdateCore.warn("", e);
+ UpdateCore.warn("", e); //$NON-NLS-1$
return;
}
@@ -449,7 +449,7 @@
child = children[j].getFeature(null);
} catch (CoreException e) {
if (!children[j].isOptional())
- UpdateCore.warn("", e);
+ UpdateCore.warn("", e); //$NON-NLS-1$
// 25202 do not return right now, the peer children may be ok
}
if (child != null){
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteStatusAnalyzer.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteStatusAnalyzer.java
index 7757071..4491006 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteStatusAnalyzer.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteStatusAnalyzer.java
@@ -72,8 +72,8 @@
ISite featureSite = feature.getSite();
if (featureSite == null) {
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_CONFIGURATION)
- UpdateCore.debug("Cannot determine status of feature:" + feature.getLabel() + ". Site is NULL.");
- String msg = Policy.bind("SiteLocal.UnableToDetermineFeatureStatusSiteNull", new Object[] { feature.getURL()});
+ UpdateCore.debug("Cannot determine status of feature:" + feature.getLabel() + ". Site is NULL."); //$NON-NLS-1$ //$NON-NLS-2$
+ String msg = Policy.bind("SiteLocal.UnableToDetermineFeatureStatusSiteNull", new Object[] { feature.getURL()}); //$NON-NLS-1$
return createStatus(IStatus.ERROR, IFeature.STATUS_AMBIGUOUS, msg, null);
}
@@ -81,8 +81,8 @@
ConfiguredSite cSite = (ConfiguredSite) featureSite.getCurrentConfiguredSite();
if (cSite == null) {
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_CONFIGURATION)
- UpdateCore.warn("Cannot determine status of feature: " + feature.getLabel() + ". Configured Site is NULL.");
- String msg = Policy.bind("SiteLocal.UnableToDetermineFeatureStatusConfiguredSiteNull", new Object[] { feature.getURL()});
+ UpdateCore.warn("Cannot determine status of feature: " + feature.getLabel() + ". Configured Site is NULL."); //$NON-NLS-1$ //$NON-NLS-2$
+ String msg = Policy.bind("SiteLocal.UnableToDetermineFeatureStatusConfiguredSiteNull", new Object[] { feature.getURL()}); //$NON-NLS-1$
return createStatus(IStatus.ERROR, IFeature.STATUS_AMBIGUOUS, msg, null);
}
@@ -90,17 +90,17 @@
IFeatureReference ref = cSite.getSite().getFeatureReference(feature);
if (ref != null) {
if (!cSite.getConfigurationPolicy().isConfigured(ref))
- return createStatus(IStatus.OK, IFeature.STATUS_DISABLED, "", null);
+ return createStatus(IStatus.OK, IFeature.STATUS_DISABLED, "", null); //$NON-NLS-1$
} else {
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_CONFIGURATION)
- UpdateCore.warn("Unable to find reference for feature " + feature + " in site " + cSite.getSite().getURL());
+ UpdateCore.warn("Unable to find reference for feature " + feature + " in site " + cSite.getSite().getURL()); //$NON-NLS-1$ //$NON-NLS-2$
}
// check if broken
IStatus status = cSite.getBrokenStatus(feature);
if (status.getSeverity() != IStatus.OK) {
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_CONFIGURATION)
- UpdateCore.debug("Feature broken:" + feature.getLabel() + ".Site:" + cSite.toString());
+ UpdateCore.debug("Feature broken:" + feature.getLabel() + ".Site:" + cSite.toString()); //$NON-NLS-1$ //$NON-NLS-2$
return status;
}
@@ -125,7 +125,7 @@
// consider disable
// check the current feature
- String msg = Policy.bind("SiteLocal.FeatureDisable");
+ String msg = Policy.bind("SiteLocal.FeatureDisable"); //$NON-NLS-1$
int code = IFeature.STATUS_DISABLED;
IStatus featureStatus = getStatus(feature);
MultiStatus multiTemp = new MultiStatus(featureStatus.getPlugin(), code, msg, null);
@@ -148,15 +148,15 @@
childFeature = children[i].getFeature(null);
} catch (CoreException e) {
if (!UpdateManagerUtils.isOptional(children[i]))
- UpdateCore.warn("Error retrieving feature:" + children[i]);
+ UpdateCore.warn("Error retrieving feature:" + children[i]); //$NON-NLS-1$
}
if (childFeature == null) {
- UpdateCore.warn("getFeatureStatus: Feature is null for:" + children[i]);
+ UpdateCore.warn("getFeatureStatus: Feature is null for:" + children[i]); //$NON-NLS-1$
// Unable to find children feature, broken
Object featureAsPrintableObject = children[i].getURL();
featureAsPrintableObject = children[i].getVersionedIdentifier();
- String msg1 = Policy.bind("SiteLocal.NestedFeatureUnavailable", new Object[] { featureAsPrintableObject });
+ String msg1 = Policy.bind("SiteLocal.NestedFeatureUnavailable", new Object[] { featureAsPrintableObject }); //$NON-NLS-1$
multiTemp.add(createStatus(IStatus.ERROR, IFeature.STATUS_UNHAPPY, msg1, null));
if (IFeature.STATUS_UNHAPPY > code)
code = IFeature.STATUS_UNHAPPY;
@@ -166,16 +166,16 @@
// returns a multiStatus
if (childStatus.getCode() == IFeature.STATUS_DISABLED) {
VersionedIdentifier versionID = childFeature.getVersionedIdentifier();
- String featureVer = (versionID == null) ? "" : versionID.getVersion().toString();
- String msg1 = Policy.bind("SiteLocal.NestedFeatureDisable", childFeature.getLabel(), featureVer);
+ String featureVer = (versionID == null) ? "" : versionID.getVersion().toString(); //$NON-NLS-1$
+ String msg1 = Policy.bind("SiteLocal.NestedFeatureDisable", childFeature.getLabel(), featureVer); //$NON-NLS-1$
multiTemp.add(createStatus(IStatus.ERROR, childStatus.getCode(), msg1, null));
if (IFeature.STATUS_UNHAPPY > code)
code = IFeature.STATUS_UNHAPPY;
}
if (childStatus.getSeverity() != IStatus.OK) {
VersionedIdentifier versionID = childFeature.getVersionedIdentifier();
- String featureVer = (versionID == null) ? "" : versionID.getVersion().toString();
- String msg1 = Policy.bind("SiteLocal.NestedFeatureUnHappy", childFeature.getLabel(), featureVer);
+ String featureVer = (versionID == null) ? "" : versionID.getVersion().toString(); //$NON-NLS-1$
+ String msg1 = Policy.bind("SiteLocal.NestedFeatureUnHappy", childFeature.getLabel(), featureVer); //$NON-NLS-1$
multiTemp.add(createStatus(IStatus.ERROR, childStatus.getCode(), msg1, null));
if (childStatus.getCode() > code)
code = childStatus.getCode();
@@ -188,19 +188,19 @@
// set message
switch (code) {
case IFeature.STATUS_HAPPY :
- msg = Policy.bind("SiteLocal.FeatureHappy");
+ msg = Policy.bind("SiteLocal.FeatureHappy"); //$NON-NLS-1$
break;
case IFeature.STATUS_UNHAPPY :
- msg = Policy.bind("SiteLocal.FeatureUnHappy");
+ msg = Policy.bind("SiteLocal.FeatureUnHappy"); //$NON-NLS-1$
break;
case IFeature.STATUS_AMBIGUOUS :
- msg = Policy.bind("SiteLocal.FeatureAmbiguous");
+ msg = Policy.bind("SiteLocal.FeatureAmbiguous"); //$NON-NLS-1$
break;
case IFeature.STATUS_DISABLED :
- msg = Policy.bind("SiteLocal.FeatureDisable");
+ msg = Policy.bind("SiteLocal.FeatureDisable"); //$NON-NLS-1$
break;
default :
- msg = Policy.bind("SiteLocal.FeatureStatusUnknown");
+ msg = Policy.bind("SiteLocal.FeatureStatusUnknown"); //$NON-NLS-1$
break;
}
MultiStatus multi = new MultiStatus(featureStatus.getPlugin(), code, msg, null);
@@ -214,9 +214,9 @@
private IStatus status(IPluginEntry[] featurePlugins) {
VersionedIdentifier featurePluginID;
- String happyMSG = Policy.bind("SiteLocal.FeatureHappy");
- String ambiguousMSG = Policy.bind("SiteLocal.FeatureAmbiguous");
- IStatus featureStatus = createStatus(IStatus.OK, IFeature.STATUS_HAPPY, "", null);
+ String happyMSG = Policy.bind("SiteLocal.FeatureHappy"); //$NON-NLS-1$
+ String ambiguousMSG = Policy.bind("SiteLocal.FeatureAmbiguous"); //$NON-NLS-1$
+ IStatus featureStatus = createStatus(IStatus.OK, IFeature.STATUS_HAPPY, "", null); //$NON-NLS-1$
MultiStatus multi = new MultiStatus(featureStatus.getPlugin(), IFeature.STATUS_AMBIGUOUS, ambiguousMSG, null);
PackageAdmin pkgAdmin = UpdateCore.getPlugin().getPackageAdmin();
@@ -243,15 +243,15 @@
String msg = null;
if (feature == null) {
Object[] values = new Object[] {bundles[j].getSymbolicName(), featurePluginID.getVersion(), bundleVersion};
- msg = Policy.bind("SiteLocal.TwoVersionSamePlugin1", values);
+ msg = Policy.bind("SiteLocal.TwoVersionSamePlugin1", values); //$NON-NLS-1$
} else {
String label = feature.getLabel();
String featureVersion = feature.getVersionedIdentifier().getVersion().toString();
Object[] values = new Object[] { bundles[j].getSymbolicName(), featurePluginID.getVersion(), bundleVersion, label, featureVersion };
- msg = Policy.bind("SiteLocal.TwoVersionSamePlugin2", values);
+ msg = Policy.bind("SiteLocal.TwoVersionSamePlugin2", values); //$NON-NLS-1$
}
- UpdateCore.warn("Found another version of the same plugin on the path:" + bundles[j].getSymbolicName() + " " + bundleVersion);
+ UpdateCore.warn("Found another version of the same plugin on the path:" + bundles[j].getSymbolicName() + " " + bundleVersion); //$NON-NLS-1$ //$NON-NLS-2$
tempmulti.add(createStatus(IStatus.ERROR, IFeature.STATUS_AMBIGUOUS, msg, null));
}
@@ -264,12 +264,12 @@
multi.addAll(tempmulti);
} else {
if (multi.getCode() != IFeature.STATUS_UNHAPPY) {
- String unhappyMSG = Policy.bind("SiteLocal.FeatureUnHappy");
+ String unhappyMSG = Policy.bind("SiteLocal.FeatureUnHappy"); //$NON-NLS-1$
MultiStatus newMulti = new MultiStatus(featureStatus.getPlugin(), IFeature.STATUS_UNHAPPY, unhappyMSG, null);
newMulti.addAll(multi);
multi = newMulti;
}
- String msg = Policy.bind("SiteLocal.NoPluginVersion", featurePluginID.getIdentifier());
+ String msg = Policy.bind("SiteLocal.NoPluginVersion", featurePluginID.getIdentifier()); //$NON-NLS-1$
multi.add(createStatus(IStatus.ERROR, IFeature.STATUS_UNHAPPY, msg, null));
}
}
@@ -287,13 +287,13 @@
private IStatus createStatus(int statusSeverity, int statusCode, String msg, Exception e) {
String id = UpdateCore.getPlugin().getBundle().getSymbolicName();
- StringBuffer completeString = new StringBuffer("");
+ StringBuffer completeString = new StringBuffer(""); //$NON-NLS-1$
if (msg != null)
completeString.append(msg);
if (e != null) {
- completeString.append("\r\n[");
+ completeString.append("\r\n["); //$NON-NLS-1$
completeString.append(e.toString());
- completeString.append("]\r\n");
+ completeString.append("]\r\n"); //$NON-NLS-1$
}
return new Status(statusSeverity, id, statusCode, completeString.toString(), e);
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteURLContentProvider.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteURLContentProvider.java
index 5eeece0..2985ee4 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteURLContentProvider.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteURLContentProvider.java
@@ -59,7 +59,7 @@
if (siteArchives.length > 0) {
for (int i = 0; i < siteArchives.length && !found; i++) {
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_INSTALL)
- UpdateCore.debug("GetArchiveURL for:"+archiveId+" compare to "+siteArchives[i].getPath());
+ UpdateCore.debug("GetArchiveURL for:"+archiveId+" compare to "+siteArchives[i].getPath()); //$NON-NLS-1$ //$NON-NLS-2$
if (archiveId.trim().equalsIgnoreCase(siteArchives[i].getPath())) {
result = siteArchives[i].getURL();
found = true;
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteURLFactory.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteURLFactory.java
index 16823d2..2eecbfd 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteURLFactory.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/SiteURLFactory.java
@@ -65,9 +65,9 @@
site.resolve(url, url);
site.markReadOnly();
} catch (MalformedURLException e) {
- throw Utilities.newCoreException(Policy.bind("SiteURLFactory.UnableToCreateURL", url == null ? "" : url.toExternalForm()), e); //$NON-NLS-1$
+ throw Utilities.newCoreException(Policy.bind("SiteURLFactory.UnableToCreateURL", url == null ? "" : url.toExternalForm()), e); //$NON-NLS-1$ //$NON-NLS-2$
} catch (IOException e) {
- throw Utilities.newCoreException(Policy.bind("SiteURLFactory.UnableToAccessSiteStream", url == null ? "" : url.toExternalForm()), ISite.SITE_ACCESS_EXCEPTION, e); //$NON-NLS-1$
+ throw Utilities.newCoreException(Policy.bind("SiteURLFactory.UnableToAccessSiteStream", url == null ? "" : url.toExternalForm()), ISite.SITE_ACCESS_EXCEPTION, e); //$NON-NLS-1$ //$NON-NLS-2$
} finally {
if (siteStream != null) {
try {
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/UpdateCore.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/UpdateCore.java
index 7ecec98..4c1c587 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/UpdateCore.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/UpdateCore.java
@@ -12,7 +12,6 @@
import java.io.*;
import java.net.*;
-import java.util.*;
import org.eclipse.core.runtime.*;
import org.eclipse.update.configuration.*;
@@ -39,12 +38,12 @@
public static boolean DEBUG_SHOW_RECONCILER;
// preference keys
- private static final String PREFIX = "org.eclipse.update.core";
- public static final String P_HISTORY_SIZE = PREFIX + ".historySize";
- public static final String P_CHECK_SIGNATURE = PREFIX + ".checkSignature";
- public static final String P_UPDATE_VERSIONS = PREFIX + ".updateVersions";
- public static final String EQUIVALENT_VALUE = "equivalent";
- public static final String COMPATIBLE_VALUE = "compatible";
+ private static final String PREFIX = "org.eclipse.update.core"; //$NON-NLS-1$
+ public static final String P_HISTORY_SIZE = PREFIX + ".historySize"; //$NON-NLS-1$
+ public static final String P_CHECK_SIGNATURE = PREFIX + ".checkSignature"; //$NON-NLS-1$
+ public static final String P_UPDATE_VERSIONS = PREFIX + ".updateVersions"; //$NON-NLS-1$
+ public static final String EQUIVALENT_VALUE = "equivalent"; //$NON-NLS-1$
+ public static final String COMPATIBLE_VALUE = "compatible"; //$NON-NLS-1$
public static int DEFAULT_HISTORY = 100;//Integer.MAX_VALUE;
@@ -53,14 +52,14 @@
//log
private static UpdateManagerLogWriter log;
- private static final String LOG_FILE="install.log";
+ private static final String LOG_FILE="install.log"; //$NON-NLS-1$
//Connection manager
private ConnectionThreadManager connectionManager;
- public static String HTTP_PROXY_HOST = "org.eclipse.update.core.proxy.host";
- public static String HTTP_PROXY_PORT = "org.eclipse.update.core.proxy.port";
- public static String HTTP_PROXY_ENABLE = "org.eclipse.update.core.proxy.enable";
+ public static String HTTP_PROXY_HOST = "org.eclipse.update.core.proxy.host"; //$NON-NLS-1$
+ public static String HTTP_PROXY_PORT = "org.eclipse.update.core.proxy.port"; //$NON-NLS-1$
+ public static String HTTP_PROXY_ENABLE = "org.eclipse.update.core.proxy.enable"; //$NON-NLS-1$
// bundle data
private BundleContext context;
@@ -104,9 +103,9 @@
public static void debug(String s) {
StringBuffer msg = new StringBuffer();
msg.append(getPlugin().toString());
- msg.append("^");
+ msg.append("^"); //$NON-NLS-1$
msg.append(Integer.toHexString(Thread.currentThread().hashCode()));
- msg.append(" ");
+ msg.append(" "); //$NON-NLS-1$
msg.append(s);
System.out.println(msg.toString());
}
@@ -117,7 +116,7 @@
public static void warn(String s) {
if (DEBUG && DEBUG_SHOW_WARNINGS) {
if (s!=null){
- s="WARNING: "+s;
+ s="WARNING: "+s; //$NON-NLS-1$
}
log(s, null);
}
@@ -133,7 +132,7 @@
public static void warn(String s, Throwable e) {
if (DEBUG && DEBUG_SHOW_WARNINGS){
if (s!=null){
- s="UPDATE MANAGER INFO: "+s;
+ s="UPDATE MANAGER INFO: "+s; //$NON-NLS-1$
}
log(s,e);
}
@@ -150,7 +149,7 @@
* Logs an error
*/
public static void log(Throwable e){
- log("",e);
+ log("",e); //$NON-NLS-1$
}
/**
@@ -182,13 +181,13 @@
IPlatformConfiguration config = ConfiguratorUtils.getCurrentPlatformConfiguration();
URL configurationLocation = config.getConfigurationLocation();
if (configurationLocation==null){
- warn("Unable to retrieve location for update manager log file");
+ warn("Unable to retrieve location for update manager log file"); //$NON-NLS-1$
return null;
}
// URL configLocation = Platform.resolve(configurationLocation);
File updateStateLocation = null;
- if ("file".equalsIgnoreCase(configurationLocation.getProtocol())) {
+ if ("file".equalsIgnoreCase(configurationLocation.getProtocol())) { //$NON-NLS-1$
File path = new File(configurationLocation.getFile());
updateStateLocation = new File(path.getParentFile(), LOG_FILE);
}
@@ -212,9 +211,9 @@
//Request request = null;
Response response = null;
- if ("file".equals(url.getProtocol())) {
+ if ("file".equals(url.getProtocol())) { //$NON-NLS-1$
response = new FileResponse(url);
- } else if (url != null && url.getProtocol().startsWith("http")) {
+ } else if (url != null && url.getProtocol().startsWith("http")) { //$NON-NLS-1$
response = new HttpResponse(url);
} else {
response = new OtherResponse(url);
@@ -278,7 +277,7 @@
if (logFile!=null)
log = new UpdateManagerLogWriter(logFile);
} catch (IOException e){
- warn("",e);
+ warn("",e); //$NON-NLS-1$
}
SiteManager.setHttpProxyInfo(
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/UpdateManagerLogWriter.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/UpdateManagerLogWriter.java
index 84df066..ff4b662 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/UpdateManagerLogWriter.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/UpdateManagerLogWriter.java
@@ -55,7 +55,7 @@
*/
public UpdateManagerLogWriter(File file) {
this.logFile = file;
- UpdateCore.warn("UPDATE MANAGER LOG Location: "+file.getAbsolutePath());
+ UpdateCore.warn("UPDATE MANAGER LOG Location: "+file.getAbsolutePath()); //$NON-NLS-1$
// If the file does not exist, prime it with the sites in the exisiting config
if (!file.exists())
@@ -262,7 +262,7 @@
return PRESERVED;
default :
- return UNKNOWN+" ["+i+"]";
+ return UNKNOWN+" ["+i+"]"; //$NON-NLS-1$ //$NON-NLS-2$
}
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/UpdatePreferencesInitializer.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/UpdatePreferencesInitializer.java
index b6ede05..b7175dc 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/UpdatePreferencesInitializer.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/core/UpdatePreferencesInitializer.java
@@ -48,11 +48,11 @@
plugin.getPluginPreferences().setDefault(UpdateCore.P_UPDATE_VERSIONS, UpdateCore.EQUIVALENT_VALUE);
// If proxy host and port are set as system properties, use them as defaults
- String proxyHost = System.getProperty("http.proxyHost");
+ String proxyHost = System.getProperty("http.proxyHost"); //$NON-NLS-1$
if (proxyHost != null && proxyHost.trim().length() > 0) {
- String proxyPort = System.getProperty("http.proxyPort");
+ String proxyPort = System.getProperty("http.proxyPort"); //$NON-NLS-1$
if (proxyPort == null || proxyPort.trim().length() == 0)
- proxyPort = "80";
+ proxyPort = "80"; //$NON-NLS-1$
plugin.getPluginPreferences().setDefault(UpdateCore.HTTP_PROXY_ENABLE, true);
plugin.getPluginPreferences().setDefault(UpdateCore.HTTP_PROXY_HOST, proxyHost);
plugin.getPluginPreferences().setDefault(UpdateCore.HTTP_PROXY_PORT, proxyPort);
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/ConfigurationPolicyModel.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/ConfigurationPolicyModel.java
index a59d293..7c363ff 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/ConfigurationPolicyModel.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/ConfigurationPolicyModel.java
@@ -160,7 +160,7 @@
if (!found) {
list.put(feature,null);
} else {
- UpdateCore.warn("Feature Reference :"+feature+" already part of the list.");
+ UpdateCore.warn("Feature Reference :"+feature+" already part of the list."); //$NON-NLS-1$ //$NON-NLS-2$
}
}
@@ -176,7 +176,7 @@
if (!configuredFeatureReferences.containsKey(feature)){
//DEBUG:
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_CONFIGURATION){
- UpdateCore.debug("Configuring "+feature.getURLString());
+ UpdateCore.debug("Configuring "+feature.getURLString()); //$NON-NLS-1$
}
this.add(feature, configuredFeatureReferences);
}
@@ -187,7 +187,7 @@
if (unconfiguredFeatureReferences != null) {
boolean success = remove(feature, unconfiguredFeatureReferences);
if (!success)
- UpdateCore.warn("Feature not part of Unconfigured list: "+feature.getURLString());
+ UpdateCore.warn("Feature not part of Unconfigured list: "+feature.getURLString()); //$NON-NLS-1$
}
}
@@ -202,7 +202,7 @@
this.unconfiguredFeatureReferences = new HashMap();
if (!unconfiguredFeatureReferences.containsKey(feature)){
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_CONFIGURATION){
- UpdateCore.debug("Unconfiguring "+feature.getURLString());
+ UpdateCore.debug("Unconfiguring "+feature.getURLString()); //$NON-NLS-1$
}
this.add(feature, unconfiguredFeatureReferences);
}
@@ -212,7 +212,7 @@
if (configuredFeatureReferences != null) {
boolean success = remove(feature, configuredFeatureReferences);
if (!success)
- UpdateCore.warn("Feature not part of Configured list: "+feature.getURLString());
+ UpdateCore.warn("Feature not part of Configured list: "+feature.getURLString()); //$NON-NLS-1$
}
}
@@ -224,13 +224,13 @@
if (unconfiguredFeatureReferences!=null){
boolean success = remove(feature, unconfiguredFeatureReferences);
if (!success)
- UpdateCore.warn(feature.getURLString()+" not part of unconfigured list.");
+ UpdateCore.warn(feature.getURLString()+" not part of unconfigured list."); //$NON-NLS-1$
}
if (configuredFeatureReferences != null) {
boolean success = remove(feature, configuredFeatureReferences);
if (!success)
- UpdateCore.warn(feature.getURLString()+" not part of configured list.");
+ UpdateCore.warn(feature.getURLString()+" not part of configured list."); //$NON-NLS-1$
}
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/ConfiguredSiteModel.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/ConfiguredSiteModel.java
index 14a0d25..646a776 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/ConfiguredSiteModel.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/ConfiguredSiteModel.java
@@ -149,13 +149,13 @@
protected IStatus createStatus(int statusSeverity, int statusCode, String msg, Exception e){
String id = UpdateCore.getPlugin().getBundle().getSymbolicName();
- StringBuffer completeString = new StringBuffer("");
+ StringBuffer completeString = new StringBuffer(""); //$NON-NLS-1$
if (msg!=null)
completeString.append(msg);
if (e!=null){
- completeString.append("\r\n[");
+ completeString.append("\r\n["); //$NON-NLS-1$
completeString.append(e.toString());
- completeString.append("]\r\n");
+ completeString.append("]\r\n"); //$NON-NLS-1$
}
return new Status(statusSeverity, id, statusCode, completeString.toString(), e);
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/DefaultPluginParser.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/DefaultPluginParser.java
index a631283..222f9dd 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/DefaultPluginParser.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/DefaultPluginParser.java
@@ -68,7 +68,7 @@
}
if (id == null || id.trim().length() == 0)
- id = "_no_id_";
+ id = "_no_id_"; //$NON-NLS-1$
pluginEntry.setVersionedIdentifier(new VersionedIdentifier(id, version));
return pluginEntry;
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/InstallConfigurationModel.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/InstallConfigurationModel.java
index 07ffedd..89405f9 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/InstallConfigurationModel.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/InstallConfigurationModel.java
@@ -249,7 +249,7 @@
}
} catch (CoreException e) {
- UpdateCore.warn("Error processing configuration history:" + locationURL.toExternalForm(), e);
+ UpdateCore.warn("Error processing configuration history:" + locationURL.toExternalForm(), e); //$NON-NLS-1$
} finally {
initialized = true;
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/InstallConfigurationParser.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/InstallConfigurationParser.java
index b3dc0a4..6c45080 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/InstallConfigurationParser.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/InstallConfigurationParser.java
@@ -64,7 +64,7 @@
try {
siteURL = Platform.asLocalURL(siteURL);
// TODO workaround bug in platform url resolution
- if (siteURL.getProtocol().equals("file"))
+ if (siteURL.getProtocol().equals("file")) //$NON-NLS-1$
siteURL = new File(siteURL.getFile()).toURL();
} catch (IOException e) {
// keep original url
@@ -124,7 +124,7 @@
}
} else {
- UpdateCore.log( Policy.bind("InstallConfigurationParser.FeatureReferenceNoURL"), new Exception());
+ UpdateCore.log( Policy.bind("InstallConfigurationParser.FeatureReferenceNoURL"), new Exception()); //$NON-NLS-1$
}
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/SiteLocalModel.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/SiteLocalModel.java
index 8cd6115..4cab39e 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/SiteLocalModel.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/SiteLocalModel.java
@@ -225,7 +225,7 @@
* @see org.eclipse.update.core.model.ModelObject#getPropertyName()
*/
protected String getPropertyName() {
- return "platform";
+ return "platform"; //$NON-NLS-1$
}
/*
@@ -233,7 +233,7 @@
*/
private void processHistory() {
try {
- URL historyURL = new URL(getLocationURL(), "history");
+ URL historyURL = new URL(getLocationURL(), "history"); //$NON-NLS-1$
historyURL = Platform.asLocalURL(historyURL);
File historyDir = new File(historyURL.getFile());
if (historyDir.exists()) {
@@ -241,7 +241,7 @@
BaseSiteLocalFactory factory = new BaseSiteLocalFactory();
for (int i=0; i<backedConfigs.length; i++) {
String name = backedConfigs[i].getName();
- if (name.endsWith(".xml"))
+ if (name.endsWith(".xml")) //$NON-NLS-1$
name = name.substring(0, name.length()-4);
else
continue;
@@ -257,7 +257,7 @@
}
}
} catch (Exception e) {
- UpdateCore.warn("Error processing history: ", e);
+ UpdateCore.warn("Error processing history: ", e); //$NON-NLS-1$
}
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/SiteLocalParser.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/SiteLocalParser.java
index eed1d7b..1ca737d 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/SiteLocalParser.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/model/SiteLocalParser.java
@@ -40,7 +40,7 @@
try {
url = UpdateManagerUtils.asDirectoryURL(site.getLocationURL());
ClassLoader l = new URLClassLoader(new URL[] { url }, null);
- bundle = ResourceBundle.getBundle("platform", Locale.getDefault(), l);
+ bundle = ResourceBundle.getBundle("platform", Locale.getDefault(), l); //$NON-NLS-1$
} catch (MissingResourceException e) {
UpdateCore.warn(e.getLocalizedMessage() + ":" + url.toExternalForm()); //$NON-NLS-1$
} catch (MalformedURLException e) {
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/BatchInstallOperation.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/BatchInstallOperation.java
index d63d20c..3c93b56 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/BatchInstallOperation.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/BatchInstallOperation.java
@@ -22,7 +22,7 @@
extends Operation
implements IBatchOperation {
- private static final String KEY_INSTALLING = "OperationsManager.installing";
+ private static final String KEY_INSTALLING = "OperationsManager.installing"; //$NON-NLS-1$
protected IInstallFeatureOperation[] operations;
public BatchInstallOperation(IInstallFeatureOperation[] operations) {
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/DuplicateConflictsValidator.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/DuplicateConflictsValidator.java
index e9390ff..a6097fe 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/DuplicateConflictsValidator.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/DuplicateConflictsValidator.java
@@ -25,7 +25,7 @@
public class DuplicateConflictsValidator {
private static final String KEY_CONFLICT =
- "DuplicateConflictsDialog.conflict";
+ "DuplicateConflictsDialog.conflict"; //$NON-NLS-1$
public static class IdEntry {
IConfiguredSite csite;
@@ -35,7 +35,7 @@
this.feature = feature;
this.csite = csite;
if (csite == null) {
- System.out.println("csite null");
+ System.out.println("csite null"); //$NON-NLS-1$
}
}
public boolean isInstallCandidate() {
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/FeatureHierarchyElement.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/FeatureHierarchyElement.java
index ac04655..3e3fb9d 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/FeatureHierarchyElement.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/FeatureHierarchyElement.java
@@ -187,7 +187,7 @@
throws CoreException {
IFeature feature = featureRef.getFeature(null);
return feature.getLabel()
- + " "
+ + " " //$NON-NLS-1$
+ feature.getVersionedIdentifier().getVersion().toString();
}
/**
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/InstallOperation.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/InstallOperation.java
index 21f6046..4fd71d2 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/InstallOperation.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/InstallOperation.java
@@ -25,7 +25,7 @@
public class InstallOperation
extends FeatureOperation
implements IInstallFeatureOperation {
- private static final String KEY_OLD = "OperationsManager.error.old";
+ private static final String KEY_OLD = "OperationsManager.error.old"; //$NON-NLS-1$
private IFeatureReference[] optionalFeatures;
private IFeature[] unconfiguredOptionalFeatures;
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/OperationValidator.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/OperationValidator.java
index fa0da64..e52209b 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/OperationValidator.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/OperationValidator.java
@@ -30,36 +30,36 @@
*/
public class OperationValidator implements IOperationValidator {
private static final String KEY_ROOT_MESSAGE =
- "ActivityConstraints.rootMessage";
+ "ActivityConstraints.rootMessage"; //$NON-NLS-1$
private static final String KEY_ROOT_MESSAGE_INIT =
- "ActivityConstraints.rootMessageInitial";
+ "ActivityConstraints.rootMessageInitial"; //$NON-NLS-1$
private static final String KEY_CHILD_MESSAGE =
- "ActivityConstraints.childMessage";
- private static final String KEY_PLATFORM = "ActivityConstraints.platform";
- private static final String KEY_PRIMARY = "ActivityConstraints.primary";
- private static final String KEY_OS = "ActivityConstraints.os";
- private static final String KEY_WS = "ActivityConstraints.ws";
- private static final String KEY_ARCH = "ActivityConstraints.arch";
- private static final String KEY_PREREQ = "ActivityConstraints.prereq";
+ "ActivityConstraints.childMessage"; //$NON-NLS-1$
+ private static final String KEY_PLATFORM = "ActivityConstraints.platform"; //$NON-NLS-1$
+ private static final String KEY_PRIMARY = "ActivityConstraints.primary"; //$NON-NLS-1$
+ private static final String KEY_OS = "ActivityConstraints.os"; //$NON-NLS-1$
+ private static final String KEY_WS = "ActivityConstraints.ws"; //$NON-NLS-1$
+ private static final String KEY_ARCH = "ActivityConstraints.arch"; //$NON-NLS-1$
+ private static final String KEY_PREREQ = "ActivityConstraints.prereq"; //$NON-NLS-1$
private static final String KEY_PREREQ_PLUGIN =
- "ActivityConstaints.prereq.plugin";
+ "ActivityConstaints.prereq.plugin"; //$NON-NLS-1$
private static final String KEY_PREREQ_FEATURE =
- "ActivityConstaints.prereq.feature";
+ "ActivityConstaints.prereq.feature"; //$NON-NLS-1$
private static final String KEY_PREREQ_PERFECT =
- "ActivityConstraints.prereqPerfect";
+ "ActivityConstraints.prereqPerfect"; //$NON-NLS-1$
private static final String KEY_PREREQ_EQUIVALENT =
- "ActivityConstraints.prereqEquivalent";
+ "ActivityConstraints.prereqEquivalent"; //$NON-NLS-1$
private static final String KEY_PREREQ_COMPATIBLE =
- "ActivityConstraints.prereqCompatible";
+ "ActivityConstraints.prereqCompatible"; //$NON-NLS-1$
private static final String KEY_PREREQ_GREATER =
- "ActivityConstraints.prereqGreaterOrEqual";
+ "ActivityConstraints.prereqGreaterOrEqual"; //$NON-NLS-1$
private static final String KEY_OPTIONAL_CHILD =
- "ActivityConstraints.optionalChild";
- private static final String KEY_CYCLE = "ActivityConstraints.cycle";
- private static final String KEY_CONFLICT = "ActivityConstraints.conflict";
- private static final String KEY_EXCLUSIVE = "ActivityConstraints.exclusive";
+ "ActivityConstraints.optionalChild"; //$NON-NLS-1$
+ private static final String KEY_CYCLE = "ActivityConstraints.cycle"; //$NON-NLS-1$
+ private static final String KEY_CONFLICT = "ActivityConstraints.conflict"; //$NON-NLS-1$
+ private static final String KEY_EXCLUSIVE = "ActivityConstraints.exclusive"; //$NON-NLS-1$
private static final String KEY_NO_LICENSE =
- "ActivityConstraints.noLicense";
+ "ActivityConstraints.noLicense"; //$NON-NLS-1$
/**
* Checks if the platform configuration has been modified outside this program.
@@ -397,7 +397,7 @@
// get the real last modified value
URL platformXML = platformConfig.getConfigurationLocation();
long actualTimeStamp = currentTimeStamp;
- if ("file".equals(platformXML.getProtocol()))
+ if ("file".equals(platformXML.getProtocol())) //$NON-NLS-1$
actualTimeStamp = new File(platformXML.getFile()).lastModified();
else {
URLConnection connection = platformXML.openConnection();
@@ -407,7 +407,7 @@
status.add(createStatus(
null,
FeatureStatus.CODE_OTHER,
- Policy.bind("ActivityConstraints.platformModified")));
+ Policy.bind("ActivityConstraints.platformModified"))); //$NON-NLS-1$
} catch (IOException e) {
// ignore
}
@@ -421,7 +421,7 @@
if (csite != null && !csite.isUpdatable())
status.add(createStatus(feature, FeatureStatus.CODE_OTHER,
Policy
- .bind("ActivityConstraints.readOnly",
+ .bind("ActivityConstraints.readOnly", //$NON-NLS-1$
csite.getSite().getURL().toExternalForm())));
}
@@ -1199,7 +1199,7 @@
} else {
if (isBetterStatus(beforeStatus, status)) {
return createMultiStatus(
- "ActivityConstraints.warning",
+ "ActivityConstraints.warning", //$NON-NLS-1$
beforeStatus,
IStatus.WARNING);
// errors may be fixed
@@ -1207,12 +1207,12 @@
ArrayList combined = new ArrayList();
combined.add(
createMultiStatus(
- "ActivityConstraints.beforeMessage",
+ "ActivityConstraints.beforeMessage", //$NON-NLS-1$
beforeStatus,
IStatus.ERROR));
combined.add(
createMultiStatus(
- "ActivityConstraints.afterMessage",
+ "ActivityConstraints.afterMessage", //$NON-NLS-1$
status,
IStatus.ERROR));
return createMultiStatus(
@@ -1228,10 +1228,10 @@
ArrayList list = new ArrayList();
if (commaSeparatedList != null) {
StringTokenizer t =
- new StringTokenizer(commaSeparatedList.trim(), ",");
+ new StringTokenizer(commaSeparatedList.trim(), ","); //$NON-NLS-1$
while (t.hasMoreTokens()) {
String token = t.nextToken().trim();
- if (!token.equals(""))
+ if (!token.equals("")) //$NON-NLS-1$
list.add(token);
}
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/ToggleSiteOperation.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/ToggleSiteOperation.java
index 07dcc5e..73158d5 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/ToggleSiteOperation.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/ToggleSiteOperation.java
@@ -45,7 +45,7 @@
} else {
try {
boolean restartNeeded = SiteManager.getLocalSite().save();
- OperationsManager.fireObjectChanged(site, "");
+ OperationsManager.fireObjectChanged(site, ""); //$NON-NLS-1$
return restartNeeded; // will restart only if changes could not be applied to current config
} catch (CoreException e) {
//revert
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/UninstallOperation.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/UninstallOperation.java
index 2be9c00..3242a79 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/UninstallOperation.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/UninstallOperation.java
@@ -40,7 +40,7 @@
// we should do something here
String message =
Policy.bind(
- "OperationsManager.error.uninstall",
+ "OperationsManager.error.uninstall", //$NON-NLS-1$
feature.getLabel());
IStatus status =
new Status(
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/UpdateUtils.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/UpdateUtils.java
index 768541d..83bcd45 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/UpdateUtils.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/operations/UpdateUtils.java
@@ -14,7 +14,6 @@
import java.io.*;
import java.lang.reflect.*;
import java.net.*;
-import java.text.*;
import java.util.*;
import org.eclipse.core.runtime.*;
@@ -32,7 +31,7 @@
* All the methods are static and this class should be a singleton.
*/
public class UpdateUtils {
- public static final String P_UPDATE_POLICY_URL = "updatePolicyURL";
+ public static final String P_UPDATE_POLICY_URL = "updatePolicyURL"; //$NON-NLS-1$
/**
* Private constructor
@@ -157,7 +156,7 @@
public static IInstallConfiguration getBackupConfigurationFor(IFeature feature) {
VersionedIdentifier vid = feature.getVersionedIdentifier();
- String key = "@" + vid.getIdentifier() + "_" + vid.getVersion();
+ String key = "@" + vid.getIdentifier() + "_" + vid.getVersion(); //$NON-NLS-1$ //$NON-NLS-2$
try {
ILocalSite lsite = SiteManager.getLocalSite();
IInstallConfiguration[] configs = lsite.getPreservedConfigurations();
@@ -479,7 +478,7 @@
String mapFile = pref.getString(UpdateUtils.P_UPDATE_POLICY_URL);
if (mapFile!=null && mapFile.length()>0) {
try {
- String decodedFile = URLDecoder.decode(mapFile, "UTF-8");
+ String decodedFile = URLDecoder.decode(mapFile, "UTF-8"); //$NON-NLS-1$
return new URL(decodedFile);
}
catch (MalformedURLException e) {
@@ -503,7 +502,7 @@
//DEBUG
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_INSTALL) {
UpdateCore.debug(
- "Downloading...:" + feature.getURL().toExternalForm());
+ "Downloading...:" + feature.getURL().toExternalForm()); //$NON-NLS-1$
}
IProgressMonitor pm = new NullProgressMonitor() {
@@ -532,7 +531,7 @@
((Feature)feature).getFeatureIdentifier());
if (targetSite == null) {
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_INSTALL) {
- UpdateCore.debug("The site to install in is null");
+ UpdateCore.debug("The site to install in is null"); //$NON-NLS-1$
}
targetSitePluginEntries = new IPluginEntry[0];
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/search/OptionalFeatureSearchCategory.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/search/OptionalFeatureSearchCategory.java
index faee8ec..d0e9286 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/search/OptionalFeatureSearchCategory.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/search/OptionalFeatureSearchCategory.java
@@ -24,7 +24,7 @@
private IUpdateSearchQuery[] queries;
private ArrayList vids;
private static final String CATEGORY_ID =
- "org.eclipse.update.core.unified-search";
+ "org.eclipse.update.core.unified-search"; //$NON-NLS-1$
private class OptionalQuery implements IUpdateSearchQuery {
public void run(
@@ -34,7 +34,7 @@
IUpdateSearchResultCollector collector,
IProgressMonitor monitor) {
- monitor.beginTask("", vids.size());
+ monitor.beginTask("", vids.size()); //$NON-NLS-1$
for (int i = 0; i < vids.size(); i++) {
VersionedIdentifier vid = (VersionedIdentifier) vids.get(i);
monitor.subTask(vid.toString());
@@ -60,9 +60,9 @@
// We may need additional information (not only id and version)
// in order to create a feature on a site.
String relative = vid.toString();
- URL featureURL = new URL(siteURL, "features/" + relative+".jar");
+ URL featureURL = new URL(siteURL, "features/" + relative+".jar"); //$NON-NLS-1$ //$NON-NLS-2$
return site.createFeature(
- "org.eclipse.update.core.packaged",
+ "org.eclipse.update.core.packaged", //$NON-NLS-1$
featureURL,
monitor);
} catch (Exception e) {
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/search/SiteSearchCategory.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/search/SiteSearchCategory.java
index c137942..96088c6 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/search/SiteSearchCategory.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/search/SiteSearchCategory.java
@@ -22,7 +22,7 @@
public class SiteSearchCategory extends BaseSearchCategory {
private IUpdateSearchQuery[] queries;
private static final String CATEGORY_ID =
- "org.eclipse.update.core.unified-search";
+ "org.eclipse.update.core.unified-search"; //$NON-NLS-1$
private static class Query implements IUpdateSearchQuery {
public void run(
@@ -39,7 +39,7 @@
}
}
- monitor.beginTask("", refs.length);
+ monitor.beginTask("", refs.length); //$NON-NLS-1$
for (int i = 0; i < refs.length; i++) {
ISiteFeatureReference ref = refs[i];
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/search/UpdateSiteAdapter.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/search/UpdateSiteAdapter.java
index 30b37bb..78b58c2 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/search/UpdateSiteAdapter.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/search/UpdateSiteAdapter.java
@@ -40,6 +40,6 @@
}
*/
public String toString(){
- return "" + getURL();
+ return "" + getURL(); //$NON-NLS-1$
}
}
\ No newline at end of file
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/security/JarVerificationResult.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/security/JarVerificationResult.java
index c4dd477..7b7993d 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/security/JarVerificationResult.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/security/JarVerificationResult.java
@@ -206,11 +206,11 @@
try {
cert.checkValidity();
} catch (CertificateExpiredException e) {
- return ("\r\n" + Policy.bind("JarVerificationResult.ExpiredCertificate")); //$NON-NLS-1$
+ return ("\r\n" + Policy.bind("JarVerificationResult.ExpiredCertificate")); //$NON-NLS-1$ //$NON-NLS-2$
} catch (CertificateNotYetValidException e) {
- return ("\r\n" + Policy.bind("JarVerificationResult.CertificateNotYetValid")); //$NON-NLS-1$
+ return ("\r\n" + Policy.bind("JarVerificationResult.CertificateNotYetValid")); //$NON-NLS-1$ //$NON-NLS-2$
}
- return ("\r\n" + Policy.bind("JarVerificationResult.CertificateValid")); //$NON-NLS-1$
+ return ("\r\n" + Policy.bind("JarVerificationResult.CertificateValid")); //$NON-NLS-1$ //$NON-NLS-2$
}
/*
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/security/JarVerifier.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/security/JarVerifier.java
index 59e1afe..877da7e 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/security/JarVerifier.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/security/JarVerifier.java
@@ -116,7 +116,7 @@
try {
jarFile = jarReference.asFile();
if (UpdateCore.DEBUG && UpdateCore.DEBUG_SHOW_INSTALL)
- UpdateCore.debug("Attempting to read JAR file:"+jarFile);
+ UpdateCore.debug("Attempting to read JAR file:"+jarFile); //$NON-NLS-1$
// # of entries
if (!jarFile.exists()) throw new IOException();
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/internal/security/KeyStores.java b/update/org.eclipse.update.core/src/org/eclipse/update/internal/security/KeyStores.java
index 7b645aa..b17cc6d 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/internal/security/KeyStores.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/internal/security/KeyStores.java
@@ -206,6 +206,6 @@
}
private void log(Exception e){
- UpdateCore.warn("Cannot retrieve a KeyStore",e);
+ UpdateCore.warn("Cannot retrieve a KeyStore",e); //$NON-NLS-1$
}
}
diff --git a/update/org.eclipse.update.core/src/org/eclipse/update/operations/IUninstallFeatureOperation.java b/update/org.eclipse.update.core/src/org/eclipse/update/operations/IUninstallFeatureOperation.java
index 9c2f453..b11ce1a 100644
--- a/update/org.eclipse.update.core/src/org/eclipse/update/operations/IUninstallFeatureOperation.java
+++ b/update/org.eclipse.update.core/src/org/eclipse/update/operations/IUninstallFeatureOperation.java
@@ -22,5 +22,5 @@
* @since 3.0
*/
public interface IUninstallFeatureOperation extends IFeatureOperation {
- public final static String UNINSTALL = "uninstall";
+ public final static String UNINSTALL = "uninstall"; //$NON-NLS-1$
}
\ No newline at end of file