This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 101367 - Ruby files have wrong icons
Summary: Ruby files have wrong icons
Status: VERIFIED FIXED
Alias: None
Product: ruby
Classification: Unclassified
Component: Code (show other bugs)
Version: 6.x
Hardware: PC Windows XP
: P1 blocker (vote)
Assignee: Marek Fukala
URL:
Keywords:
: 101466 (view as bug list)
Depends on: 101535
Blocks:
  Show dependency tree
 
Reported: 2007-04-17 14:28 UTC by Tomas Danek
Modified: 2007-07-03 14:47 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
screenshot (39.94 KB, image/jpeg)
2007-04-17 14:30 UTC, Tomas Danek
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Tomas Danek 2007-04-17 14:28:35 UTC
rubyide #994
NetBeans Ruby IDE 070417
1.6.0-rc; Java HotSpot(TM) Client VM 1.6.0-rc-b99
Windows XP version 5.1 running on x86
en_US (nbrubyide); Cp1252
----------------------------------------------------
- unzipped rubyide, started with fresh UD, created rubyapp, looked into a new
file wizard, ruby files have kind of html icons?! - screenshot attached.
Comment 1 Tomas Danek 2007-04-17 14:30:19 UTC
Created attachment 41091 [details]
screenshot
Comment 2 Torbjorn Norbye 2007-04-17 19:02:19 UTC
I -think- this is because of the new RHTML support; in its layer file it's registering the text/x-ruby mime 
type with Schliemann, so I think Schliemann's dataloaders are used to recognize the Ruby files instead of 
our own Ruby data loaders. (This also means that when you create a new project, the template support for 
Ruby files don't get to replace tokens like __DATE__, __TIME__ etc).

Marek, can you take a look and see if this is indeed the problem?
Comment 3 Torbjorn Norbye 2007-04-17 19:54:04 UTC
A number of other things are broken as a result of this - for example the commenting actions.

As a hotfix I tried commenting out the x-ruby registration in rhtml's layer.xml, and while that made the 
normal dataloader kick in (with icons, editor actions and such), I keep getting exceptions stating that a 
language definition for x-ruby could not be found - so I didn't check this in.
Comment 4 Torbjorn Norbye 2007-04-17 22:20:11 UTC
*** Issue 101466 has been marked as a duplicate of this issue. ***
Comment 5 Torbjorn Norbye 2007-04-17 22:27:27 UTC
Pretty much all features that are depending on Ruby lexing are broken, such as automatic insertion of 
"end" statements, matching bracket highlighting and goto matching, pair-matching for "", '', etc.
Comment 6 Torbjorn Norbye 2007-04-17 22:42:39 UTC
I added 

Install-Before: org.netbeans.modules.languages.dataobject.LanguagesDataObject

to my DataLoader's registration, and that does fix part of this bug - in particular, my own data objects 
are being used now, so the right icons are shown, creating a project properly substitutes correct values 
for template parameters, etc. I've checked this part in.

However, the -editor- is still somehow being managed by Schliemann - the comment/uncomment 
actions are not available, formatting or the other lexer-based operations I listed above don't work, etc.

I'm guessing Schliemann registers x-ruby with the Lexer language manager (since the RHTML support 
reigsters x-ruby with Schliemann) and that's probably how the Schliemann lexer rather than my own is 
getting used.
Comment 7 Torbjorn Norbye 2007-04-18 09:42:37 UTC
I've looked at this some more, and have found that the problem is NOT with the wrong lexer being used, 
the problem is that the Schliemann EditorKit is being installed for the ruby mime type - and is being used 
by the Ruby editor (org.netbeans.modules.languages.dataobject.LanguagesEditorKit)

This might be because of the languages.nbs registration in MimeLookup under text/x-ruby done by the 
RHTML module.

I saw a checkin from Hanz a short while ago which had something to do with handling of missing 
language definitions, so maybe we don't need the fake registrations anymore?
Comment 8 Marek Fukala 2007-04-18 10:58:38 UTC
I am sorry Tor, that was my mistake, see my comments in issue #101535. The issue
is fixed already.

However I do not understand how can the Schliemann's Kit get installed for the
Ruby files????!?! Hanzi, do you have an idea? Or is that intentional?

Anyway, as you Tor correctly mentioned, Hanz has recently fixed something the
the S. parser so I was able to remove the fake registrations. I have briefly
tested it and I see your icons and the features what you described works in ruby
files.

I would be happy if you verify more thoroughly anyway. Thanks & sorry again.
Comment 9 Jan Jancura 2007-04-18 12:50:37 UTC
Schliemann kit is automatically installed if you have .nbs file registered.

And do no forget to delete userdir/Config/Editors. Schliemann creates some
registrations there. So even if ruby.nbs file is removed, registrations are
still there...
Comment 10 Torbjorn Norbye 2007-04-18 16:23:55 UTC
Thanks for responding to this so quickly!

Regarding cleaning up the Editors/ part in the userdir:

1) I think we might be lucky in that few people picked up this change via auto update since the module 
version number was 0.5, less than the previous version (0.12).  My impression is that the update center 
would not pick up the new version - is that correct? I looked at the Daily update center this morning, 
and it's still only showing version 0.12 for the RHTML module - I don't know if that means I'm correct 
and the update center is ignoring the newer version because of its version number, or if the daily 
update center is again lagging the trunk by a couple of days.

2) After my DataLoader Install-Before fix yesterday which forces the ruby dataloader to win over the 
Schliemann data loader (which addressed the wrong-icons issue), I don't think Schliemann does 
anything to the MIME folder.  When I was debugging this last night and found the mimekit reference, I 
started looking in the system layer using apisupport/beanbrowser, and all the registrations there 
looked okay.

So we're basically looking at people who used the Ruby modules for the first time (I assume Schliemann 
only writes mime folder entries if they don't exist, rather than replace existing entries?) in the window 
of time between Monday morning and Tuesday aternoon (or perhaps shifted a day or two out with the 
update center) - so I think that's going to be a pretty small group.
Comment 11 Marek Fukala 2007-04-18 16:50:03 UTC
As for the #1 - it may be related to a problem reported by Jesse to me - see
issue #101496 (Illegal implementation dependencies). I have fixed the manifest
and project.properties files also in rhtml editor module, we will see if it
helps - I have not much experience with publishing modules to AU, especially
with impl. deps. I hope the change won't affect other modules dependencies... If
you encounter something wrong or suspicious regarding AU and Ruby module, please
let me know, I may finally become an AU expert as you :-)
Comment 12 Tomas Danek 2007-05-25 14:00:38 UTC
icons are ok now. verified.
Comment 13 Tomas Danek 2007-05-25 14:01:19 UTC
v.
Comment 14 Jiri Kovalsky 2007-07-03 14:16:34 UTC
Reassigning this issue to newly created 'ruby' component.
Comment 15 Jiri Kovalsky 2007-07-03 14:47:12 UTC
Changing target milestone of all resolved Ruby issues from TBD to 6.0 Beta 1 build.