1 11 12 package org.eclipse.jdt.internal.ui.javaeditor; 13 14 import org.eclipse.core.runtime.Assert; 15 16 import org.eclipse.jface.action.Action; 17 18 import org.eclipse.ui.PlatformUI; 19 20 import org.eclipse.jdt.internal.ui.IJavaHelpContextIds; 21 22 23 public class GotoMatchingBracketAction extends Action { 24 25 public final static String GOTO_MATCHING_BRACKET= "GotoMatchingBracket"; 27 private final JavaEditor fEditor; 28 29 public GotoMatchingBracketAction(JavaEditor editor) { 30 super(JavaEditorMessages.GotoMatchingBracket_label); 31 Assert.isNotNull(editor); 32 fEditor= editor; 33 setEnabled(true); 34 PlatformUI.getWorkbench().getHelpSystem().setHelp(this, IJavaHelpContextIds.GOTO_MATCHING_BRACKET_ACTION); 35 } 36 37 public void run() { 38 fEditor.gotoMatchingBracket(); 39 } 40 } 41 | Popular Tags |