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.
The problem: NetBeans enterprise pack team need specific copyright notice (about usage of TomSawyer library) to be displayed in first tab of about box dialog, on bottom just under splash screen image. This place is required by lawyers and license text can't be placed into special separate action etc. (note that ent pack can't do branding AFAIK, which means thay can't alter splash screen directly). Proposed technical solution is as follows: Contract will be that some module in ent pack will put following lines into their module's xml layer: <folder name="About"> <folder name="Licenses"> <file name="tomsawyer_copyright" url="tomsawyer_copyright.txt"/> </folder> </folder> Of course coupled with copyright text in tomsawyer_copyright.txt file. If netbeans core implementation will find any files under given directory About/Licenses, it will load the text and display it under splash screen, using Swing's JTextArea. For short texts, there will be no scrollbar, for longer ones or multiple copyright texts, vertical scrollbar will appear.
Created attachment 30019 [details] Implementation with tests, patch against release55 branch
I kindly ask for fast review, as this needs to be integrated to release 5.5 beta. Only thing I'm not sure of (from the point of API) is where should I document the change. Should I create apichanges document for core/startup module, where impl resides? Or is there more general, better place anywhere? Thanks.
Dafe, would it be possible to move most of the implementation to AboutAction - e.g. core module and not core/startup? I was thinking about adding new argument to Splash.showSplashDialog which would also take a component with licenses. The component would be itself constructed in core. The reason for that is that I would like to keep core/startup as small as possible without any unnecessary APIs, while core is going to be the trash where we can smash everything. It has horrible content even now, so one more contract like this shall not make things worse. As concern the description, core has arch.xml document, so put an <api/> tag describing what is on there, with a note since when this is going to work. It does not have apichanges, so probably just give up or find some suitable module to mention this - maybe openide/awt is partially related...
As requested, I moved implementation to core module to prevent polluting of core/startup. I' attaching new diffs. And btw, I decided to only commit this stuff into release55, not in trunk. Reasons are it's probably won't be needed for further versions, is ugly, not systemic solution and moreover it seems requestor (ent pack) wants something little bit different, to be able to provide alternative splash screen image diretly, which is unfortunately not doable under current time constraints. So they agreed to go with current solution, which I view as hot-hack only for release55.
Created attachment 30060 [details] new patch - impl moved to core
Well, knowing that this is just a hack for release55: Would not it be simpler, if guys from "ent" just hide the default about action and provided their own? They can just copy our code and modify it how ever they need. If not, then ok.
Yes, I thought about it too, but there was a problem when some other pack will come with similar request, then replacing whole AboutAction wouldn't work. Given the fact that impl is ready, working, tested and result agreed from ent pack side, I'd say it's now simpler to stick with it and make the life of "ent" pack easier.
Hack committed into release55 branch. I'm sorry for not following review time limits exactly, but it's special situation and I hope it will do no harm. IDE: [26.4.06 18:48] Committing started Directory /cvs/core/test/unit/src/org/netbeans/core/actions/data added to the repository cvs server: scheduling file `data/testGetLicenseCompLayer.xml' for addition on branch `release55' cvs server: scheduling file `UnitTestUtils.java' for addition on branch `release55' cvs server: scheduling file `data/license2.txt' for addition on branch `release55' cvs server: scheduling file `data/license1.txt' for addition on branch `release55' cvs server: scheduling file `AboutActionTest.java' for addition on branch `release55' cvs server: use 'cvs commit' to add these files permanently Checking in startup/src/org/netbeans/core/startup/Splash.java; /cvs/core/startup/src/org/netbeans/core/startup/Splash.java,v <-- Splash.java new revision: 1.2.16.2.2.1; previous revision: 1.2.16.2 done RCS file: /cvs/core/test/unit/src/org/netbeans/core/actions/Attic/AboutActionTest.java,v done Checking in test/unit/src/org/netbeans/core/actions/AboutActionTest.java; /cvs/core/test/unit/src/org/netbeans/core/actions/Attic/AboutActionTest.java,v <-- AboutActionTest.java new revision: 1.1.2.1; previous revision: 1.1 done RCS file: /cvs/core/test/unit/src/org/netbeans/core/actions/Attic/UnitTestUtils.java,v done Checking in test/unit/src/org/netbeans/core/actions/UnitTestUtils.java; /cvs/core/test/unit/src/org/netbeans/core/actions/Attic/UnitTestUtils.java,v <-- UnitTestUtils.java new revision: 1.1.2.1; previous revision: 1.1 done RCS file: /cvs/core/test/unit/src/org/netbeans/core/actions/data/Attic/license2.txt,v done Checking in test/unit/src/org/netbeans/core/actions/data/license2.txt; /cvs/core/test/unit/src/org/netbeans/core/actions/data/Attic/license2.txt,v <-- license2.txt new revision: 1.1.2.1; previous revision: 1.1 done RCS file: /cvs/core/test/unit/src/org/netbeans/core/actions/data/Attic/testGetLicenseCompLayer.xml,v done Checking in test/unit/src/org/netbeans/core/actions/data/testGetLicenseCompLayer.xml; /cvs/core/test/unit/src/org/netbeans/core/actions/data/Attic/testGetLicenseCompLayer.xml,v <-- testGetLicenseCompLayer.xml new revision: 1.1.2.1; previous revision: 1.1 done RCS file: /cvs/core/test/unit/src/org/netbeans/core/actions/data/Attic/license1.txt,v done Checking in test/unit/src/org/netbeans/core/actions/data/license1.txt; /cvs/core/test/unit/src/org/netbeans/core/actions/data/Attic/license1.txt,v <-- license1.txt new revision: 1.1.2.1; previous revision: 1.1 done Checking in src/org/netbeans/core/actions/Bundle.properties; /cvs/core/src/org/netbeans/core/actions/Bundle.properties,v <-- Bundle.properties new revision: 1.146.30.1; previous revision: 1.146 done Checking in src/org/netbeans/core/actions/AboutAction.java; /cvs/core/src/org/netbeans/core/actions/AboutAction.java,v <-- AboutAction.java new revision: 1.20.44.1; previous revision: 1.20
Hopefully last touch, minor fix to keep the width of splash image and copyright component the same: Checking in Splash.java; /cvs/core/startup/src/org/netbeans/core/startup/Splash.java,v <-- Splash.java new revision: 1.2.16.2.2.2; previous revision: 1.2.16.2.2.1
Implemented, reviewed, integrated -> I consider this issue done and I'm closing it.
marking as fixed.
closed.