Simple question on contact item syntax

Ive setup openhab2 with habmin and got z-wave working, im completely new to openhab.

I am trying to write my first rule and i can’t work out the syntax required for contactitems,

this is what i have working

rule "door"
when
Item door changed
then
pushover(“door open”, 1)
end

that pushes a message fine but what i want is something like this

rule "door"
when
Item door changed
then
if (Item door.state==open){
pushover(“door opened”, 1)
}
end

ive tried fiddling with it but i always get an error in the logs, I know its so simple but there are no examples of contact item state rules i can find. I assume the eclipse smarthome IDE should help but i cant get it working i point it at the conf forlder but it never finds any things so doesnt seem to help, plus it gives me errors in the woring rule so ive stuck with notepad++.

Thanks for any help and sorry if ive missed something obvious somewhere.

For anyone else who is a dimwhit like me and makes this mistake, its that i put Item in the if statement

if(door.state==OPEN){}

works fine