Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get rid of patch PRJ-452.patch as far as it moved to plugin #88

Merged
merged 1 commit into from
Feb 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 0 additions & 50 deletions patches/projector-client/PRJ-452.patch

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
* Copyright (c) 2022 Red Hat, Inc.
* This program and the accompanying materials are made
* available under the terms of the Eclipse Public License 2.0
* which is available at https://www.eclipse.org/legal/epl-2.0/
*
* SPDX-License-Identifier: EPL-2.0
*
* Contributors:
* Red Hat, Inc. - initial API and implementation
*/
package che.incubator.ide

import com.intellij.openapi.project.Project
import com.intellij.openapi.startup.StartupActivity
import com.intellij.openapi.wm.IdeFocusManager
import java.awt.Component
import java.awt.Frame
import java.awt.Window
import javax.swing.JFrame
import javax.swing.SwingUtilities

class IdeFrameConfigurationService : StartupActivity {
override fun runActivity(project: Project) {
val focusOwner: Component = IdeFocusManager.getGlobalInstance().focusOwner
val window: Window = if(focusOwner is JFrame) focusOwner else SwingUtilities.getWindowAncestor(focusOwner)
(window as JFrame).extendedState = Frame.MAXIMIZED_BOTH
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@
<extensions defaultExtensionNs="com.intellij">
<configurationType implementation="che.incubator.devfile.DevfileRunConfigurationType"/>
<postStartupActivity implementation="che.incubator.devfile.DevfileRunConfigurationService"/>
<postStartupActivity implementation="che.incubator.ide.IdeFrameConfigurationService"/>
</extensions>
</idea-plugin>