Unable to dispose custom EditorPart [message #1398027] |
Thu, 10 July 2014 13:59 |
SREENATH V Messages: 1 Registered: July 2014 |
Junior Member |
|
|
Greetings!
We are using Eclipse Kepler with Java 1.7. We have been developing a plugin using Eclipse 3.X. As part of the plugin development, we have created a custom editor type which extends EditorPart and implements IPartListener. We have overridden the dispose () method as given below:
public void dispose()
{
//custom removals for listeners etc.. and finally
super.dispose();
}
But when we open another part of the same editor type, in the partOpened() method we could see all the parts opened till now in this eclipse instance. i.e it also shows the names of the parts that have been disposed earlier using the above dispose method.
partOpened() implementation is as given below:
public void partOpened( IWorkbenchPart part )
{
System.out.println("part opened " + getPartName());
//custom code.
}
Our doubts are:
1) How to dispose an EditorPart such that it is not shown while opening another part of the same type?
2) How can we restrict opening multiple EditorParts of the same type and allow files to be open in the same EditorPart? i.e suppose a file of extension xyz has been opened in Eclipse using an EditorPart. Now, if another file of the same type has to be opened, then it should be opened in the same EditorPart and should not open a new EditorPart.
Regards,
Sreenath
|
|
|
Powered by
FUDForum. Page generated in 0.03329 seconds