X-Git-Url: https://gerrit.simantics.org/r/gitweb?p=simantics%2Fplatform.git;a=blobdiff_plain;f=bundles%2Forg.simantics.workbench%2Fsrc%2Forg%2Fsimantics%2Fworkbench%2Finternal%2Fcontributions%2Fe4%2FClosePartHandler.java;fp=bundles%2Forg.simantics.workbench%2Fsrc%2Forg%2Fsimantics%2Fworkbench%2Finternal%2Fcontributions%2Fe4%2FClosePartHandler.java;h=b123fdab8353626f06bb5431d060dc7dde8f6e98;hp=96c4c7121dd51d1f15d0ca744b0864c17a3228a8;hb=0ae2b770234dfc3cbb18bd38f324125cf0faca07;hpb=24e2b34260f219f0d1644ca7a138894980e25b14 diff --git a/bundles/org.simantics.workbench/src/org/simantics/workbench/internal/contributions/e4/ClosePartHandler.java b/bundles/org.simantics.workbench/src/org/simantics/workbench/internal/contributions/e4/ClosePartHandler.java index 96c4c7121..b123fdab8 100644 --- a/bundles/org.simantics.workbench/src/org/simantics/workbench/internal/contributions/e4/ClosePartHandler.java +++ b/bundles/org.simantics.workbench/src/org/simantics/workbench/internal/contributions/e4/ClosePartHandler.java @@ -1,28 +1,28 @@ -package org.simantics.workbench.internal.contributions.e4; - -import javax.inject.Inject; -import javax.inject.Named; - -import org.eclipse.e4.core.di.annotations.CanExecute; -import org.eclipse.e4.core.di.annotations.Execute; -import org.eclipse.e4.ui.model.application.ui.basic.MPart; -import org.eclipse.e4.ui.services.IServiceConstants; -import org.eclipse.e4.ui.workbench.modeling.EPartService; - -public class ClosePartHandler { - - @Inject - EPartService partService; - - @CanExecute - public boolean canExecute(@Named(IServiceConstants.ACTIVE_PART) MPart activePart) { - if (activePart == null) - return false; - return activePart.isCloseable(); - } - - @Execute - public void closePart(@Named(IServiceConstants.ACTIVE_PART) MPart activePart) { - partService.hidePart(activePart); - } -} +package org.simantics.workbench.internal.contributions.e4; + +import javax.inject.Inject; +import javax.inject.Named; + +import org.eclipse.e4.core.di.annotations.CanExecute; +import org.eclipse.e4.core.di.annotations.Execute; +import org.eclipse.e4.ui.model.application.ui.basic.MPart; +import org.eclipse.e4.ui.services.IServiceConstants; +import org.eclipse.e4.ui.workbench.modeling.EPartService; + +public class ClosePartHandler { + + @Inject + EPartService partService; + + @CanExecute + public boolean canExecute(@Named(IServiceConstants.ACTIVE_PART) MPart activePart) { + if (activePart == null) + return false; + return activePart.isCloseable(); + } + + @Execute + public void closePart(@Named(IServiceConstants.ACTIVE_PART) MPart activePart) { + partService.hidePart(activePart); + } +}