menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

Theia

Eclipse Theia - Cloud & Desktop IDE

Channels
Team

I want to overwrite saveWorkspaceAs method,but meet a error

April 12, 2020 at 11:07am

I want to overwrite saveWorkspaceAs method,but meet a error

April 12, 2020 at 11:07am
when I create a new class A extends WorkspaceFrontendContribution, but It tells me that this.confirmOverwrite is a private method, and can't access, what should I do?

April 14, 2020 at 7:04am
You can use index access to work around private methods:
const superMethod = obj['privateMethod'];
obj['privateMethod'] = (arg1, ..., argN) => {
// do something
const result = superMethod(arg1, ..., argN);
// do something
return result;
}
or send a PR to Theia to change private to protected visibility