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.
Summary: | New PrintAction implementation is broken | ||
---|---|---|---|
Product: | utilities | Reporter: | pblemel <pblemel> |
Component: | Assignee: | Vladimir Yaroslavskiy <yaroslavskiy> | |
Status: | RESOLVED FIXED | ||
Severity: | blocker | ||
Priority: | P2 | ||
Version: | 6.x | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Exception Reporter: |
Description
pblemel
2007-09-18 00:08:29 UTC
Which version of NetBeans do you use: Java, Mobility, ..., or Full version? New version of Print and Print Preview is available in Full version only (in soa1 cluster). So, it is important to know your configuration. While I am developing I am using the full version (6.0 B1), however it would be terrible to force my RCP app to include the full version's worth of modules! That would make the size of the application explode just to get functions back that were already working. Please try with small version (without SOA pack) to be sure that PrintProvider from openide works fine. I don't mean to be completely obtuse, but I just googled PrintProvider and nothing turns up but the source code for PrintProvider.java itself. How does one go about using it? Does the node need to impliment it instead of PrintCookie? I've been thrashing around with this for a couple of hours now, without success. org.openide.modules.print doesn't show up in the filtered list of modules until I check "Show non IDE modules", at which point I can add the module dependencies for Print/PrintAPI. Having done that, I get an error that my module is not a friend of org-netbeans-modules-print.jar or print-api.jar. What would you like me to try next? Even if you could just sketch out the basic steps, I could write a tutorial for the wiki -- but I really need to get printing working again. To clear situation: 1. NetBeans (version Java, C++, Ruby, Mobility, J2EE etc. - not Full version) has only one Print action in File menu. No Print Preview action. This action lives in openide and operates with PrintCookie from org.openide.cookies package. If you have Print Preview action (enabled or disabled) - it is Full version. PS. I downloaded the Java build 20070919044214 and tried to print a java source: I see empty page with header/footer only. I think that it is a bug in editor. Please file it against openide or editor. PrintContainer doesn't work for BaseDocument. 2. Full version of NetBeans (it has netbeans/soa1 folder in installation directory) has Print and Print Preview actions. New version of Print action overrides old action. New version of Print action doesn't work with PrintCookie, it is a bug and I'll fix it in a few days. 3. Print Preview (and Print) action works with PrintProvder from o.n.m.print.spi package. If you wish that your data will be printable, you should put implemented print provider in lookup of your topComponent or dataObject. In this case your module must a friend of print.api because packages are not real public (it will happen in future). Let me know and I'll add your module in the list of friends. Note that API/SPI is under discussion and may be little bit changed. 4. All text sources (java, text, c++, html, xml, etc.) in editor are printable and available in print preview. You should not do anything in this case. There are a lot of options of text printing. 5. If your data is represented by javax.swing.JComponent (or class which extends it) you may not be a friend of print.api and has dependency on it. Just add one line in your code: putClientProperty(java.awt.print.Printable.class, <name>); Let me know if your have questions/comments. fixed. |