diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/AbstractUpdateIndexAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/AbstractUpdateIndexAction.java index b5e88a5dbe6..d92928a241d 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/AbstractUpdateIndexAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/AbstractUpdateIndexAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2007, 2013 Wind River Systems, Inc. and others. + * Copyright (c) 2007, 2014 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -41,7 +41,7 @@ public abstract class AbstractUpdateIndexAction implements IObjectActionDelegate @Override public void run(IAction action) { - if(!(fSelection instanceof IStructuredSelection) && !(fSelection instanceof ITextSelection)) { + if (!(fSelection instanceof IStructuredSelection) && !(fSelection instanceof ITextSelection)) { return; } ICElement[] elements = getSelectedCElements(); @@ -57,7 +57,7 @@ public abstract class AbstractUpdateIndexAction implements IObjectActionDelegate } /** - * Return the options to update the translation. + * Returns the options to update the translation. * @see IIndexManager#update(ICElement[], int) * @since 4.0 */ @@ -76,22 +76,22 @@ public abstract class AbstractUpdateIndexAction implements IObjectActionDelegate protected ICElement[] getSelectedCElements() { ArrayList tuSelection= new ArrayList(); - if(fSelection instanceof IStructuredSelection) { + if (fSelection instanceof IStructuredSelection) { IStructuredSelection resources = SelectionConverter.convertSelectionToResources(fSelection); for (Iterator i= resources.iterator(); i.hasNext();) { Object o= i.next(); - if(o instanceof IResource) { - ICElement celement= CCorePlugin.getDefault().getCoreModel().create((IResource)o); - if(celement != null) { + if (o instanceof IResource) { + ICElement celement= CCorePlugin.getDefault().getCoreModel().create((IResource) o); + if (celement != null) { tuSelection.add(celement); } } } - } else if(fSelection == null || fSelection instanceof ITextSelection) { + } else if (fSelection == null || fSelection instanceof ITextSelection) { IProject project = EditorUtility.getProjectForActiveEditor(); - if(project != null) { + if (project != null) { ICProject cproject= CCorePlugin.getDefault().getCoreModel().create(project); - if(cproject != null) { + if (cproject != null) { tuSelection.add(cproject); } } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/RebuildIndexHandler.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/RebuildIndexHandler.java index f0ec4f000dc..03e41fc2953 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/RebuildIndexHandler.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/actions/RebuildIndexHandler.java @@ -10,7 +10,6 @@ *******************************************************************************/ package org.eclipse.cdt.internal.ui.actions; - /** * Handler for {@link org.eclipse.cdt.internal.ui.actions.RebuildIndexAction} * @@ -18,7 +17,6 @@ package org.eclipse.cdt.internal.ui.actions; * @noinstantiate This class is not intended to be instantiated by clients. */ public class RebuildIndexHandler extends AbstractUpdateIndexHandler { - private final RebuildIndexAction rebuildIndexAction = new RebuildIndexAction(); @Override diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindUnresolvedIncludesProjectAction.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindUnresolvedIncludesProjectAction.java index bee7d5b32be..20b719751ea 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindUnresolvedIncludesProjectAction.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/search/actions/FindUnresolvedIncludesProjectAction.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2008, 2013 Wind River Systems, Inc. and others. + * Copyright (c) 2008, 2014 Wind River Systems, Inc. and others. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at