Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » Getting default content on editor
Getting default content on editor [message #68310] Fri, 17 July 2009 09:49 Go to next message
Prasad is currently offline PrasadFriend
Messages: 4
Registered: July 2009
Junior Member
Hi,

I am newbee to eclipse plugin development and currently doing a RCP
project. I have a requirement in this project to display some default
content on the editor in the initial perspective when the application
started. In one of the books I read that editors are always opened on user
interaction. Is it possible to somehow trigger opening of editor with some
default content on application start.

Note: I don't want to do configuration saving. Need some default content
displayed in the editor which can be updated by external process.


Thanks
-- Prasad
Re: Getting default content on editor [message #68545 is a reply to message #68310] Tue, 21 July 2009 15:25 Go to previous messageGo to next message
Martin Hardy is currently offline Martin HardyFriend
Messages: 10
Registered: July 2009
Junior Member
Have a look at the IEditorInput and IEditor interfaces.

You can use them this way :

IEditorInput fieldInput = new CustomFieldEditorInput(/*some parameters..
default content for example*/);
this.dataModelView.getSite().getPage().openEditor(fieldInput ,
CustomFieldEditor.ID);
Re: Getting default content on editor [message #412180 is a reply to message #68545] Thu, 30 July 2009 08:52 Go to previous message
Prasad is currently offline PrasadFriend
Messages: 4
Registered: July 2009
Junior Member
Martin Hardy wrote:

> Have a look at the IEditorInput and IEditor interfaces.

> You can use them this way :

> IEditorInput fieldInput = new CustomFieldEditorInput(/*some parameters..
> default content for example*/);
> this.dataModelView.getSite().getPage().openEditor(fieldInput ,
> CustomFieldEditor.ID);Hi Martin,

Thanks for the reply. Where do I put this code? In other words, when do I
execute this code? I tried putting similar code in couple of places and
got segfault. I would like to execute this code just before it enters the
diplay event dispatch loop.

Thanks
-- Prasad
Re: Getting default content on editor [message #599675 is a reply to message #68310] Tue, 21 July 2009 15:25 Go to previous message
Martin Hardy is currently offline Martin HardyFriend
Messages: 10
Registered: July 2009
Junior Member
Have a look at the IEditorInput and IEditor interfaces.

You can use them this way :

IEditorInput fieldInput = new CustomFieldEditorInput(/*some parameters..
default content for example*/);
this.dataModelView.getSite().getPage().openEditor(fieldInput ,
CustomFieldEditor.ID);
Re: Getting default content on editor [message #600126 is a reply to message #68545] Thu, 30 July 2009 08:52 Go to previous message
Prasad is currently offline PrasadFriend
Messages: 4
Registered: July 2009
Junior Member
Martin Hardy wrote:

> Have a look at the IEditorInput and IEditor interfaces.

> You can use them this way :

> IEditorInput fieldInput = new CustomFieldEditorInput(/*some parameters..
> default content for example*/);
> this.dataModelView.getSite().getPage().openEditor(fieldInput ,
> CustomFieldEditor.ID);Hi Martin,

Thanks for the reply. Where do I put this code? In other words, when do I
execute this code? I tried putting similar code in couple of places and
got segfault. I would like to execute this code just before it enters the
diplay event dispatch loop.

Thanks
-- Prasad
Previous Topic:Editors
Next Topic:platform:/plugin URLs behave differently for deployed plugins and plugins started from source
Goto Forum:
  


Current Time: Sat Aug 13 15:53:17 GMT 2022

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

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

Back to the top