import java.util.HashMap;
-import net.sourceforge.phpdt.sql.PHPEclipseSQLPlugin;
-
import org.eclipse.jface.preference.IPreferenceStore;
import org.eclipse.jface.preference.PreferenceConverter;
import org.eclipse.jface.text.IDocument;
import org.eclipse.swt.graphics.Color;
import org.eclipse.swt.graphics.RGB;
+import net.sourceforge.phpdt.sql.PHPEclipseSQLPlugin;
+
public class SQLConfiguration extends SourceViewerConfiguration {
private PresentationReconciler reconciler = new PresentationReconciler();
private ColorManager colorManager;
}
public void loadPrefs() {
IPreferenceStore store = PHPEclipseSQLPlugin.getDefault().getPreferenceStore();
- textBold = store.getBoolean("quantum.text.bold");
- keywordBold = store.getBoolean("quantum.keyword.bold");
- stringBold = store.getBoolean("quantum.string.bold");
- commentBold = store.getBoolean("quantum.comment.bold");
- numericBold = store.getBoolean("quantum.numeric.bold");
- SQLColorConstants.BACKGROUND = PreferenceConverter.getColor(store, "quantum.background.color");
- SQLColorConstants.DEFAULT = PreferenceConverter.getColor(store, "quantum.text.color");
- SQLColorConstants.IDENTIFIER = PreferenceConverter.getColor(store, "quantum.text.color");
- SQLColorConstants.KEYWORD = PreferenceConverter.getColor(store, "quantum.keyword.color");
- SQLColorConstants.STRING = PreferenceConverter.getColor(store, "quantum.string.color");
- SQLColorConstants.COMMENT = PreferenceConverter.getColor(store, "quantum.comment.color");
- SQLColorConstants.NUMERIC = PreferenceConverter.getColor(store, "quantum.numeric.color");
+ textBold = store.getBoolean("phpeclipse.sql.text.bold");
+ keywordBold = store.getBoolean("phpeclipse.sql.keyword.bold");
+ stringBold = store.getBoolean("phpeclipse.sql.string.bold");
+ commentBold = store.getBoolean("phpeclipse.sql.comment.bold");
+ numericBold = store.getBoolean("phpeclipse.sql.numeric.bold");
+ SQLColorConstants.BACKGROUND = PreferenceConverter.getColor(store, "phpeclipse.sql.background.color");
+ SQLColorConstants.DEFAULT = PreferenceConverter.getColor(store, "phpeclipse.sql.text.color");
+ SQLColorConstants.IDENTIFIER = PreferenceConverter.getColor(store, "phpeclipse.sql.text.color");
+ SQLColorConstants.KEYWORD = PreferenceConverter.getColor(store, "phpeclipse.sql.keyword.color");
+ SQLColorConstants.STRING = PreferenceConverter.getColor(store, "phpeclipse.sql.string.color");
+ SQLColorConstants.COMMENT = PreferenceConverter.getColor(store, "phpeclipse.sql.comment.color");
+ SQLColorConstants.NUMERIC = PreferenceConverter.getColor(store, "phpeclipse.sql.numeric.color");
}
public void initializeColors() {
setDamageRepairer(getAttr(SQLColorConstants.KEYWORD, keywordBold), SQLPartitionScanner.SQL_KEYWORD);
setDamageRepairer(getAttr(SQLColorConstants.NUMERIC, numericBold), SQLPartitionScanner.SQL_NUMERIC);
}
public TextAttribute getAttr(RGB color, boolean bold) {
- Color background = colorManager.getColor(SQLColorConstants.BACKGROUND);
+ colorManager.getColor(SQLColorConstants.BACKGROUND);
Color foreground = colorManager.getColor(color);
TextAttribute attr = new TextAttribute(foreground);
if (bold) {