X-Git-Url: http://git.argeo.org/?a=blobdiff_plain;f=org.argeo.security.ui.admin%2Fsrc%2Forg%2Fargeo%2Fsecurity%2Fui%2Fadmin%2Finternal%2FPartStateChanged.java;fp=org.argeo.security.ui.admin%2Fsrc%2Forg%2Fargeo%2Fsecurity%2Fui%2Fadmin%2Finternal%2FPartStateChanged.java;h=1a5f375d0920034c4d547d9cd16d11359915e995;hb=a1d862e4ef6221ebc91fcccea688d66504020365;hp=2d437540f4d98291aca524ba851238fd6590bffb;hpb=831fd907fdc595e64c7835534c1ca625cd9d914b;p=lgpl%2Fargeo-commons.git diff --git a/org.argeo.security.ui.admin/src/org/argeo/security/ui/admin/internal/PartStateChanged.java b/org.argeo.security.ui.admin/src/org/argeo/security/ui/admin/internal/PartStateChanged.java index 2d437540f..1a5f375d0 100644 --- a/org.argeo.security.ui.admin/src/org/argeo/security/ui/admin/internal/PartStateChanged.java +++ b/org.argeo.security.ui.admin/src/org/argeo/security/ui/admin/internal/PartStateChanged.java @@ -1,22 +1,17 @@ package org.argeo.security.ui.admin.internal; -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; import org.argeo.ArgeoException; import org.eclipse.swt.widgets.Display; import org.eclipse.ui.IPartListener; import org.eclipse.ui.IStartup; import org.eclipse.ui.IWorkbenchPage; import org.eclipse.ui.IWorkbenchPart; -import org.eclipse.ui.IWorkbenchPartSite; -import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.PlatformUI; -import org.eclipse.ui.contexts.IContextActivation; /** Manage transaction and part refresh while updating the security model */ public class PartStateChanged implements IPartListener, IStartup { - private final static Log log = LogFactory.getLog(PartStateChanged.class); - IContextActivation contextActivation; + // private final static Log log = LogFactory.getLog(PartStateChanged.class); + // private IContextActivation contextActivation; @Override public void earlyStartup() { @@ -38,39 +33,7 @@ public class PartStateChanged implements IPartListener, IStartup { @Override public void partActivated(IWorkbenchPart part) { - if (log.isTraceEnabled()) - log.trace("Part activated: " + part.getTitle() + " - " - + part.getClass()); - - // Try to avoid NPE when closing the application - IWorkbenchPartSite site = part.getSite(); - if (site == null) - return; - IWorkbenchWindow window = site.getWorkbenchWindow(); - if (window == null) - return; - - // // Retrieve the service to enable/disable checkout button - // ISourceProviderService sourceProviderService = - // (ISourceProviderService) window - // .getService(ISourceProviderService.class); - // EditionSourceProvider esp = (EditionSourceProvider) - // sourceProviderService - // .getSourceProvider(EditionSourceProvider.EDITING_STATE); - // if (part instanceof IVersionedItemEditor) { - // IStatusLineManager manager = ((IEditorPart) part).getEditorSite() - // .getActionBars().getStatusLineManager(); - // manager.setMessage(((IVersionedItemEditor) part) - // .getlastUpdateMessage()); - // - // } - // if (part instanceof CmsEditable) { - // CmsEditable editor = (CmsEditable) part; - // // Processing the ability to checkout is delegated to the editor - // esp.setCurrentItemEditingState(editor.isEditing()); - // } else {// force button to be disabled if another part has the focus. - // esp.setCurrentItemEditingState(true); - // } + // Nothing to do } @Override @@ -85,28 +48,11 @@ public class PartStateChanged implements IPartListener, IStartup { @Override public void partDeactivated(IWorkbenchPart part) { - // Always remove checkOut button when the editor is left. - // if (part instanceof IVersionedItemEditor) { - // // Try to avoid NPE when closing the application - // IWorkbenchPartSite site = part.getSite(); - // if (site == null) - // return; - // IWorkbenchWindow window = site.getWorkbenchWindow(); - // if (window == null) - // return; - // - // // Retrieve the service to enable/disable checkout button - // ISourceProviderService sourceProviderService = - // (ISourceProviderService) window - // .getService(ISourceProviderService.class); - // EditionSourceProvider esp = (EditionSourceProvider) - // sourceProviderService - // .getSourceProvider(EditionSourceProvider.EDITING_STATE); - // esp.setCurrentItemEditingState(true); - // } + // Nothing to do } @Override public void partOpened(IWorkbenchPart part) { + // Nothing to do } } \ No newline at end of file