Java Code Examples for org.eclipse.jface.fieldassist.ContentProposalAdapter#PROPOSAL_REPLACE
The following examples show how to use
org.eclipse.jface.fieldassist.ContentProposalAdapter#PROPOSAL_REPLACE .
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: ExpressionViewer.java From bonita-studio with GNU General Public License v2.0 | 6 votes |
@Override public void proposalAccepted(final IContentProposal proposal) { final int proposalAcceptanceStyle = autoCompletion.getContentProposalAdapter().getProposalAcceptanceStyle(); if (proposalAcceptanceStyle == ContentProposalAdapter.PROPOSAL_REPLACE) { final Expression selectedExpression = getSelectedExpression(); final CompoundCommand cc = new CompoundCommand("Update Expression (and potential side components)"); final ExpressionProposal prop = (ExpressionProposal) proposal; final Expression copy = EcoreUtil.copy((Expression) prop.getExpression()); copy.setReturnTypeFixed(selectedExpression.isReturnTypeFixed()); sideModificationOnProposalAccepted(cc, copy); updateSelection(cc, copy); fireSelectionChanged(new SelectionChangedEvent(ExpressionViewer.this, new StructuredSelection(selectedExpression))); validate(); } }
Example 2
Source File: FieldAssistHelper.java From birt with Eclipse Public License 1.0 | 5 votes |
private int getContentAssistAcceptance( ) { IPreferenceStore store = getPreferenceStore( ); String acceptanceStyle = store.getString( PreferenceConstants.PREF_CONTENTASSISTRESULT ); if ( acceptanceStyle.equals( PreferenceConstants.PREF_CONTENTASSISTRESULT_INSERT ) ) return ContentProposalAdapter.PROPOSAL_INSERT; if ( acceptanceStyle.equals( PreferenceConstants.PREF_CONTENTASSISTRESULT_REPLACE ) ) return ContentProposalAdapter.PROPOSAL_REPLACE; return ContentProposalAdapter.PROPOSAL_IGNORE; }