Skip to main content


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: 2902
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:Open file with e3.x editor in e4 application
Next Topic:Editor area
Goto Forum:
  


Current Time: Thu Apr 25 01:50:27 GMT 2024

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

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

Back to the top