Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse 4 » Visibility of new editor part
Visibility of new editor part [message #1732835] Fri, 20 May 2016 15:13 Go to next message
Robert Onslow is currently offline Robert OnslowFriend
Messages: 27
Registered: March 2016
Junior Member
Hi

I have a part descriptor for an editor which extends jface TextEditor

In my OpenHandler I do
@Execute
	public void execute(Shell shell){
		FileDialog dialog = new FileDialog(shell);
		String fileName = dialog.open();
		if (fileName.endsWith(".lxml")) {
			MPart part = partService.createPart("uk.co.xbundle.scopist.application.partdescriptor.lxmleditor");
			part.setLabel(fileName);
			
			MPartStack editorStack = (MPartStack) modelService.find("uk.co.xbundle.scopist.application.partstack.editors", app);
			editorStack.getChildren().add(part);
			partService.showPart(part, PartState.ACTIVATE);
			
		}
		
	}


The editor initializes via its constructor, the tab panel appears, but the editor is not visible within the tab.

Any ideas as to why this should be?

Thanks

Robert

Re: Visibility of new editor part [message #1732856 is a reply to message #1732835] Sat, 21 May 2016 06:23 Go to previous message
Dirk Fauth is currently offline Dirk FauthFriend
Messages: 2526
Registered: July 2012
Senior Member
Have you tried to debug to see if the initialization code is called?
Re: Visibility of new editor part [message #1732869 is a reply to message #1732856] Sat, 21 May 2016 02:13 Go to previous message
Robert Onslow is currently offline Robert OnslowFriend
Messages: 27
Registered: March 2016
Junior Member
Thanks Dirk
Yes, initialization was fine
I hadn't set the input of the TextEditor using TextEditor.setEditorInput(IEditorInput input)

Previous Topic:e4 perspective with e3 editor area (org.eclipse.ui.editorss)
Next Topic:How does one get the minimize and maximize view menu items to render on the view menu?
Goto Forum:
  


Current Time: Fri Nov 24 07:14:22 GMT 2017

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

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