1 11 package org.eclipse.ui.internal.presentations; 12 13 import org.eclipse.jface.action.Action; 14 import org.eclipse.swt.widgets.Display; 15 import org.eclipse.ui.internal.WorkbenchMessages; 16 import org.eclipse.ui.presentations.IStackPresentationSite; 17 18 21 public class SystemMenuMoveFolder extends Action implements ISelfUpdatingAction { 22 private IStackPresentationSite site; 23 24 public SystemMenuMoveFolder(IStackPresentationSite site) { 25 this.site = site; 26 setText(WorkbenchMessages.ViewPane_moveFolder); 27 } 28 29 32 public void run() { 33 site.dragStart(Display.getDefault().getCursorLocation(), true); 34 } 35 36 public void update() { 37 setEnabled(site.isStackMoveable()); 38 } 39 40 public boolean shouldBeVisible() { 41 return site.isStackMoveable(); 42 } 43 } 44 | Popular Tags |