Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Graphical editor start problem - setFocus
Graphical editor start problem - setFocus [message #461272] Mon, 08 January 2007 14:16 Go to next message
Eclipse UserFriend
Originally posted by: eclipse.patcom.demon.co.uk

Hello

I have a graphical editor - losely based on the Shapes Editor example -
and I am having problems getting it to run. Instead of the Navigator, I
have a tree viewer that is building a hierachical model. An action fired
from the tree viwer's pop-up menu launches the editor. I know that the
editor is being created and is getting past PartTester but it falls over
at the setFocus method.

This is because the graphicalViewer attribute (from the GraphicalEditor
super class) is not being set.

My editor sub-classes GraphicalEditorWithFlyoutPalette and I have
provided methods for configureGraphicalViewer and
initializeGraphicalViewer but niether of these methods are fired.

The action that starts the editor uses

diagramEditor = window.getActivePage().openEditor(diagramEditorInput,
"com.....designer.DiagramEditor");

The plugin contains

<extension point="org.eclipse.ui.editors">
<editor
class="com.....designer.DiagramEditor"

contributorClass="com......designer.DiagramEditorActionBarContributer "
default="true"
icon="shapes.gif"
id="com......designer.DiagramEditor"
name="Designer Editor"/>
</extension>


I must be missing something but cannot find out what it is.

Many thanks

Mike
Re: Graphical editor start problem - setFocus [message #461280 is a reply to message #461272] Mon, 08 January 2007 16:39 Go to previous messageGo to next message
Jakub Jurkiewicz is currently offline Jakub JurkiewiczFriend
Messages: 38
Registered: July 2009
Member
Hi,

Do you implement createGraphicalViewer method in your Editor class? If
so, could you show it's implementation. Also the implementation of
methods configureGraphicalViewer and initializeGraphicalViewer could be
useful.

regards
Jakub Jurkiewicz

mgb wrote:
> Hello
>
> I have a graphical editor - losely based on the Shapes Editor example -
> and I am having problems getting it to run. Instead of the Navigator, I
> have a tree viewer that is building a hierachical model. An action fired
> from the tree viwer's pop-up menu launches the editor. I know that the
> editor is being created and is getting past PartTester but it falls over
> at the setFocus method.
>
> This is because the graphicalViewer attribute (from the GraphicalEditor
> super class) is not being set.
>
> My editor sub-classes GraphicalEditorWithFlyoutPalette and I have
> provided methods for configureGraphicalViewer and
> initializeGraphicalViewer but niether of these methods are fired.
>
> The action that starts the editor uses
>
> diagramEditor = window.getActivePage().openEditor(diagramEditorInput,
> "com.....designer.DiagramEditor");
>
> The plugin contains
>
> <extension point="org.eclipse.ui.editors">
> <editor
> class="com.....designer.DiagramEditor"
>
> contributorClass="com......designer.DiagramEditorActionBarContributer "
> default="true"
> icon="shapes.gif"
> id="com......designer.DiagramEditor"
> name="Designer Editor"/>
> </extension>
>
>
> I must be missing something but cannot find out what it is.
>
> Many thanks
>
> Mike
Re: Graphical editor start problem - setFocus [message #461318 is a reply to message #461280] Tue, 09 January 2007 10:38 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.patcom.demon.co.uk

Thanks Jakub

No I don't implement createGraphicalViewer, should I?, there isn't one
in the ShapesEditor example.

Here are the configureGraphicalViewer and initializeGraphicalViewer methods

protected void configureGraphicalViewer() {
super.configureGraphicalViewer();

GraphicalViewer viewer = getGraphicalViewer();
viewer.setEditPartFactory(new DesignerEditPartFactory());
viewer.setRootEditPart(new ScalableFreeformRootEditPart());
viewer.setKeyHandler(new GraphicalViewerKeyHandler(viewer));

// configure the context menu provider
ContextMenuProvider cmProvider =
new DiagramEditorContextMenuProvider(viewer, getActionRegistry());
viewer.setContextMenu(cmProvider);
getSite().registerContextMenu(cmProvider, viewer);
}


protected void initializeGraphicalViewer() {
super.initializeGraphicalViewer();
GraphicalViewer viewer = getGraphicalViewer();
viewer.setContents(getModel()); // set the contents of this editor

// listen for dropped parts
viewer.addDropTargetListener(createTransferDropTargetListene r());
}

Neither of these methods get called as a result of the openEditor call

Cheers

Mike

Jakub Jurkiewicz wrote:
> Hi,
>
> Do you implement createGraphicalViewer method in your Editor class? If
> so, could you show it's implementation. Also the implementation of
> methods configureGraphicalViewer and initializeGraphicalViewer could be
> useful.
>
> regards
> Jakub Jurkiewicz
>
> mgb wrote:
>> Hello
>>
>> I have a graphical editor - losely based on the Shapes Editor example
>> - and I am having problems getting it to run. Instead of the
>> Navigator, I have a tree viewer that is building a hierachical model.
>> An action fired from the tree viwer's pop-up menu launches the editor.
>> I know that the editor is being created and is getting past PartTester
>> but it falls over at the setFocus method.
>>
>> This is because the graphicalViewer attribute (from the
>> GraphicalEditor super class) is not being set.
>>
>> My editor sub-classes GraphicalEditorWithFlyoutPalette and I have
>> provided methods for configureGraphicalViewer and
>> initializeGraphicalViewer but niether of these methods are fired.
>>
>> The action that starts the editor uses
>>
>> diagramEditor = window.getActivePage().openEditor(diagramEditorInput,
>> "com.....designer.DiagramEditor");
>>
>> The plugin contains
>>
>> <extension point="org.eclipse.ui.editors">
>> <editor
>> class="com.....designer.DiagramEditor"
>>
>> contributorClass="com......designer.DiagramEditorActionBarContributer "
>> default="true"
>> icon="shapes.gif"
>> id="com......designer.DiagramEditor"
>> name="Designer Editor"/>
>> </extension>
>>
>>
>> I must be missing something but cannot find out what it is.
>>
>> Many thanks
>>
>> Mike
Re: Graphical editor start problem - setFocus [message #461334 is a reply to message #461318] Tue, 09 January 2007 14:44 Go to previous messageGo to next message
Jakub Jurkiewicz is currently offline Jakub JurkiewiczFriend
Messages: 38
Registered: July 2009
Member
I've just run my editor, and I can see that neither
configureGraphicalViewer() method nor initializeGraphicalViewer() is
called (I don't have them implemented). There is only
createGraphicalViewer(Composite parent) called.
My implementation looks more less like this:
protected void createGraphicalViewer(Composite parent) {
IEditorSite editorSite = getEditorSite();
GraphicalViewer viewer = new GraphicalViewerCreator(editorSite)
.createViewer(parent);

// hook the viewer into the EditDomain
getEditDomain().addViewer(viewer);
// acticate the viewer as selection provider for Eclipse
getSite().setSelectionProvider(viewer);
// set the viewer's content
viewer.setContents(screen);

this.graphicalViewer = viewer;

}

Check this and let me know how it goes.

Jakub Jurkiewicz

mgb wrote:
> Thanks Jakub
>
> No I don't implement createGraphicalViewer, should I?, there isn't one
> in the ShapesEditor example.
>
> Here are the configureGraphicalViewer and initializeGraphicalViewer methods
>
> protected void configureGraphicalViewer() {
> super.configureGraphicalViewer();
>
> GraphicalViewer viewer = getGraphicalViewer();
> viewer.setEditPartFactory(new DesignerEditPartFactory());
> viewer.setRootEditPart(new ScalableFreeformRootEditPart());
> viewer.setKeyHandler(new GraphicalViewerKeyHandler(viewer));
>
> // configure the context menu provider
> ContextMenuProvider cmProvider =
> new DiagramEditorContextMenuProvider(viewer, getActionRegistry());
> viewer.setContextMenu(cmProvider);
> getSite().registerContextMenu(cmProvider, viewer);
> }
>
>
> protected void initializeGraphicalViewer() {
> super.initializeGraphicalViewer();
> GraphicalViewer viewer = getGraphicalViewer();
> viewer.setContents(getModel()); // set the contents of this editor
>
> // listen for dropped parts
> viewer.addDropTargetListener(createTransferDropTargetListene r());
> }
>
> Neither of these methods get called as a result of the openEditor call
>
> Cheers
>
> Mike
>
> Jakub Jurkiewicz wrote:
>> Hi,
>>
>> Do you implement createGraphicalViewer method in your Editor class? If
>> so, could you show it's implementation. Also the implementation of
>> methods configureGraphicalViewer and initializeGraphicalViewer could
>> be useful.
>>
>> regards
>> Jakub Jurkiewicz
Re: Graphical editor start problem - setFocus [message #461348 is a reply to message #461334] Tue, 09 January 2007 16:17 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.patcom.demon.co.uk

Thanks Jakub

That is strange, I wonder why those methods were included in the example.

I have tried adding your code but do not have GraphicalViwerCreator - do
you know where this class should be

Cheers

Mike

Jakub Jurkiewicz wrote:
> I've just run my editor, and I can see that neither
> configureGraphicalViewer() method nor initializeGraphicalViewer() is
> called (I don't have them implemented). There is only
> createGraphicalViewer(Composite parent) called.
> My implementation looks more less like this:
> protected void createGraphicalViewer(Composite parent) {
> IEditorSite editorSite = getEditorSite();
> GraphicalViewer viewer = new GraphicalViewerCreator(editorSite)
> .createViewer(parent);
>
> // hook the viewer into the EditDomain
> getEditDomain().addViewer(viewer);
> // acticate the viewer as selection provider for Eclipse
> getSite().setSelectionProvider(viewer);
> // set the viewer's content
> viewer.setContents(screen);
>
> this.graphicalViewer = viewer;
>
> }
>
> Check this and let me know how it goes.
>
> Jakub Jurkiewicz
>
> mgb wrote:
>> Thanks Jakub
>>
>> No I don't implement createGraphicalViewer, should I?, there isn't one
>> in the ShapesEditor example.
>>
>> Here are the configureGraphicalViewer and initializeGraphicalViewer
>> methods
>>
>> protected void configureGraphicalViewer() {
>> super.configureGraphicalViewer();
>>
>> GraphicalViewer viewer = getGraphicalViewer();
>> viewer.setEditPartFactory(new DesignerEditPartFactory());
>> viewer.setRootEditPart(new ScalableFreeformRootEditPart());
>> viewer.setKeyHandler(new GraphicalViewerKeyHandler(viewer));
>>
>> // configure the context menu provider
>> ContextMenuProvider cmProvider =
>> new DiagramEditorContextMenuProvider(viewer,
>> getActionRegistry());
>> viewer.setContextMenu(cmProvider);
>> getSite().registerContextMenu(cmProvider, viewer);
>> }
>>
>>
>> protected void initializeGraphicalViewer() {
>> super.initializeGraphicalViewer();
>> GraphicalViewer viewer = getGraphicalViewer();
>> viewer.setContents(getModel()); // set the contents of this editor
>>
>> // listen for dropped parts
>> viewer.addDropTargetListener(createTransferDropTargetListene r());
>> }
>>
>> Neither of these methods get called as a result of the openEditor call
>>
>> Cheers
>>
>> Mike
>>
>> Jakub Jurkiewicz wrote:
>>> Hi,
>>>
>>> Do you implement createGraphicalViewer method in your Editor class?
>>> If so, could you show it's implementation. Also the implementation of
>>> methods configureGraphicalViewer and initializeGraphicalViewer could
>>> be useful.
>>>
>>> regards
>>> Jakub Jurkiewicz
>
Re: Graphical editor start problem - setFocus [message #461363 is a reply to message #461348] Tue, 09 January 2007 20:53 Go to previous messageGo to next message
Jakub Jurkiewicz is currently offline Jakub JurkiewiczFriend
Messages: 38
Registered: July 2009
Member
Sorry for that, class GraphicalViwerCreator was my class. I've put the
code from GraphicalViewerCreator#createViewer to the
createGraphicalViewer method and for me it works, so check it:
protected void createGraphicalViewer(Composite parent) {
IEditorSite editorSite = getEditorSite();
GraphicalViewer viewer = new GraphicalViewerImpl();
viewer.createControl(parent);
viewer.setRootEditPart(new ScalableFreeformRootEditPart());
viewer.setEditPartFactory(new ScreenEditPartFactory());
viewer.getControl().setBackground(ColorConstants.white);

getEditDomain().addViewer(viewer);
getSite().setSelectionProvider(viewer);
viewer.setContents(screen);

this.graphicalViewer = viewer;

}

I hope this works!
Jakub Jurkiewicz

mgb wrote:
> Thanks Jakub
>
> That is strange, I wonder why those methods were included in the example.
>
> I have tried adding your code but do not have GraphicalViwerCreator - do
> you know where this class should be
>
> Cheers
>
> Mike
>
> Jakub Jurkiewicz wrote:
>> I've just run my editor, and I can see that neither
>> configureGraphicalViewer() method nor initializeGraphicalViewer() is
>> called (I don't have them implemented). There is only
>> createGraphicalViewer(Composite parent) called.
>> My implementation looks more less like this:
>> protected void createGraphicalViewer(Composite parent) {
>> IEditorSite editorSite = getEditorSite();
>> GraphicalViewer viewer = new GraphicalViewerCreator(editorSite)
>> .createViewer(parent);
>>
>> // hook the viewer into the EditDomain
>> getEditDomain().addViewer(viewer);
>> // acticate the viewer as selection provider for Eclipse
>> getSite().setSelectionProvider(viewer);
>> // set the viewer's content
>> viewer.setContents(screen);
>>
>> this.graphicalViewer = viewer;
>>
>> }
>>
>> Check this and let me know how it goes.
>>
>> Jakub Jurkiewicz
Re: Graphical editor start problem - setFocus [message #461378 is a reply to message #461363] Wed, 10 January 2007 09:33 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: eclipse.patcom.demon.co.uk

Hello Jakub

I do appreciate your help, but I am afraid we are still not there, is
GraphicalViewerImpl one of your classes ?

This would still be a problem as the createGraphicalViwer method does
not get fired, I think the initial problem must lie outside of the
Editor in the way the workbench starts the Editor.

In the shapes example, the Editor is associated with a resource and in
the plugin, it has an extension of shapes. The wizard starts the Editor
by using

IDE.openEditor(page, newFile, true);

Some thing in this route must cause the graphical viewer to be
instantiated an set into the Editor attribute graphialViewer because in
the shapes example, the only two methods to do with the graphical viewer
are the configureGraphicalViewer and initializeGraphicalViewer, both of
which expect the graphicalViewer attribute to be already populated.

I had assumed that the editor super class,
GraphicalEditorWithFlyoutPalette, created the viewer and populated the
graphicalViewer attribute, but it does not seam to.

Many thanks

Mike
Jakub Jurkiewicz wrote:
> Sorry for that, class GraphicalViwerCreator was my class. I've put the
> code from GraphicalViewerCreator#createViewer to the
> createGraphicalViewer method and for me it works, so check it:
> protected void createGraphicalViewer(Composite parent) {
> IEditorSite editorSite = getEditorSite();
> GraphicalViewer viewer = new GraphicalViewerImpl();
> viewer.createControl(parent);
> viewer.setRootEditPart(new ScalableFreeformRootEditPart());
> viewer.setEditPartFactory(new ScreenEditPartFactory());
> viewer.getControl().setBackground(ColorConstants.white);
>
> getEditDomain().addViewer(viewer);
> getSite().setSelectionProvider(viewer);
> viewer.setContents(screen);
>
> this.graphicalViewer = viewer;
>
> }
>
> I hope this works!
> Jakub Jurkiewicz
>
> mgb wrote:
>> Thanks Jakub
>>
>> That is strange, I wonder why those methods were included in the example.
>>
>> I have tried adding your code but do not have GraphicalViwerCreator -
>> do you know where this class should be
>>
>> Cheers
>>
>> Mike
>>
>> Jakub Jurkiewicz wrote:
>>> I've just run my editor, and I can see that neither
>>> configureGraphicalViewer() method nor initializeGraphicalViewer() is
>>> called (I don't have them implemented). There is only
>>> createGraphicalViewer(Composite parent) called.
>>> My implementation looks more less like this:
>>> protected void createGraphicalViewer(Composite parent) {
>>> IEditorSite editorSite = getEditorSite();
>>> GraphicalViewer viewer = new GraphicalViewerCreator(editorSite)
>>> .createViewer(parent);
>>>
>>> // hook the viewer into the EditDomain
>>> getEditDomain().addViewer(viewer);
>>> // acticate the viewer as selection provider for Eclipse
>>> getSite().setSelectionProvider(viewer);
>>> // set the viewer's content
>>> viewer.setContents(screen);
>>>
>>> this.graphicalViewer = viewer;
>>>
>>> }
>>>
>>> Check this and let me know how it goes.
>>>
>>> Jakub Jurkiewicz
>
Re: Graphical editor start problem - setFocus [message #461412 is a reply to message #461378] Wed, 10 January 2007 16:51 Go to previous messageGo to next message
Jakub Jurkiewicz is currently offline Jakub JurkiewiczFriend
Messages: 38
Registered: July 2009
Member
No, GraphicalViewerImpl class is from org.eclipse.gef.ui.parts package.

I don't have any clue what can be wrong. Could you show me your
plugin.xml file?
Did you look at this tutotial:
http://www.eclipse.org/articles/Article-GEF-diagram-editor/s hape.html -
it shows how to build shape editor.

If you still have this problem I can still try to help you.
And if you find what was wrong, please tell me what was it, ok?

regards
Jakub Jurkiewicz

mgb wrote:
> Hello Jakub
>
> I do appreciate your help, but I am afraid we are still not there, is
> GraphicalViewerImpl one of your classes ?
>
> This would still be a problem as the createGraphicalViwer method does
> not get fired, I think the initial problem must lie outside of the
> Editor in the way the workbench starts the Editor.
>
> In the shapes example, the Editor is associated with a resource and in
> the plugin, it has an extension of shapes. The wizard starts the Editor
> by using
>
> IDE.openEditor(page, newFile, true);
>
> Some thing in this route must cause the graphical viewer to be
> instantiated an set into the Editor attribute graphialViewer because in
> the shapes example, the only two methods to do with the graphical viewer
> are the configureGraphicalViewer and initializeGraphicalViewer, both of
> which expect the graphicalViewer attribute to be already populated.
>
> I had assumed that the editor super class,
> GraphicalEditorWithFlyoutPalette, created the viewer and populated the
> graphicalViewer attribute, but it does not seam to.
>
> Many thanks
>
> Mike
> Jakub Jurkiewicz wrote:
>> Sorry for that, class GraphicalViwerCreator was my class. I've put the
>> code from GraphicalViewerCreator#createViewer to the
>> createGraphicalViewer method and for me it works, so check it:
>> protected void createGraphicalViewer(Composite parent) {
>> IEditorSite editorSite = getEditorSite();
>> GraphicalViewer viewer = new GraphicalViewerImpl();
>> viewer.createControl(parent);
>> viewer.setRootEditPart(new ScalableFreeformRootEditPart());
>> viewer.setEditPartFactory(new ScreenEditPartFactory());
>> viewer.getControl().setBackground(ColorConstants.white);
>>
>> getEditDomain().addViewer(viewer);
>> getSite().setSelectionProvider(viewer);
>> viewer.setContents(screen);
>>
>> this.graphicalViewer = viewer;
>>
>> }
>>
>> I hope this works!
>> Jakub Jurkiewicz
>>
>> mgb wrote:
>>> Thanks Jakub
>>>
>>> That is strange, I wonder why those methods were included in the
>>> example.
>>>
>>> I have tried adding your code but do not have GraphicalViwerCreator -
>>> do you know where this class should be
>>>
>>> Cheers
>>>
>>> Mike
>>>
>>> Jakub Jurkiewicz wrote:
>>>> I've just run my editor, and I can see that neither
>>>> configureGraphicalViewer() method nor initializeGraphicalViewer() is
>>>> called (I don't have them implemented). There is only
>>>> createGraphicalViewer(Composite parent) called.
>>>> My implementation looks more less like this:
>>>> protected void createGraphicalViewer(Composite parent) {
>>>> IEditorSite editorSite = getEditorSite();
>>>> GraphicalViewer viewer = new GraphicalViewerCreator(editorSite)
>>>> .createViewer(parent);
>>>>
>>>> // hook the viewer into the EditDomain
>>>> getEditDomain().addViewer(viewer);
>>>> // acticate the viewer as selection provider for Eclipse
>>>> getSite().setSelectionProvider(viewer);
>>>> // set the viewer's content
>>>> viewer.setContents(screen);
>>>>
>>>> this.graphicalViewer = viewer;
>>>>
>>>> }
>>>>
>>>> Check this and let me know how it goes.
>>>>
>>>> Jakub Jurkiewicz
>>
Re: Graphical editor start problem - setFocus [message #461566 is a reply to message #461412] Fri, 12 January 2007 11:37 Go to previous message
Eclipse UserFriend
Originally posted by: eclipse.patcom.demon.co.uk

Problem solved - it apears to be a mismatch of versions problem. I had
3.2 GEF in a 3.1.1 Eclipse, with everything moved to a 3.1.1 eclipse
with a 3.1.1 GEF the Editor now starts.

However within the PaletteFactory, I had to change
com.wcg.catalyst.common.designer.model.EllipticalFigure.clas s to new
com.wcg.catalyst.common.designer.model.EllipticalFigure().ge tClass() in
the CombinedTemplateCreationEntry constructor

Many thanks for your help

Cheers

Mike

Jakub Jurkiewicz wrote:
> No, GraphicalViewerImpl class is from org.eclipse.gef.ui.parts package.
>
> I don't have any clue what can be wrong. Could you show me your
> plugin.xml file?
> Did you look at this tutotial:
> http://www.eclipse.org/articles/Article-GEF-diagram-editor/s hape.html -
> it shows how to build shape editor.
>
> If you still have this problem I can still try to help you.
> And if you find what was wrong, please tell me what was it, ok?
>
> regards
> Jakub Jurkiewicz
>
> mgb wrote:
>> Hello Jakub
>>
>> I do appreciate your help, but I am afraid we are still not there, is
>> GraphicalViewerImpl one of your classes ?
>>
>> This would still be a problem as the createGraphicalViwer method does
>> not get fired, I think the initial problem must lie outside of the
>> Editor in the way the workbench starts the Editor.
>>
>> In the shapes example, the Editor is associated with a resource and in
>> the plugin, it has an extension of shapes. The wizard starts the
>> Editor by using
>>
>> IDE.openEditor(page, newFile, true);
>>
>> Some thing in this route must cause the graphical viewer to be
>> instantiated an set into the Editor attribute graphialViewer because
>> in the shapes example, the only two methods to do with the graphical
>> viewer are the configureGraphicalViewer and initializeGraphicalViewer,
>> both of which expect the graphicalViewer attribute to be already
>> populated.
>>
>> I had assumed that the editor super class,
>> GraphicalEditorWithFlyoutPalette, created the viewer and populated the
>> graphicalViewer attribute, but it does not seam to.
>>
>> Many thanks
>>
>> Mike
>> Jakub Jurkiewicz wrote:
>>> Sorry for that, class GraphicalViwerCreator was my class. I've put
>>> the code from GraphicalViewerCreator#createViewer to the
>>> createGraphicalViewer method and for me it works, so check it:
>>> protected void createGraphicalViewer(Composite parent) {
>>> IEditorSite editorSite = getEditorSite();
>>> GraphicalViewer viewer = new GraphicalViewerImpl();
>>> viewer.createControl(parent);
>>> viewer.setRootEditPart(new ScalableFreeformRootEditPart());
>>> viewer.setEditPartFactory(new ScreenEditPartFactory());
>>> viewer.getControl().setBackground(ColorConstants.white);
>>>
>>> getEditDomain().addViewer(viewer);
>>> getSite().setSelectionProvider(viewer);
>>> viewer.setContents(screen);
>>>
>>> this.graphicalViewer = viewer;
>>>
>>> }
>>>
>>> I hope this works!
>>> Jakub Jurkiewicz
>>>
>>> mgb wrote:
>>>> Thanks Jakub
>>>>
>>>> That is strange, I wonder why those methods were included in the
>>>> example.
>>>>
>>>> I have tried adding your code but do not have GraphicalViwerCreator
>>>> - do you know where this class should be
>>>>
>>>> Cheers
>>>>
>>>> Mike
>>>>
>>>> Jakub Jurkiewicz wrote:
>>>>> I've just run my editor, and I can see that neither
>>>>> configureGraphicalViewer() method nor initializeGraphicalViewer()
>>>>> is called (I don't have them implemented). There is only
>>>>> createGraphicalViewer(Composite parent) called.
>>>>> My implementation looks more less like this:
>>>>> protected void createGraphicalViewer(Composite parent) {
>>>>> IEditorSite editorSite = getEditorSite();
>>>>> GraphicalViewer viewer = new
>>>>> GraphicalViewerCreator(editorSite)
>>>>> .createViewer(parent);
>>>>>
>>>>> // hook the viewer into the EditDomain
>>>>> getEditDomain().addViewer(viewer);
>>>>> // acticate the viewer as selection provider for Eclipse
>>>>> getSite().setSelectionProvider(viewer);
>>>>> // set the viewer's content
>>>>> viewer.setContents(screen);
>>>>>
>>>>> this.graphicalViewer = viewer;
>>>>>
>>>>> }
>>>>>
>>>>> Check this and let me know how it goes.
>>>>>
>>>>> Jakub Jurkiewicz
>>>
Previous Topic:RCP Application: How to remove Resource Perspective?
Next Topic:How to execute a Job allways in background
Goto Forum:
  


Current Time: Fri Apr 19 01:34:21 GMT 2024

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

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

Back to the top