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 24855 Details for
Bug 103819
User can appear "locked" in License Loop if they "decline".
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Patch that only prompts the user for license acceptance once per Eclipse invocation.
org.eclipse.wst.internet.cache.patch (text/plain), 3.62 KB, created by
Lawrence Mandel
on 2005-07-15 14:34:09 EDT
(
hide
)
Description:
Patch that only prompts the user for license acceptance once per Eclipse invocation.
Filename:
MIME Type:
Creator:
Lawrence Mandel
Created:
2005-07-15 14:34:09 EDT
Size:
3.62 KB
patch
obsolete
>Index: src/org/eclipse/wst/internet/cache/internal/CachePlugin.java >=================================================================== >RCS file: /home/webtools/wst/components/internet/plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/CachePlugin.java,v >retrieving revision 1.5 >diff -u -r1.5 CachePlugin.java >--- src/org/eclipse/wst/internet/cache/internal/CachePlugin.java 13 Jun 2005 21:23:26 -0000 1.5 >+++ src/org/eclipse/wst/internet/cache/internal/CachePlugin.java 15 Jul 2005 18:32:07 -0000 >@@ -37,11 +37,6 @@ > private static CachePlugin plugin; > > /** >- * The plugin's resource bundle. >- */ >- private ResourceBundle resourceBundle; >- >- /** > * The cache job caches resources that were not able to be downloaded when requested. > */ > private CacheJob job = null; >@@ -105,6 +100,12 @@ > for(int i = 0; i < numLicenses; i++) > { > Integer state = registry.getLicenseState(licenses[i]); >+ // For states that have been disagreed to this session store >+ // them as disagree. >+ if(state == LicenseRegistry.LICENSE_DISAGREE_THIS_SESSION) >+ { >+ state = LicenseRegistry.LICENSE_DISAGREE; >+ } > prefs.setValue(licenses[i], state.intValue()); > } > >@@ -112,7 +113,6 @@ > stopJob(); > super.stop(context); > plugin = null; >- resourceBundle = null; > } > > /** >Index: src/org/eclipse/wst/internet/cache/internal/LicenseRegistry.java >=================================================================== >RCS file: /home/webtools/wst/components/internet/plugins/org.eclipse.wst.internet.cache/src/org/eclipse/wst/internet/cache/internal/LicenseRegistry.java,v >retrieving revision 1.4 >diff -u -r1.4 LicenseRegistry.java >--- src/org/eclipse/wst/internet/cache/internal/LicenseRegistry.java 13 Jul 2005 22:10:33 -0000 1.4 >+++ src/org/eclipse/wst/internet/cache/internal/LicenseRegistry.java 15 Jul 2005 18:32:07 -0000 >@@ -25,6 +25,8 @@ > protected static Integer LICENSE_UNSPECIFIED = new Integer(0); // This needs to be 0 for the plugin prefs. > protected static Integer LICENSE_AGREE = new Integer(1); > protected static Integer LICENSE_DISAGREE = new Integer(2); >+ // Signifies a license that has been disagreed to this session. >+ protected static Integer LICENSE_DISAGREE_THIS_SESSION = new Integer(3); > > protected final static String _LOG_INFO_WTP_NO_USER_INTERACTION = "_LOG_INFO_WTP_NO_USER_INTERACTION"; > >@@ -115,6 +117,20 @@ > } > > /** >+ * Disagree to the specified license for this session. The license is disagreed to only if it has already >+ * been registered with the registry. >+ * >+ * @param url The URL of the license to accept. >+ */ >+ private void disagreeLicenseThisSession(String url) >+ { >+ if(licenses.containsKey(url)) >+ { >+ licenses.put(url, LICENSE_DISAGREE_THIS_SESSION); >+ } >+ } >+ >+ /** > * Determine if the license has been accepted. This method will return true if the license > * has been accepted or is not registered with the registry and false if it has not been accepted. > * >@@ -140,7 +156,14 @@ > { > if(!CachePlugin.getDefault().shouldPrompt()) > return false; >+ licenses.put(licenseURL, LICENSE_DISAGREE_THIS_SESSION); >+ } >+ // The license has already been disagreed to this session. Do not prompt. >+ else if(agreed == LICENSE_DISAGREE_THIS_SESSION) >+ { >+ return false; > } >+ > > // Prompt the user to accept the license. > if(promptToAcceptLicense(url, licenseURL)) >@@ -148,7 +171,7 @@ > agreeLicense(licenseURL); > return true; > } >- disagreeLicense(licenseURL); >+ disagreeLicenseThisSession(licenseURL); > return false; > } >
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 103819
: 24855