mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
2004-05-19 Alain Magloire
Comply with Eclipse-3.0 and use the theme extension to change the CEditor text font. Move the CBuildConsole font in the same category.
This commit is contained in:
parent
6b63b8ab83
commit
1329b3aedf
4 changed files with 39 additions and 32 deletions
|
@ -1,3 +1,9 @@
|
|||
2004-05-19 Alain Magloire
|
||||
|
||||
Comply with Eclipse-3.0 and use the theme
|
||||
extension to change the CEditor text font.
|
||||
Move the CBuildConsole font in the same category.
|
||||
|
||||
2004-05-18 Bogdan Gheorghe
|
||||
Got rid of deprecated methods in CSearchResultPage and MouseClickListener.
|
||||
|
||||
|
|
|
@ -158,4 +158,11 @@ CDTIndexerProperty.name=C/C++ Indexer
|
|||
cDocumentFactory=C Document Factory
|
||||
cDocumentSetupParticipant=C Document Setup Participant
|
||||
|
||||
defaultPathContainerPage=Default Path Container
|
||||
defaultPathContainerPage=Default Path Container
|
||||
|
||||
## CEditor Fonts
|
||||
CEditorFontDefiniton.label= C/C++ Editor Text Font
|
||||
CEditorFontDefintion.description= The editor text font is used by C/C++ editors.
|
||||
#--- presentation
|
||||
CPresentation.label= C/C++
|
||||
CEditorPresentation.label= Editor
|
||||
|
|
|
@ -239,6 +239,7 @@
|
|||
icon="icons/full/obj16/c_file_obj.gif"
|
||||
class="org.eclipse.cdt.internal.ui.editor.CEditor"
|
||||
contributorClass="org.eclipse.cdt.internal.ui.editor.CEditorActionContributor"
|
||||
symbolicFontName="org.eclipse.cdt.ui.editors.textfont"
|
||||
id="org.eclipse.cdt.ui.editor.CEditor">
|
||||
</editor>
|
||||
<editor
|
||||
|
@ -249,6 +250,29 @@
|
|||
id="org.eclipse.cdt.ui.editor.asm.AsmEditor">
|
||||
</editor>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.ui.themes">
|
||||
<themeElementCategory label="%CPresentation.label" id="org.eclipse.cdt.ui.presentation"/>
|
||||
<themeElementCategory label="%CEditorPresentation.label" id="org.eclipse.cdt.ui.CEditor.presentation" parentId= "org.eclipse.cdt.ui.presentation"/>
|
||||
<fontDefinition
|
||||
label="%CEditorFontDefiniton.label"
|
||||
defaultsTo="org.eclipse.jface.textfont"
|
||||
categoryId="org.eclipse.cdt.ui.CEditor.presentation"
|
||||
id="org.eclipse.cdt.ui.editors.textfont">
|
||||
<description>
|
||||
%CEditorFontDefinition.description
|
||||
</description>
|
||||
</fontDefinition>
|
||||
<fontDefinition
|
||||
label="%BuildConsoleFontDefinition.label"
|
||||
defaultsTo="org.eclipse.jface.textfont"
|
||||
categoryId="org.eclipse.cdt.ui.presentation"
|
||||
id="org.eclipse.cdt.ui.buildconsole.ConsoleFont">
|
||||
<description>
|
||||
%BuildConsoleFontDefinition.description
|
||||
</description>
|
||||
</fontDefinition>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.ui.preferencePages">
|
||||
<page
|
||||
|
@ -592,17 +616,6 @@
|
|||
id="org.eclipse.cdt.ui.CElementWorkingSetPage">
|
||||
</workingSet>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.ui.fontDefinitions">
|
||||
<fontDefinition
|
||||
label="%BuildConsoleFontDefinition.label"
|
||||
defaultsTo="org.eclipse.jface.textfont"
|
||||
id="org.eclipse.cdt.ui.buildconsole.ConsoleFont">
|
||||
<description>
|
||||
%BuildConsoleFontDefinition.description
|
||||
</description>
|
||||
</fontDefinition>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.ui.editors.markerAnnotationSpecification">
|
||||
<specification
|
||||
|
|
|
@ -60,7 +60,6 @@ import org.eclipse.ui.IWorkbench;
|
|||
import org.eclipse.ui.IWorkbenchPreferencePage;
|
||||
import org.eclipse.ui.help.WorkbenchHelp;
|
||||
import org.eclipse.ui.texteditor.AbstractDecoratedTextEditorPreferenceConstants;
|
||||
import org.eclipse.ui.texteditor.WorkbenchChainedTextFontFieldEditor;
|
||||
|
||||
/*
|
||||
* The page for setting the editor options.
|
||||
|
@ -118,7 +117,6 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
}
|
||||
};
|
||||
|
||||
private WorkbenchChainedTextFontFieldEditor fFontEditor;
|
||||
protected List fList;
|
||||
protected ColorEditor fForegroundColorEditor;
|
||||
protected ColorEditor fBackgroundColorEditor;
|
||||
|
@ -215,8 +213,6 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
store.setDefault(AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLUMN, 80);
|
||||
PreferenceConverter.setDefault(store, AbstractDecoratedTextEditorPreferenceConstants.EDITOR_PRINT_MARGIN_COLOR, new RGB(176, 180, 185));
|
||||
|
||||
WorkbenchChainedTextFontFieldEditor.startPropagate(store, JFaceResources.TEXT_FONT);
|
||||
|
||||
color = display.getSystemColor(SWT.COLOR_LIST_FOREGROUND);
|
||||
PreferenceConverter.setDefault(store, CEditor.PREFERENCE_COLOR_FOREGROUND, color.getRGB());
|
||||
store.setDefault(CEditor.PREFERENCE_COLOR_FOREGROUND_SYSTEM_DEFAULT, true);
|
||||
|
@ -569,10 +565,7 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
layout.numColumns = 2;
|
||||
behaviorComposite.setLayout(layout);
|
||||
|
||||
String label = PreferencesMessages.getString("CEditorPreferencePage.behaviorPage.textFont"); //$NON-NLS-1$
|
||||
addTextFontEditor(behaviorComposite, label, JFaceResources.TEXT_FONT);
|
||||
|
||||
label = PreferencesMessages.getString("CEditorPreferencePage.behaviorPage.tabWidth"); //$NON-NLS-1$
|
||||
String label = PreferencesMessages.getString("CEditorPreferencePage.behaviorPage.tabWidth"); //$NON-NLS-1$
|
||||
addTextField(behaviorComposite, label, CSourceViewerConfiguration.PREFERENCE_TAB_WIDTH, 2, 0, true);
|
||||
|
||||
label = PreferencesMessages.getString("CEditorPreferencePage.behaviorPage.marginColumn"); //$NON-NLS-1$
|
||||
|
@ -793,10 +786,6 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
|
||||
private void initialize() {
|
||||
|
||||
fFontEditor.setPreferenceStore(getPreferenceStore());
|
||||
fFontEditor.setPreferencePage(this);
|
||||
fFontEditor.load();
|
||||
|
||||
initializeFields();
|
||||
|
||||
for (int i = 0; i < fListModel.length; i++)
|
||||
|
@ -858,7 +847,6 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
* @see PreferencePage#performOk()
|
||||
*/
|
||||
public boolean performOk() {
|
||||
fFontEditor.store();
|
||||
fOverlayStore.propagate();
|
||||
return true;
|
||||
}
|
||||
|
@ -868,8 +856,6 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
*/
|
||||
protected void performDefaults() {
|
||||
|
||||
fFontEditor.loadDefault();
|
||||
|
||||
fOverlayStore.loadDefaults();
|
||||
initializeFields();
|
||||
handleListSelection();
|
||||
|
@ -889,9 +875,6 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
fCTextTools = null;
|
||||
}
|
||||
|
||||
fFontEditor.setPreferencePage(null);
|
||||
fFontEditor.setPreferenceStore(null);
|
||||
|
||||
if (fOverlayStore != null) {
|
||||
fOverlayStore.stop();
|
||||
fOverlayStore = null;
|
||||
|
@ -1006,8 +989,6 @@ public class CEditorPreferencePage extends PreferencePage implements IWorkbenchP
|
|||
GridLayout layout = new GridLayout();
|
||||
layout.numColumns = 3;
|
||||
editorComposite.setLayout(layout);
|
||||
fFontEditor = new WorkbenchChainedTextFontFieldEditor(key, label, editorComposite);
|
||||
fFontEditor.setChangeButtonText(PreferencesMessages.getString("CEditorPreferencePage.textFont.changeButton")); //$NON-NLS-1$
|
||||
|
||||
GridData gd = new GridData(GridData.FILL_HORIZONTAL);
|
||||
gd.horizontalSpan = 2;
|
||||
|
|
Loading…
Add table
Reference in a new issue