|
Lines 15-26
Link Here
|
| 15 |
import org.eclipse.core.resources.IMarker; |
15 |
import org.eclipse.core.resources.IMarker; |
| 16 |
import org.eclipse.core.runtime.CoreException; |
16 |
import org.eclipse.core.runtime.CoreException; |
| 17 |
import org.eclipse.jdt.ui.JavaUI; |
17 |
import org.eclipse.jdt.ui.JavaUI; |
| 18 |
import org.eclipse.jface.action.IAction; |
|
|
| 19 |
import org.eclipse.jface.action.IMenuManager; |
18 |
import org.eclipse.jface.action.IMenuManager; |
| 20 |
import org.eclipse.jface.preference.IPreferenceStore; |
19 |
import org.eclipse.jface.preference.IPreferenceStore; |
| 21 |
import org.eclipse.jface.text.IDocument; |
20 |
import org.eclipse.jface.text.IDocument; |
| 22 |
import org.eclipse.jface.text.ITextSelection; |
21 |
import org.eclipse.jface.text.ITextSelection; |
| 23 |
import org.eclipse.jface.text.source.*; |
22 |
import org.eclipse.jface.text.source.ISourceViewer; |
| 24 |
import org.eclipse.jface.viewers.*; |
23 |
import org.eclipse.jface.viewers.*; |
| 25 |
import org.eclipse.pde.core.IBaseModel; |
24 |
import org.eclipse.pde.core.IBaseModel; |
| 26 |
import org.eclipse.pde.internal.core.text.*; |
25 |
import org.eclipse.pde.internal.core.text.*; |
|
Lines 394-401
Link Here
|
| 394 |
PDEFormTextEditorContributor textContributor = (PDEFormTextEditorContributor) contributor; |
393 |
PDEFormTextEditorContributor textContributor = (PDEFormTextEditorContributor) contributor; |
| 395 |
setAction(PDEActionConstants.OPEN, textContributor.getHyperlinkAction()); |
394 |
setAction(PDEActionConstants.OPEN, textContributor.getHyperlinkAction()); |
| 396 |
setAction(PDEActionConstants.FORMAT, textContributor.getFormatAction()); |
395 |
setAction(PDEActionConstants.FORMAT, textContributor.getFormatAction()); |
| 397 |
if (textContributor.supportsContentAssist()) |
|
|
| 398 |
createContentAssistAction(); |
| 399 |
} |
396 |
} |
| 400 |
|
397 |
|
| 401 |
// Create the quick outline action |
398 |
// Create the quick outline action |
|
Lines 416-428
Link Here
|
| 416 |
setAction(PDEActionConstants.COMMAND_ID_QUICK_OUTLINE, action); |
413 |
setAction(PDEActionConstants.COMMAND_ID_QUICK_OUTLINE, action); |
| 417 |
} |
414 |
} |
| 418 |
|
415 |
|
| 419 |
private void createContentAssistAction() { |
|
|
| 420 |
IAction contentAssist = new ContentAssistAction(getBundleForConstructedKeys(), "ContentAssistProposal.", this); //$NON-NLS-1$ |
| 421 |
contentAssist.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTENT_ASSIST_PROPOSALS); |
| 422 |
setAction("ContentAssist", contentAssist); //$NON-NLS-1$ |
| 423 |
markAsStateDependentAction("ContentAssist", true); //$NON-NLS-1$ |
| 424 |
} |
| 425 |
|
| 426 |
public final void selectionChanged(SelectionChangedEvent event) { |
416 |
public final void selectionChanged(SelectionChangedEvent event) { |
| 427 |
if (event.getSource() == getSelectionProvider()) |
417 |
if (event.getSource() == getSelectionProvider()) |
| 428 |
return; |
418 |
return; |