1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-29 20:05:35 +02:00

last changes for runtime.compatiblity dependency removal

This commit is contained in:
David Inglis 2004-06-10 17:38:50 +00:00
parent 949c41775e
commit 47dd3dc302
7 changed files with 85 additions and 53 deletions

View file

@ -13,7 +13,6 @@
</runtime>
<requires>
<import plugin="org.eclipse.core.runtime.compatibility"/>
</requires>

View file

@ -87,12 +87,11 @@ public class CCorePlugin extends Plugin {
public final static String BUILD_SCANNER_INFO_SIMPLE_ID = "ScannerInfoProvider"; //$NON-NLS-1$
public final static String BUILD_SCANNER_INFO_UNIQ_ID = PLUGIN_ID + "." + BUILD_SCANNER_INFO_SIMPLE_ID; //$NON-NLS-1$
/**
* Possible configurable option ID.
* @see #getDefaultOptions
*/
public static final String TRANSLATION_TASK_PRIORITIES = PLUGIN_ID + ".translation.taskPriorities"; //$NON-NLS-1$
/**
* Possible configurable option value for TRANSLATION_TASK_PRIORITIES.
* @see #getDefaultOptions
*/
public static final String TRANSLATION_TASK_PRIORITY_NORMAL = "NORMAL"; //$NON-NLS-1$
/**
* Possible configurable option value for TRANSLATION_TASK_PRIORITIES.
* @see #getDefaultOptions
@ -103,25 +102,6 @@ public class CCorePlugin extends Plugin {
* @see #getDefaultOptions
*/
public static final String TRANSLATION_TASK_PRIORITY_LOW = "LOW"; //$NON-NLS-1$
/**
* Possible configurable option value for TRANSLATION_TASK_PRIORITIES.
* @see #getDefaultOptions
*/
public static final String TRANSLATION_TASK_PRIORITY_NORMAL = "NORMAL"; //$NON-NLS-1$
/**
* Possible configurable option ID.
* @see #getDefaultOptions
*/
public static final String TRANSLATION_TASK_TAGS = PLUGIN_ID + ".translation.taskTags"; //$NON-NLS-1$
/**
* Default task tag
*/
public static final String DEFAULT_TASK_TAG = "TODO"; //$NON-NLS-1$
/**
* Default task priority
*/
public static final String DEFAULT_TASK_PRIORITY = TRANSLATION_TASK_PRIORITY_NORMAL;
/**
* Possible configurable option ID.
* @see #getDefaultOptions
@ -347,23 +327,6 @@ public class CCorePlugin extends Plugin {
}
/**
* Initializes the default preferences settings for this plug-in.
* TODO: Add all options here
*/
protected void initializeDefaultPluginPreferences()
{
Preferences preferences = getPluginPreferences();
HashSet optionNames = CModelManager.OptionNames;
// Compiler settings
preferences.setDefault(TRANSLATION_TASK_TAGS, DEFAULT_TASK_TAG);
optionNames.add(TRANSLATION_TASK_TAGS);
preferences.setDefault(TRANSLATION_TASK_PRIORITIES, DEFAULT_TASK_PRIORITY);
optionNames.add(TRANSLATION_TASK_PRIORITIES);
}
/**
* Helper method for returning one option value only. Equivalent to <code>(String)CCorePlugin.getOptions().get(optionName)</code>
* Note that it may answer <code>null</code> if this option does not exist.

View file

@ -0,0 +1,35 @@
/*******************************************************************************
* Copyright (c) 2004 QNX Software Systems and others. All rights reserved. This
* program and the accompanying materials are made available under the terms of
* the Common Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors: QNX Software Systems - initial API and implementation
******************************************************************************/
package org.eclipse.cdt.core;
public class CCorePreferenceConstants {
/**
* Possible configurable option ID.
* @see #getDefaultOptions
*/
public static final String TRANSLATION_TASK_TAGS = CCorePlugin.PLUGIN_ID + ".translation.taskTags"; //$NON-NLS-1$
/**
* Default task tag
*/
public static final String DEFAULT_TASK_TAG = "TODO"; //$NON-NLS-1$
/**
* Default task priority
*/
public static final String DEFAULT_TASK_PRIORITY = CCorePlugin.TRANSLATION_TASK_PRIORITY_NORMAL;
/**
* Possible configurable option ID.
* @see #getDefaultOptions
*/
public static final String TRANSLATION_TASK_PRIORITIES = CCorePlugin.PLUGIN_ID + ".translation.taskPriorities"; //$NON-NLS-1$
}

View file

@ -0,0 +1,37 @@
/*******************************************************************************
* Copyright (c) 2004 QNX Software Systems and others. All rights reserved. This
* program and the accompanying materials are made available under the terms of
* the Common Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors: QNX Software Systems - initial API and implementation
******************************************************************************/
package org.eclipse.cdt.internal.core;
import java.util.HashSet;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.CCorePreferenceConstants;
import org.eclipse.cdt.internal.core.model.CModelManager;
import org.eclipse.core.runtime.Preferences;
import org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer;
public class CCorePreferenceInitializer extends AbstractPreferenceInitializer {
/* (non-Javadoc)
* @see org.eclipse.core.runtime.preferences.AbstractPreferenceInitializer#initializeDefaultPreferences()
*/
public void initializeDefaultPreferences() {
Preferences preferences = CCorePlugin.getDefault().getPluginPreferences();
HashSet optionNames = CModelManager.OptionNames;
// Compiler settings
preferences.setDefault(CCorePreferenceConstants.TRANSLATION_TASK_TAGS, CCorePreferenceConstants.DEFAULT_TASK_TAG);
optionNames.add(CCorePreferenceConstants.TRANSLATION_TASK_TAGS);
preferences.setDefault(CCorePreferenceConstants.TRANSLATION_TASK_PRIORITIES, CCorePreferenceConstants.DEFAULT_TASK_PRIORITY);
optionNames.add(CCorePreferenceConstants.TRANSLATION_TASK_PRIORITIES);
}
}

View file

@ -11,6 +11,7 @@ import java.util.List;
import java.util.StringTokenizer;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.CCorePreferenceConstants;
import org.eclipse.cdt.core.filetype.ICFileType;
import org.eclipse.cdt.core.model.CModelException;
import org.eclipse.cdt.core.model.CoreModel;
@ -136,7 +137,7 @@ public class CEditor extends TextEditor implements ISelectionChangedListener, IS
public final static String LINKED_POSITION_COLOR = "linkedPositionColor"; //$NON-NLS-1$
/** Preference key for compiler task tags */
private final static String TRANSLATION_TASK_TAGS= CCorePlugin.TRANSLATION_TASK_TAGS;
private final static String TRANSLATION_TASK_TAGS= CCorePreferenceConstants.TRANSLATION_TASK_TAGS;
/** Preference key for hyperlink enablement */
public final static String HYPERLINK_ENABLED = "hyperlinkEnable"; //$NON-NLS-1$

View file

@ -27,6 +27,7 @@ import org.eclipse.jface.viewers.ITableLabelProvider;
import org.eclipse.jface.viewers.LabelProvider;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.core.CCorePreferenceConstants;
import org.eclipse.cdt.core.model.ICProject;
import org.eclipse.cdt.internal.ui.dialogs.StatusInfo;
@ -43,8 +44,8 @@ import org.eclipse.cdt.internal.ui.dialogs.IStatusChangeListener;
*/
public class TodoTaskConfigurationBlock extends OptionsConfigurationBlock {
private static final String PREF_TRANSLATION_TASK_TAGS= CCorePlugin.TRANSLATION_TASK_TAGS;
private static final String PREF_TRANSLATION_TASK_PRIORITIES= CCorePlugin.TRANSLATION_TASK_PRIORITIES;
private static final String PREF_TRANSLATION_TASK_TAGS= CCorePreferenceConstants.TRANSLATION_TASK_TAGS;
private static final String PREF_TRANSLATION_TASK_PRIORITIES= CCorePreferenceConstants.TRANSLATION_TASK_PRIORITIES;
private static final String PRIORITY_HIGH= CCorePlugin.TRANSLATION_TASK_PRIORITY_HIGH;
private static final String PRIORITY_NORMAL= CCorePlugin.TRANSLATION_TASK_PRIORITY_NORMAL;

View file

@ -15,12 +15,8 @@ import java.util.ArrayList;
import java.util.List;
import java.util.StringTokenizer;
import org.eclipse.cdt.core.CCorePreferenceConstants;
import org.eclipse.core.runtime.Preferences;
import org.eclipse.cdt.core.CCorePlugin;
import org.eclipse.cdt.internal.ui.text.IColorManager;
import org.eclipse.cdt.internal.ui.text.ICColorConstants;
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.text.rules.IToken;
import org.eclipse.jface.text.rules.IWordDetector;
@ -78,7 +74,7 @@ public class CCommentScanner extends AbstractCScanner
}
}
private static final String TRANSLATION_TASK_TAGS= CCorePlugin.TRANSLATION_TASK_TAGS;
private static final String TRANSLATION_TASK_TAGS= CCorePreferenceConstants.TRANSLATION_TASK_TAGS;
protected static final String TASK_TAG= ICColorConstants.TASK_TAG;
private TaskTagRule fTaskTagRule;