Java 透视图更改后窗口最大化图标不可见

Java 透视图更改后窗口最大化图标不可见,java,eclipse-rcp,rcp,e4,Java,Eclipse Rcp,Rcp,E4,我从一位同事那里接手了一份RCP申请,我将从现在开始维护该申请。我发现了一个bug,在透视图更改之后,窗口最大化按钮消失了,在更改之前,一切看起来都正常。不需要这种行为,最大化按钮应该保持在原来的位置:-) 但在我切换透视图后,最大化按钮消失了 我不太熟悉RCP,所以我不知道去哪里找。我发现的唯一相关的源代码是似乎管理透视图更改的处理程序 import org.eclipse.e4.core.contexts.IEclipseContext; import org.eclipse.e4.co

我从一位同事那里接手了一份RCP申请,我将从现在开始维护该申请。我发现了一个bug,在透视图更改之后,窗口最大化按钮消失了,在更改之前,一切看起来都正常。不需要这种行为,最大化按钮应该保持在原来的位置:-)

但在我切换透视图后,最大化按钮消失了

我不太熟悉RCP,所以我不知道去哪里找。我发现的唯一相关的源代码是似乎管理透视图更改的处理程序

import org.eclipse.e4.core.contexts.IEclipseContext;
import org.eclipse.e4.core.di.annotations.Execute;

import java.util.logging.Logger;

import javax.inject.Named;

import org.eclipse.e4.core.di.annotations.CanExecute;
import org.eclipse.e4.ui.model.application.ui.advanced.MPerspective;
import org.eclipse.e4.ui.model.application.ui.advanced.MPerspectiveStack;
import org.eclipse.e4.ui.model.application.ui.basic.MWindow;
import org.eclipse.e4.ui.workbench.modeling.EPartService;

public class SwitchPerspectiveHandler {
    @CanExecute
    boolean canExecute(MPerspective perspective, @Named("********.command.2.perspective") String perspectiveId) {
        return !perspective.getElementId().equals(perspectiveId);
    }

    @Execute
    void execute(EPartService partService, MPerspective current, MWindow window, @Named("********.command.2.perspective") String perspectiveId) {
        MPerspectiveStack stack = (MPerspectiveStack) window.getChildren().get(0);
        for (MPerspective p : stack.getChildren()) {
            if (perspectiveId.equals(p.getElementId())) {
                String ABC_VIEW_VISIBLE = "abc_view_visible";
                boolean abc_view_visible = false;
                IEclipseContext ctx = window.getContext();
                if (p.getElementId().equals("abcperspective")) {
                    abc_view_visible = true;
                }
                ctx.set(ABC_VIEW_VISIBLE, abc_view_visible);

                partService.switchPerspective(p);
                break;
            }
        }
    }
}
我也查看了application.e4xmi,但是我找不到任何可以告诉透视图改变其装饰的东西