Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » Writing plugin output in an html editor
Writing plugin output in an html editor [message #560203] Tue, 21 September 2010 10:50 Go to previous message
Michel Simeon is currently offline Michel Simeon
Messages: 122
Registered: December 2009
Senior Member
I am developping a software (called MADS) that would work as follows:

- data is entered as text following a specific syntax; I have developed the sysntax and the corresponding specialized editor using the excellent TMF/XText package.

- a MADS menu item and toolbar button show up when the MADS editor is active. They trigger reading the selected item from the MADS editor, running the corresponding calculations and producing tables as defined in the data set.

- so far I am sending the output to a standard editor as plain text

- I would like to produce the output in html and view/save/print it in a viewer / editor / browser such as the one in WTP.

Having open an html file in the editor, I tried the following:

IEditorPart editor = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage().getActiveEditor();
IDocumentProvider dp = ((AbstractTextEditor) editor).getDocumentProvider();
IDocument doc = dp.getDocument(editor.getEditorInput());

I egt the following error:

org.eclipse.jst.pagedesigner.editors.HTMLEditor cannot be cast to org.eclipse.ui.texteditor.AbstractTextEditor

How do I get the html editor's document ?

Thanks
MS
 
Read Message
Read Message
Read Message
Read Message
Previous Topic:Multiple Web Services in one project
Next Topic:Export ear => which action are done?
Goto Forum:
  


Current Time: Tue May 21 06:21:14 EDT 2013

Powered by FUDForum. Page generated in 0.01720 seconds