1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-08-10 01:35:39 +02:00

Terminal: Bug 435360 - [TERMINALS] [CSS] [Dark] Terminal view should

integrate well into the Eclipse dark theme


Signed-off-by: Lars Vogel <Lars.Vogel@gmail.com>
This commit is contained in:
Lars Vogel 2014-06-04 14:44:03 +02:00 committed by Uwe Stieber
parent 57f40bf1de
commit ee07ae74f0
4 changed files with 34 additions and 14 deletions

View file

@ -27,14 +27,13 @@ bin.includes = .,\
about.properties,\
tm32.png,\
icons/,\
HelpContexts.xml
HelpContexts.xml,\
css/
source.. = src/
output.. = bin/
src.includes = schema/,\
about.html,\
.settings/,\
build.properties
about.html
javacSource=1.4
javacTarget=1.4

View file

@ -0,0 +1,15 @@
/*******************************************************************************
* Copyright (c) 2014 vogella GmbH 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:
* Lars Vogel <Lars.Vogel@gmail.com> - initial API and implementation
******************************************************************************/
IEclipsePreferences {
preferences:
"TerminalPrefInvertColors=true"
}

View file

@ -229,21 +229,20 @@
sequence="M3+ARROW_UP"/>
</extension>
<extension
point="org.eclipse.ui.preferencePages">
<extension point="org.eclipse.ui.preferencePages">
<page
name="%terminal.preferences.name"
class="org.eclipse.tm.internal.terminal.preferences.TerminalPreferencePage"
id="org.eclipse.tm.terminal.TerminalPreferencePage">
</page>
</extension>
<extension
point="org.eclipse.core.runtime.preferences">
<extension point="org.eclipse.core.runtime.preferences">
<initializer class="org.eclipse.tm.internal.terminal.preferences.TerminalPreferenceInitializer"/>
<modifier class="org.eclipse.tm.internal.terminal.preferences.PreferenceModifyListener"/>
</extension>
<extension
point="org.eclipse.ui.themes" id="terminal.font">
<extension point="org.eclipse.ui.themes" id="terminal.font">
<fontDefinition
defaultsTo="org.eclipse.jface.textfont"
id="terminal.views.view.font.definition"
@ -253,5 +252,13 @@
</description>
</fontDefinition>
</extension>
<!-- Theme contributions -->
<extension point="org.eclipse.e4.ui.css.swt.theme">
<stylesheet
uri="css/org.eclipse.tm.terminal.stylesheet.dark.css">
<themeid refid="org.eclipse.e4.ui.css.theme.e4_dark"/>
</stylesheet>
</extension>
</plugin>

View file

@ -24,8 +24,7 @@ public class TerminalPreferenceInitializer extends AbstractPreferenceInitializer
}
public void initializeDefaultPreferences() {
//DefaultScope.INSTANCE was only added in Eclipse 3.7 - we want to be compatible further back
IEclipsePreferences defaultPrefs = new DefaultScope().getNode(TerminalPlugin.PLUGIN_ID);
IEclipsePreferences defaultPrefs = DefaultScope.INSTANCE.getNode(TerminalPlugin.PLUGIN_ID);
defaultPrefs.putBoolean(ITerminalConstants.PREF_INVERT_COLORS, ITerminalConstants.DEFAULT_INVERT_COLORS);
defaultPrefs.putInt(ITerminalConstants.PREF_BUFFERLINES, ITerminalConstants.DEFAULT_BUFFERLINES);
migrateTerminalPreferences();
@ -36,10 +35,10 @@ public class TerminalPreferenceInitializer extends AbstractPreferenceInitializer
*/
public static void migrateTerminalPreferences() {
//InstanceScope.INSTANCE was only added in Eclipse 3.7 - we want to be compatible further back
IEclipsePreferences prefs = new InstanceScope().getNode(TerminalPlugin.PLUGIN_ID);
IEclipsePreferences prefs = InstanceScope.INSTANCE.getNode(TerminalPlugin.PLUGIN_ID);
if (!prefs.getBoolean(ITerminalConstants.PREF_HAS_MIGRATED, false)) {
prefs.putBoolean(ITerminalConstants.PREF_HAS_MIGRATED, true);
PreferenceModifyListener.migrateTerminalPreferences(new InstanceScope().getNode("")); //$NON-NLS-1$
PreferenceModifyListener.migrateTerminalPreferences(InstanceScope.INSTANCE.getNode("")); //$NON-NLS-1$
}
}