mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Cosmetics.
This commit is contained in:
parent
6c33857abf
commit
fdbfec3f2b
6 changed files with 14 additions and 23 deletions
|
@ -6,7 +6,7 @@
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Andrew Ferguson (Symbian) - initial API and implementation
|
* Andrew Ferguson (Symbian) - initial API and implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.index;
|
package org.eclipse.cdt.internal.core.index;
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Markus Schorn - initial API and implementation
|
* Markus Schorn - initial API and implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core.pdom;
|
package org.eclipse.cdt.internal.core.pdom;
|
||||||
|
|
||||||
|
@ -142,8 +142,7 @@ public class IndexUpdatePolicy {
|
||||||
task= new PDOMUpdateTask(fIndexer,
|
task= new PDOMUpdateTask(fIndexer,
|
||||||
IIndexManager.UPDATE_CHECK_TIMESTAMPS | IIndexManager.UPDATE_CHECK_CONTENTS_HASH);
|
IIndexManager.UPDATE_CHECK_TIMESTAMPS | IIndexManager.UPDATE_CHECK_CONTENTS_HASH);
|
||||||
clearTUs();
|
clearTUs();
|
||||||
}
|
} else if (fKind == POST_CHANGE) {
|
||||||
else if (fKind == POST_CHANGE) {
|
|
||||||
task= createTask();
|
task= createTask();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -188,9 +188,7 @@ public class IndexerPreferences {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static int getDefaultUpdatePolicy() {
|
public static int getDefaultUpdatePolicy() {
|
||||||
Preferences[] prefs = new Preferences[] {
|
Preferences[] prefs = new Preferences[] { getDefaultPreferences() };
|
||||||
getDefaultPreferences()
|
|
||||||
};
|
|
||||||
return getUpdatePolicy(prefs);
|
return getUpdatePolicy(prefs);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -203,7 +201,7 @@ public class IndexerPreferences {
|
||||||
}
|
}
|
||||||
|
|
||||||
private static void setProperties(Preferences prefs, Properties props) {
|
private static void setProperties(Preferences prefs, Properties props) {
|
||||||
for (Map.Entry<Object,Object> entry : props.entrySet()) {
|
for (Map.Entry<Object, Object> entry : props.entrySet()) {
|
||||||
String key = (String) entry.getKey();
|
String key = (String) entry.getKey();
|
||||||
String val = (String) entry.getValue();
|
String val = (String) entry.getValue();
|
||||||
prefs.put(key, val);
|
prefs.put(key, val);
|
||||||
|
|
|
@ -14,6 +14,9 @@
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.internal.core;
|
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.CCorePlugin;
|
||||||
import org.eclipse.cdt.core.CCorePreferenceConstants;
|
import org.eclipse.cdt.core.CCorePreferenceConstants;
|
||||||
import org.eclipse.cdt.core.formatter.DefaultCodeFormatterConstants;
|
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.DefaultScope;
|
||||||
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
|
import org.eclipse.core.runtime.preferences.IEclipsePreferences;
|
||||||
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public class CCorePreferenceInitializer extends AbstractPreferenceInitializer {
|
public class CCorePreferenceInitializer extends AbstractPreferenceInitializer {
|
||||||
|
|
||||||
/* (non-Javadoc)
|
/* (non-Javadoc)
|
||||||
|
@ -51,7 +51,7 @@ public class CCorePreferenceInitializer extends AbstractPreferenceInitializer {
|
||||||
|
|
||||||
// Store default values to default preferences
|
// Store default values to default preferences
|
||||||
IEclipsePreferences defaultPreferences = DefaultScope.INSTANCE.getNode(CCorePlugin.PLUGIN_ID);
|
IEclipsePreferences defaultPreferences = DefaultScope.INSTANCE.getNode(CCorePlugin.PLUGIN_ID);
|
||||||
for (Map.Entry<String,String> entry : defaultOptionsMap.entrySet()) {
|
for (Map.Entry<String, String> entry : defaultOptionsMap.entrySet()) {
|
||||||
String optionName = entry.getKey();
|
String optionName = entry.getKey();
|
||||||
defaultPreferences.put(optionName, entry.getValue());
|
defaultPreferences.put(optionName, entry.getValue());
|
||||||
optionNames.add(optionName);
|
optionNames.add(optionName);
|
||||||
|
|
|
@ -6,10 +6,9 @@
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Markus Schorn - initial API and implementation
|
* Markus Schorn - initial API and implementation
|
||||||
* Anton Leherbauer (Wind River Systems)
|
* Anton Leherbauer (Wind River Systems)
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.cdt.internal.ui.actions;
|
package org.eclipse.cdt.internal.ui.actions;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
@ -32,7 +31,6 @@ import org.eclipse.cdt.core.model.ITranslationUnit;
|
||||||
import org.eclipse.cdt.ui.CUIPlugin;
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
|
||||||
public abstract class AbstractUpdateIndexAction implements IObjectActionDelegate {
|
public abstract class AbstractUpdateIndexAction implements IObjectActionDelegate {
|
||||||
|
|
||||||
private ISelection fSelection;
|
private ISelection fSelection;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -45,9 +43,8 @@ public abstract class AbstractUpdateIndexAction implements IObjectActionDelegate
|
||||||
return;
|
return;
|
||||||
|
|
||||||
IStructuredSelection cElements= SelectionConverter.convertSelectionToCElements(fSelection);
|
IStructuredSelection cElements= SelectionConverter.convertSelectionToCElements(fSelection);
|
||||||
Iterator<?> i= cElements.iterator();
|
|
||||||
ArrayList<ICElement> tuSelection= new ArrayList<ICElement>();
|
ArrayList<ICElement> tuSelection= new ArrayList<ICElement>();
|
||||||
while (i.hasNext()) {
|
for (Iterator<?> i= cElements.iterator(); i.hasNext();) {
|
||||||
Object o= i.next();
|
Object o= i.next();
|
||||||
if (o instanceof ICProject || o instanceof ICContainer || o instanceof ITranslationUnit) {
|
if (o instanceof ICProject || o instanceof ICContainer || o instanceof ITranslationUnit) {
|
||||||
tuSelection.add((ICElement) o);
|
tuSelection.add((ICElement) o);
|
||||||
|
@ -57,8 +54,7 @@ public abstract class AbstractUpdateIndexAction implements IObjectActionDelegate
|
||||||
|
|
||||||
try {
|
try {
|
||||||
CCorePlugin.getIndexManager().update(tuArray, getUpdateOptions());
|
CCorePlugin.getIndexManager().update(tuArray, getUpdateOptions());
|
||||||
}
|
} catch (CoreException e) {
|
||||||
catch (CoreException e) {
|
|
||||||
CUIPlugin.log(e);
|
CUIPlugin.log(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -6,9 +6,8 @@
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* Markus Schorn - initial API and implementation
|
* Markus Schorn - initial API and implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
|
|
||||||
package org.eclipse.cdt.internal.ui.actions;
|
package org.eclipse.cdt.internal.ui.actions;
|
||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
@ -24,7 +23,6 @@ import org.eclipse.cdt.core.CCorePlugin;
|
||||||
import org.eclipse.cdt.core.model.ICProject;
|
import org.eclipse.cdt.core.model.ICProject;
|
||||||
|
|
||||||
public class RebuildIndexAction implements IObjectActionDelegate {
|
public class RebuildIndexAction implements IObjectActionDelegate {
|
||||||
|
|
||||||
private ISelection fSelection;
|
private ISelection fSelection;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
Loading…
Add table
Reference in a new issue