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 80901 Details for
Bug 168597
[Vista] HTTP Recorder requires work-around on Windows Vista for Internet Explorer
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 for org.eclipse.hyades.test.ui
bugzilla168597test.ui.txt (text/plain), 6.90 KB, created by
DuWayne Morris
on 2007-10-22 15:56:24 EDT
(
hide
)
Description:
Patch for org.eclipse.hyades.test.ui
Filename:
MIME Type:
Creator:
DuWayne Morris
Created:
2007-10-22 15:56:24 EDT
Size:
6.90 KB
patch
obsolete
>### Eclipse Workspace Patch 1.0 >#P org.eclipse.hyades.test.ui >Index: META-INF/MANIFEST.MF >=================================================================== >RCS file: /cvsroot/tptp/test/org.eclipse.hyades.test.ui/META-INF/MANIFEST.MF,v >retrieving revision 1.20 >diff -u -r1.20 MANIFEST.MF >--- META-INF/MANIFEST.MF 24 Apr 2007 15:31:50 -0000 1.20 >+++ META-INF/MANIFEST.MF 22 Oct 2007 18:46:30 -0000 >@@ -2,7 +2,7 @@ > Bundle-ManifestVersion: 2 > Bundle-Name: %PLUGIN_NAME > Bundle-SymbolicName: org.eclipse.hyades.test.ui; singleton:=true >-Bundle-Version: 4.2.200.qualifier >+Bundle-Version: 4.4.100.qualifier > Bundle-Activator: org.eclipse.hyades.test.ui.UiPlugin > Bundle-Vendor: %PROVIDER_NAME > Bundle-Localization: plugin >Index: src-recorder/org/eclipse/hyades/internal/execution/recorder/ui/wizards/RecorderRegistryInfo.java >=================================================================== >RCS file: /cvsroot/tptp/test/org.eclipse.hyades.test.ui/src-recorder/org/eclipse/hyades/internal/execution/recorder/ui/wizards/RecorderRegistryInfo.java,v >retrieving revision 1.12 >diff -u -r1.12 RecorderRegistryInfo.java >--- src-recorder/org/eclipse/hyades/internal/execution/recorder/ui/wizards/RecorderRegistryInfo.java 26 Apr 2007 20:49:40 -0000 1.12 >+++ src-recorder/org/eclipse/hyades/internal/execution/recorder/ui/wizards/RecorderRegistryInfo.java 22 Oct 2007 18:46:30 -0000 >@@ -23,10 +23,14 @@ > > import java.io.IOException; > import java.io.InputStreamReader; >+import java.net.URL; > import java.util.StringTokenizer; > >+import org.eclipse.core.runtime.FileLocator; > import org.eclipse.core.runtime.IPath; > import org.eclipse.core.runtime.Platform; >+import org.eclipse.hyades.execution.recorder.local.appadapters.JNIWrapper; >+import org.osgi.framework.Bundle; > > /** > * @author mdunn >@@ -57,6 +61,8 @@ > // below is for bugzilla 177396 mdd > public final int VISTA_ADMIN_ERROR = -8; > public final int WINDOWS_ADMIN_ERROR = -8; >+ public final int BROWSER_IN_USE_ERROR = -9; >+ public final int RECORDING_TPTPRECUTIL_DLL_MISSING = -10; > // bugzilla 79219 mdd > private String sslProxyAddr = ""; > private String sslProxyPort = ""; >@@ -66,8 +72,18 @@ > private String proxyOverrideString = ""; > private String autoConfigURLString = ""; > >+ private boolean bUseNativeRegistryInterface = false; >+ private JNIWrapper jniWrapper = null; >+ > public RecorderRegistryInfo() { >- StringBuffer inputFileContents = getRegistryInfo(); >+ StringBuffer inputFileContents = new StringBuffer(); >+ // return of false indicates fatal error >+ checkOSVersion(inputFileContents); >+ if (bUseNativeRegistryInterface) >+ getRegistryInfoUsingNativeAPI(inputFileContents); >+ else >+ getRegistryInfo(inputFileContents); >+ > // below is for bugzilla 177396 mdd > String checkVistaError=inputFileContents.toString(); > if (checkVistaError.equalsIgnoreCase("VISTA_ADMIN_ERROR")) { >@@ -78,6 +94,14 @@ > setBadProxySettings(true); > setProxyError(WINDOWS_ADMIN_ERROR); > } >+ else if (checkVistaError.equalsIgnoreCase("BROWSER_IN_USE_ERROR")) { >+ setBadProxySettings(true); >+ setProxyError(BROWSER_IN_USE_ERROR); >+ } >+ if (checkVistaError.equalsIgnoreCase("RECORDING_TPTPRECUTIL_DLL_MISSING")) { >+ setBadProxySettings(true); >+ setProxyError(RECORDING_TPTPRECUTIL_DLL_MISSING); >+ } > else { > boolean isEnabled = checkProxyEnabled(inputFileContents); > setProxyEnabled(isEnabled); >@@ -115,8 +139,53 @@ > } > } > } >- >- private StringBuffer getRegistryInfo() >+ >+ private boolean checkOSVersion(StringBuffer inputFileContents){ >+ String currentOS = Platform.getOS(); >+ if (currentOS.equals("win32")) { >+ String myVersion = System.getProperty("os.version"); >+ if (myVersion.startsWith("6")) { >+ try{ >+ // Bugilla 168597, use native registry calls >+ // instead of displaying an error message >+ Bundle b = Platform.getBundle("org.eclipse.hyades.test.core"); >+ URL u = FileLocator.resolve(b.getEntry("/")); >+ String path = u.getPath(); >+ path = path.substring(1); >+ String finalPath = path + "TPTPRecUtil.dll"; >+ File dllFile = new File(finalPath); >+ if (dllFile.exists() == false){ >+ return false; >+ } >+ >+ >+ jniWrapper = new JNIWrapper(); >+ if (jniWrapper.isProcessRunningElevated() == false){ >+ bUseNativeRegistryInterface = true; >+ if (jniWrapper.isBrowserRunning() == true){ >+ inputFileContents.append("BROWSER_IN_USE_ERROR"); >+ return false; >+ } >+ } >+ } >+ catch (IOException ioe){ >+ >+ } >+ >+ // so, if we can't load our DLL, we will throw the old >+ // error message out so the user can perform a recording by >+ // running eclipse using "Run as Adminstrator >+ // this should never happen >+ catch (UnsatisfiedLinkError e2){ >+ inputFileContents.append("VISTA_ADMIN_ERROR"); >+ return false; >+ } >+ } >+ } >+ return true; >+ } >+ >+ private void getRegistryInfo(StringBuffer inputFileContents) > { > String originalSettingsFileName = "newSettingsFile.tmp"; > String originalSettingsFilePath = ""; >@@ -127,7 +196,6 @@ > String getOriginalInfoCommandLine = "regedit /e "+"\"" + originalSettingsFilePath+"\"" + " \"HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Internet Settings\"";//$NON-NLS-1$//$NON-NLS-2$ > InputStreamReader inputReader=null; > File file = null; >- StringBuffer inputFileContents = new StringBuffer(); > try > { > try { >@@ -154,13 +222,12 @@ > if (currentOS.equals("win32")) { > String myVersion = System.getProperty("os.version"); > if (myVersion.startsWith("6")) { >- inputFileContents.append("VISTA_ADMIN_ERROR"); >- } >- else { >+ inputFileContents.append("RECORDING_TPTPRECUTIL_DLL_MISSING"); >+ }else { > inputFileContents.append("WINDOWS_ADMIN_ERROR"); >+ e.printStackTrace(); > } > } >- e.printStackTrace(); > > } > >@@ -181,8 +248,29 @@ > if (file.exists()) > file.delete(); > } >- return inputFileContents; >+ return; > } >+ >+ // added for Bugilla 168597 >+ private void getRegistryInfoUsingNativeAPI(StringBuffer inputFileContents){ >+ // fire up an instance of the JNI layer to start using native code >+ AddSettingToBuffer(jniWrapper, inputFileContents, "ProxyEnable"); >+ AddSettingToBuffer(jniWrapper, inputFileContents, "AutoConfigURL"); >+ AddSettingToBuffer(jniWrapper, inputFileContents, "ProxyServer"); >+ AddSettingToBuffer(jniWrapper, inputFileContents, "ProxyOverride"); >+ >+ return; >+ } >+ >+ private void AddSettingToBuffer(JNIWrapper jniWrapper, StringBuffer inputFileContents, String name){ >+ String setting = jniWrapper.getInternetSetting(name); >+ if (setting != null && setting.length() > 0){ >+ inputFileContents.append("\"" + name + "\"=" + setting + "\r\n"); >+ } >+ return; >+ } >+ >+ > private boolean checkProxyEnabled(StringBuffer inputBuffer) > { > boolean comparesOK = 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 168597
:
76930
|
76931
|
80259
|
80260
|
80261
|
80262
|
80270
|
80900
| 80901 |
80902