Re: JSP editor encoding
Sultan Tezadov <[email protected]>
| Newsgroups | gmane.comp.java.netbeans.general.russian |
|---|---|
| Message-ID | <[email protected]> |
С web.xml всё в порядке.
> Ах, да, не заметил. Странно, интересно, а почему у меня ISO-8859-1 :(
Судя по коду в следующем классе:
/home/sultan/my/java/netbeans41/web/jspparser/src/org/netbeans/modules/web/jspparser/JspParserImpl.java
либо WebModule, либо одно из его свойств оказывается равным null что и
приводит к тому что выставляется кодировка по умолчанию.
Как выяснить почему это происходит, к сожалению, понятия не имею...
public JspParserAPI.JspOpenInfo getJspOpenInfo(FileObject jspFile,
WebModule wm, boolean useEditor) {
if (wm == null)
return new JspParserAPI.JspOpenInfo(false, "ISO-8859-1"); //
NOI18N
FileObject wmRoot = wm.getDocumentBase();
if (wmRoot == null) {
// PENDING - we could do a better job here in making up a fallback
return new JspParserAPI.JspOpenInfo(false, "ISO-8859-1"); //
NOI18N
}
WebAppParseProxy pp = getParseProxy(wm);
if (pp != null)
return pp.getJspOpenInfo(jspFile, useEditor);
else
return new JspParserAPI.JspOpenInfo(false, "ISO-8859-1"); //
NOI18N
}
public JspParserAPI.ParseResult analyzePage(FileObject jspFile, WebModule
wm, int errorReportingMode) {
if (wm ==null)
return getNoWebModuleResult(jspFile, null);
FileObject wmRoot = wm.getDocumentBase();
if (wmRoot == null) {
return getNoWebModuleResult(jspFile, wm);
}
WebAppParseProxy pp = getParseProxy(wm);
if (pp == null)
return getNoWebModuleResult(jspFile, wm);
return pp.analyzePage(jspFile, errorReportingMode);
}
private JspParserAPI.ParseResult getNoWebModuleResult(FileObject jspFile,
WebModule wm) {
JspParserAPI.ErrorDescriptor error = new
JspParserAPI.ErrorDescriptor(null, jspFile, -1, -1,
NbBundle.getMessage(JspParserImpl.class, "MSG_webModuleNotFound",
jspFile.getNameExt()), ""); // NOI18N
return new JspParserAPI.ParseResult(new JspParserAPI.ErrorDescriptor[]
{error});
}
Султан