001: /*******************************************************************************
002: * Copyright (c) 2000, 2007 IBM Corporation and others.
003: * All rights reserved. This program and the accompanying materials
004: * are made available under the terms of the Eclipse Public License v1.0
005: * which accompanies this distribution, and is available at
006: * http://www.eclipse.org/legal/epl-v10.html
007: *
008: * Contributors:
009: * IBM Corporation - initial API and implementation
010: * Genady Beryozkin, me@genady.org - https://bugs.eclipse.org/bugs/show_bug.cgi?id=11668
011: * Benjamin Muskalla <b.muskalla@gmx.net> - https://bugs.eclipse.org/bugs/show_bug.cgi?id=41573
012: *******************************************************************************/package org.eclipse.ui.texteditor;
013:
014: import org.eclipse.jface.text.information.IInformationProvider;
015:
016: import org.eclipse.ui.IWorkbenchActionConstants;
017: import org.eclipse.ui.actions.ActionFactory;
018:
019: /**
020: * Defines the names of those actions which are pre-registered with the
021: * <code>AbstractTextEditor</code>. <code>RULER_DOUBLE_CLICK</code> defines
022: * the action which is registered as being executed when the editor's
023: * ruler has been double clicked. This interface extends the set of names
024: * available from <code>IWorkbenchActionConstants</code>. It also defines the
025: * names of the menu groups in a text editor's context menu.
026: */
027: public interface ITextEditorActionConstants extends
028: IWorkbenchActionConstants {
029:
030: /**
031: * Context menu group for undo/redo related actions.
032: * Value: <code>"group.undo"</code>
033: */
034: String GROUP_UNDO = "group.undo"; //$NON-NLS-1$
035:
036: /**
037: * Context menu group for copy/paste related actions.
038: * Value: <code>"group.copy"</code>
039: */
040: String GROUP_COPY = "group.copy"; //$NON-NLS-1$
041:
042: /**
043: * Context menu group for text manipulation actions.
044: * Value: <code>"group.edit"</code>
045: */
046: String GROUP_EDIT = "group.edit"; //$NON-NLS-1$
047:
048: /**
049: * Context menu group for print related actions.
050: * Value: <code>"group.print"</code>
051: */
052: String GROUP_PRINT = "group.print"; //$NON-NLS-1$
053:
054: /**
055: * Context menu group for find/replace related actions.
056: * Value: <code>"group.find"</code>
057: */
058: String GROUP_FIND = "group.find"; //$NON-NLS-1$
059:
060: /**
061: * Context menu group for save related actions.
062: * Value: <code>"group.save"</code>
063: */
064: String GROUP_SAVE = "group.save"; //$NON-NLS-1$
065:
066: /**
067: * Context menu group for actions which do not fit in one of the other categories.
068: * Value: <code>"group.rest"</code>
069: */
070: String GROUP_REST = "group.rest"; //$NON-NLS-1$
071:
072: /**
073: * Menu group for open actions.
074: * Value <code>"group.open"</code>
075: * @since 3.1
076: */
077: String GROUP_OPEN = "group.open"; //$NON-NLS-1$
078:
079: /**
080: * Menu group for code generation and content assist actions.
081: * Value <code>"group.generate"</code>).
082: * @since 3.1
083: */
084: String GROUP_GENERATE = "group.generate"; //$NON-NLS-1$
085:
086: /**
087: * Name of the action for shifting text blocks to the right.
088: * Value: <code>"ShiftRight"</code>
089: */
090: String SHIFT_RIGHT = "ShiftRight"; //$NON-NLS-1$
091:
092: /**
093: * Name of the action for shifting text blocks to the right, triggered by the TAB key.
094: * Value: <code>"ShiftRightTab"</code>
095: * @since 3.0
096: */
097: String SHIFT_RIGHT_TAB = "ShiftRightTab"; //$NON-NLS-1$
098:
099: /**
100: * Name of the action for shifting text blocks to the left.
101: * Value: <code>"ShiftLeft"</code>
102: */
103: String SHIFT_LEFT = "ShiftLeft"; //$NON-NLS-1$
104:
105: /**
106: * Name of the action to delete the current line.
107: * Value: <code>"DeleteLine"</code>
108: * @since 2.0
109: */
110: String DELETE_LINE = "DeleteLine"; //$NON-NLS-1$
111:
112: /**
113: * Name of the action to join the current lines.
114: * Value: <code>"JoinLine"</code>
115: * @since 3.3
116: */
117: String JOIN_LINES = "JoinLines"; //$NON-NLS-1$
118:
119: /**
120: * Name of the action to cut the current line.
121: * Value: <code>"CutLine"</code>
122: * @since 2.1
123: */
124: String CUT_LINE = "CutLine"; //$NON-NLS-1$
125:
126: /**
127: * Name of the action to delete line to beginning.
128: * Value: <code>"DeleteLineToBeginning"</code>
129: * @since 2.0
130: */
131: String DELETE_LINE_TO_BEGINNING = "DeleteLineToBeginning"; //$NON-NLS-1$
132:
133: /**
134: * Name of the action to cut line to beginning.
135: * Value: <code>"CutLineToBeginning"</code>
136: * @since 2.1
137: */
138: String CUT_LINE_TO_BEGINNING = "CutLineToBeginning"; //$NON-NLS-1$
139:
140: /**
141: * Name of the action to delete line to end.
142: * Value: <code>"DeleteLineToEnd"</code>
143: * @since 2.0
144: */
145: String DELETE_LINE_TO_END = "DeleteLineToEnd"; //$NON-NLS-1$
146:
147: /**
148: * Name of the action to cut line to end.
149: * Value: <code>"CutLineToEnd"</code>
150: * @since 2.1
151: */
152: String CUT_LINE_TO_END = "CutLineToEnd"; //$NON-NLS-1$
153:
154: /**
155: * Name of the action to set the mark.
156: * Value: <code>"SetMark"</code>
157: * @since 2.0
158: */
159: String SET_MARK = "SetMark"; //$NON-NLS-1$
160:
161: /**
162: * Name of the action to set the mark.
163: * Value: <code>"ClearMark"</code>
164: * @since 2.0
165: */
166: String CLEAR_MARK = "ClearMark"; //$NON-NLS-1$
167:
168: /**
169: * Name of the action to swap the mark with the cursor position.
170: * Value: <code>"SwapMark"</code>
171: * @since 2.0
172: */
173: String SWAP_MARK = "SwapMark"; //$NON-NLS-1$
174:
175: /**
176: * Name of the action to jump to a certain text line.
177: * Value: <code>"GotoLine"</code>
178: */
179: String GOTO_LINE = "GotoLine"; //$NON-NLS-1$
180:
181: /**
182: * Name of the action to insert a new line below the current position.
183: * Value: <code>"SmartEnter"</code>
184: * @since 3.0
185: */
186: String SMART_ENTER = "SmartEnter"; //$NON-NLS-1$
187:
188: /**
189: * Name of the action to insert a new line above the current position.
190: * Value: <code>"SmartEnterInverse"</code>
191: * @since 3.0
192: */
193: String SMART_ENTER_INVERSE = "SmartEnterInverse"; //$NON-NLS-1$
194:
195: /**
196: * Name of the action to move lines upwards
197: * Value: <code>"MoveLineUp"</code>
198: * @since 3.0
199: */
200: String MOVE_LINE_UP = "MoveLineUp"; //$NON-NLS-1$
201:
202: /**
203: * Name of the action to move lines downwards
204: * Value: <code>"MoveLineDown"</code>
205: * @since 3.0
206: */
207: String MOVE_LINE_DOWN = "MoveLineDown"; //$NON-NLS-1$
208:
209: /**
210: * Name of the action to copy lines upwards
211: * Value: <code>"CopyLineUp"</code>
212: * @since 3.0
213: */
214: String COPY_LINE_UP = "CopyLineUp"; //$NON-NLS-1$;
215:
216: /**
217: * Name of the action to copy lines downwards
218: * Value: <code>"CopyLineDown"</code>
219: * @since 3.0
220: */
221: String COPY_LINE_DOWN = "CopyLineDown"; //$NON-NLS-1$;
222:
223: /**
224: * Name of the action to turn a selection to upper case
225: * Value: <code>"UpperCase"</code>
226: * @since 3.0
227: */
228: String UPPER_CASE = "UpperCase"; //$NON-NLS-1$
229:
230: /**
231: * Name of the action to turn a selection to lower case
232: * Value: <code>"LowerCase"</code>
233: * @since 3.0
234: */
235: String LOWER_CASE = "LowerCase"; //$NON-NLS-1$
236:
237: /**
238: * Name of the action to find next.
239: * Value: <code>"FindNext"</code>
240: * @since 2.0
241: */
242: String FIND_NEXT = "FindNext"; //$NON-NLS-1$
243:
244: /**
245: * Name of the action to find previous.
246: * Value: <code>"FindPrevious"</code>
247: * @since 2.0
248: */
249: String FIND_PREVIOUS = "FindPrevious"; //$NON-NLS-1$
250:
251: /**
252: * Name of the action to incremental find.
253: * Value: <code>"FindIncremental"</code>
254: * @since 2.0
255: */
256: String FIND_INCREMENTAL = "FindIncremental"; //$NON-NLS-1$
257: /**
258: * Name of the action to incremental find reverse.
259: * Value: <code>"FindIncrementalReverse"</code>
260: * @since 2.1
261: */
262: String FIND_INCREMENTAL_REVERSE = "FindIncrementalReverse"; //$NON-NLS-1$
263:
264: /**
265: * Name of the action to convert line delimiters to Windows.
266: * Value: <code>"ConvertLineDelimitersToWindows"</code>
267: * @since 2.0
268: * @deprecated since 3.1. No longer supported as editor actions.
269: */
270: String CONVERT_LINE_DELIMITERS_TO_WINDOWS = "ConvertLineDelimitersToWindows"; //$NON-NLS-1$
271:
272: /**
273: * Name of the action to convert line delimiters to UNIX.
274: * Value: <code>"ConvertLineDelimitersToUNIX"</code>
275: * @since 2.0
276: * @deprecated since 3.1. No longer supported as editor actions.
277: */
278: String CONVERT_LINE_DELIMITERS_TO_UNIX = "ConvertLineDelimitersToUNIX"; //$NON-NLS-1$
279:
280: /**
281: * Name of the action to convert line delimiters to MAC.
282: * Value: <code>"ConvertLineDelimitersToMAC"</code>
283: * @since 2.0
284: * @deprecated since 3.1. No longer supported as editor actions.
285: */
286: String CONVERT_LINE_DELIMITERS_TO_MAC = "ConvertLineDelimitersToMAC"; //$NON-NLS-1$
287:
288: /**
289: * Name of the change encoding action.
290: * Value: <code>"ChangeEncoding"</code>
291: * @since 3.1
292: */
293: String CHANGE_ENCODING = "ChangeEncoding"; //$NON-NLS-1$
294:
295: /**
296: * Name of the ruler action performed when double clicking the editor's vertical ruler.
297: * Value: <code>"RulerDoubleClick"</code>
298: */
299: String RULER_DOUBLE_CLICK = "RulerDoubleClick"; //$NON-NLS-1$
300:
301: /**
302: * Name of the ruler action performed when clicking the editor's vertical ruler.
303: * Value: <code>"RulerClick"</code>
304: * @since 2.0
305: */
306: String RULER_CLICK = "RulerClick"; //$NON-NLS-1$
307:
308: /**
309: * Name of the ruler action to manage tasks.
310: * Value: <code>"ManageTasks"</code>
311: */
312: String RULER_MANAGE_TASKS = "ManageTasks"; //$NON-NLS-1$
313:
314: /**
315: * Name of the ruler action to manage bookmarks.
316: * Value: <code>"ManageBookmarks"</code>
317: */
318: String RULER_MANAGE_BOOKMARKS = "ManageBookmarks"; //$NON-NLS-1$
319:
320: /**
321: * Status line category "input position".
322: * Value: <code>"InputPosition"</code>
323: * @since 2.0
324: */
325: String STATUS_CATEGORY_INPUT_POSITION = "InputPosition"; //$NON-NLS-1$
326:
327: /**
328: * Status line category "input mode".
329: * Value: <code>"InputMode"</code>
330: * @since 2.0
331: */
332: String STATUS_CATEGORY_INPUT_MODE = "InputMode"; //$NON-NLS-1$
333:
334: /**
335: * Status line category "element state".
336: * Value: <code>"ElementState"</code>
337: * @since 2.0
338: */
339: String STATUS_CATEGORY_ELEMENT_STATE = "ElementState"; //$NON-NLS-1$
340:
341: /**
342: * Status line category "findField".
343: * Value: <code>"findField"</code>
344: * @since 3.0
345: */
346: String STATUS_CATEGORY_FIND_FIELD = "findField"; //$NON-NLS-1$
347:
348: /**
349: * Name of standard Copy global action in the Edit menu.
350: * Value <code>"copy"</code>
351: * @since 3.0
352: * @see org.eclipse.ui.actions.ActionFactory#COPY
353: */
354: String COPY = ActionFactory.COPY.getId();
355:
356: /**
357: * Name of standard Cut global action in the Edit menu.
358: * Value <code>"cut"</code>
359: * @since 3.0
360: * @see org.eclipse.ui.actions.ActionFactory#CUT
361: */
362: String CUT = ActionFactory.CUT.getId();
363:
364: /**
365: * Name of standard Delete global action in the Edit menu.
366: * Value <code>"delete"</code>
367: * @since 3.0
368: * @see org.eclipse.ui.actions.ActionFactory#DELETE
369: */
370: String DELETE = ActionFactory.DELETE.getId();
371:
372: /**
373: * Name of standard Find global action in the Edit menu.
374: * Value <code>"find"</code>
375: * @since 3.0
376: * @see org.eclipse.ui.actions.ActionFactory#FIND
377: */
378: String FIND = ActionFactory.FIND.getId();
379:
380: /**
381: * Name of standard Paste global action in the Edit menu.
382: * Value <code>"paste"</code>
383: * @since 3.0
384: * @see org.eclipse.ui.actions.ActionFactory#PASTE
385: */
386: String PASTE = ActionFactory.PASTE.getId();
387:
388: /**
389: * Name of standard Print global action in the File menu.
390: * Value <code>"print"</code>
391: * @since 3.0
392: * @see org.eclipse.ui.actions.ActionFactory#PRINT
393: */
394: String PRINT = ActionFactory.PRINT.getId();
395:
396: /**
397: * Name of standard Properties global action in the File menu.
398: * Value <code>"properties"</code>
399: * @since 3.1
400: * @see org.eclipse.ui.actions.ActionFactory#PROPERTIES
401: */
402: String PROPERTIES = ActionFactory.PROPERTIES.getId();
403:
404: /**
405: * Name of standard Redo global action in the Edit menu.
406: * Value <code>"redo"</code>
407: * @since 3.0
408: * @see org.eclipse.ui.actions.ActionFactory#REDO
409: */
410: String REDO = ActionFactory.REDO.getId();
411:
412: /**
413: * Name of standard Undo global action in the Edit menu.
414: * Value <code>"undo"</code>
415: * @since 3.0
416: * @see org.eclipse.ui.actions.ActionFactory#UNDO
417: */
418: String UNDO = ActionFactory.UNDO.getId();
419:
420: /**
421: * Name of standard Save global action in the File menu.
422: * Value <code>"save"</code>
423: * @since 3.0
424: * @see org.eclipse.ui.actions.ActionFactory#SAVE
425: */
426: String SAVE = ActionFactory.SAVE.getId();
427:
428: /**
429: * Name of standard Select All global action in the Edit menu.
430: * Value <code>"selectAll"</code>
431: * @since 3.0
432: * @see org.eclipse.ui.actions.ActionFactory#SELECT_ALL
433: */
434: String SELECT_ALL = ActionFactory.SELECT_ALL.getId();
435:
436: /**
437: * Name of standard Revert global action in the File menu.
438: * Value <code>"revert"</code>
439: * @since 3.0
440: * @see org.eclipse.ui.actions.ActionFactory#REVERT
441: */
442: String REVERT = ActionFactory.REVERT.getId();
443:
444: /**
445: * Name of standard Next global action in the Navigate menu.
446: * Value <code>"next"</code>
447: * @since 3.2
448: * @see org.eclipse.ui.actions.ActionFactory#NEXT
449: */
450: String NEXT = ActionFactory.NEXT.getId();
451:
452: /**
453: * Name of standard Previous global action in the Navigate menu.
454: * Value <code>"previous"</code>
455: * @since 3.2
456: * @see org.eclipse.ui.actions.ActionFactory#PREVIOUS
457: */
458: String PREVIOUS = ActionFactory.PREVIOUS.getId();
459:
460: /**
461: * Name of standard Refresh global action in the File menu.
462: * Value <code>"refresh"</code>
463: * @since 3.4
464: * @see org.eclipse.ui.actions.ActionFactory#REFRESH
465: */
466: String REFRESH = ActionFactory.REFRESH.getId();
467:
468: /**
469: * Name of the action for re-establishing the state after the
470: * most recent save operation.
471: * Value: <code>"ITextEditorActionConstants.REVERT"</code>
472: */
473: String REVERT_TO_SAVED = REVERT;
474:
475: /**
476: * Name of the action for toggling the smart insert mode.
477: * Value: <code>"ToggleInsertMode"</code>
478: * @since 3.0
479: */
480: String TOGGLE_INSERT_MODE = "TOGGLE_INSERT_MODE"; //$NON-NLS-1$
481:
482: /**
483: * Context menu group for preference related actions.
484: * Value: <code>"settings"</code>
485: * @since 3.1
486: */
487: String GROUP_SETTINGS = "settings"; //$NON-NLS-1$
488:
489: /**
490: * Context menu group for ruler column related actions.
491: * Value: <code>"rulers"</code>
492: * @since 3.1
493: */
494: String GROUP_RULERS = "rulers"; //$NON-NLS-1$
495:
496: /**
497: * Context menu group for quick diff revert related actions.
498: * Value: <code>"restore"</code>
499: * @since 3.1
500: */
501: String GROUP_RESTORE = "restore"; //$NON-NLS-1$
502:
503: /**
504: * Context menu group for actions that display additional information. Value:
505: * <code>"group.information"</code>.
506: * @since 3.2
507: */
508: String GROUP_INFORMATION = "group.information"; //$NON-NLS-1$
509:
510: /**
511: * Context menu group for typing aid actions such as content assist. Value:
512: * <code>"group.assist"</code>.
513: * @since 3.2
514: */
515: String GROUP_ASSIST = "group.assist"; //$NON-NLS-1$
516:
517: /**
518: * Name of the action for showing the preferences from the editor context
519: * menu. Value: <code>"Preferences.ContextAction"</code>
520: * @since 3.1
521: */
522: String CONTEXT_PREFERENCES = "Preferences.ContextAction"; //$NON-NLS-1$
523:
524: /**
525: * Name of the action for showing the preferences from the editor ruler
526: * context menu. Value: <code>"Preferences.RulerAction"</code>
527: * @since 3.1
528: */
529: String RULER_PREFERENCES = "Preferences.RulerAction"; //$NON-NLS-1$
530:
531: /**
532: * Name of the action for toggling line number display.
533: * Value: <code>"Linenumbers.Toggle"</code>
534: * @since 3.1
535: */
536: String LINENUMBERS_TOGGLE = "Linenumbers.Toggle"; //$NON-NLS-1$
537:
538: /**
539: * Name of the action for reverting deleted lines at the current selection.
540: * Value: <code>"QuickDiff.RevertDeletion"</code>
541: * @since 3.1
542: */
543: String QUICKDIFF_REVERTDELETION = "QuickDiff.RevertDeletion"; //$NON-NLS-1$
544:
545: /**
546: * Name of the action for reverting the line at the current selection.
547: * Value: <code>"QuickDiff.RevertLine"</code>
548: * @since 3.1
549: */
550: String QUICKDIFF_REVERTLINE = "QuickDiff.RevertLine"; //$NON-NLS-1$
551:
552: /**
553: * Name of the action for reverting the selection or the block at the
554: * current selection. Value: <code>"QuickDiff.Revert"</code>
555: * @since 3.1
556: */
557: String QUICKDIFF_REVERT = "QuickDiff.Revert"; //$NON-NLS-1$
558:
559: /**
560: * Name of the action for reverting the block at the current selection.
561: * Value: <code>"QuickDiff.RevertBlock"</code>
562: * @since 3.1
563: */
564: String QUICKDIFF_REVERTBLOCK = "QuickDiff.RevertBlock"; //$NON-NLS-1$
565:
566: /**
567: * Name of the action for reverting the current selection.
568: * Value: <code>"QuickDiff.RevertBlock"</code>
569: * @since 3.1
570: */
571: String QUICKDIFF_REVERTSELECTION = "QuickDiff.RevertSelection"; //$NON-NLS-1$
572:
573: /**
574: * Name of the action for toggling quick diff display.
575: * Value: <code>"QuickDiff.Toggle"</code>
576: * @since 3.1
577: */
578: String QUICKDIFF_TOGGLE = "QuickDiff.Toggle"; //$NON-NLS-1$
579:
580: /**
581: * Name of the action for emacs style word completion.
582: * Value: <code>"HIPPIE_COMPLETION"</code>
583: * @since 3.1
584: */
585: String HIPPIE_COMPLETION = "HIPPIE_COMPLETION"; //$NON-NLS-1$
586:
587: /**
588: * Name of the action for hiding the revision info
589: * Value: <code>"Revision.HideInfo"</code>
590: * @since 3.2
591: */
592: String REVISION_HIDE_INFO = "Revision.HideInfo"; //$NON-NLS-1$
593:
594: /**
595: * Name of the quick assist action
596: * Value: <code>"QuickAssist"</code>
597: * @since 3.2
598: */
599: String QUICK_ASSIST = "QuickAssist"; //$NON-NLS-1$
600:
601: /**
602: * Name of the action for cycling through the revision rendering modes.
603: * Value: <code>"Revision.Rendering.Cycle"</code>
604: * @since 3.3
605: */
606: String REVISION_RENDERING_CYCLE = "Revision.Rendering.Cycle"; //$NON-NLS-1$
607:
608: /**
609: * Name of the action for toggling the display of the revision author.
610: * Value: <code>"Revision.ShowAuthor.Toggle"</code>
611: * @since 3.3
612: */
613: String REVISION_SHOW_AUTHOR_TOGGLE = "Revision.ShowAuthor.Toggle"; //$NON-NLS-1$
614:
615: /**
616: * Name of the action for toggling the display of the revision id.
617: * Value: <code>"Revision.ShowId.Toggle"</code>
618: * @since 3.3
619: */
620: String REVISION_SHOW_ID_TOGGLE = "Revision.ShowId.Toggle"; //$NON-NLS-1$
621: /**
622: * Name of the action for emacs recenter.
623: * Value: <code>"RECENTER"</code>
624: * @since 3.3
625: */
626: String RECENTER = "Recenter"; //$NON-NLS-1$
627:
628: /**
629: * Name of the action for toggling the display of whitespace characters.
630: * Value: <code>"ShowWhitespaceCharacters"</code>
631: * @since 3.3
632: */
633: String SHOW_WHITESPACE_CHARACTERS = "ShowWhitespaceCharacters"; //$NON-NLS-1$
634:
635: /**
636: * Name of the action displaying information for the
637: * current caret location in a sticky hover.
638: *
639: * Value: <code>"ShowInformation"</code>
640: * @see IInformationProvider
641: * @since 3.3
642: */
643: String SHOW_INFORMATION = "ShowInformation"; //$NON-NLS-1$
644: }
|