1 11 package org.eclipse.team.internal.ccvs.ui.actions; 12 13 import java.lang.reflect.InvocationTargetException ; 14 15 import org.eclipse.jface.window.Window; 16 import org.eclipse.swt.widgets.Display; 17 import org.eclipse.team.internal.ccvs.ui.*; 18 import org.eclipse.team.internal.ccvs.ui.operations.ITagOperation; 19 import org.eclipse.team.internal.ccvs.ui.operations.TagOperation; 20 21 24 public class TagLocalAction extends TagAction { 25 26 29 protected boolean performPrompting(ITagOperation operation) { 30 if (operation instanceof TagOperation) { 31 final TagOperation tagOperation = (TagOperation) operation; 32 try { 33 if (hasOutgoingChanges(tagOperation)) { 34 final boolean[] keepGoing = new boolean[] { true }; 35 Display.getDefault().syncExec(new Runnable () { 36 public void run() { 37 OutgoingChangesDialog dialog = new OutgoingChangesDialog(getShell(), tagOperation.getScopeManager(), 38 CVSUIMessages.TagLocalAction_2, 39 CVSUIMessages.TagLocalAction_0, 40 CVSUIMessages.TagLocalAction_1); 41 dialog.setHelpContextId(IHelpContextIds.TAG_OUTGOING_CHANGES_DIALOG); 42 int result = dialog.open(); 43 keepGoing[0] = result == Window.OK; 44 } 45 }); 46 return keepGoing[0]; 47 } 48 return true; 49 } catch (InterruptedException e) { 50 } catch (InvocationTargetException e) { 52 handle(e); 53 } 54 } 55 return false; 56 } 57 58 61 protected ITagOperation createTagOperation() { 62 return new TagOperation(getTargetPart(), getCVSResourceMappings()); 63 } 64 65 68 public String getId() { 69 return ICVSUIConstants.CMD_TAGASVERSION; 70 } 71 } 72 | Popular Tags |