/** * @see IExtendedContributor#contributeToPopupMenu(IMenuManager) */ public final void contributeToPopupMenu(IMenuManager menu) { // TODO: this method is empty addToPopupMenu(menu); if (_extendedContributor != null) _extendedContributor.contributeToPopupMenu(menu); }
/** * @see IExtendedContributor#updateToolbarActions() */ public void updateToolbarActions() { if (extendedContributor != null) { extendedContributor.updateToolbarActions(); } }
public void dragOperationChanged(DropTargetEvent event) { super.dragOperationChanged(event); }
public SourceEditorActionBarContributor() { super(); sourceViewerActionContributor = new SourcePageActionContributor(); // Read action extensions. ExtendedEditorActionBuilder builder = new ExtendedEditorActionBuilder(); extendedContributor = builder.readActionExtensions(EDITOR_ID); }
/** * */ protected void deactivateSourceAndDesignPage(IEditorPart activeEditor) { if (_designViewerActionBarContributor != null) { _designViewerActionBarContributor.setActiveEditor(_htmlEditor); _designViewerActionBarContributor .setViewerSpecificContributionsEnabled(false); } if (_sourceViewerActionContributor != null) { _sourceViewerActionContributor.setActiveEditor(_htmlEditor); _sourceViewerActionContributor .setViewerSpecificContributionsEnabled(false); } }
protected void activateSourcePage(IEditorPart activeEditor, boolean state) { if (sourceViewerActionContributor != null && sourceViewerActionContributor instanceof ISourceViewerActionBarContributor) { sourceViewerActionContributor.setActiveEditor(activeEditor); ((ISourceViewerActionBarContributor) sourceViewerActionContributor).setViewerSpecificContributionsEnabled(state); } }
public boolean performOk() { // required since the superclass *removes* existing preferences before // saving its own super.performOk(); SSEUIPlugin.getDefault().savePluginPreferences(); return true; }
public int getCaretOffset() { StructuredTextViewer stv = fTextEditor.getTextViewer(); if ((stv != null) && (stv.getTextWidget() != null) && !stv.getTextWidget().isDisposed()) { return stv.widgetOffset2ModelOffset(stv.getTextWidget().getCaretOffset()); } return 0; }
public void dispose() { super.dispose(); if (_designViewerActionBarContributor != null) { _designViewerActionBarContributor.dispose(); } if (_sourceViewerActionContributor != null) { _sourceViewerActionContributor.dispose(); } if (_extendedContributor != null) { _extendedContributor.dispose(); } if (_group != null) { _group.dispose(); } }
/** * @see org.eclipse.ui.part.EditorActionBarContributor#contributeToStatusLine(IStatusLineManager) */ public final void contributeToStatusLine(IStatusLineManager manager) { super.contributeToStatusLine(manager); // TODO: this method does nothing addToStatusLine(manager); if (_extendedContributor != null) _extendedContributor.contributeToStatusLine(manager); }
/** * @see org.eclipse.ui.part.EditorActionBarContributor#contributeToToolBar(IToolBarManager) */ public final void contributeToToolBar(IToolBarManager toolBarManager) { super.contributeToToolBar(toolBarManager); // TODO: this method is empty addToToolBar(toolBarManager); if (_extendedContributor != null) _extendedContributor.contributeToToolBar(toolBarManager); }
public void setActiveEditor(IEditorPart targetEditor) { if (targetEditor instanceof HTMLEditor) { _htmlEditor = (HTMLEditor) targetEditor; //StructuredTextEditor textEditor = _htmlEditor.getTextEditor(); // TODO: never read this._model = textEditor.getModel(); } super.setActiveEditor(targetEditor); updateToolbarActions(); if (_extendedContributor != null) _extendedContributor.setActiveEditor(targetEditor); }
protected void processElementAttrValueDoubleClicked2Times() { int prevRegionOffset = fStructuredDocumentRegion.getStartOffset(fTextRegion) - 1; ITextRegion prevRegion = fStructuredDocumentRegion.getRegionAtCharacterOffset(prevRegionOffset); if (prevRegion != null) { prevRegionOffset = fStructuredDocumentRegion.getStartOffset(prevRegion) - 1; prevRegion = fStructuredDocumentRegion.getRegionAtCharacterOffset(prevRegionOffset); if ((prevRegion != null) && (prevRegion.getType() == DOMRegionContext.XML_TAG_ATTRIBUTE_NAME)) { fStructuredTextViewer.setSelectedRange(fStructuredDocumentRegion.getStartOffset(prevRegion), fTextRegion.getTextEnd() - prevRegion.getStart()); } } }
/** * Ensures release if it's a duplicate partition type. * * @param map * @param key * @param processor */ private void addProcessor(HashMap map, String key, IContentAssistProcessor processor) { Object o = map.remove(key); if (o != null) { if (o instanceof IReleasable) { ((IReleasable) o).release(); } } map.put(key, processor); }
protected void initSourceViewerActionContributor(IActionBars actionBars) { if (_sourceViewerActionContributor != null) _sourceViewerActionContributor.init(actionBars, getPage()); }
/** * IExtendedMarkupEditor method */ public List getSelectedNodes() { if (getTextEditor() == null) { return null; } // FIXME: when designer as current view, what to return? return getExtendedTextEditor().getSelectedNodes(); }
protected void activateSourcePage(IEditorPart activeEditor) { if ((designViewerActionBarContributor != null) && (designViewerActionBarContributor instanceof IDesignViewerActionBarContributor)) { designViewerActionBarContributor.setActiveEditor(multiPageEditor); } if ((sourceViewerActionContributor != null) && (sourceViewerActionContributor instanceof ISourceViewerActionBarContributor)) { sourceViewerActionContributor.setActiveEditor(activeEditor); ((ISourceViewerActionBarContributor) sourceViewerActionContributor).setViewerSpecificContributionsEnabled(true); } }
/** * @see IExtendedContributor#contributeToPopupMenu(IMenuManager) */ public final void contributeToPopupMenu(IMenuManager menu) { addToPopupMenu(menu); if (extendedContributor != null) { extendedContributor.contributeToPopupMenu(menu); } }
/** * @see IExtendedContributor#updateToolbarActions() */ public void updateToolbarActions() { if (_extendedContributor != null) { _extendedContributor.updateToolbarActions(); } _group.setHTMLEditor(_htmlEditor); }
/** * @see org.eclipse.ui.part.EditorActionBarContributor#contributeToStatusLine(IStatusLineManager) */ public final void contributeToStatusLine(IStatusLineManager manager) { super.contributeToStatusLine(manager); addToStatusLine(manager); if (extendedContributor != null) { extendedContributor.contributeToStatusLine(manager); } }