From 380f3373da8af4e31ad6e37070848ea5e1c5705c Mon Sep 17 00:00:00 2001 From: Sergey Prigogin Date: Sun, 20 Jan 2013 20:40:29 -0800 Subject: Cosmetics. --- .../ui/editor/AbstractCModelOutlinePage.java | 26 +++++++++------------- 1 file changed, 11 insertions(+), 15 deletions(-) diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/AbstractCModelOutlinePage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/AbstractCModelOutlinePage.java index e7640ba8e12..95cf35fb74f 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/AbstractCModelOutlinePage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/editor/AbstractCModelOutlinePage.java @@ -93,13 +93,12 @@ import org.eclipse.cdt.internal.ui.viewsupport.DecoratingCLabelProvider; * * @since 5.0 */ -public abstract class AbstractCModelOutlinePage extends Page implements IContentOutlinePage, ISelectionChangedListener, IAdaptable { - +public abstract class AbstractCModelOutlinePage extends Page + implements IContentOutlinePage, ISelectionChangedListener, IAdaptable { /** * The default label provider for the outline. */ public static class COutlineLabelProvider extends AppearanceAwareLabelProvider { - /** * Flag whether to show member definitions with qualified or simple names. */ @@ -148,9 +147,7 @@ public abstract class AbstractCModelOutlinePage extends Page implements IContent public OutlineTreeViewer(Composite parent, int flags) { super(parent, flags); } - /* - * @see TreeViewer#internalExpandToLevel - */ + @Override protected void internalExpandToLevel(Widget node, int level) { if (node instanceof Item) { @@ -213,7 +210,6 @@ public abstract class AbstractCModelOutlinePage extends Page implements IContent public boolean isIncludesGroupingEnabled () { return PreferenceConstants.getPreferenceStore().getBoolean(PreferenceConstants.OUTLINE_GROUP_INCLUDES); } - } /** @@ -247,7 +243,6 @@ public abstract class AbstractCModelOutlinePage extends Page implements IContent public boolean isMacroGroupingEnabled () { return PreferenceConstants.getPreferenceStore().getBoolean(PreferenceConstants.OUTLINE_GROUP_MACROS); } - } /** @@ -257,7 +252,6 @@ public abstract class AbstractCModelOutlinePage extends Page implements IContent * @since 3.0 */ public class ToggleLinkingAction extends AbstractToggleLinkingAction { - /** * Constructs a new action. */ @@ -277,7 +271,9 @@ public abstract class AbstractCModelOutlinePage extends Page implements IContent } } - private static final long TEXT_FLAGS = AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS | CElementLabels.F_APP_TYPE_SIGNATURE | CElementLabels.M_APP_RETURNTYPE; + private static final long TEXT_FLAGS = + AppearanceAwareLabelProvider.DEFAULT_TEXTFLAGS | CElementLabels.F_APP_TYPE_SIGNATURE | + CElementLabels.M_APP_RETURNTYPE; private static final int IMAGE_FLAGS = AppearanceAwareLabelProvider.DEFAULT_IMAGEFLAGS; protected ITextEditor fEditor; protected ITranslationUnit fInput; @@ -374,7 +370,7 @@ public abstract class AbstractCModelOutlinePage extends Page implements IContent int offset= tsel.getOffset(); ICElement element= null; if (fEditor instanceof CEditor) { - element= ((CEditor)fEditor).getElementAt(offset, false); + element= ((CEditor) fEditor).getElementAt(offset, false); } else if (fInput != null) { try { element= fInput.getElementAtOffset(offset); @@ -407,11 +403,11 @@ public abstract class AbstractCModelOutlinePage extends Page implements IContent * Sets the selected element to the one at the current cursor position in the editor. */ public void synchronizeSelectionWithEditor() { - if(fInput == null || fEditor == null || fTreeViewer == null) + if (fInput == null || fEditor == null || fTreeViewer == null) return; ITextSelection editorSelection = (ITextSelection) fEditor.getSelectionProvider().getSelection(); - if(editorSelection == null) + if (editorSelection == null) return; int offset = editorSelection.getOffset(); @@ -513,7 +509,8 @@ public abstract class AbstractCModelOutlinePage extends Page implements IContent site.setSelectionProvider(fTreeViewer); IActionBars bars= site.getActionBars(); - bars.setGlobalActionHandler(ITextEditorActionDefinitionIds.TOGGLE_SHOW_SELECTED_ELEMENT_ONLY, fTogglePresentation); + bars.setGlobalActionHandler(ITextEditorActionDefinitionIds.TOGGLE_SHOW_SELECTED_ELEMENT_ONLY, + fTogglePresentation); fSelectionSearchGroup = createSearchActionGroup(); fOpenViewActionGroup = createOpenViewActionGroup(); @@ -786,5 +783,4 @@ public abstract class AbstractCModelOutlinePage extends Page implements IContent }; fTreeViewer.addDragSupport(ops, transfers, new CDTViewerDragAdapter(fTreeViewer, dragListeners)); } - } -- cgit v1.2.3