package Ġname . k ro pp . intellij . make file . psi Ċ Ċ import Ġcom . intellij . openapi . project .* Ċ import Ġcom . intellij . psi .* Ċ import Ġname . k ro pp . intellij . make file .* Ċ Ċ object ĠMakefile Element Factory Ġ{ ĊĠ Ġfun Ġcreate File ( project : ĠProject , Ġtext : ĠString ) Ġ= ĊĠĠĠĠĠ ĠPsi File Factory . getInstance ( project ). create File FromText (" Makefile ", ĠMakefile FileType , Ġtext ) Ġas ĠMakefile File ĊĊĠ Ġfun Ġcreate Rule ( project : ĠProject , Ġtarget : ĠString ) Ġ= ĊĠĠĠĠĠ Ġcreate File ( project , Ġ"$ target : "). firstChild Ġas ĠMakefile Rule ĊĊĠ Ġfun Ġcreate Target ( project : ĠProject , Ġname : ĠString ) Ġ= ĊĠĠĠĠĠ Ġcreate Rule ( project , Ġname ). firstChild . firstChild . firstChild Ġas ĠMakefile Target ĊĊĠ Ġfun Ġcreate Variable ( project : ĠProject , Ġname : ĠString ) Ġ= ĊĠĠĠĠĠ Ġcreate File ( project , Ġ"$ name Ġ:= Ġ'' "). firstChild . firstChild Ġas ĠMakefile Variable ĊĊĠ Ġfun Ġcreate Pr erequis ite ( project : ĠProject , Ġname : ĠString ) Ġ= ĊĠĠĠĠĠ Ġ( create File ( project , Ġ" a : Ġ$ name "). firstChild Ġas ĠMakefile Rule ). target Line . prerequisites !!. normal Pr erequisites . firstChild Ġas ĠMakefile Pr erequis ite ĊĊĠ Ġfun Ġcreate WhiteSpace ( project : ĠProject , Ġwhitespace : ĠString ) Ġ= ĊĠĠĠĠĠ Ġcreate File ( project , Ġwhitespace ). firstChild Ġas ĠPsi WhiteSpace ĊĊĠ Ġfun Ġcreate Chars ( project : ĠProject , Ġchars : ĠString ) Ġ= ĊĠĠĠĠĠ Ġcreate File ( project , Ġchars ). firstChild . node ĊĊĠ Ġfun Ġcreate EOL ( project : ĠProject , Ġwhitespace : ĠString ) Ġ= ĊĠĠĠĠĠ Ġcreate File ( project , Ġwhitespace ). firstChild ĊĊĠ Ġfun Ġcreate Recipe ( project : ĠProject , Ġtext : ĠString ) Ġ= ĊĠĠĠĠĠ Ġcreate Rule ( project , Ġ" target :\ n \ t $ text "). firstChild . next Sibling Ġas ĠMakefile Recipe ĊĊĠ Ġfun Ġcreate Function ( project : ĠProject , Ġtext : ĠString ) Ġ= ĊĠĠĠĠĠ Ġcreate File ( project , Ġtext ). firstChild Ġas ĠMakefile Function ĊĊĠ Ġfun Ġcreate Substitution ( project : ĠProject , Ġtext : ĠString ): ĠMakefile Substitution Ġ= ĊĠĠĠĠĠ Ġcreate Recipe ( project , Ġtext ). command List . first (). subst itution List . first () Ċ }