mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-23 08:55:25 +02:00
Added ICSettingEntry.NONE constant.
This commit is contained in:
parent
bdbfa25c7b
commit
30e8158c26
4 changed files with 19 additions and 10 deletions
|
@ -2,7 +2,7 @@ Manifest-Version: 1.0
|
|||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %pluginName
|
||||
Bundle-SymbolicName: org.eclipse.cdt.core; singleton:=true
|
||||
Bundle-Version: 5.5.0.qualifier
|
||||
Bundle-Version: 5.6.0.qualifier
|
||||
Bundle-Activator: org.eclipse.cdt.core.CCorePlugin
|
||||
Bundle-Vendor: %providerName
|
||||
Bundle-Localization: plugin
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007, 2010 Intel Corporation and others.
|
||||
* Copyright (c) 2007, 2013 Intel Corporation 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
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Intel Corporation - Initial API and implementation
|
||||
* Intel Corporation - Initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.settings.model;
|
||||
|
||||
|
@ -23,6 +23,12 @@ import org.eclipse.cdt.core.settings.model.util.CDataUtil;
|
|||
* entries could be safely pooled by {@link CDataUtil#getPooledEntry(ICSettingEntry)}.
|
||||
*/
|
||||
public interface ICSettingEntry {
|
||||
/**
|
||||
* A constant known to be zero (0), used to indicate that no flags are set.
|
||||
* @since 5.6
|
||||
*/
|
||||
int NONE = 0;
|
||||
|
||||
/**
|
||||
* Flag {@code BUILTIN} indicates settings built in a tool (compiler) itself.
|
||||
* That kind of settings are not passed as options to a compiler but indexer
|
||||
|
@ -100,5 +106,4 @@ public interface ICSettingEntry {
|
|||
boolean equalsByContents(ICSettingEntry entry);
|
||||
|
||||
int getFlags();
|
||||
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007, 2010 Intel Corporation and others.
|
||||
* Copyright (c) 2007, 2013 Intel Corporation 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
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Intel Corporation - Initial API and implementation
|
||||
* Intel Corporation - Initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.core.settings.model.util;
|
||||
|
||||
|
@ -45,6 +45,8 @@ public class LanguageSettingEntriesSerializer {
|
|||
public static final String SOURCE_PATH = "sourcePath"; //$NON-NLS-1$
|
||||
public static final String OUTPUT_PATH = "outputPath"; //$NON-NLS-1$
|
||||
|
||||
/** @since 5.6 */
|
||||
public static final String NONE = "NONE"; //$NON-NLS-1$
|
||||
public static final String BUILTIN = "BUILTIN"; //$NON-NLS-1$
|
||||
public static final String READONLY = "READONLY"; //$NON-NLS-1$
|
||||
public static final String LOCAL = "LOCAL"; //$NON-NLS-1$
|
||||
|
@ -225,7 +227,10 @@ public class LanguageSettingEntriesSerializer {
|
|||
}
|
||||
|
||||
public static String composeFlagsString(int flags) {
|
||||
StringBuffer buf = new StringBuffer();
|
||||
if (flags == ICSettingEntry.NONE) {
|
||||
return NONE;
|
||||
}
|
||||
StringBuilder buf = new StringBuilder();
|
||||
if ((flags & ICSettingEntry.BUILTIN) != 0) {
|
||||
buf.append(BUILTIN);
|
||||
}
|
||||
|
@ -272,7 +277,7 @@ public class LanguageSettingEntriesSerializer {
|
|||
* @since 5.4
|
||||
*/
|
||||
public static int composeFlags(String flagsString) {
|
||||
if (flagsString == null || flagsString.length() == 0)
|
||||
if (flagsString == null || flagsString.isEmpty() || flagsString.equals(NONE))
|
||||
return 0;
|
||||
|
||||
StringTokenizer tokenizer = new StringTokenizer(flagsString, FLAGS_SEPARATOR);
|
||||
|
@ -298,5 +303,4 @@ public class LanguageSettingEntriesSerializer {
|
|||
|
||||
return flags;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<version>5.5.0-SNAPSHOT</version>
|
||||
<version>5.6.0-SNAPSHOT</version>
|
||||
<artifactId>org.eclipse.cdt.core</artifactId>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
</project>
|
||||
|
|
Loading…
Add table
Reference in a new issue