goodwinnk / eclihx

Automatically exported from code.google.com/p/eclihx
0 stars 0 forks source link

Cannot see line numbers in haxe editor #24

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Make sure line numbers are set to be displayed
(Window/Preferences/General/Text Editors/Show line numbers)
2. Open any .hx file, lines are not shown
3. Open an .hxml, lines are shown

This is on linux 64bit

Original issue reported on code.google.com by fmjrey on 16 Aug 2009 at 4:18

GoogleCodeExporter commented 9 years ago
I have send to goodwink a patch for displaying it

Original comment by sylvain....@gmail.com on 2 Oct 2009 at 7:39

GoogleCodeExporter commented 9 years ago
Great thanks! Can you send it to me as well or paste it here?

Original comment by fmjrey on 2 Oct 2009 at 8:17

GoogleCodeExporter commented 9 years ago
voilà

Original comment by sylvain....@gmail.com on 2 Oct 2009 at 11:15

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks Sylvain. Examining your patch made me have a closer look at this issue.
Reading the eclipse API it seems that subclassing from TextEditor should give 
us the
line numbers that any other editor have. In fact the hxml editor is the default
TextEditor class provided by eclipse, and it has the line numbers feature. Our
HXEditor class extends TextEditor therefore it should not have to do anything 
to get
that feature too. Your code gives us a line number but I'm pretty sure it's not 
the
proper way. Besides, it does not follow the editors preferences "Show line 
numbers".

I still need further investigation but so far what I discovered is this and 
maybe
someone else has a better idea how to get further: line numbers do not show up
because the PreferenceStore that HXEditor uses does not contain the 'show line
numbers' preference from Eclise editors.

The class eclihx.core.CorePreferenceInitializer seems to be where we need to 
ensure
eclipse editor preferences are also included but I'm not sure how if that makes
sense. Digging into eclipse code I found the class
org.eclipse.ui.internal.editors.text.EditorsPluginPreferenceInitializer which I 
think
is what we would need to reuse in the case of editors. That would mean another
preference store for the eclihx.ui plugin, separate from the eclihx.code 
preference
store.
I'm not sure yet what makes more sense, my guess would be a separate preference 
store
for eclihx.ui, but maybe goodwink has another idea?

Original comment by fmjrey on 4 Oct 2009 at 12:40

GoogleCodeExporter commented 9 years ago

Original comment by goodwi...@gmail.com on 4 Oct 2009 at 4:52

GoogleCodeExporter commented 9 years ago
Ok i tried the implementation and it works fine. 

Original comment by sylvain....@gmail.com on 5 Oct 2009 at 8:16