1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Cosmetics.

This commit is contained in:
Sergey Prigogin 2012-05-09 15:35:18 -07:00
parent 6c33857abf
commit fdbfec3f2b
6 changed files with 14 additions and 23 deletions

View file

@ -142,8 +142,7 @@ public class IndexUpdatePolicy {
task= new PDOMUpdateTask(fIndexer,
IIndexManager.UPDATE_CHECK_TIMESTAMPS | IIndexManager.UPDATE_CHECK_CONTENTS_HASH);
clearTUs();
}
else if (fKind == POST_CHANGE) {
} else if (fKind == POST_CHANGE) {
task= createTask();
}
}

View file

@ -188,9 +188,7 @@ public class IndexerPreferences {
}
public static int getDefaultUpdatePolicy() {
Preferences[] prefs = new Preferences[] {
getDefaultPreferences()
};
Preferences[] prefs = new Preferences[] { getDefaultPreferences() };
return getUpdatePolicy(prefs);
}

View file

@ -14,6 +14,9 @@
*******************************************************************************/
package org.eclipse.cdt.internal.core;
import java.util.HashSet;
import java.util.Map;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.CCorePreferenceConstants;
import org.eclipse.cdt.core.formatter.DefaultCodeFormatterConstants;
@ -24,9 +27,6 @@ import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
import org.eclipse.core.runtime.preferences.DefaultScope;
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
import java.util.HashSet;
import java.util.Map;
public class CCorePreferenceInitializer extends AbstractPreferenceInitializer {
/* (non-Javadoc)

View file

@ -9,7 +9,6 @@
* Markus Schorn - initial API and implementation
* Anton Leherbauer (Wind River Systems)
*******************************************************************************/
package org.eclipse.cdt.internal.ui.actions;
import java.util.ArrayList;
@ -32,7 +31,6 @@ import org.eclipse.cdt.core.model.ITranslationUnit;
import org.eclipse.cdt.ui.CUIPlugin;
public abstract class AbstractUpdateIndexAction implements IObjectActionDelegate {
private ISelection fSelection;
@Override
@ -45,9 +43,8 @@ public abstract class AbstractUpdateIndexAction implements IObjectActionDelegate
return;
IStructuredSelection cElements= SelectionConverter.convertSelectionToCElements(fSelection);
Iterator<?> i= cElements.iterator();
ArrayList<ICElement> tuSelection= new ArrayList<ICElement>();
while (i.hasNext()) {
for (Iterator<?> i= cElements.iterator(); i.hasNext();) {
Object o= i.next();
if (o instanceof ICProject || o instanceof ICContainer || o instanceof ITranslationUnit) {
tuSelection.add((ICElement) o);
@ -57,8 +54,7 @@ public abstract class AbstractUpdateIndexAction implements IObjectActionDelegate
try {
CCorePlugin.getIndexManager().update(tuArray, getUpdateOptions());
}
catch (CoreException e) {
} catch (CoreException e) {
CUIPlugin.log(e);
}
}

View file

@ -8,7 +8,6 @@
* Contributors:
* Markus Schorn - initial API and implementation
*******************************************************************************/
package org.eclipse.cdt.internal.ui.actions;
import java.util.Iterator;
@ -24,7 +23,6 @@ import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.model.ICProject;
public class RebuildIndexAction implements IObjectActionDelegate {
private ISelection fSelection;
@Override