1 11 package org.eclipse.update.internal.ui.views; 12 13 import org.eclipse.jface.action.Action; 14 import org.eclipse.jface.dialogs.MessageDialog; 15 import org.eclipse.swt.widgets.Shell; 16 17 public abstract class FeatureAction extends Action { 18 19 protected String windowTitle; 20 21 protected Shell shell; 22 23 public FeatureAction(Shell shell, String text) { 24 super(text); 25 this.shell = shell; 26 } 27 28 protected boolean confirm(String message) { 29 return MessageDialog.openConfirm( shell, windowTitle, message); 30 } 31 32 public void setWindowTitle( String windowTitle) { 33 this.windowTitle = windowTitle; 34 } 35 36 public abstract boolean canExecuteAction(); 37 } 38 | Popular Tags |