mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-21 21:52:10 +02:00
Cosmetics.
Fix bad line endings in memory/**/*.java Change-Id: I34b4966b7d3fd965ea43b2f676b77ae9b7b4f2aa
This commit is contained in:
parent
9913afd1eb
commit
fb0df4a130
2 changed files with 1494 additions and 1494 deletions
File diff suppressed because it is too large
Load diff
|
@ -1,99 +1,99 @@
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
* Copyright (c) 2013 IBM Corporation and others.
|
* Copyright (c) 2013 IBM Corporation and others.
|
||||||
* All rights reserved. This program and the accompanying materials
|
* All rights reserved. This program and the accompanying materials
|
||||||
* are made available under the terms of the Eclipse Public License v1.0
|
* are made available under the terms of the Eclipse Public License v1.0
|
||||||
* which accompanies this distribution, and is available at
|
* which accompanies this distribution, and is available at
|
||||||
* http://www.eclipse.org/legal/epl-v10.html
|
* http://www.eclipse.org/legal/epl-v10.html
|
||||||
*
|
*
|
||||||
* Contributors:
|
* Contributors:
|
||||||
* IBM - Initial API and implementation
|
* IBM - Initial API and implementation
|
||||||
*******************************************************************************/
|
*******************************************************************************/
|
||||||
package org.eclipse.cdt.debug.ui.memory.traditional;
|
package org.eclipse.cdt.debug.ui.memory.traditional;
|
||||||
|
|
||||||
import org.eclipse.jface.preference.ColorSelector;
|
import org.eclipse.jface.preference.ColorSelector;
|
||||||
import org.eclipse.jface.preference.FieldEditor;
|
import org.eclipse.jface.preference.FieldEditor;
|
||||||
import org.eclipse.jface.preference.IPreferenceStore;
|
import org.eclipse.jface.preference.IPreferenceStore;
|
||||||
import org.eclipse.jface.preference.PreferenceConverter;
|
import org.eclipse.jface.preference.PreferenceConverter;
|
||||||
import org.eclipse.swt.SWT;
|
import org.eclipse.swt.SWT;
|
||||||
import org.eclipse.swt.layout.GridData;
|
import org.eclipse.swt.layout.GridData;
|
||||||
import org.eclipse.swt.widgets.Button;
|
import org.eclipse.swt.widgets.Button;
|
||||||
import org.eclipse.swt.widgets.Composite;
|
import org.eclipse.swt.widgets.Composite;
|
||||||
import org.eclipse.swt.widgets.Control;
|
import org.eclipse.swt.widgets.Control;
|
||||||
|
|
||||||
public class ColorAndEffectFieldEditor extends FieldEditor {
|
public class ColorAndEffectFieldEditor extends FieldEditor {
|
||||||
|
|
||||||
private final String nameBold;
|
private final String nameBold;
|
||||||
private final String nameItalic;
|
private final String nameItalic;
|
||||||
private final String nameBox;
|
private final String nameBox;
|
||||||
|
|
||||||
private ColorSelector colorSelector;
|
private ColorSelector colorSelector;
|
||||||
private Button checkBold;
|
private Button checkBold;
|
||||||
private Button checkItalic;
|
private Button checkItalic;
|
||||||
private Button checkBox; // :)
|
private Button checkBox; // :)
|
||||||
|
|
||||||
public ColorAndEffectFieldEditor(String name, String nameBold, String nameItalic, String nameBox, String labelText, Composite parent) {
|
public ColorAndEffectFieldEditor(String name, String nameBold, String nameItalic, String nameBox, String labelText, Composite parent) {
|
||||||
super(name, labelText, parent);
|
super(name, labelText, parent);
|
||||||
this.nameBold = nameBold;
|
this.nameBold = nameBold;
|
||||||
this.nameItalic = nameItalic;
|
this.nameItalic = nameItalic;
|
||||||
this.nameBox = nameBox;
|
this.nameBox = nameBox;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void adjustForNumColumns(int numColumns) {
|
protected void adjustForNumColumns(int numColumns) {
|
||||||
((GridData) checkItalic.getLayoutData()).horizontalSpan = numColumns - 4;
|
((GridData) checkItalic.getLayoutData()).horizontalSpan = numColumns - 4;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void doFillIntoGrid(Composite parent, int numColumns) {
|
protected void doFillIntoGrid(Composite parent, int numColumns) {
|
||||||
Control control = getLabelControl(parent);
|
Control control = getLabelControl(parent);
|
||||||
control.setLayoutData(new GridData());
|
control.setLayoutData(new GridData());
|
||||||
|
|
||||||
colorSelector = new ColorSelector(parent);
|
colorSelector = new ColorSelector(parent);
|
||||||
colorSelector.getButton().setLayoutData(new GridData());
|
colorSelector.getButton().setLayoutData(new GridData());
|
||||||
|
|
||||||
checkBold = new Button(parent, SWT.CHECK);
|
checkBold = new Button(parent, SWT.CHECK);
|
||||||
checkBold.setText(TraditionalRenderingMessages.getString("ColorAndEffectFieldEditor.bold"));
|
checkBold.setText(TraditionalRenderingMessages.getString("ColorAndEffectFieldEditor.bold"));
|
||||||
checkBold.setLayoutData(new GridData());
|
checkBold.setLayoutData(new GridData());
|
||||||
|
|
||||||
checkItalic = new Button(parent, SWT.CHECK);
|
checkItalic = new Button(parent, SWT.CHECK);
|
||||||
checkItalic.setText(TraditionalRenderingMessages.getString("ColorAndEffectFieldEditor.italic"));
|
checkItalic.setText(TraditionalRenderingMessages.getString("ColorAndEffectFieldEditor.italic"));
|
||||||
checkItalic.setLayoutData(new GridData());
|
checkItalic.setLayoutData(new GridData());
|
||||||
|
|
||||||
checkBox = new Button(parent, SWT.CHECK);
|
checkBox = new Button(parent, SWT.CHECK);
|
||||||
checkBox.setText(TraditionalRenderingMessages.getString("ColorAndEffectFieldEditor.box"));
|
checkBox.setText(TraditionalRenderingMessages.getString("ColorAndEffectFieldEditor.box"));
|
||||||
checkBox.setLayoutData(new GridData());
|
checkBox.setLayoutData(new GridData());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void doLoad() {
|
protected void doLoad() {
|
||||||
IPreferenceStore store = getPreferenceStore();
|
IPreferenceStore store = getPreferenceStore();
|
||||||
colorSelector.setColorValue(PreferenceConverter.getColor(store, getPreferenceName()));
|
colorSelector.setColorValue(PreferenceConverter.getColor(store, getPreferenceName()));
|
||||||
checkBold.setSelection(store.getBoolean(nameBold));
|
checkBold.setSelection(store.getBoolean(nameBold));
|
||||||
checkItalic.setSelection(store.getBoolean(nameItalic));
|
checkItalic.setSelection(store.getBoolean(nameItalic));
|
||||||
checkBox.setSelection(store.getBoolean(nameBox));
|
checkBox.setSelection(store.getBoolean(nameBox));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void doLoadDefault() {
|
protected void doLoadDefault() {
|
||||||
IPreferenceStore store = getPreferenceStore();
|
IPreferenceStore store = getPreferenceStore();
|
||||||
colorSelector.setColorValue(PreferenceConverter.getDefaultColor(store, getPreferenceName()));
|
colorSelector.setColorValue(PreferenceConverter.getDefaultColor(store, getPreferenceName()));
|
||||||
checkBold.setSelection(store.getDefaultBoolean(nameBold));
|
checkBold.setSelection(store.getDefaultBoolean(nameBold));
|
||||||
checkItalic.setSelection(store.getDefaultBoolean(nameItalic));
|
checkItalic.setSelection(store.getDefaultBoolean(nameItalic));
|
||||||
checkBox.setSelection(store.getDefaultBoolean(nameBox));
|
checkBox.setSelection(store.getDefaultBoolean(nameBox));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void doStore() {
|
protected void doStore() {
|
||||||
IPreferenceStore store = getPreferenceStore();
|
IPreferenceStore store = getPreferenceStore();
|
||||||
PreferenceConverter.setValue(store, getPreferenceName(), colorSelector.getColorValue());
|
PreferenceConverter.setValue(store, getPreferenceName(), colorSelector.getColorValue());
|
||||||
store.setValue(nameBold, checkBold.getSelection());
|
store.setValue(nameBold, checkBold.getSelection());
|
||||||
store.setValue(nameItalic, checkItalic.getSelection());
|
store.setValue(nameItalic, checkItalic.getSelection());
|
||||||
store.setValue(nameBox, checkBox.getSelection());
|
store.setValue(nameBox, checkBox.getSelection());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int getNumberOfControls() {
|
public int getNumberOfControls() {
|
||||||
return 5;
|
return 5;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue