Java Code Examples for org.eclipse.jface.text.source.ISourceViewer#CONTENTASSIST_PROPOSALS
The following examples show how to use
org.eclipse.jface.text.source.ISourceViewer#CONTENTASSIST_PROPOSALS .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: BibEditor.java From texlipse with Eclipse Public License 1.0 | 5 votes |
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)); }
Example 2
Source File: TexEditor.java From texlipse with Eclipse Public License 1.0 | 5 votes |
/** * @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); }
Example 3
Source File: ScriptEditor.java From birt with Eclipse Public License 1.0 | 5 votes |
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 ) ); }
Example 4
Source File: EditTemplateDialog.java From typescript.java with MIT License | 4 votes |
private void initializeActions() { TextViewerAction action = new TextViewerAction(fPatternEditor, ITextOperationTarget.UNDO); action.setText(JSDTTypeScriptUIMessages.EditTemplateDialog_undo); fGlobalActions.put(ITextEditorActionConstants.UNDO, action); action = new TextViewerAction(fPatternEditor, ITextOperationTarget.CUT); action.setText(JSDTTypeScriptUIMessages.EditTemplateDialog_cut); fGlobalActions.put(ITextEditorActionConstants.CUT, action); action = new TextViewerAction(fPatternEditor, ITextOperationTarget.COPY); action.setText(JSDTTypeScriptUIMessages.EditTemplateDialog_copy); fGlobalActions.put(ITextEditorActionConstants.COPY, action); action = new TextViewerAction(fPatternEditor, ITextOperationTarget.PASTE); action.setText(JSDTTypeScriptUIMessages.EditTemplateDialog_paste); fGlobalActions.put(ITextEditorActionConstants.PASTE, action); action = new TextViewerAction(fPatternEditor, ITextOperationTarget.SELECT_ALL); action.setText(JSDTTypeScriptUIMessages.EditTemplateDialog_select_all); fGlobalActions.put(ITextEditorActionConstants.SELECT_ALL, action); action = new TextViewerAction(fPatternEditor, ISourceViewer.CONTENTASSIST_PROPOSALS); action.setText(JSDTTypeScriptUIMessages.EditTemplateDialog_content_assist); fGlobalActions.put("ContentAssistProposal", action); //$NON-NLS-1$ fSelectionActions.add(ITextEditorActionConstants.CUT); fSelectionActions.add(ITextEditorActionConstants.COPY); fSelectionActions.add(ITextEditorActionConstants.PASTE); // create context menu MenuManager manager = new MenuManager(null, null); manager.setRemoveAllWhenShown(true); manager.addMenuListener(new IMenuListener() { public void menuAboutToShow(IMenuManager mgr) { fillContextMenu(mgr); } }); StyledText text = fPatternEditor.getTextWidget(); Menu menu = manager.createContextMenu(text); text.setMenu(menu); }
Example 5
Source File: DecoratedScriptEditor.java From birt with Eclipse Public License 1.0 | 4 votes |
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 ) ); }
Example 6
Source File: ScriptConsolePage.java From Pydev with Eclipse Public License 1.0 | 4 votes |
public ContentAssistProposalsAction(ITextViewer viewer) { super(viewer, ISourceViewer.CONTENTASSIST_PROPOSALS); }