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 40397 - ValidateLayerConsistencyTest broken; Bookmarks{Node,Action} not functional
Summary: ValidateLayerConsistencyTest broken; Bookmarks{Node,Action} not functional
Status: VERIFIED FIXED
Alias: None
Product: utilities
Classification: Unclassified
Component: URL (show other bugs)
Version: 3.x
Hardware: All All
: P1 blocker (vote)
Assignee: Patrick Keegan
URL: http://www.netbeans.org/download/dev/...
Keywords: TEST
: 40358 40371 40405 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-02-23 23:24 UTC by Jesse Glick
Modified: 2005-07-19 13:22 UTC (History)
3 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments
quick fix for bookmark problem (2.74 KB, patch)
2004-02-24 00:06 UTC, Patrick Keegan
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jesse Glick 2004-02-23 23:24:42 UTC
See test logs at marked URL. Caused by recent
commits from pkeegan.

Services/org-netbeans-modules-url-BookmarksNode.instance
and
UI/Services/IDEConfiguration/System/org-netbeans-modules-url-BookmarksNode.shadow
cannot exist so long as the Bookmarks/ folder does
not exist (you commented it out).
Actions/Help/org-netbeans-modules-url-BookmarksAction.instance
does not make any sense either so long as this
folder does not exist - it will not throw
exceptions if you add it to e.g. a menu, but it
will not display anything either. Please either

1. Reinstate the Bookmarks/ folder, possibly
empty, so that it can be used. (A user would have
to manually copy BookmarksAction to some menu
folder in order to see the bookmarks, however.)

or

2. Remove the three obsolete files mentioned above
from the layer (and if the removal is to be
permanent consider deleting the corresponding Java
sources as well: BookmarksAction.java and
BookmarksNode.java).

Note: you also get

java.lang.IllegalArgumentException: Called
DataObject.find on null
	at
org.openide.loaders.DataObject.find(DataObject.java:435)
	at
org.openide.loaders.DataFolder.findFolder(DataFolder.java:518)
	at
org.netbeans.modules.url.BookmarksNode.<init>(BookmarksNode.java:70)

on console when opening the System folder in the
Options dialog, for the same reason the test is
broken.
Comment 1 Patrick Keegan 2004-02-23 23:38:39 UTC
*** Issue 40358 has been marked as a duplicate of this issue. ***
Comment 2 Patrick Keegan 2004-02-24 00:06:36 UTC
Created attachment 13594 [details]
quick fix for bookmark problem
Comment 3 Patrick Keegan 2004-02-24 00:17:03 UTC
I attached a proposed patch. However, sanity checking the fix by
building the module, adding it to an an existing build, and trying
copy a bookmark instance from actions to the menu threw a missing
resource, so I would only commit it in conjunction with adding these
two keys to the bundle file:

Templates/Other/bookmark.url=Web Bookmark
Bookmarks=&Bookmarks

Jesse, if you sanity check the patch, I'll apply it within the half hour.

BTW, I prefer the second option that you listed, but for some reason I
couldn't get it to work properly at the moment, but that's what I'll
probably ask Marian to do permanently
Comment 4 Jesse Glick 2004-02-24 00:47:15 UTC
No idea what you are talking about w.r.t. the bundle key for
Templates/Other/bookmark.url; this file is unrelated to the Bookmarks/
folder, was not deleted, and still has a bundle key in
.../url/Bundle.properties as it should.

The MRE you got is probably because you failed to comment out

          <attr name="SystemFileSystem.localizingBundle"
stringvalue="org.netbeans.modules.url.Bundle"/>
          <attr name="helpID"
stringvalue="org.netbeans.modules.url.BookmarksNode"/>
Comment 5 Patrick Keegan 2004-02-24 00:52:38 UTC
RE: Templates/Other/bookmark.url;

Yep, I misread my diff.

RE the uncommented out attributes, I assumed that they would have to
stay around for the folder to mean anything
Comment 6 Jesse Glick 2004-02-24 00:54:38 UTC
But the folder *doesn't* mean anything any more.
Comment 7 Tomas Pavek 2004-02-24 09:10:34 UTC
*** Issue 40371 has been marked as a duplicate of this issue. ***
Comment 8 Marian Petras 2004-02-24 10:00:43 UTC
*** Issue 40405 has been marked as a duplicate of this issue. ***
Comment 9 Marian Petras 2004-02-24 10:43:31 UTC
fixed by commenting out the relevant files from Layer.xml

the remaining changes to be done:
- delete the commented sections
- delete the unused Java files
Comment 10 Patrick Keegan 2004-02-24 14:42:55 UTC
I see that the commit validation is working now. Thanks a lot for your
help, Marian.
Comment 11 Patrick Keegan 2004-02-26 20:07:33 UTC
One thought: the Studio folks have been using URL files in the
Filesystems window. Would the deletion of BookmarksAction.java and
BookmarksNode.java prevent them from using URLs in the future?
Comment 12 Jesse Glick 2004-02-26 21:04:00 UTC
Nope, *.url files should work fine without BookmarksAction and
BookmarksNode.
Comment 13 Jesse Glick 2004-02-27 18:42:09 UTC
Is there an issue filed for the remaining tasks like deleting
BookmarksAction/Node? These are not yet done.
Comment 14 Marian Petras 2004-02-27 18:55:55 UTC
No, there is not. I have not evaluated yet whether it is OK to delete
the files. Words like "should work fine" do not sound well to me.
Comment 15 Max Sauer 2005-07-19 12:14:52 UTC
Jesse, could you please verify this issue? Thanks.
Comment 16 Jesse Glick 2005-07-19 13:22:38 UTC
Long dead.