Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarco Stornelli2019-03-09 04:22:10 -0500
committerMarco Stornelli2019-04-28 02:12:04 -0400
commit6be494466b397670a0c21842dc3a66d1ad6d015d (patch)
treefa029eeb6141960efe5348fac7dc980934f78a31 /core/org.eclipse.cdt.core
parent5edac6e20c69845546fe873268989f53b5f55a48 (diff)
downloadorg.eclipse.cdt-6be494466b397670a0c21842dc3a66d1ad6d015d.tar.gz
org.eclipse.cdt-6be494466b397670a0c21842dc3a66d1ad6d015d.tar.xz
org.eclipse.cdt-6be494466b397670a0c21842dc3a66d1ad6d015d.zip
Bug 303870 - Add override virtual methods functionality
Added overridemethods package Change-Id: I73a8f0a396336acf7d3bbc8988e629da510ae781 Signed-off-by: Marco Stornelli <marco.stornelli@gmail.com> Signed-off-by: pmarek <pavel.akira.marek@gmail.com>
Diffstat (limited to 'core/org.eclipse.cdt.core')
-rw-r--r--core/org.eclipse.cdt.core/META-INF/MANIFEST.MF2
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePreferenceConstants.java30
-rw-r--r--core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CCorePreferenceInitializer.java4
3 files changed, 35 insertions, 1 deletions
diff --git a/core/org.eclipse.cdt.core/META-INF/MANIFEST.MF b/core/org.eclipse.cdt.core/META-INF/MANIFEST.MF
index d652f2cf9e..e6bc529ced 100644
--- a/core/org.eclipse.cdt.core/META-INF/MANIFEST.MF
+++ b/core/org.eclipse.cdt.core/META-INF/MANIFEST.MF
@@ -2,7 +2,7 @@ Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %pluginName
Bundle-SymbolicName: org.eclipse.cdt.core; singleton:=true
-Bundle-Version: 6.7.100.qualifier
+Bundle-Version: 6.8.0.qualifier
Bundle-Activator: org.eclipse.cdt.core.CCorePlugin
Bundle-Vendor: %providerName
Bundle-Localization: plugin
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePreferenceConstants.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePreferenceConstants.java
index 715f8709fa..72e56a97fe 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePreferenceConstants.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/core/CCorePreferenceConstants.java
@@ -369,6 +369,36 @@ public class CCorePreferenceConstants {
public static final boolean DEFAULT_PLACE_CONST_RIGHT_OF_TYPE = false;
/**
+ * A named preference that specifies whether the override keyword should be added
+ * to method signature.
+ *
+ * @since 6.8
+ */
+ public static final String ADD_OVERRIDE_KEYWORD = "astwriter.addOverride"; //$NON-NLS-1$
+
+ /**
+ * A named preference that specifies whether the virtual keyword should be added
+ * to method signature.
+ *
+ * @since 6.8
+ */
+ public static final String PRESERVE_VIRTUAL_KEYWORD = "astwriter.preserveVirtual"; //$NON-NLS-1$
+
+ /**
+ * Default value for {@link #ADD_OVERRIDE_KEYWORD}.
+ *
+ * @since 6.8
+ */
+ public static final boolean DEFAULT_ADD_OVERRIDE_KEYWORD = false;
+
+ /**
+ * Default value for {@link #PRESERVE_VIRTUAL_KEYWORD}.
+ *
+ * @since 6.8
+ */
+ public static final boolean DEFAULT_PRESERVE_VIRTUAL_KEYWORD = true;
+
+ /**
* Returns the node in the preference in the given context.
*
* @param key The preference key.
diff --git a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CCorePreferenceInitializer.java b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CCorePreferenceInitializer.java
index f76419e5a7..08be850207 100644
--- a/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CCorePreferenceInitializer.java
+++ b/core/org.eclipse.cdt.core/src/org/eclipse/cdt/internal/core/CCorePreferenceInitializer.java
@@ -94,5 +94,9 @@ public class CCorePreferenceInitializer extends AbstractPreferenceInitializer {
CCorePreferenceConstants.DEFAULT_SCALABILITY_MAXIMUM_TOKENS);
defaultPreferences.putBoolean(CCorePreferenceConstants.PLACE_CONST_RIGHT_OF_TYPE,
CCorePreferenceConstants.DEFAULT_PLACE_CONST_RIGHT_OF_TYPE);
+ defaultPreferences.putBoolean(CCorePreferenceConstants.ADD_OVERRIDE_KEYWORD,
+ CCorePreferenceConstants.DEFAULT_ADD_OVERRIDE_KEYWORD);
+ defaultPreferences.putBoolean(CCorePreferenceConstants.PRESERVE_VIRTUAL_KEYWORD,
+ CCorePreferenceConstants.DEFAULT_PRESERVE_VIRTUAL_KEYWORD);
}
}

Back to the top