Re: Listing per java

#42970
Up
0
Down
::


ho provato così ma non riesco a farlo andare, mi stampa i delimitatori:

`
\lstdefinestyle{JAVA}{
language=JAVA,
basicstyle=\scriptsize\ttfamily,
numbers=left,
numberstyle=\tiny,
numbersep=4pt,
tabsize=1,
extendedchars=false,
breaklines=true,
frame=tb,
showspaces=false,
showtabs=false,
xleftmargin=17pt,
framexleftmargin=14pt,
framexrightmargin=3pt,
framexbottommargin=2pt,
commentstyle=\itshape\color[gray]{0.3},
stringstyle=\itshape\color{black},
backgroundcolor=\color[gray]{0.95},
showstringspaces=false
moredelim=[is][\bfseries\color{black}\underbar]{>}{<} } ` quando inserisco `\lstset{style=JAVA} \lstinputlisting[label=samplecode,caption=A sample]{cap05/test.java}` e il file di test ` ... Logger log = Logger.getLogger(getClass().getName()); try{ String a = (String) action.get("opname"); log.debug("Action " + a); if (a.equals("Search")) { >JSONObject< parameters = new JSONObject(action.get("pars")); String operation_PartsNs = "http://www.unitnt.it/JS/LocalSearch"; ... ` il risultato è che mi stampa > <

Go to top