mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-08 02:06:01 +02:00
Fix warnings
This commit is contained in:
parent
19c97c7afd
commit
1aaa1cbdf6
2 changed files with 14 additions and 16 deletions
|
@ -53,8 +53,6 @@ public class ScalabilityPreferencePage extends PreferencePage implements
|
||||||
// Files with this number of lines will trigger scalability mode
|
// Files with this number of lines will trigger scalability mode
|
||||||
private IntegerFieldEditor fLinesToTrigger;
|
private IntegerFieldEditor fLinesToTrigger;
|
||||||
|
|
||||||
private Button fAlertMe;
|
|
||||||
|
|
||||||
private Button fEnableAll;
|
private Button fEnableAll;
|
||||||
|
|
||||||
private Button fReconciler;
|
private Button fReconciler;
|
||||||
|
@ -74,7 +72,7 @@ public class ScalabilityPreferencePage extends PreferencePage implements
|
||||||
|
|
||||||
public ScalabilityPreferencePage() {
|
public ScalabilityPreferencePage() {
|
||||||
setPreferenceStore(PreferenceConstants.getPreferenceStore());
|
setPreferenceStore(PreferenceConstants.getPreferenceStore());
|
||||||
setDescription(PreferencesMessages.ScalabilityPreferencePage_description);
|
setDescription(PreferencesMessages.ScalabilityPreferencePage_description);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -106,7 +104,7 @@ public class ScalabilityPreferencePage extends PreferencePage implements
|
||||||
SelectionListener listener= (SelectionListener)iter.next();
|
SelectionListener listener= (SelectionListener)iter.next();
|
||||||
listener.widgetSelected(null);
|
listener.widgetSelected(null);
|
||||||
}
|
}
|
||||||
fLinesToTrigger.setStringValue(Integer.toString(prefs.getInt(PreferenceConstants.SCALABILITY_NUMBER_OF_LINES)));
|
fLinesToTrigger.setStringValue(Integer.toString(prefs.getInt(PreferenceConstants.SCALABILITY_NUMBER_OF_LINES)));
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -116,7 +114,7 @@ public class ScalabilityPreferencePage extends PreferencePage implements
|
||||||
public void createControl(Composite parent) {
|
public void createControl(Composite parent) {
|
||||||
super.createControl(parent);
|
super.createControl(parent);
|
||||||
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), ICHelpContextIds.SCALABILITY_PREFERENCE_PAGE);
|
PlatformUI.getWorkbench().getHelpSystem().setHelp(getControl(), ICHelpContextIds.SCALABILITY_PREFERENCE_PAGE);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see PreferencePage#createContents(Composite)
|
* @see PreferencePage#createContents(Composite)
|
||||||
|
@ -140,14 +138,14 @@ public class ScalabilityPreferencePage extends PreferencePage implements
|
||||||
|
|
||||||
createDetectionSettings(composite);
|
createDetectionSettings(composite);
|
||||||
|
|
||||||
new Separator().doFillIntoGrid(composite, nColumns);
|
new Separator().doFillIntoGrid(composite, nColumns);
|
||||||
|
|
||||||
createScalabilityModeSettings(composite);
|
createScalabilityModeSettings(composite);
|
||||||
|
|
||||||
new Separator().doFillIntoGrid(composite, nColumns);
|
new Separator().doFillIntoGrid(composite, nColumns);
|
||||||
|
|
||||||
String noteTitle= PreferencesMessages.ScalabilityPreferencePage_note;
|
String noteTitle= PreferencesMessages.ScalabilityPreferencePage_note;
|
||||||
String noteMessage= PreferencesMessages.ScalabilityPreferencePage_preferenceOnlyForNewViews;
|
String noteMessage= PreferencesMessages.ScalabilityPreferencePage_preferenceOnlyForNewViews;
|
||||||
Composite noteControl= createNoteComposite(JFaceResources.getDialogFont(), composite, noteTitle, noteMessage);
|
Composite noteControl= createNoteComposite(JFaceResources.getDialogFont(), composite, noteTitle, noteMessage);
|
||||||
GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL);
|
GridData gd= new GridData(GridData.HORIZONTAL_ALIGN_FILL);
|
||||||
gd.horizontalSpan= 2;
|
gd.horizontalSpan= 2;
|
||||||
|
@ -179,7 +177,7 @@ public class ScalabilityPreferencePage extends PreferencePage implements
|
||||||
*/
|
*/
|
||||||
private void createDetectionSettings( Composite parent ) {
|
private void createDetectionSettings( Composite parent ) {
|
||||||
Composite group = createGroupComposite( parent, 1, PreferencesMessages.ScalabilityPreferencePage_detection_group_label );
|
Composite group = createGroupComposite( parent, 1, PreferencesMessages.ScalabilityPreferencePage_detection_group_label );
|
||||||
fAlertMe = createCheckButton(group, PreferencesMessages.ScalabilityPreferencePage_detection_label,PreferenceConstants.SCALABILITY_ALERT);
|
createCheckButton(group, PreferencesMessages.ScalabilityPreferencePage_detection_label,PreferenceConstants.SCALABILITY_ALERT);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -198,7 +196,7 @@ public class ScalabilityPreferencePage extends PreferencePage implements
|
||||||
fLinesToTrigger.setValidRange( 1, Integer.MAX_VALUE );
|
fLinesToTrigger.setValidRange( 1, Integer.MAX_VALUE );
|
||||||
String minValue = Integer.toString( 1 );
|
String minValue = Integer.toString( 1 );
|
||||||
String maxValue = Integer.toString( Integer.MAX_VALUE );
|
String maxValue = Integer.toString( Integer.MAX_VALUE );
|
||||||
fLinesToTrigger.setErrorMessage( MessageFormat.format(PreferencesMessages.ScalabilityPreferencePage_error, new String[]{ minValue, maxValue } ) );
|
fLinesToTrigger.setErrorMessage( MessageFormat.format(PreferencesMessages.ScalabilityPreferencePage_error, new Object[]{ minValue, maxValue } ) );
|
||||||
fLinesToTrigger.load();
|
fLinesToTrigger.load();
|
||||||
fLinesToTrigger.setPropertyChangeListener( new IPropertyChangeListener() {
|
fLinesToTrigger.setPropertyChangeListener( new IPropertyChangeListener() {
|
||||||
|
|
||||||
|
@ -224,7 +222,7 @@ public class ScalabilityPreferencePage extends PreferencePage implements
|
||||||
private static void indent(Control control) {
|
private static void indent(Control control) {
|
||||||
GridData gridData= new GridData();
|
GridData gridData= new GridData();
|
||||||
gridData.horizontalIndent= 20;
|
gridData.horizontalIndent= 20;
|
||||||
control.setLayoutData(gridData);
|
control.setLayoutData(gridData);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void createDependency(final Button master, String masterKey, final Control slave) {
|
private void createDependency(final Button master, String masterKey, final Control slave) {
|
||||||
|
@ -271,7 +269,7 @@ public class ScalabilityPreferencePage extends PreferencePage implements
|
||||||
prefs.setValue(PreferenceConstants.SCALABILITY_NUMBER_OF_LINES, fLinesToTrigger.getIntValue());
|
prefs.setValue(PreferenceConstants.SCALABILITY_NUMBER_OF_LINES, fLinesToTrigger.getIntValue());
|
||||||
CUIPlugin.getDefault().savePluginPreferences();
|
CUIPlugin.getDefault().savePluginPreferences();
|
||||||
return super.performOk();
|
return super.performOk();
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* @see PreferencePage#performDefaults()
|
* @see PreferencePage#performDefaults()
|
||||||
|
@ -293,6 +291,6 @@ public class ScalabilityPreferencePage extends PreferencePage implements
|
||||||
SelectionListener listener= (SelectionListener)iter.next();
|
SelectionListener listener= (SelectionListener)iter.next();
|
||||||
listener.widgetSelected(null);
|
listener.widgetSelected(null);
|
||||||
}
|
}
|
||||||
fLinesToTrigger.setStringValue(Integer.toString(prefs.getDefaultInt(PreferenceConstants.SCALABILITY_NUMBER_OF_LINES)));
|
fLinesToTrigger.setStringValue(Integer.toString(prefs.getDefaultInt(PreferenceConstants.SCALABILITY_NUMBER_OF_LINES)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -561,7 +561,7 @@ public class CSourceViewerConfiguration extends TextSourceViewerConfiguration {
|
||||||
/**
|
/**
|
||||||
* Returns the ICProject associated with this CSourceViewerConfiguration, or null if
|
* Returns the ICProject associated with this CSourceViewerConfiguration, or null if
|
||||||
* no ICProject could be determined
|
* no ICProject could be determined
|
||||||
* @return
|
* @return the ICProject or <code>null</code>
|
||||||
*/
|
*/
|
||||||
protected ICProject getCProject() {
|
protected ICProject getCProject() {
|
||||||
ITextEditor editor= getEditor();
|
ITextEditor editor= getEditor();
|
||||||
|
@ -636,7 +636,7 @@ public class CSourceViewerConfiguration extends TextSourceViewerConfiguration {
|
||||||
public int[] getConfiguredTextHoverStateMasks(ISourceViewer sourceViewer, String contentType) {
|
public int[] getConfiguredTextHoverStateMasks(ISourceViewer sourceViewer, String contentType) {
|
||||||
CEditorTextHoverDescriptor[] hoverDescs= CUIPlugin.getDefault().getCEditorTextHoverDescriptors();
|
CEditorTextHoverDescriptor[] hoverDescs= CUIPlugin.getDefault().getCEditorTextHoverDescriptors();
|
||||||
int stateMasks[]= new int[hoverDescs.length];
|
int stateMasks[]= new int[hoverDescs.length];
|
||||||
int stateMasksLength= 0;
|
int stateMasksLength= 0;
|
||||||
for (CEditorTextHoverDescriptor hoverDesc : hoverDescs) {
|
for (CEditorTextHoverDescriptor hoverDesc : hoverDescs) {
|
||||||
if (hoverDesc.isEnabled()) {
|
if (hoverDesc.isEnabled()) {
|
||||||
int j= 0;
|
int j= 0;
|
||||||
|
@ -932,7 +932,7 @@ public class CSourceViewerConfiguration extends TextSourceViewerConfiguration {
|
||||||
protected IInformationControlCreator getMacroExplorationControlCreator() {
|
protected IInformationControlCreator getMacroExplorationControlCreator() {
|
||||||
final IInformationControlCreator conrolCreator = new IInformationControlCreator() {
|
final IInformationControlCreator conrolCreator = new IInformationControlCreator() {
|
||||||
public IInformationControl createInformationControl(Shell parent) {
|
public IInformationControl createInformationControl(Shell parent) {
|
||||||
return new CMacroExpansionExplorationControl(parent);
|
return new CMacroExpansionExplorationControl(parent);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
return conrolCreator;
|
return conrolCreator;
|
||||||
|
|
Loading…
Add table
Reference in a new issue