Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 7038 Details for
Bug 47458
Manual updates are not detected at startup
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
[patch]
Patching ConfigurationActivator
update.configurator.patch (text/plain), 4.26 KB, created by
Pascal Rapicault
on 2003-12-02 16:26:21 EST
(
hide
)
Description:
Patching ConfigurationActivator
Filename:
MIME Type:
Creator:
Pascal Rapicault
Created:
2003-12-02 16:26:21 EST
Size:
4.26 KB
patch
obsolete
>Index: src/org/eclipse/update/configurator/ConfigurationActivator.java >=================================================================== >retrieving revision 1.4 >diff -u -r1.4 ConfigurationActivator.java >--- src/org/eclipse/update/configurator/ConfigurationActivator.java 1 Dec 2003 16:49:18 -0000 1.4 >+++ src/org/eclipse/update/configurator/ConfigurationActivator.java 2 Dec 2003 21:23:11 -0000 >@@ -10,10 +10,17 @@ > *******************************************************************************/ > package org.eclipse.update.configurator; > >+import java.io.DataInputStream; >+import java.io.DataOutputStream; > import java.io.File; >+import java.io.FileInputStream; >+import java.io.FileNotFoundException; >+import java.io.FileOutputStream; > import java.io.IOException; >+import java.io.InputStream; > import java.net.MalformedURLException; > import java.net.URL; >+import java.sql.Timestamp; > import java.util.*; > import org.eclipse.core.runtime.*; > import org.eclipse.osgi.service.environment.DebugOptions; >@@ -40,12 +47,15 @@ > private String[] allArgs; > > // location used to put the generated manfests >- private String cacheLocation = (String) System.getProperties().get("osgi.manifest.cache"); //PASCAL Need to set this value somewhere (probably from boot) >+ private String cacheLocation = (String) System.getProperties().get("osgi.manifest.cache"); > private IPluginConverter converter; > private Set ignore; > private BundleListener reconcilerListener; > private IPlatform platform; > private PlatformConfiguration configuration; >+ >+ //Need to store that because it is not provided by the platformConfiguration >+ private long lastTimeStamp; > > public void start(BundleContext ctx) throws Exception { > context = ctx; >@@ -58,7 +68,8 @@ > if("org.eclipse.ui.workbench".equals(System.getProperties().get("eclipse.application"))) { //$NON-NLS-1$ //$NON-NLS-2$ > System.setProperty("eclipse.application", "org.eclipse.ui.ide.workbench"); //$NON-NLS-1$ //$NON-NLS-2$ > } >- if (!(application.equals(PlatformConfiguration.RECONCILER_APP) || System.getProperties().get("osgi.dev") != null)) >+ >+ if (lastTimeStamp==configuration.getChangeStamp() && !(application.equals(PlatformConfiguration.RECONCILER_APP) || System.getProperties().get("osgi.dev") != null)) > if (System.getProperty("eclipse.application") == null) { > System.setProperty("eclipse.application", application); > return; >@@ -77,6 +88,16 @@ > URL installURL = platform.getInstallURL(); > configurationFactorySR = context.registerService(IPlatformConfigurationFactory.class.getName(), new PlatformConfigurationFactory(), null); > configuration = getPlatformConfiguration(allArgs, metaPath, installURL); >+ >+ String configArea = (String) System.getProperty("osgi.configuration.area"); >+ try { >+ DataInputStream stream = new DataInputStream(new FileInputStream(configArea + "/last.config.stamp")); >+ lastTimeStamp = stream.readLong(); >+ } catch (FileNotFoundException e) { >+ lastTimeStamp = configuration.getChangeStamp() - 1; >+ } catch (IOException e) { >+ lastTimeStamp = configuration.getChangeStamp() - 1; >+ } > } > > private void computeIgnoredBundles() { >@@ -118,9 +139,23 @@ > releasePlatform(); > converter = null; > releaseConverter(); >+ writePlatformConfigurationTimeStamp(); > configurationFactorySR.unregister(); > } > >+ private void writePlatformConfigurationTimeStamp() { >+ String configArea = (String) System.getProperty("osgi.configuration.area"); >+ try { >+ DataOutputStream stream = new DataOutputStream(new FileOutputStream(configArea + "/last.config.stamp")); >+ stream.writeLong(configuration.getChangeStamp()); >+ } catch (FileNotFoundException e) { >+ lastTimeStamp = configuration.getChangeStamp() - 1; >+ } catch (IOException e) { >+ lastTimeStamp = configuration.getChangeStamp() - 1; >+ } >+ >+ } >+ > private void releasePlatform() { > if (platformTracker == null) > return; >@@ -266,7 +301,7 @@ > if (generationLocation.exists()) > return; > if (!converter.convertManifest(pluginDir, generationLocation)) >- System.out.println(pluginDir + " manifest generation failed"); >+ System.out.println(pluginDir + " manifest generation failed"); //TODO Need to log an error > } > /* > * Derives a file name corresponding to a path:
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 47458
:
6983
| 7038