Invoking the 'File/Print To HTML' feature (org.netbeans.modules.editor.ExportHTMLAction.class)

[email protected]
Newsgroups gmane.comp.java.netbeans.modules.openide.devel
Message-ID <[email protected]>
To give everyone the basic idea of what I am trying to do, I will give
a brief summary of the plugin I am attempting to create.

~~~~~~~~~~~~~~
Project Summary:
~~~~~~~~~~~~~~

My plugin will allow an instructor to markup a student's homework
assignments (as in, their code), making it as effortless as possible to
give feedback by the instructor to the student on any mistakes they
make, without needing to actually make physical changes (I.E: Adding
comments, or printing out the code and physically markup the
assignment... believe it or not, but this is still done at my
University). 

The Plugin itself needs to create a Read-Only copy (and hence the need
for the Print to HTML feature) and allow the instructor to markup said
assignments (the details I will leave out, as they are irrelevant).


~~~~~~~~~~~~~
Current Solution:
~~~~~~~~~~~~~

My current approach to this problem is to use a library that converts
Java to HTML, aptly named 'Java2HTML'... the issues with the generated
HTML aside, the plugin will need to work for any and all languages, and
so this library is insufficient. I also do not want to rely on network
API calls to do this for me (such as 'hilite.me') and such I want this
to work offline as well.


~~~~~~~~
Research:
~~~~~~~~

By research, I mean I will establish, at least to the best of my
ability, that I didn't just "immediately jump to the mailing list
without doing any research first". I'll admit that I probably could
have done more research, but considering that said research would
require me to understand the entirety of the NetBeans API, as well as
reading the Source Code to see how it is normally done... well, I
figured I should attempt to get some guidance first (as time is a
relative constraint).


I have looked at the XML Layer file to find out what gets invoked when
the user attempts to select 'Print To HTML'. This leads to
'org.netbeans.modules.editor.ExportHTMLAction' class, which while it is
public, it's methods are either private or protected, meaning I have
have no access to it directly. 



~~~~~~~~~~
What I Need:
~~~~~~~~~~

A way to invoke the ExportHTMLAction without the actual dialogue,
pretty much specifying that the currently selected file is what should
be 'Printed', and as well telling it precisely WHERE to print it. For
example, the current file, 'test.java' or 'example.cpp' should print to
'generated_html/test.java.html' and 'generated_html/example.cpp.html'
respectively. 

Is something like this possible? If not, is there a way I can simulate
this functionality myself without needing to build my own
<Language>2HTML library myself?


This is my first time posting on this mailing list, and in fact on any
mailing list, so please let me know if I make any mistakes in my posts,
and I will proceed to correct it. Thank you for your time.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.