org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds源码实例Demo

类org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds源码实例Demo

下面列出了org.eclipse.ui.texteditor.ITextEditorActionDefinitionIds 类实例代码,或者点击链接到github查看源代码,也可以在右侧发表评论。

@Override
protected void createNavigationActions() {
	super.createNavigationActions();

	final StyledText textWidget= getSourceViewer().getTextWidget();

	IAction action= new DeletePreviousSubWordAction();
	action.setActionDefinitionId(ITextEditorActionDefinitionIds.DELETE_PREVIOUS_WORD);
	setAction(ITextEditorActionDefinitionIds.DELETE_PREVIOUS_WORD, action);
	textWidget.setKeyBinding(SWT.CTRL | SWT.BS, SWT.NULL);
	markAsStateDependentAction(ITextEditorActionDefinitionIds.DELETE_PREVIOUS_WORD, true);

	action= new DeleteNextSubWordAction();
	action.setActionDefinitionId(ITextEditorActionDefinitionIds.DELETE_NEXT_WORD);
	setAction(ITextEditorActionDefinitionIds.DELETE_NEXT_WORD, action);
	textWidget.setKeyBinding(SWT.CTRL | SWT.DEL, SWT.NULL);
	markAsStateDependentAction(ITextEditorActionDefinitionIds.DELETE_NEXT_WORD, true);
}
 
public BasicCompilationUnitEditorActionContributor() {

		fRetargetContentAssist= new RetargetAction(JdtActionConstants.CONTENT_ASSIST,  JavaEditorMessages.ContentAssistProposal_label);
		fRetargetContentAssist.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
		fRetargetContentAssist.setImageDescriptor(JavaPluginImages.DESC_ELCL_CODE_ASSIST);
		fRetargetContentAssist.setDisabledImageDescriptor(JavaPluginImages.DESC_DLCL_CODE_ASSIST);
		markAsPartListener(fRetargetContentAssist);

		fContentAssist= new RetargetTextEditorAction(JavaEditorMessages.getBundleForConstructedKeys(), "ContentAssistProposal."); //$NON-NLS-1$
		fContentAssist.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
		fContentAssist.setImageDescriptor(JavaPluginImages.DESC_ELCL_CODE_ASSIST);
		fContentAssist.setDisabledImageDescriptor(JavaPluginImages.DESC_DLCL_CODE_ASSIST);

		fContextInformation= new RetargetTextEditorAction(JavaEditorMessages.getBundleForConstructedKeys(), "ContentAssistContextInformation."); //$NON-NLS-1$
		fContextInformation.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_CONTEXT_INFORMATION);

		fQuickAssistAction= new RetargetTextEditorAction(JavaEditorMessages.getBundleForConstructedKeys(), "CorrectionAssistProposal."); //$NON-NLS-1$
		fQuickAssistAction.setActionDefinitionId(ITextEditorActionDefinitionIds.QUICK_ASSIST);

		fChangeEncodingAction= new RetargetTextEditorAction(JavaEditorMessages.getBundleForConstructedKeys(), "Editor.ChangeEncodingAction."); //$NON-NLS-1$
	}
 
private static void initializeHighlightRange(IEditorPart editorPart) {
	if (editorPart instanceof ITextEditor) {
		IAction toggleAction= editorPart.getEditorSite().getActionBars().getGlobalActionHandler(ITextEditorActionDefinitionIds.TOGGLE_SHOW_SELECTED_ELEMENT_ONLY);
		boolean enable= toggleAction != null;
		if (enable && editorPart instanceof JavaEditor)
			enable= JavaPlugin.getDefault().getPreferenceStore().getBoolean(PreferenceConstants.EDITOR_SHOW_SEGMENTS);
		else
			enable= enable && toggleAction.isEnabled() && toggleAction.isChecked();
		if (enable) {
			if (toggleAction instanceof TextEditorAction) {
				// Reset the action
				((TextEditorAction)toggleAction).setEditor(null);
				// Restore the action
				((TextEditorAction)toggleAction).setEditor((ITextEditor)editorPart);
			} else {
				// Uncheck
				toggleAction.run();
				// Check
				toggleAction.run();
			}
		}
	}
}
 
源代码4 项目: xtext-eclipse   文件: TextViewerMoveLinesAction.java
/**
 * Creates and initializes the action for the given text viewer. The action configures its
 * visual representation from the given resource bundle.
 *
 * @param bundle the resource bundle
 * @param prefix a prefix to be prepended to the various resource keys (described in
 *            <code>ResourceAction</code> constructor), or <code>null</code> if none
 * @param viewer the text viewer
 * @param upwards <code>true</code>if the selected lines should be moved upwards,
 *            <code>false</code> if downwards
 * @param copy if <code>true</code>, the action will copy lines instead of moving them
 * @see TextViewerAction#TextViewerAction(ResourceBundle, String, ITextViewer)
 * @since 3.5
 */
public TextViewerMoveLinesAction(ResourceBundle bundle, String prefix, ITextViewer viewer, boolean upwards, boolean copy) {
	super(bundle, prefix, viewer);
	fUpwards= upwards;
	fCopy= copy;
	String[] commandIds= copy ? new String[] {ITextEditorActionDefinitionIds.COPY_LINES_UP, ITextEditorActionDefinitionIds.COPY_LINES_DOWN } : new String[] {ITextEditorActionDefinitionIds.MOVE_LINES_UP, ITextEditorActionDefinitionIds.MOVE_LINES_DOWN };
	fStrategy= new CompoundEditExitStrategy(commandIds);
	fStrategy.addCompoundListener(new ICompoundEditListener() {
		@Override
		public void endCompoundEdit() {
			TextViewerMoveLinesAction.this.endCompoundEdit();
		}
	});
	update();
}
 
源代码5 项目: texlipse   文件: BibEditor.java
protected void createActions() {
    super.createActions();
    IAction a = new TextOperationAction(TexlipsePlugin.getDefault().getResourceBundle(),
    		"ContentAssistProposal.", this, ISourceViewer.CONTENTASSIST_PROPOSALS);
    
    a.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
    setAction("ContentAssistProposal", a);
    
    //This feature was removed because it causes errors
    //getDocumentProvider().getDocument(this.getEditorInput()).addDocumentListener(new BibStringCompleter(this));
}
 
源代码6 项目: texlipse   文件: TexEditor.java
/** 
 * @see org.eclipse.ui.texteditor.AbstractTextEditor#createActions()
 */
protected void createActions() {
    super.createActions();
    
    IAction a = new TextOperationAction(TexlipsePlugin.getDefault().getResourceBundle(), "ContentAssistProposal.", this, ISourceViewer.CONTENTASSIST_PROPOSALS);
    a.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
    setAction("ContentAssistProposal", a);
}
 
源代码7 项目: tlaplus   文件: TLAEditorActionContributor.java
/**
 * Default constructor.
 */
public TLAEditorActionContributor()
{
    super();
    fContentAssistProposal = new RetargetTextEditorAction(TLAEditorMessages.getResourceBundle(),
            "ContentAssistProposal."); //$NON-NLS-1$
    fContentAssistProposal.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
    fContentAssistTip = new RetargetTextEditorAction(TLAEditorMessages.getResourceBundle(), "ContentAssistTip."); //$NON-NLS-1$
    fContentAssistTip.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_CONTEXT_INFORMATION);
}
 
public TLAMultiPageEditorActionBarContributor()
{
    super();
    fContentAssistProposal = new RetargetTextEditorAction(TLAEditorMessages.getResourceBundle(),
            "ContentAssistProposal."); //$NON-NLS-1$
    fContentAssistProposal.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
    fContentAssistTip = new RetargetTextEditorAction(TLAEditorMessages.getResourceBundle(), "ContentAssistTip."); //$NON-NLS-1$
    fContentAssistTip.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_CONTEXT_INFORMATION);

    // status field for the line and column of the cursor
    cursorPositionStatusField = new StatusLineContributionItem(
            ITextEditorActionConstants.STATUS_CATEGORY_INPUT_POSITION);
}
 
源代码9 项目: tracecompass   文件: TimeGraphFindDialog.java
/**
 * Creates the panel where the user specifies the text to search for
 *
 * @param parent
 *            the parent composite
 * @return the input panel
 */
private Composite createInputPanel(Composite parent) {
    Composite panel = new Composite(parent, SWT.NULL);
    GridLayout layout = new GridLayout();
    layout.numColumns = 2;
    panel.setLayout(layout);

    Label findLabel = new Label(panel, SWT.LEFT);
    findLabel.setText(Messages.TimeGraphFindDialog_FindLabel);
    setGridData(findLabel, SWT.LEFT, false, SWT.CENTER, false);

    // Create the find content assist field
    ComboContentAdapter contentAdapter = new ComboContentAdapter();
    FindReplaceDocumentAdapterContentProposalProvider findProposer = new FindReplaceDocumentAdapterContentProposalProvider(true);
    fFindField = new Combo(panel, SWT.DROP_DOWN | SWT.BORDER);
    fContentAssistFindField = new ContentAssistCommandAdapter(
            fFindField,
            contentAdapter,
            findProposer,
            ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS,
            new char[0],
            true);
    setGridData(fFindField, SWT.FILL, true, SWT.CENTER, false);
    fFindField.addModifyListener(fFindModifyListener);

    return panel;
}
 
public SharedState(CompilationUnitEditor editor) {
	fEditor= editor;
	fExitStrategy= new CompoundEditExitStrategy(new String[] {ITextEditorActionDefinitionIds.MOVE_LINES_UP, ITextEditorActionDefinitionIds.MOVE_LINES_DOWN, ITextEditorActionDefinitionIds.COPY_LINES_UP, ITextEditorActionDefinitionIds.COPY_LINES_DOWN});
	fExitStrategy.addCompoundListener(new ICompoundEditListener() {
		public void endCompoundEdit() {
			SharedState.this.endCompoundEdit();
		}
	});
}
 
@Override
protected void createNavigationActions() {
	super.createNavigationActions();

	final StyledText textWidget= getSourceViewer().getTextWidget();

	IAction action= new SmartLineStartAction(textWidget, false);
	action.setActionDefinitionId(ITextEditorActionDefinitionIds.LINE_START);
	setAction(ITextEditorActionDefinitionIds.LINE_START, action);

	action= new SmartLineStartAction(textWidget, true);
	action.setActionDefinitionId(ITextEditorActionDefinitionIds.SELECT_LINE_START);
	setAction(ITextEditorActionDefinitionIds.SELECT_LINE_START, action);

	action= new NavigatePreviousSubWordAction();
	action.setActionDefinitionId(ITextEditorActionDefinitionIds.WORD_PREVIOUS);
	setAction(ITextEditorActionDefinitionIds.WORD_PREVIOUS, action);
	textWidget.setKeyBinding(SWT.CTRL | SWT.ARROW_LEFT, SWT.NULL);

	action= new NavigateNextSubWordAction();
	action.setActionDefinitionId(ITextEditorActionDefinitionIds.WORD_NEXT);
	setAction(ITextEditorActionDefinitionIds.WORD_NEXT, action);
	textWidget.setKeyBinding(SWT.CTRL | SWT.ARROW_RIGHT, SWT.NULL);

	action= new SelectPreviousSubWordAction();
	action.setActionDefinitionId(ITextEditorActionDefinitionIds.SELECT_WORD_PREVIOUS);
	setAction(ITextEditorActionDefinitionIds.SELECT_WORD_PREVIOUS, action);
	textWidget.setKeyBinding(SWT.CTRL | SWT.SHIFT | SWT.ARROW_LEFT, SWT.NULL);

	action= new SelectNextSubWordAction();
	action.setActionDefinitionId(ITextEditorActionDefinitionIds.SELECT_WORD_NEXT);
	setAction(ITextEditorActionDefinitionIds.SELECT_WORD_NEXT, action);
	textWidget.setKeyBinding(SWT.CTRL | SWT.SHIFT | SWT.ARROW_RIGHT, SWT.NULL);
}
 
public CompilationUnitEditorActionContributor() {
	super();

	ResourceBundle b= JavaEditorMessages.getBundleForConstructedKeys();

	fToggleInsertModeAction= new RetargetTextEditorAction(b, "CompilationUnitEditorActionContributor.ToggleInsertMode.", IAction.AS_CHECK_BOX); //$NON-NLS-1$
	fToggleInsertModeAction.setActionDefinitionId(ITextEditorActionDefinitionIds.TOGGLE_INSERT_MODE);
}
 
@Override
public void init(IActionBars bars, IWorkbenchPage page) {
	fToggleBreadcrumbAction= new ToggleBreadcrumbAction(page);
	Iterator<RetargetAction> e= fPartListeners.iterator();
	while (e.hasNext())
		page.addPartListener(e.next());

	super.init(bars, page);

	bars.setGlobalActionHandler(ITextEditorActionDefinitionIds.TOGGLE_SHOW_SELECTED_ELEMENT_ONLY, fTogglePresentation);
	bars.setGlobalActionHandler(IJavaEditorActionDefinitionIds.TOGGLE_MARK_OCCURRENCES, fToggleMarkOccurrencesAction);
	bars.setGlobalActionHandler(IJavaEditorActionDefinitionIds.TOGGLE_BREADCRUMB, fToggleBreadcrumbAction);
}
 
private KeySequence getIterationBinding() {
   final IBindingService bindingSvc= (IBindingService) PlatformUI.getWorkbench().getAdapter(IBindingService.class);
TriggerSequence binding= bindingSvc.getBestActiveBindingFor(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
if (binding instanceof KeySequence)
	return (KeySequence) binding;
return null;
  }
 
源代码15 项目: textuml   文件: SourceEditor.java
@Override
protected void createActions() {
    super.createActions();

    IAction contentAssistAction = new ContentAssistAction(Messages.RESOURCE_BUNDLE, "ContentAssistProposal.", this);
    contentAssistAction.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
    setAction("ContentAssistProposal", contentAssistAction);
    markAsStateDependentAction("ContentAssistProposal", true);
}
 
源代码16 项目: birt   文件: ScriptEditor.java
protected void createActions( )
{
	super.createActions( );

	IAction contentAssistAction = new TextOperationAction( Messages.getReportResourceBundle( ),
			"ContentAssistProposal_", this, ISourceViewer.CONTENTASSIST_PROPOSALS, true );//$NON-NLS-1$

	contentAssistAction.setActionDefinitionId( ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS );
	setAction( "ContentAssistProposal", contentAssistAction );//$NON-NLS-1$
	setAction( ITextEditorActionConstants.SAVE, new TextSaveAction( this ) );
}
 
源代码17 项目: goclipse   文件: LangContentAssistProcessor.java
protected KeySequence getGroupingIterationBinding() {
IBindingService bindingSvc = (IBindingService) PlatformUI.getWorkbench().getAdapter(IBindingService.class);
TriggerSequence binding = bindingSvc.getBestActiveBindingFor(
	ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
if(binding instanceof KeySequence)
	return (KeySequence) binding;
return null;
  }
 
protected void contributeSourceMenu(IMenuManager sourceMenu) {
	sourceMenu.appendToGroup(SOURCE_MENU_GroupComment, 
		pushItem(svcLocator, EditorCommandIds.ToggleComment));
	
	sourceMenu.appendToGroup(SOURCE_MENU_GroupFormat, 
		pushItem(svcLocator, ITextEditorActionDefinitionIds.SHIFT_RIGHT));
	sourceMenu.appendToGroup(SOURCE_MENU_GroupFormat, 
		pushItem(svcLocator, ITextEditorActionDefinitionIds.SHIFT_LEFT));
	
	sourceMenu.appendToGroup(SOURCE_MENU_GroupFormat, 
		pushItem(svcLocator, EditorCommandIds.Format));
}
 
源代码19 项目: goclipse   文件: LangEditorActionContributor.java
protected void prepareEditMenu(IMenuManager menu) {
	IMenuManager editMenu= menu.findMenuUsingPath(IWorkbenchActionConstants.M_EDIT);
	if(editMenu != null) {
		editMenu.appendToGroup(ITextEditorActionConstants.GROUP_ASSIST, pushItem(
			ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS, 
			ITextEditorActionConstants.CONTENT_ASSIST));
		
		editMenu.appendToGroup(ITextEditorActionConstants.GROUP_ASSIST, pushItem(
			ITextEditorActionDefinitionIds.CONTENT_ASSIST_CONTEXT_INFORMATION, 
			ITextEditorActionConstants.CONTENT_ASSIST_CONTEXT_INFORMATION));
	}
	
}
 
源代码20 项目: xtext-eclipse   文件: XtextEditor.java
@Override
protected void createNavigationActions() {
	super.createNavigationActions();

	final StyledText textWidget = getSourceViewer().getTextWidget();

	IAction action = createSmartLineStartAction(textWidget, false);
	action.setActionDefinitionId(ITextEditorActionDefinitionIds.LINE_START);
	setAction(ITextEditorActionDefinitionIds.LINE_START, action);

	action = createSmartLineStartAction(textWidget, true);
	action.setActionDefinitionId(ITextEditorActionDefinitionIds.SELECT_LINE_START);
	setAction(ITextEditorActionDefinitionIds.SELECT_LINE_START, action);

	action = createNavigatePreviousSubWordAction();
	action.setActionDefinitionId(ITextEditorActionDefinitionIds.WORD_PREVIOUS);
	setAction(ITextEditorActionDefinitionIds.WORD_PREVIOUS, action);
	textWidget.setKeyBinding(SWT.CTRL | SWT.ARROW_LEFT, SWT.NULL);

	action = createNavigateNextSubWordAction();
	action.setActionDefinitionId(ITextEditorActionDefinitionIds.WORD_NEXT);
	setAction(ITextEditorActionDefinitionIds.WORD_NEXT, action);
	textWidget.setKeyBinding(SWT.CTRL | SWT.ARROW_RIGHT, SWT.NULL);

	action = createSelectPreviousSubWordAction();
	action.setActionDefinitionId(ITextEditorActionDefinitionIds.SELECT_WORD_PREVIOUS);
	setAction(ITextEditorActionDefinitionIds.SELECT_WORD_PREVIOUS, action);
	textWidget.setKeyBinding(SWT.CTRL | SWT.SHIFT | SWT.ARROW_LEFT, SWT.NULL);

	action = createSelectNextSubWordAction();
	action.setActionDefinitionId(ITextEditorActionDefinitionIds.SELECT_WORD_NEXT);
	setAction(ITextEditorActionDefinitionIds.SELECT_WORD_NEXT, action);
	textWidget.setKeyBinding(SWT.CTRL | SWT.SHIFT | SWT.ARROW_RIGHT, SWT.NULL);

	action = createDeletePreviousSubWordAction();
	action.setActionDefinitionId(ITextEditorActionDefinitionIds.DELETE_PREVIOUS_WORD);
	setAction(ITextEditorActionDefinitionIds.DELETE_PREVIOUS_WORD, action);
	textWidget.setKeyBinding(SWT.CTRL | SWT.BS, SWT.NULL);
	markAsStateDependentAction(ITextEditorActionDefinitionIds.DELETE_PREVIOUS_WORD, true);

	action = createDeleteNextSubWordAction();
	action.setActionDefinitionId(ITextEditorActionDefinitionIds.DELETE_NEXT_WORD);
	setAction(ITextEditorActionDefinitionIds.DELETE_NEXT_WORD, action);
	textWidget.setKeyBinding(SWT.CTRL | SWT.DEL, SWT.NULL);
	markAsStateDependentAction(ITextEditorActionDefinitionIds.DELETE_NEXT_WORD, true);
}
 
源代码21 项目: xtext-eclipse   文件: AbstractCursorHandlingTest.java
protected void navigateLeft(XtextEditor editor) {
	IAction action = editor.getAction(ITextEditorActionDefinitionIds.WORD_PREVIOUS);
	action.run();
}
 
源代码22 项目: xtext-eclipse   文件: AbstractCursorHandlingTest.java
protected void navigateRight(XtextEditor editor) {
	IAction action = editor.getAction(ITextEditorActionDefinitionIds.WORD_NEXT);
	action.run();
}
 
源代码23 项目: xtext-eclipse   文件: AbstractCursorHandlingTest.java
protected void toLineStart(XtextEditor editor) {
	IAction action = editor.getAction(ITextEditorActionDefinitionIds.LINE_START);
	action.run();
}
 
源代码24 项目: xtext-eclipse   文件: AbstractCursorHandlingTest.java
protected void navigateLeft(XtextEditor editor) {
	IAction action = editor.getAction(ITextEditorActionDefinitionIds.WORD_PREVIOUS);
	action.run();
}
 
源代码25 项目: xtext-eclipse   文件: AbstractCursorHandlingTest.java
protected void navigateRight(XtextEditor editor) {
	IAction action = editor.getAction(ITextEditorActionDefinitionIds.WORD_NEXT);
	action.run();
}
 
源代码26 项目: xtext-eclipse   文件: AbstractCursorHandlingTest.java
protected void toLineStart(XtextEditor editor) {
	IAction action = editor.getAction(ITextEditorActionDefinitionIds.LINE_START);
	action.run();
}
 
public BasicJavaEditorActionContributor() {
	super();

	ResourceBundle b= JavaEditorMessages.getBundleForConstructedKeys();

	fRetargetShowInformationAction= new RetargetTextEditorAction(b, "Editor.ShowInformation."); //$NON-NLS-1$
	fRetargetShowInformationAction.setActionDefinitionId(ITextEditorActionDefinitionIds.SHOW_INFORMATION);

	// actions that are "contributed" to editors, they are considered belonging to the active editor
	fTogglePresentation= new TogglePresentationAction();

	fToggleMarkOccurrencesAction= new ToggleMarkOccurrencesAction();

	fGotoMatchingBracket= new RetargetTextEditorAction(b, "GotoMatchingBracket."); //$NON-NLS-1$
	fGotoMatchingBracket.setActionDefinitionId(IJavaEditorActionDefinitionIds.GOTO_MATCHING_BRACKET);

	fShowOutline= new RetargetTextEditorAction(JavaEditorMessages.getBundleForConstructedKeys(), "ShowOutline."); //$NON-NLS-1$
	fShowOutline.setActionDefinitionId(IJavaEditorActionDefinitionIds.SHOW_OUTLINE);

	fOpenHierarchy= new RetargetTextEditorAction(JavaEditorMessages.getBundleForConstructedKeys(), "OpenHierarchy."); //$NON-NLS-1$
	fOpenHierarchy.setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_HIERARCHY);

	fOpenStructure= new RetargetTextEditorAction(JavaEditorMessages.getBundleForConstructedKeys(), "OpenStructure."); //$NON-NLS-1$
	fOpenStructure.setActionDefinitionId(IJavaEditorActionDefinitionIds.OPEN_STRUCTURE);

	fStructureSelectEnclosingAction= new RetargetTextEditorAction(b, "StructureSelectEnclosing."); //$NON-NLS-1$
	fStructureSelectEnclosingAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.SELECT_ENCLOSING);
	fStructureSelectNextAction= new RetargetTextEditorAction(b, "StructureSelectNext."); //$NON-NLS-1$
	fStructureSelectNextAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.SELECT_NEXT);
	fStructureSelectPreviousAction= new RetargetTextEditorAction(b, "StructureSelectPrevious."); //$NON-NLS-1$
	fStructureSelectPreviousAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.SELECT_PREVIOUS);
	fStructureSelectHistoryAction= new RetargetTextEditorAction(b, "StructureSelectHistory."); //$NON-NLS-1$
	fStructureSelectHistoryAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.SELECT_LAST);

	fGotoNextMemberAction= new RetargetTextEditorAction(b, "GotoNextMember."); //$NON-NLS-1$
	fGotoNextMemberAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.GOTO_NEXT_MEMBER);
	fGotoPreviousMemberAction= new RetargetTextEditorAction(b, "GotoPreviousMember."); //$NON-NLS-1$
	fGotoPreviousMemberAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.GOTO_PREVIOUS_MEMBER);

	fRemoveOccurrenceAnnotationsAction= new RetargetTextEditorAction(b, "RemoveOccurrenceAnnotations."); //$NON-NLS-1$
	fRemoveOccurrenceAnnotationsAction.setActionDefinitionId(IJavaEditorActionDefinitionIds.REMOVE_OCCURRENCE_ANNOTATIONS);
}
 
源代码28 项目: birt   文件: DecoratedScriptEditor.java
protected void createActions( )
{
	super.createActions( );

	IAction contentAssistAction = new TextOperationAction( Messages.getReportResourceBundle( ),
			"ContentAssistProposal_", this, ISourceViewer.CONTENTASSIST_PROPOSALS, true );//$NON-NLS-1$

	IAction expandAll = new TextOperationAction( Messages.getReportResourceBundle( ),
			"JSEditor.Folding.ExpandAll.", this, ProjectionViewer.EXPAND_ALL, true ); //$NON-NLS-1$

	IAction collapseAll = new TextOperationAction( Messages.getReportResourceBundle( ),
			"JSEditor.Folding.CollapseAll.", this, ProjectionViewer.COLLAPSE_ALL, true ); //$NON-NLS-1$

	IAction collapseComments = new ResourceAction( Messages.getReportResourceBundle( ),
			"JSEditor.Folding.CollapseComments." ) { //$NON-NLS-1$

		/*
		 * (non-Javadoc)
		 * 
		 * @see org.eclipse.jface.action.Action#run()
		 */
		public void run( )
		{
			collapseStyle( ScriptProjectionAnnotation.SCRIPT_COMMENT );
		}
	};

	IAction collapseMethods = new ResourceAction( Messages.getReportResourceBundle( ),
			"JSEditor.Folding.CollapseMethods." ) { //$NON-NLS-1$

		/*
		 * (non-Javadoc)
		 * 
		 * @see org.eclipse.jface.action.Action#run()
		 */
		public void run( )
		{
			collapseStyle( ScriptProjectionAnnotation.SCRIPT_METHOD );
		}
	};

	contentAssistAction.setActionDefinitionId( ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS );
	expandAll.setActionDefinitionId( IFoldingCommandIds.FOLDING_EXPAND_ALL );
	collapseAll.setActionDefinitionId( IFoldingCommandIds.FOLDING_COLLAPSE_ALL );

	setAction( "ContentAssistProposal", contentAssistAction );//$NON-NLS-1$
	setAction( "FoldingExpandAll", expandAll ); //$NON-NLS-1$
	setAction( "FoldingCollapseAll", collapseAll ); //$NON-NLS-1$
	setAction( "FoldingCollapseComments", collapseComments ); //$NON-NLS-1$
	setAction( "FoldingCollapseMethods", collapseMethods ); //$NON-NLS-1$
	setAction( ITextEditorActionConstants.SAVE, new TextSaveAction( this ) );
}
 
源代码29 项目: Pydev   文件: KeyBindingHelper.java
/**
 * @return true if the given event matches a content assistant keystroke (and false otherwise).
 */
public static boolean matchesContentAssistKeybinding(KeyEvent event) {
    return matchesKeybinding(event, ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
}
 
源代码30 项目: Pydev   文件: KeyBindingHelper.java
/**
 * @return the key sequence that is the best match for a content assist request.
 */
public static KeySequence getContentAssistProposalBinding() {
    return getCommandKeyBinding(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS);
}
 
源代码评论
动弹
沙发等你来抢
 类所在包
 类方法
 同包方法