Perhaps this question might be silly, but I need some help. I did the upgrade from Netbeans 7.1 to Netbeans 8, in order to get more functionality and I'm involved in a project that uses handlebars. The problem is I can not find a way to highlight this file. I've tried to go to tools-> options-> Miscellaneous->file and change the file extension and file type associated with no results.
Can you help me with this issue or give me other alternatives that support web editor handlebars?
thank you
I followed this link and applied the HTML mime type and worked fine.
This are the instructions from the webpage:
Go to Netbeans -> Preferences -> Miscellaneous -> Files on a Mac
or Tools -> Options -> Miscellaneous -> Files on Windows
Leave "File Extensions" as "< Choose the extension >" and click the "New" button.
Type in the extension without the dot.
Select the appropriate file type from the "Associated file type (MIME)" drop down box.
http://www.electrictoolbox.com/netbeans-syntax-highlighting-file-extensions/
Related
I am not able to highlight the matching variables in JSP and scriptlets. I have already tried
Window -> Preferences -> Java -> Editor -> Mark Occurrences
and
Preferences > General > Editors > Text Editors > Annotations.
These are not working.
Is there any way I can highlight the matching variables in JSP and scriplets?
I am using Eclipse Java EE IDE for Web Developers.
Version: Luna Release (4.4.0)
Thanks a lot in advance.
Thanks & Regards,
Archana
It appears that JSP files are opened in Eclipse using their own 'editor' distinct from the Java editor. Its settings are located under Window -> Preferences -> Web -> JSP Files -> Editor, but unfortunately it appears to lack the 'mark occurrences' feature found in the editors for Java and some other languages.
There's an answer to another question on here with information on how to implement 'mark occurrences' in an editor (pointing to Source viewers and annotations in the Eclipse developers guide), but I couldn't even find a bug in the Eclipse JSP 'product' requesting the feature. It's open-source, though, so of course anyone is welcome to contribute that functionality!
It doesn't accomplish quite the same thing (lacking the intelligence to restrict scope), but you can get a rough approximation of this functionality by selecting your variable/method/text and using the generic Source -> Occurrences in File feature.
Problem:
The mis-spelt word are highlighted by the editor. However, when I try to correct the mis-spelt word using Quick-fix, the pop-up window is black
Installation:
Eclipse SDK 4.2.2 with Texlipse Plugin
I realized that there are two spell-checkers. One belongs to the eclipse and the other one belongs to texlipse. The two spell-checkers conflicts a bit.
First I tell the spell checker of eclipse to ignore all .tex files (by adding .tex to the excluded file types):
preferences -> spelling -> excluded file types: ... + .tex
Then I enable the spell checker of texlipse:
preferences -> texlipse -> spell checker -> use build-in spell checker
Then I restarted eclipse and everything seems fine.
I want the default edior to be the internal editor and not the system editor.
I have it configured in window->preferences->file associations to use default internal xml editor for *.xml yet eclipse always tries to open files with OS system editor. How can I prevent this?
The editor type is mapped to file type; you can do this on a per-workspace (global) or per-project basis.
It should be pretty much as simple as this:
http://help.eclipse.org/indigo/index.jsp?topic=%2Forg.eclipse.wst.xmleditor.doc.user%2Ftopics%2Ftxprefs.html
Go into "Help, Install Software, What is already installed?" and make sure you have "Eclipse XML Editors and Tools" installed. You you don't, then get it.
Finally, create a new, "clean" project, add an XML file, and verify it works correctly
I found this question but the answers didn't help me, so I continued searching and found the answer here http://help.eclipse.org/juno/index.jsp?topic=%2Forg.eclipse.platform.doc.user%2Ftasks%2Ftasks-51.xhtml
Basically, in the Preferences, General > Editors > File Associations, then define your file types (if not already there), and select an editor.
Right Click on File from Project,
Select Open with ....
Select your editor
How can I add UTF-8 support in eclipse? I want to add for example Russian language but eclipse won't support it. What should I do? Please guide me.
Try this
1) Window > Preferences > General > Content Types, set UTF-8 as the
default encoding for all content types.
2) Window > Preferences > General > Workspace, set Text file encoding to Other : UTF-8
Open Eclipse and do the following steps:
Window -> Preferences -> Expand General and click Workspace, text file encoding (near bottom) has an encoding chooser.
Select "Other" radio button -> Select UTF-8 from the drop down
Click Apply and OK button OR click simply OK button
You can set a default encoding-set whenever you run eclipse.exe.
Open eclipse.ini in your eclipse home directory Or STS.ini in case of STS(Spring Tool Suite)
put the line below at the end of the file
-Dfile.encoding=UTF-8
Just right click the Project -- Properties and select Resource on the left side menu.
You can now change the Text-file encoding to whatever you wish.
Right click on main source -> Run As -> Run Configurations -> (x)= Arguments -> VM arguments -> add:
-Dsun.stdout.encoding=UTF-8
September 24, 2022 Update:
JDK 19 (released on September 20, 2022) has System property
stdout.encoding
which can be set to UTF-8, i.e. add the following option to the java command:
-Dstdout.encoding=UTF-8
You can set an explicit Java default character encoding operating system-wide by setting the environment variable JAVA_TOOL_OPTIONS with the value -Dfile.encoding="UTF-8". Next time you start Eclipse, it should adhere to UTF-8 as the default character set.
See https://docs.oracle.com/javase/8/docs/technotes/guides/troubleshoot/envvars002.html
If you have problems with JSON files, it turns out in some Eclipse versions there is an embedded JSON Validator. You can turn it off by doing the steps below:
Go to Windows->Validation and Uncheck JSON validation checkboxes
I tried all settings mentioned in this post to build my project successfully however that didn't work for me. At last I was able to build my project successfully with mvn -DargLine=-Dfile.encoding=UTF-8 clean install command.
You may require to install Language Packs: 3.2
I've been googling and can't find a solution for this. I'm trying to setup .tpl files to use either HTML syntax highlighting or PHP syntax highlighting. Has anyone does this, or do you know how?
Thanks
Go to Window -> Preferences-
Then General -> Editors -> File Associations-
Add the PHP Editor to the *.tpl file type. You may have to create the *.tpl type if it doesn't already exist.
You may also have to set the content type for your tpl files in Content Types also under the General settings. Scroll down to PHP Source File and make sure *.tpl exists there as well.
Then you need to restart eclipse to make it work.
Go to Window -> Preferences -> General -> Content Types
Select Text -> CSS, click Add, write *.tpl and save.
Do the step two for Text -> HTML, Javascript and PHP.
I took that from this link. You can get that form there or I give their content below if the anyhow that link doesn't work. It works for me nicely.
steps how to install SmartyPDT 0.9.1
Be sure that the .TPL files are not associated with any content type (file type). In Eclipse,
Be sure that the .TPL files are not associated with any content type (file type). In Eclipse,
Go to Help-> Install New Software
At the Work With section click on the Add... button. Give the new "Site" a name and set the location with http://smartypdt.googlecode.com/svn/trunk/org.eclipse.php.smarty.updatesite/ , then click OK. Go back to the Install New Software window and select the newly added "site". If the "Group items by category" check-box is checked, uncheck it. Now you should be able to see 1 item in the software list named "Smarty Feature"
Select the Smarty Feature, click Next> and from here afterwards it shouldn't be a problem.
If you are prompted that this is an unsigned package, just ignore the warning and install it anyway.
After the installation completes, restart Eclipse and it should be working.
Define a default PHP executable of type 'Zend Debugger' (only if you install vanilla Eclipse PDT):
In Eclipse go to Window->Preferences->PHP->PHP Executables Click on the Add button. Enter a name for that executable definition, for example "PHP localhost", complete the 2 fields which ask you for the PHP executable path (the PHP binary CLI executable) and php.ini path. Be sure that the PHP debugger is the Zend Debugger.
Installing smarty on eclipse kepler fails
(see Install SmartyPDT 0.0.9.1 in Eclipse Kepler).
The recommendation there is to use the PHP Development Tools (PDT) from former eclipse juno version. But in contrary to the recommendation I did not DELETE the mentioned features folder but I just uninstalled the plugins from eclipse itself (Help/About/InstallationDetails):
Uninstall all PDT packages
Restart eclipse
Then follow the instructions in above answer to install the PDT packages from Juno version and then the smarty package.
All these Installations worked without error.
But unfortunatly the *.tpl files are still not syntax highlighted. What to do more?
Our *.tpl file extension is not associated with the HTML editor in Eclipse by default.
Open Eclipse’s preferences.
Expand General from the tree on the left and select Content Types.
Expand Text on the right and select HTML. Click the Add... button below, enter *.tpl and click the OK button.
General -> Editors -> File Associations
Click Add..., enter *.tpl, and click OK.
Select HTML Editor from the Associated editors: section below and click the Default button to the right.