1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-26 18:35:32 +02:00

cosmetics - deprecated usage, override annotations, indentations

This commit is contained in:
Andrew Gvozdev 2011-11-08 13:10:24 -05:00
parent 11ea0ed928
commit 0419dcde0f

View file

@ -1,5 +1,5 @@
/******************************************************************************* /*******************************************************************************
* Copyright (c) 2007, 2010 Intel Corporation and others. * Copyright (c) 2007, 2011 Intel 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
@ -130,6 +130,7 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
protected boolean visible; protected boolean visible;
@Override
public void createControls(Composite _parent, ICPropertyProvider _provider) { public void createControls(Composite _parent, ICPropertyProvider _provider) {
page = _provider; page = _provider;
createControls(_parent); createControls(_parent);
@ -214,7 +215,8 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
@Override @Override
public void widgetSelected(SelectionEvent event) { public void widgetSelected(SelectionEvent event) {
buttonPressed(event); buttonPressed(event);
}}); }
});
} }
} }
@ -227,10 +229,10 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
} }
/** /**
* Disposes the SWT resources allocated by this * Disposes the SWT resources allocated by this dialog page.
* dialog page.
*/ */
public void dispose() {} public void dispose() {
}
/** /**
* Sets the visibility of this property tab. * Sets the visibility of this property tab.
@ -260,7 +262,6 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
protected void performOK() {} protected void performOK() {}
/** /**
*
* @param e - event to be handled * @param e - event to be handled
*/ */
private void buttonPressed(SelectionEvent e) { private void buttonPressed(SelectionEvent e) {
@ -366,9 +367,10 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
b.addSelectionListener(new SelectionAdapter() { b.addSelectionListener(new SelectionAdapter() {
@Override @Override
public void widgetSelected(SelectionEvent event) { public void widgetSelected(SelectionEvent event) {
setGrayed((Button)event.widget, false); ((Button) event.widget).setGrayed(false);
checkPressed(event); checkPressed(event);
}}); }
});
return b; return b;
} }
@ -384,7 +386,8 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
* else if (b.equals(mySecondCheckbox) { ... } * else if (b.equals(mySecondCheckbox) { ... }
* ... } * ... }
*/ */
protected void checkPressed(SelectionEvent e) {} protected void checkPressed(SelectionEvent e) {
}
protected void setupControl(Control c, int span, int mode) { protected void setupControl(Control c, int span, int mode) {
// although we use GridLayout usually, // although we use GridLayout usually,
@ -477,6 +480,7 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
} }
dialog.setInitialSelection(container); dialog.setInitialSelection(container);
dialog.setValidator(new ISelectionStatusValidator() { dialog.setValidator(new ISelectionStatusValidator() {
@Override
public IStatus validate(Object[] selection) { public IStatus validate(Object[] selection) {
if (selection != null) if (selection != null)
if (selection.length > 0) if (selection.length > 0)
@ -494,6 +498,7 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
} }
dialog.setInitialSelection(resource); dialog.setInitialSelection(resource);
dialog.setValidator(new ISelectionStatusValidator() { dialog.setValidator(new ISelectionStatusValidator() {
@Override
public IStatus validate(Object[] selection) { public IStatus validate(Object[] selection) {
if (selection != null) if (selection != null)
if (selection.length > 0) if (selection.length > 0)
@ -523,6 +528,7 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
/** /**
* Common event handler: called by parent for each tab * Common event handler: called by parent for each tab
*/ */
@Override
public void handleTabEvent (int kind, Object data) { public void handleTabEvent (int kind, Object data) {
switch(kind) { switch(kind) {
case ICPropertyTab.OK: case ICPropertyTab.OK:
@ -562,6 +568,7 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
// By default, returns true (no visibility restriction) // By default, returns true (no visibility restriction)
// But several pages should rewrite this functionality. // But several pages should rewrite this functionality.
@Override
public boolean canBeVisible() { public boolean canBeVisible() {
return true; return true;
} }
@ -598,16 +605,16 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
public static void setTriSelection(Button b, int state) { public static void setTriSelection(Button b, int state) {
switch (state) { switch (state) {
case TRI_NO: case TRI_NO:
setGrayed(b, false); b.setGrayed(false);
b.setSelection(false); b.setSelection(false);
break; break;
case TRI_YES: case TRI_YES:
setGrayed(b, false); b.setGrayed(false);
b.setSelection(true); b.setSelection(true);
break; break;
case TRI_UNKNOWN: case TRI_UNKNOWN:
b.setGrayed(true);
b.setSelection(true); b.setSelection(true);
setGrayed(b, true);
break; break;
} }
} }