Closed ahmedchemek closed 7 years ago
@vzhukovskii can you assist please?
Hello @ahmedchemek! You should inject into your component org.eclipse.che.ide.api.editor.EditorAgent
and call org.eclipse.che.ide.api.editor.EditorAgent#closeEditor
then your tab with editor will be completely closed.
Hi @vzhukovskii !! I injected org.eclipse.che.ide.api.editor.EditorAgent in my Presenter and in the methode close i added : public void close(final boolean save) { view.setVisible(false); partStack.removePart(this); editorAgent.closeEditor(this); } but i have the same result
You don't need to modify the method public void close(final boolean save)
. Just when you want to close programmatically your custom editor you should call only editorAgent.closeEditor(editorPresenterToClose);
@ahmedchemek - please be mindful that this is a public forum for the entire community. We need to remove the perception of emotion from the discussions so that we can help you effectively. So, there is no need to use exclamation (!!) marks or bold. Just plain, simple English will be ok.
@TylerJewell ok sorry. @vzhukovskii where i should write editorAgent.closeEditor(editorPresenterToClose); ?
@eivantsov when executing close,
i have this in the console:
com.google.web.bindery.event.shared.UmbrellaException: Exception caught: (TypeError) : Cannot read property 'c0' of nul
l
@ahmedchemek this exception can be ignored. It is unrelated.
@ahmedchemek in any place where you want to close editor programmatically.
@vzhukovskii i writed it in the close method but always not working
@ahmedchemek is this still an issue?
@ahmedchemek I am closing the issue. Feel free to reopen if the problem persists.
Hello, I added a new type of editor to Che, the problem is when I want to close the editor just the view disappears but the Head that contains the name of the file remains open. this is the close method in the Presenter : public void close(final boolean save) { view.setVisible(false); partStack.removePart(this); }