Skip to main content
summaryrefslogtreecommitdiffstats
path: root/build
diff options
context:
space:
mode:
authorAndrew Gvozdev2010-04-30 01:40:47 -0400
committerAndrew Gvozdev2010-04-30 01:40:47 -0400
commit517fc29c6736bb517e7a01af0884eadda966d75a (patch)
tree772717edef7749be4eb1981386d5dff20808e5af /build
parent5546676b9084d4500644b02cd7a365ea1ad118cb (diff)
downloadorg.eclipse.cdt-517fc29c6736bb517e7a01af0884eadda966d75a.tar.gz
org.eclipse.cdt-517fc29c6736bb517e7a01af0884eadda966d75a.tar.xz
org.eclipse.cdt-517fc29c6736bb517e7a01af0884eadda966d75a.zip
compilation warnings
Diffstat (limited to 'build')
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MultipleInputDialog.java35
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileEditor.java15
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/NotifyingReconciler.java14
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MacroReferenceRule.java4
-rw-r--r--build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileWordDetector.java4
5 files changed, 46 insertions, 26 deletions
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MultipleInputDialog.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MultipleInputDialog.java
index 1ccce54759..4786e3c68e 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MultipleInputDialog.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/MultipleInputDialog.java
@@ -13,7 +13,6 @@ package org.eclipse.cdt.make.internal.ui;
import java.io.File;
import java.util.ArrayList;
import java.util.HashMap;
-import java.util.Iterator;
import java.util.List;
import java.util.Map;
@@ -49,10 +48,10 @@ public class MultipleInputDialog extends Dialog {
protected Composite panel;
- protected List fieldList = new ArrayList();
- protected List controlList = new ArrayList();
- protected List validators = new ArrayList();
- protected Map valueMap = new HashMap();
+ protected List<FieldSummary> fieldList = new ArrayList<FieldSummary>();
+ protected List<Text> controlList = new ArrayList<Text>();
+ protected List<Validator> validators = new ArrayList<Validator>();
+ protected Map<Object, String> valueMap = new HashMap<Object, String>();
private String title;
@@ -67,6 +66,7 @@ public class MultipleInputDialog extends Dialog {
/* (non-Javadoc)
* @see org.eclipse.jface.window.Window#configureShell(org.eclipse.swt.widgets.Shell)
*/
+ @Override
protected void configureShell(Shell shell) {
super.configureShell(shell);
if (title != null) {
@@ -78,6 +78,7 @@ public class MultipleInputDialog extends Dialog {
/* (non-Javadoc)
* @see org.eclipse.jface.dialogs.Dialog#createButtonBar(org.eclipse.swt.widgets.Composite)
*/
+ @Override
protected Control createButtonBar(Composite parent) {
Control bar = super.createButtonBar(parent);
validateFields();
@@ -87,6 +88,7 @@ public class MultipleInputDialog extends Dialog {
/* (non-Javadoc)
* @see org.eclipse.jface.dialogs.Dialog#createDialogArea(org.eclipse.swt.widgets.Composite)
*/
+ @Override
protected Control createDialogArea(Composite parent) {
Composite container = (Composite)super.createDialogArea(parent);
container.setLayout(new GridLayout(2, false));
@@ -97,8 +99,7 @@ public class MultipleInputDialog extends Dialog {
panel.setLayout(layout);
panel.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
- for (Iterator i = fieldList.iterator(); i.hasNext();) {
- FieldSummary field = (FieldSummary)i.next();
+ for (FieldSummary field : fieldList) {
switch(field.type) {
case TEXT:
createTextField(field.name, field.initialValue, field.allowsEmpty);
@@ -145,6 +146,7 @@ public class MultipleInputDialog extends Dialog {
if (!allowEmpty) {
validators.add(new Validator() {
+ @Override
public boolean validate() {
return !text.getText().equals(""); //$NON-NLS-1$
}
@@ -186,6 +188,7 @@ public class MultipleInputDialog extends Dialog {
if (!allowEmpty) {
validators.add(new Validator() {
+ @Override
public boolean validate() {
return !text.getText().equals(""); //$NON-NLS-1$
}
@@ -200,6 +203,7 @@ public class MultipleInputDialog extends Dialog {
Button button = createButton(comp, IDialogConstants.IGNORE_ID, MakeUIPlugin.getResourceString("MultipleInputDialog.0"), false); //$NON-NLS-1$
button.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
DirectoryDialog dialog = new DirectoryDialog(getShell());
dialog.setMessage(MakeUIPlugin.getResourceString("MultipleInputDialog.1")); //$NON-NLS-1$
@@ -250,6 +254,7 @@ public class MultipleInputDialog extends Dialog {
if (!allowEmpty) {
validators.add(new Validator() {
+ @Override
public boolean validate() {
return !text.getText().equals(""); //$NON-NLS-1$
}
@@ -264,6 +269,7 @@ public class MultipleInputDialog extends Dialog {
Button button = createButton(comp, IDialogConstants.IGNORE_ID, MakeUIPlugin.getResourceString("MultipleInputDialog.2"), false); //$NON-NLS-1$
button.addSelectionListener(new SelectionAdapter() {
+ @Override
public void widgetSelected(SelectionEvent e) {
StringVariableSelectionDialog dialog = new StringVariableSelectionDialog(getShell());
int code = dialog.open();
@@ -283,12 +289,10 @@ public class MultipleInputDialog extends Dialog {
/* (non-Javadoc)
* @see org.eclipse.jface.dialogs.Dialog#okPressed()
*/
+ @Override
protected void okPressed() {
- for (Iterator i = controlList.iterator(); i.hasNext(); ) {
- Control control = (Control)i.next();
- if (control instanceof Text) {
- valueMap.put(control.getData(FIELD_NAME), ((Text)control).getText());
- }
+ for (Text control : controlList) {
+ valueMap.put(control.getData(FIELD_NAME), control.getText());
}
controlList = null;
super.okPressed();
@@ -298,6 +302,7 @@ public class MultipleInputDialog extends Dialog {
/* (non-Javadoc)
* @see org.eclipse.jface.window.Window#open()
*/
+ @Override
public int open() {
applyDialogFont(panel);
return super.open();
@@ -312,8 +317,7 @@ public class MultipleInputDialog extends Dialog {
}
public void validateFields() {
- for(Iterator i = validators.iterator(); i.hasNext(); ) {
- Validator validator = (Validator) i.next();
+ for (Validator validator : validators) {
if (!validator.validate()) {
getButton(IDialogConstants.OK_ID).setEnabled(false);
return;
@@ -325,6 +329,7 @@ public class MultipleInputDialog extends Dialog {
/* (non-Javadoc)
* @see org.eclipse.jface.window.Window#getInitialLocation(org.eclipse.swt.graphics.Point)
*/
+ @Override
protected Point getInitialLocation(Point initialSize) {
Point initialLocation= DialogSettingsHelper.getInitialLocation(getDialogSettingsSectionName());
if (initialLocation != null) {
@@ -341,6 +346,7 @@ public class MultipleInputDialog extends Dialog {
/* (non-Javadoc)
* @see org.eclipse.jface.window.Window#getInitialSize()
*/
+ @Override
protected Point getInitialSize() {
Point size = super.getInitialSize();
return DialogSettingsHelper.getInitialSize(getDialogSettingsSectionName(), size);
@@ -349,6 +355,7 @@ public class MultipleInputDialog extends Dialog {
/* (non-Javadoc)
* @see org.eclipse.jface.window.Window#close()
*/
+ @Override
public boolean close() {
DialogSettingsHelper.persistShellGeometry(getShell(), getDialogSettingsSectionName());
return super.close();
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileEditor.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileEditor.java
index 39156cae59..8e79b8cd54 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileEditor.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/MakefileEditor.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2009 QNX Software Systems and others.
+ * Copyright (c) 2000, 2010 QNX Software Systems 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
@@ -93,6 +93,7 @@ public class MakefileEditor extends TextEditor implements ISelectionChangedListe
/* (non-Javadoc)
* @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#initializeEditor()
*/
+ @Override
protected void initializeEditor() {
setRangeIndicator(new DefaultRangeIndicator());
setEditorContextMenuId("#MakefileEditorContext"); //$NON-NLS-1$
@@ -106,6 +107,7 @@ public class MakefileEditor extends TextEditor implements ISelectionChangedListe
/* (non-Javadoc)
* @see org.eclipse.ui.IWorkbenchPart#dispose()
*/
+ @Override
public void dispose() {
if (fProjectionMakefileUpdater != null) {
fProjectionMakefileUpdater.uninstall();
@@ -121,6 +123,7 @@ public class MakefileEditor extends TextEditor implements ISelectionChangedListe
/* (non-Javadoc)
* @see org.eclipse.ui.IWorkbenchPart#createPartControl(org.eclipse.swt.widgets.Composite)
*/
+ @Override
public void createPartControl(Composite parent) {
super.createPartControl(parent);
ProjectionViewer projectionViewer = (ProjectionViewer) getSourceViewer();
@@ -142,6 +145,7 @@ public class MakefileEditor extends TextEditor implements ISelectionChangedListe
}
}
+ @Override
protected ISourceViewer createSourceViewer(Composite parent, IVerticalRuler ruler, int styles) {
ISourceViewer viewer = new ProjectionViewer(parent, ruler, getOverviewRuler(), isOverviewRulerVisible(), styles);
@@ -154,6 +158,7 @@ public class MakefileEditor extends TextEditor implements ISelectionChangedListe
/* (non-Javadoc)
* Method declared on IAdaptable
*/
+ @Override
public Object getAdapter(Class key) {
if (ProjectionAnnotationModel.class.equals(key)) {
if (projectionSupport != null) {
@@ -171,6 +176,7 @@ public class MakefileEditor extends TextEditor implements ISelectionChangedListe
/* (non-Javadoc)
* @see org.eclipse.ui.ISaveablePart#doSave(org.eclipse.core.runtime.IProgressMonitor)
*/
+ @Override
public void doSave(IProgressMonitor monitor) {
super.doSave(monitor);
if (page != null) {
@@ -181,6 +187,7 @@ public class MakefileEditor extends TextEditor implements ISelectionChangedListe
/* (non-Javadoc)
* @see org.eclipse.ui.texteditor.AbstractTextEditor#createActions()
*/
+ @Override
protected void createActions() {
super.createActions();
@@ -297,6 +304,7 @@ public class MakefileEditor extends TextEditor implements ISelectionChangedListe
/* (non-Javadoc)
* @see org.eclipse.ui.texteditor.AbstractTextEditor#editorContextMenuAboutToShow(org.eclipse.jface.action.IMenuManager)
*/
+ @Override
protected void editorContextMenuAboutToShow(IMenuManager menu) {
super.editorContextMenuAboutToShow(menu);
addAction(menu, ITextEditorActionConstants.GROUP_EDIT, "Comment"); //$NON-NLS-1$
@@ -343,6 +351,7 @@ public class MakefileEditor extends TextEditor implements ISelectionChangedListe
/*
* @see org.eclipse.ui.texteditor.AbstractTextEditor#performRevert()
*/
+ @Override
protected void performRevert() {
ProjectionViewer projectionViewer= (ProjectionViewer) getSourceViewer();
projectionViewer.setRedraw(false);
@@ -372,6 +381,7 @@ public class MakefileEditor extends TextEditor implements ISelectionChangedListe
/* (non-Javadoc)
* @see org.eclipse.ui.texteditor.AbstractTextEditor#handlePreferenceStoreChanged(org.eclipse.jface.util.PropertyChangeEvent)
*/
+ @Override
protected void handlePreferenceStoreChanged(PropertyChangeEvent event) {
ISourceViewer sourceViewer= getSourceViewer();
if (sourceViewer == null)
@@ -407,6 +417,7 @@ public class MakefileEditor extends TextEditor implements ISelectionChangedListe
/*
* @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#collectContextMenuPreferencePages()
*/
+ @Override
protected String[] collectContextMenuPreferencePages() {
// Add Makefile Editor relevant pages
String[] parentPrefPageIds = super.collectContextMenuPreferencePages();
@@ -421,6 +432,7 @@ public class MakefileEditor extends TextEditor implements ISelectionChangedListe
/*
* @see org.eclipse.ui.texteditor.AbstractDecoratedTextEditor#isTabsToSpacesConversionEnabled()
*/
+ @Override
protected boolean isTabsToSpacesConversionEnabled() {
// always false for Makefiles
// see http://bugs.eclipse.org/186106
@@ -431,6 +443,7 @@ public class MakefileEditor extends TextEditor implements ISelectionChangedListe
* @see org.eclipse.ui.editors.text.TextEditor#initializeKeyBindingScopes()
* @see http://bugs.eclipse.org/172331
*/
+ @Override
protected void initializeKeyBindingScopes() {
setKeyBindingScopes(new String [] { "org.eclipse.cdt.make.ui.makefileEditorScope" } ); //$NON-NLS-1$
}
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/NotifyingReconciler.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/NotifyingReconciler.java
index 08d3fd5986..6dad415a6e 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/NotifyingReconciler.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/editor/NotifyingReconciler.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2002, 2006 QNX Software Systems and others.
+ * Copyright (c) 2002, 2010 QNX Software Systems 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
@@ -12,7 +12,6 @@
package org.eclipse.cdt.make.internal.ui.editor;
import java.util.ArrayList;
-import java.util.Iterator;
import org.eclipse.jface.text.reconciler.DirtyRegion;
import org.eclipse.jface.text.reconciler.IReconcilingStrategy;
@@ -23,12 +22,10 @@ import org.eclipse.jface.text.reconciler.MonoReconciler;
*/
public class NotifyingReconciler extends MonoReconciler {
- private ArrayList fReconcilingParticipants= new ArrayList();
+ private ArrayList<IReconcilingParticipant> fReconcilingParticipants= new ArrayList<IReconcilingParticipant>();
/**
* Constructor for NotifyingReconciler.
- * @param strategy
- * @param isIncremental
*/
public NotifyingReconciler(IReconcilingStrategy strategy, boolean isIncremental) {
super(strategy, isIncremental);
@@ -37,6 +34,7 @@ public class NotifyingReconciler extends MonoReconciler {
/*
* @see org.eclipse.jface.text.reconciler.AbstractReconciler#process(org.eclipse.jface.text.reconciler.DirtyRegion)
*/
+ @Override
protected void process(DirtyRegion dirtyRegion) {
super.process(dirtyRegion);
notifyReconcilingParticipants();
@@ -51,14 +49,14 @@ public class NotifyingReconciler extends MonoReconciler {
}
protected void notifyReconcilingParticipants() {
- Iterator i= new ArrayList(fReconcilingParticipants).iterator();
- while (i.hasNext()) {
- ((IReconcilingParticipant) i.next()).reconciled();
+ for (IReconcilingParticipant participant : fReconcilingParticipants) {
+ participant.reconciled();
}
}
/* (non-Javadoc)
* @see org.eclipse.jface.text.reconciler.AbstractReconciler#initialProcess()
*/
+ @Override
protected void initialProcess() {
super.initialProcess();
notifyReconcilingParticipants();
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MacroReferenceRule.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MacroReferenceRule.java
index f9e20080e3..49d606966e 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MacroReferenceRule.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MacroReferenceRule.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
+ * Copyright (c) 2000, 2010 QNX Software Systems 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
@@ -32,11 +32,13 @@ public class MacroReferenceRule extends PatternRule {
}
}
+ @Override
protected IToken doEvaluate(ICharacterScanner scanner, boolean resume) {
nOfBrackets = 1;
return super.doEvaluate(scanner, resume);
}
+ @Override
protected boolean endSequenceDetected(ICharacterScanner scanner) {
int c;
char[][] delimiters = scanner.getLegalLineDelimiters();
diff --git a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileWordDetector.java b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileWordDetector.java
index a648a9b1ec..de816fe4f2 100644
--- a/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileWordDetector.java
+++ b/build/org.eclipse.cdt.make.ui/src/org/eclipse/cdt/make/internal/ui/text/makefile/MakefileWordDetector.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2006 QNX Software Systems and others.
+ * Copyright (c) 2000, 2010 QNX Software Systems 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
@@ -19,7 +19,7 @@ public class MakefileWordDetector implements IWordDetector {
private static final String correctSpecChars = "@$/\\_"; //$NON-NLS-1$
/**
- * @see IWordDetector#isWordPart(character)
+ * @see IWordDetector#isWordPart(char)
*/
public boolean isWordPart(char character) {
return Character.isLetterOrDigit(character) || (correctSpecChars.indexOf(character) >= 0);

Back to the top