duplicated and weird code
The code works, but is very difficult to understand and because of the duplication, to maintain
classes: ModelUtils and ErlModelUtils
methods: findPreprocessorDef
classes: ModelUtils and ErlModelUtils
methods: findPreprocessorDef
Leave a comment
![User picture](https://assets2.assembla.com/assets/avatars/big/3-37373335373136643838393663653763643763383330636535343563363631316238626361333162343832306332663434353138326264316463653836383831.png)
on 2010-10-12 09:09 *
By jakobc
Assigned to set to jakobc
Status changed from New to Accepted
Assigned to set to jakobc
Status changed from New to Accepted
I'll fix this (in my cleanup branch), I've grown tired of the hairy code in ErlModelUtils (and openaction, and search). It should have unit tests, too.
![User picture](https://assets2.assembla.com/assets/avatars/big/3-37373335373136643838393663653763643763383330636535343563363631316238626361333162343832306332663434353138326264316463653836383831.png)
![User picture](https://assets0.assembla.com/assets/avatars/big/4-36383533643662313133626333643264636332393066396165343239336266333364326134666231363138383637343462396266366563313533356361303261.png)
on 2010-10-12 10:02 *
By Vlad Dumitrescu
Cool, thanks! I tried to clean it up yesterday, but couldn't be sure how everything is hanging together...
![User picture](https://assets0.assembla.com/assets/avatars/big/4-36383533643662313133626333643264636332393066396165343239336266333364326134666231363138383637343462396266366563313533356361303261.png)
on 2010-11-17 12:00 *
By Vlad Dumitrescu
What's the status of this issue?
![User picture](https://assets2.assembla.com/assets/avatars/big/3-37373335373136643838393663653763643763383330636535343563363631316238626361333162343832306332663434353138326264316463653836383831.png)
![User picture](https://assets0.assembla.com/assets/avatars/big/4-36383533643662313133626333643264636332393066396165343239336266333364326134666231363138383637343462396266366563313533356361303261.png)
on 2010-11-18 12:19 *
By Vlad Dumitrescu
Milestone changed from sprint #8 to sprint #11
Milestone changed from sprint #8 to sprint #11
![User picture](https://assets0.assembla.com/assets/avatars/big/4-36383533643662313133626333643264636332393066396165343239336266333364326134666231363138383637343462396266366563313533356361303261.png)
on 2010-12-23 12:10 *
By Vlad Dumitrescu
Status changed from Accepted to Test
Work remaining changed from 16.0 to 0.0
Status changed from Accepted to Test
Work remaining changed from 16.0 to 0.0
![User picture](https://assets0.assembla.com/assets/avatars/big/4-36383533643662313133626333643264636332393066396165343239336266333364326134666231363138383637343462396266366563313533356361303261.png)
on 2010-12-23 12:12 *
By Vlad Dumitrescu
closed because such "long-running" tickets aren't useful -- nothing will be done about them anyway.
We'll go through the code once in a while to clean up.
We'll go through the code once in a while to clean up.
![User picture](https://assets0.assembla.com/assets/avatars/big/4-36383533643662313133626333643264636332393066396165343239336266333364326134666231363138383637343462396266366563313533356361303261.png)
![User picture](https://assets2.assembla.com/assets/avatars/big/3-37373335373136643838393663653763643763383330636535343563363631316238626361333162343832306332663434353138326264316463653836383831.png)
on 2011-01-21 10:34 *
By jakobc
Status changed from New to Accepted
Status changed from New to Accepted
internalFindPreprocessorDef is a mess...
11:11:07,037 W: (ErlTextHover.java:412) : null
java.lang.NullPointerException
at org.erlide.ui.util.ErlModelUtils.internalFindPreprocessorDef(ErlModelUtils.java:174)
at org.erlide.ui.util.ErlModelUtils.findPreprocessorDef(ErlModelUtils.java:135)
at org.erlide.ui.editors.erl.hover.ErlTextHover.internalGetHoverInfo(ErlTextHover.java:395)
at org.erlide.ui.editors.erl.hover.ErlTextHover.getHoverInfo2(ErlTextHover.java:248)
at org.eclipse.jface.text.TextViewerHoverManager$4.run(TextViewerHoverManager.java:166)
11:11:07,037 W: (ErlTextHover.java:412) : null
java.lang.NullPointerException
at org.erlide.ui.util.ErlModelUtils.internalFindPreprocessorDef(ErlModelUtils.java:174)
at org.erlide.ui.util.ErlModelUtils.findPreprocessorDef(ErlModelUtils.java:135)
at org.erlide.ui.editors.erl.hover.ErlTextHover.internalGetHoverInfo(ErlTextHover.java:395)
at org.erlide.ui.editors.erl.hover.ErlTextHover.getHoverInfo2(ErlTextHover.java:248)
at org.eclipse.jface.text.TextViewerHoverManager$4.run(TextViewerHoverManager.java:166)
![User picture](https://assets2.assembla.com/assets/avatars/big/3-37373335373136643838393663653763643763383330636535343563363631316238626361333162343832306332663434353138326264316463653836383831.png)
![User picture](https://assets2.assembla.com/assets/avatars/big/3-37373335373136643838393663653763643763383330636535343563363631316238626361333162343832306332663434353138326264316463653836383831.png)
![User picture](https://assets2.assembla.com/assets/avatars/big/3-37373335373136643838393663653763643763383330636535343563363631316238626361333162343832306332663434353138326264316463653836383831.png)