How to change Eclipse's internal browser? - eclipse

I am using Eclipse version 4.8.0 (Photon).
I have one website I want to open inside this eclipse internal browser. When I use Eclipse's internal browser to open one website , that website is opening but few functionalities are not working.
On further investigation , I found out that -
Website is using ES6 syntax so its not working on Internet Explorer.
Eclipse is using Internet Explorer as its internal browser
I tried following things , but could not make it work
Change Eclipse browser setting at Preferances -> Web Browser -> Select Chrome (Image 1 and 2).
Add below property in eclipse.ini file -Dorg.eclipse.swt.browser.DefaultType=webkit
After adding this property , I am getting error while opening browser (Image 3)

Related

Has problem in Installing PyDev into Eclipse

I tried to install PyDev into Eclipse, when I tried to install new software with this site : http://www.pydev.org/update, it complains unable to read repository. I tried to go the page
http://www.pydev.org/update and click the links on this page, it returns 404 page error. Does anybody why? How can I install PyDev into Eclipse?
Thanks,
Josephine
https://github.com/fabioz/Pydev/releases/download/pydev_8_3_0/ is where it links today, and that link goes to a 404 error page...
I get the same issue - fails trying in install via Marketplace. The links all 404 error. In the PyDev installation troubleshooting (https://www.pydev.org/manual_101_install.html), it mentions:
Unable to load repository
While most times things work as explained, some users may have messages such as:
Unable to load the repository http://pydev.org/updates
Unknown Host: http://pydev.org/updates/content.xml
This means there's some issue accessing the update site in your current connection.
In that case, you can try using a direct URL for the download (all the http://pydev.org/updates/ URLs are actually redirects to the final location). Currently, those redirects point to links on http://bintray.com, so, you can visit the related update site page (such as http://pydev.org/updates) in a browser and see to where it's being redirected (you may want to try that direct link with http or https to see if it makes a difference in your use case).
If they ARE redirecting to Bintray, it has been sunset according to JFrog: https://bintray.com
That said, I was able to install PyDev manually using the ZIP on SourceForge: https://sourceforge.net/projects/pydev/files/pydev/
Download and extract the zip, then copy the entire folder to the Eclipse 'dropins' dir (not 'plugins'). On Mac OS, open the Eclipse.app package contents, then copy the unzipped dir, and you should end up with:
Eclipse.app
Contents
Eclipse
dropins
PyDev
features
plugins
Then launch Eclipse. Rather than using Finder, I launched it from Terminal w/ the -clean option to try to refresh the installed plugins:
/Applications/Eclipse.app/Contents/MacOS/eclipse -clean
I didn't see "PyDev" in the toolbar like I'm used to, but PyDev is in Eclipse Preferences, so I set PyDev > Debug > Remote debugger server activation="Start when the plugins is started", and relaunched Eclipse. So far, so good...

How to launch an HTML file in an external web browser via a shortcut in the toolbar

Sorry, if this question is already ansewered! I have configured my external browser and I can launch any html file via right clicking this file and choosing open with.... What I would like to do is launching any file via a shortcut in the toolbar by just clicking on this shortcut and right click on file --> open with.... So if there is any possibility to get this shortcut, please tell me how?
i guess you refer to eclipse:
had the same problem, it's really annoying that there is no default behaviour of eclipse to deal with html files.
here is how i did it with pictures! ;)
http://dwaves.de/index.php/2014/01/16/eclipse-run-launch-html-htm-webpage-in-external-browser-external-tools-shortcut-hotkey/
eclipse as web editor – do it yourself – howto:
eclipse is per default configured to be used for java development.
but if you want to “run” a html site in your external browser… nada. You have to configure it yourself, like this:
1. download eclipse
2. start eclipse (this was tested with Eclipse Standard/SDK Version: Kepler Service Release 1 Build id: 20130919-0819)
3. install the plugin “web page editor” help -> new software -> select All Sites -> search for “web page editor” -> check the checkbox -> click next, next, agree, restart.
this is what you will get (when you r-click on a document and choose “open with” -> “web page editor”, reminds me of dreamweaver’s preview.
now in order to “launch” / start the website with a shortcut:
1. setup firefox as default browser: “window” -> preferences -> search for browser -> choose “external browser” and search for the firefox.exe
define external tool command
you should get a new command in your run-suitcase-symbol.
when you click it… firefox should launch your website.
in order to shortcut-this go again into preferences, search for “keys”
and asign a key-combination to the “Run Last Launched External Tool”
that’s the best way right now i know of.
Feel free to comment!

How to open Internet explorer from GUI while launching it from eclipse

I have developed one GUI.In that when I click one button of GUI it should go to Internet Explorer.But when I launch this from Eclipse it is not directed to IE. I tried this from outside eclipse.That is working fine.Any setup is needed to open IE from GUI in eclipse?
I'm not sure if your refer to this, but inside Eclipse if you go to the Window menu -> Web Browsers and select Internet Explorer shoul done it.

Why does Eclipse opens http://localhost:8080/de.vogella.jersey.first/WEB-INF/web.xml

I followed the following tutorial (although I installed Glassfish Open Source Edition, instead of Tomcat, and using Eclipse Indigo) : http://www.vogella.de/articles/REST/article.html.
The webservice is ok, but when I "Run" the project from Eclipse, Eclipse opens a new pane showing the result of a Web browsing to http://localhost:8080/de.vogella.jersey.first/WEB-INF/web.xml.
The point is that the browser yields the following result :
HTTP Status 404 -
--------------------------------------------------------------------------------
type Status report
message
descriptionThe requested resource () is not available.
--------------------------------------------------------------------------------
GlassFish Server Open Source Edition 3.1.1
I don't understand what this is. What's the point in getting the web.xml at that point ?
I this a normal behaviour ? How to remove this ?
Thank you !
SCO
i may not be correct but i assume you must have had the focus on web.xml when you clicked run. So eclipse just tried to run whatever you asked it to. Open your index.jspx or whatever jsp page you want to see first and then click run.

Can I link the Zend PDT (eclipse) to a browser action?

Is it possible to configure the Zend PDT debugger in eclipse to hit a breakpoint from a browser action in a similar way to that of the Java debugger for eclipse? I.e. Set a breakpoint, start the debugger, browse a site then drop into a breakpoint when it is hit.
I can debug individual scripts and Web pages however I am trying to debug a script that is called from a webpage. I am using Joomla and want to be able to traverse the dependency stack while click on page content.
Thanks in advance for any advice..!
I found out how to do this but it is quite long winded. It enables you to debug PHP like you debug Java as in you can browser your site and only drop into the debugger when you hit one of your break points. Here's the config for Linux.
Installing Zend Debugger
First you will need to install and configure the Zend Debugger:
Ensure you have the Eclipse PDT (PHP Development Tools) installed. If not:
Add this repository to your sources list in Help > Install New Software...: http://download.eclipse.org/releases/helios
Expand the Programming Languages package and select PHP Development Tools (PDT) SDK Feature.
Click next and install.
Install the Zend PDT in the same way by adding this repository to your sources list: http://downloads.zend.com/pdt
Expand Zend CE Features and select Zend Debugger Feature then click Next.
Restart Eclipse and then go to Window > Preferences > PHP > Debug > Installed Debuggers to ensure the Zend Debugger is installed.
Configure php.ini to point to the ZendDebugger.so file.
First type
php5 -i | grep "Loaded Conf"
into a terminal to find the correct php.ini file you need to edit and open it in a text editor
Next type
locate ZendDebugger.so
into a terminal and copy the location to the php5 Debugger file.
Add these lines to the bottom of your php.ini file:
[Zend]
Zend_extension="[path to your ZendDebugger.so file]"
zend_debugger.allow_hosts="127.0.0.1, [your IP address if required]"
zend_debugger.expose_remotely=always
substituting in the path returned from your locate command and your IP address.
Restart PHP by typing
sudo /etc/init.d/apache2 restart
into a terminal.
Then type the
php5 -m
command into your terminal to ensure the Zend Debugger is properly configured. You will see something like:
xmlreader
xmlwriter
Zend Debugger
zip
zlib
[Zend Modules]
Zend Debugger
near the end of the dump. If you don't see the Zend Debugger then make sure you have edited the correct php.ini file and ensure that the path to your ZendDebugger.so file is valid. Make sure to restart PHP for any changes to propagate.
Configuring Eclipse
Next you will have to configure Eclipse:
Firstly go to Window > Preferences > PHP > PHP Executables and make sure the latest PHP CLI libraries are installed and set as default.
Next add the PHP Debugging perspective in eclipse by going to Window > Open Perspective > Other > PHP Debug.
Now go to Window > Preferences > PHP > Debug and click Configure Project Specific Settings.
Select the project you want to debug and click OK.
Check the Enable project specific settings.
These are the settings you will need:
PHP Debugger: Zend Debugger
Server: [local URL path to your project (should configure this in hosts file)]
PHP Executable: 5.3.x (or later)
Default Base URL / Base Path: /
Auto-generated Base URL: http://[local URL path to your project]
Uncheck the Break at First Line option and click OK to close the config window, then uncheck the same option on the main PHP Debug page. Click Apply to save the settings.
Next go to Window > Preferences > PHP > PHP Servers and add a New server config with the URL
http://[local URL path to your project]
this should be the same URL as in your host config that you use in dev' to get to your home page. Give the config a name and set it as default. Click Finish and OK then restart Eclipse.
Next go to Window > Preferences > General > Web Browser, select Use external web browser and choose a browser you want to interact with during debugging. >Note:> DO NOT USE FIREFOX! The Zend PDT binds to it and you cannot decouple the browser from the debugger without uninstalling and reinstalling firefox. The Opera browser works by far the best with the Zend PDT so here's how to add it:
After installing the Opera browser go to the Window > Preferences > General > Web Browser settings again and select New and use these parameters:
Name: Opera
Location: /usr/bin/opera
Parameter: %URL%
click OK, select Firefox if it exists and remove it then check Opera and click OK.
Restart Eclipse again and you will be ready to start debugging PHP.
Using the Debugger
In the PHP perspective open a PHP file and select Debug as > PHP Web Page either from the Project menu or by selecting the downward arrow beside the Debug icon.
You may see an alert window asking you to confirm the debug URL. Remove eveything after the base URL to leave just:
http://[local URL path to your project]
as the URL and click OK.
If eclipse doesn't switch to the PHP Debug Perspective automatically then switch to it manually.
Go to your browser and navigate to the URL you configured above. You may need to run the debugger forward for the homepage to resolve. Sometimes you will need to refresh and run the debugger forward a couple of times before it fully binds your debug session.
You can navigate site normally and the debugger will drop into your code at breakpoints.
Troubleshooting
When the PHP debug session starts sometimes the session ends before the page loads and the page in the browser stays blank. Try right clicking the session in the debug stack view and select Relaunch.
When a debug session starts up first time make sure the URL in the browser window appears as the base URL you configured i.e. remove any debugger parameters that Zend appends to the URL. URLs should appear cleanly from now on.
For smoother debugging remove all terminated debugging sessions from the PHP Debug perspective before your finish your PHP development.
Be careful to avoid shutting eclipse down while the PHP Debug perspective is in focus as it will take a long time to close.