mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-07-26 10:25:32 +02:00
cosmetics - deprecated usage, override annotations, indentations
This commit is contained in:
parent
11ea0ed928
commit
0419dcde0f
1 changed files with 74 additions and 67 deletions
|
@ -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
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
|
@ -130,6 +130,7 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
|||
|
||||
protected boolean visible;
|
||||
|
||||
@Override
|
||||
public void createControls(Composite _parent, ICPropertyProvider _provider) {
|
||||
page = _provider;
|
||||
createControls(_parent);
|
||||
|
@ -214,7 +215,8 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
|||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
buttonPressed(event);
|
||||
}});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -227,10 +229,10 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
|||
}
|
||||
|
||||
/**
|
||||
* Disposes the SWT resources allocated by this
|
||||
* dialog page.
|
||||
* Disposes the SWT resources allocated by this dialog page.
|
||||
*/
|
||||
public void dispose() {}
|
||||
public void dispose() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the visibility of this property tab.
|
||||
|
@ -260,7 +262,6 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
|||
protected void performOK() {}
|
||||
|
||||
/**
|
||||
*
|
||||
* @param e - event to be handled
|
||||
*/
|
||||
private void buttonPressed(SelectionEvent e) {
|
||||
|
@ -366,9 +367,10 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
|||
b.addSelectionListener(new SelectionAdapter() {
|
||||
@Override
|
||||
public void widgetSelected(SelectionEvent event) {
|
||||
setGrayed((Button)event.widget, false);
|
||||
((Button) event.widget).setGrayed(false);
|
||||
checkPressed(event);
|
||||
}});
|
||||
}
|
||||
});
|
||||
return b;
|
||||
}
|
||||
|
||||
|
@ -384,7 +386,8 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
|||
* else if (b.equals(mySecondCheckbox) { ... }
|
||||
* ... }
|
||||
*/
|
||||
protected void checkPressed(SelectionEvent e) {}
|
||||
protected void checkPressed(SelectionEvent e) {
|
||||
}
|
||||
|
||||
protected void setupControl(Control c, int span, int mode) {
|
||||
// although we use GridLayout usually,
|
||||
|
@ -477,6 +480,7 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
|||
}
|
||||
dialog.setInitialSelection(container);
|
||||
dialog.setValidator(new ISelectionStatusValidator() {
|
||||
@Override
|
||||
public IStatus validate(Object[] selection) {
|
||||
if (selection != null)
|
||||
if (selection.length > 0)
|
||||
|
@ -494,6 +498,7 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
|||
}
|
||||
dialog.setInitialSelection(resource);
|
||||
dialog.setValidator(new ISelectionStatusValidator() {
|
||||
@Override
|
||||
public IStatus validate(Object[] selection) {
|
||||
if (selection != null)
|
||||
if (selection.length > 0)
|
||||
|
@ -523,6 +528,7 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
|||
/**
|
||||
* Common event handler: called by parent for each tab
|
||||
*/
|
||||
@Override
|
||||
public void handleTabEvent (int kind, Object data) {
|
||||
switch(kind) {
|
||||
case ICPropertyTab.OK:
|
||||
|
@ -562,6 +568,7 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
|||
|
||||
// By default, returns true (no visibility restriction)
|
||||
// But several pages should rewrite this functionality.
|
||||
@Override
|
||||
public boolean canBeVisible() {
|
||||
return true;
|
||||
}
|
||||
|
@ -598,16 +605,16 @@ public abstract class AbstractCPropertyTab implements ICPropertyTab {
|
|||
public static void setTriSelection(Button b, int state) {
|
||||
switch (state) {
|
||||
case TRI_NO:
|
||||
setGrayed(b, false);
|
||||
b.setGrayed(false);
|
||||
b.setSelection(false);
|
||||
break;
|
||||
case TRI_YES:
|
||||
setGrayed(b, false);
|
||||
b.setGrayed(false);
|
||||
b.setSelection(true);
|
||||
break;
|
||||
case TRI_UNKNOWN:
|
||||
b.setGrayed(true);
|
||||
b.setSelection(true);
|
||||
setGrayed(b, true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue