Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » How to open the javascript editor with a non IFileEditorInput
How to open the javascript editor with a non IFileEditorInput [message #176792] Thu, 10 August 2006 18:46 Go to next message
Andreas Herz is currently offline Andreas Herz
Messages: 196
Registered: July 2009
Senior Member
Hi,

sorry, but this is repost from:
"Integration of the Javascript Editor into a FormDialog"

I need to open the JavaScript editor with a non IFileEditorInput!

I have seen a lot of javascript text editors in eclipse
(BIRT, WorkflowEditor,.....).

Reason:
======
I implement a logic editor (like the GEF example) and want
implement the logic of the parts in javascript. So - the user
can change/create any parts in the library.

double click on a library element and edit the logic via javascript editor.
The javascript logic is a part of the element and isn't stored as
separat file.

Is there any solution available!!!!


greetings

Andreas
Re: How to open the javascript editor with a non IFileEditorInput [message #179730 is a reply to message #176792] Sat, 23 September 2006 03:42 Go to previous message
Nitin Dahyabhai is currently offline Nitin Dahyabhai
Messages: 2272
Registered: July 2009
Senior Member
FreeGroup wrote:
> sorry, but this is repost from:
> "Integration of the Javascript Editor into a FormDialog"
>
> I need to open the JavaScript editor with a non IFileEditorInput!
>
> I have seen a lot of javascript text editors in eclipse
> (BIRT, WorkflowEditor,.....).
>
> Reason:
> ======
> I implement a logic editor (like the GEF example) and want
> implement the logic of the parts in javascript. So - the user
> can change/create any parts in the library.
>
> double click on a library element and edit the logic via javascript editor.
> The javascript logic is a part of the element and isn't stored as
> separat file.
>
> Is there any solution available!!!!

While we haven't tested any scenarios like that, I'd start by
looking at the IStorageEditorInput interface and how it can be used
to open an editor on a non-file. For editing without a full editor,
it's best to look into using a SourceViewer and the same setup as
the JavaScript Editor's text page
(org.eclipse.wst.javascript.ui.internal.editor.JSEditor). The
editor adds lifecycle management and other features, most of which
aren't really suited for putting into a dialog.

--
- Nitin


---
Nitin Dahyabhai
Eclipse WTP, IBM
Previous Topic:Distinguish j2ee projects
Next Topic:refresh JSPs
Goto Forum:
  


Current Time: Fri Sep 19 14:01:59 GMT 2014

Powered by FUDForum. Page generated in 0.02704 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software