\NeedsTeXFormat{LaTeX2e}
\ProvidesPackage{lstide}[2012/09/06 v0.6b Jan Waller]
\RequirePackage{calc}
\RequirePackage{xcolor}
\RequirePackage{listings}
%
\newdimen\lstidenumbersdimen%
\settowidth{\lstidenumbersdimen}{\normalfont{\small\ttfamily{99}}}%
\addtolength{\lstidenumbersdimen}{10pt}% add numbersep, which is 10pt by default
\lstset{xleftmargin=\lstidenumbersdimen,}
%
\lstloadlanguages{Java,C++,[Visual]C++,XML}%
%
\definecolor{eclipsekeyword}{RGB}{127,0,85}%
\definecolor{eclipsestring}{RGB}{42,0,191}%
\definecolor{eclipseannotation}{RGB}{100,100,100}%
\definecolor{eclipsecomment}{RGB}{63,127,95}%
\definecolor{eclipsejavadoc}{RGB}{63,95,191}%
\definecolor{eclipselinenumber}{RGB}{120,120,120}%
\definecolor{eclipsefield}{RGB}{0,0,192}%
\definecolor{eclipsexml}{RGB}{63,127,127}%
%
\lstdefinestyle{eclipse-java}{%
  language={},%
  morekeywords=[1]{},%
  keywordsprefix=@,%
  classoffset=1,%
  alsolanguage=Java,%
  classoffset=0,%
  numbers=left,%
  showstringspaces=false,%
  basicstyle=\small\ttfamily,%
  keywordstyle=\color{eclipseannotation},%
  keywordstyle=[2]\color{eclipsekeyword}\bfseries,%
  commentstyle=\color{eclipsecomment},%
  stringstyle=\color{eclipsestring},%
  numberstyle=\color{eclipselinenumber}\ttfamily,%
  morecomment=[s][\color{eclipsejavadoc}]{/**}{*/},%
  moredelim=**[is][\itshape]{°}{°},%static
  moredelim=**[is][\color{eclipsefield}]{\#}{\#},%field
}%
%
\lstdefinestyle{eclipse-cpp}{%
  language=C++,%
  keywordsprefix={},%
  numbers=left,%
  showstringspaces=false,%
  basicstyle=\small\ttfamily,%
  keywordstyle=\color{eclipsekeyword}\bfseries,%
  commentstyle=\color{eclipsecomment},%
  stringstyle=\color{eclipsestring},%
  numberstyle=\color{eclipselinenumber}\ttfamily,%
}%
%
\lstdefinestyle{eclipse-xml}{%
  language={},%
  keywordsprefix={},%
  numbers=left,%
  showstringspaces=false,%
  morestring=[b][\color{eclipsestring}\itshape]",
  morecomment=[s][\color{eclipsexml}]{<!}{>},%
  morekeywords={},% list your attributes here
  basicstyle=\color{eclipsexml}\small\ttfamily,%
  keywordstyle=\color{eclipsekeyword},%
  numberstyle=\color{eclipselinenumber}\ttfamily,%
}%
%
\definecolor{visualkeyword}{RGB}{0,0,255}%
\definecolor{visualstring}{RGB}{163,21,21}%
\definecolor{visualcomment}{RGB}{0,128,0}%
\definecolor{visuallinenumber}{RGB}{43,145,175}%
%
\lstdefinestyle{visual-cpp}{%
  language=[Visual]C++,%
  keywordsprefix={},%
  numbers=left,%
  showstringspaces=false,%
  basicstyle=\small\ttfamily,%
  keywordstyle=\color{visualkeyword},%
  commentstyle=\color{visualcomment},%
  stringstyle=\color{visualstring},%
  numberstyle=\color{visuallinenumber}\ttfamily,%
}%
%
\lstdefinestyle{default}{%
    basicstyle=\small\ttfamily,%
    keywordstyle=\bfseries,%
    commentstyle=\itshape,%
}%
%
\endinput
