]>
git.argeo.org Git - gpl/argeo-slc.git/blob - PartStateChanged.java
28e82c5d70b8eaf5d52b9edcc892c121934d9832
1 package org
.argeo
.cms
.ui
.workbench
.internal
.useradmin
;
3 import org
.argeo
.cms
.CmsException
;
4 import org
.eclipse
.swt
.widgets
.Display
;
5 import org
.eclipse
.ui
.IPartListener
;
6 import org
.eclipse
.ui
.IStartup
;
7 import org
.eclipse
.ui
.IWorkbenchPage
;
8 import org
.eclipse
.ui
.IWorkbenchPart
;
9 import org
.eclipse
.ui
.PlatformUI
;
11 /** Manage transaction and part refresh while updating the security model */
12 public class PartStateChanged
implements IPartListener
, IStartup
{
13 // private final static Log log = LogFactory.getLog(PartStateChanged.class);
14 // private IContextActivation contextActivation;
17 public void earlyStartup() {
18 Display
.getDefault().asyncExec(new Runnable() {
21 IWorkbenchPage iwp
= PlatformUI
.getWorkbench()
22 .getActiveWorkbenchWindow().getActivePage();
24 iwp
.addPartListener(new PartStateChanged());
25 } catch (Exception e
) {
26 throw new CmsException(
27 "Error while registering the PartStateChangedListener",
35 public void partActivated(IWorkbenchPart part
) {
40 public void partBroughtToTop(IWorkbenchPart part
) {
45 public void partClosed(IWorkbenchPart part
) {
50 public void partDeactivated(IWorkbenchPart part
) {
55 public void partOpened(IWorkbenchPart part
) {