mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-25 09:55:29 +02:00
Cosmetics.
This commit is contained in:
parent
856b684824
commit
3ac977929a
3 changed files with 11 additions and 13 deletions
|
@ -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<ICElement> tuSelection= new ArrayList<ICElement>();
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue