Eclipse HTML editor for HTML template files
Asked Answered
D

2

8

I'm trying to edit phpbb HTML template file with Eclipse Ganymedes version 3.4.1 containing Web Developer Tools.

These template files contain HTML markup with template variable marks in form {variable_name}. Now, when trying to open such file, Eclipse trys to validate also these template variable marks.

For example template contains

<meta http-equiv="content-type" content="text/html; charset={S_CONTENT_ENCODING}" /> 

After opening Eclipse shows on editor body:

Unsupported Character Body
Character encoding "{S_CONTENT_ENCODING}" is not supported by this platform.
<button>Set encoding...</button>

How to solve this using WTP or is there any better editor for template editing purpose ?

Doodlebug answered 8/9, 2009 at 2:5 Comment(2)
Perhaps Dreamewaver is more suitable for the job.Coahuila
Thanks but Eclipse is only way for me on Linux platform. Development process of my project depends also on many other facilities of Eclipse.Doodlebug
T
3

Eclipse is trying to determine the text encoding from your meta tags and fails.

To override this behavior open the file in eclipse so you can see the error. Open the File menu and choose Properties (Alt-Enter) and eclipse will show you the properties dialog for the file where you can change the text file encoding.

I don't know if this can be disabled for all the files.

Trachytic answered 8/9, 2009 at 9:29 Comment(1)
Check out similar question at #8856851Ziguard
H
1

I've never used Eclipse on Linux, but it looks like the problem isn't really about Eclipse supporting variables -- it's about it trying to render what a character set that it thinks is called "{S_CONTENT_ENCODING}"

You can probably get around the problem by changing {S_CONTENT_ENCODING} to utf-8 (or latin-1 or whatever) in all of your templates. (This assumes that you aren't changing encoding from one template to the next, but I really doubt you are.)

Copy-paste utf-8 where you see {S_CONTENT_ENCODING} in one of the templates, and Eclipse should handle it the other {foo} instances from there.

Highmuckamuck answered 8/9, 2009 at 3:35 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.