mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-23 22:52:11 +02:00
Fixes warnings
This commit is contained in:
parent
1853f55894
commit
33ebd6b7b9
12 changed files with 21 additions and 72 deletions
|
@ -13,25 +13,19 @@ package org.eclipse.cdt.internal.ui.buildconsole;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
import org.eclipse.cdt.core.resources.IConsole;
|
|
||||||
import org.eclipse.cdt.internal.ui.preferences.BuildConsolePreferencePage;
|
|
||||||
import org.eclipse.cdt.ui.CUIPlugin;
|
|
||||||
import org.eclipse.cdt.ui.IBuildConsoleEvent;
|
|
||||||
import org.eclipse.cdt.ui.IBuildConsoleListener;
|
|
||||||
import org.eclipse.cdt.ui.IBuildConsoleManager;
|
|
||||||
import org.eclipse.core.resources.IProject;
|
import org.eclipse.core.resources.IProject;
|
||||||
import org.eclipse.core.resources.IResource;
|
import org.eclipse.core.resources.IResource;
|
||||||
import org.eclipse.core.resources.IResourceChangeEvent;
|
import org.eclipse.core.resources.IResourceChangeEvent;
|
||||||
import org.eclipse.core.resources.IResourceChangeListener;
|
import org.eclipse.core.resources.IResourceChangeListener;
|
||||||
import org.eclipse.core.runtime.CoreException;
|
import org.eclipse.core.runtime.CoreException;
|
||||||
import org.eclipse.core.runtime.IStatus;
|
import org.eclipse.core.runtime.IStatus;
|
||||||
|
import org.eclipse.core.runtime.ListenerList;
|
||||||
import org.eclipse.core.runtime.Status;
|
import org.eclipse.core.runtime.Status;
|
||||||
import org.eclipse.jface.preference.PreferenceConverter;
|
import org.eclipse.jface.preference.PreferenceConverter;
|
||||||
import org.eclipse.jface.text.Assert;
|
import org.eclipse.jface.text.Assert;
|
||||||
import org.eclipse.jface.text.IDocument;
|
import org.eclipse.jface.text.IDocument;
|
||||||
import org.eclipse.jface.text.IDocumentPartitioner;
|
import org.eclipse.jface.text.IDocumentPartitioner;
|
||||||
import org.eclipse.jface.util.IPropertyChangeListener;
|
import org.eclipse.jface.util.IPropertyChangeListener;
|
||||||
import org.eclipse.jface.util.ListenerList;
|
|
||||||
import org.eclipse.jface.util.PropertyChangeEvent;
|
import org.eclipse.jface.util.PropertyChangeEvent;
|
||||||
import org.eclipse.swt.graphics.Color;
|
import org.eclipse.swt.graphics.Color;
|
||||||
import org.eclipse.swt.graphics.RGB;
|
import org.eclipse.swt.graphics.RGB;
|
||||||
|
@ -45,9 +39,17 @@ import org.eclipse.ui.console.ConsolePlugin;
|
||||||
import org.eclipse.ui.console.IConsoleConstants;
|
import org.eclipse.ui.console.IConsoleConstants;
|
||||||
import org.eclipse.ui.console.IConsoleView;
|
import org.eclipse.ui.console.IConsoleView;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.core.resources.IConsole;
|
||||||
|
import org.eclipse.cdt.ui.CUIPlugin;
|
||||||
|
import org.eclipse.cdt.ui.IBuildConsoleEvent;
|
||||||
|
import org.eclipse.cdt.ui.IBuildConsoleListener;
|
||||||
|
import org.eclipse.cdt.ui.IBuildConsoleManager;
|
||||||
|
|
||||||
|
import org.eclipse.cdt.internal.ui.preferences.BuildConsolePreferencePage;
|
||||||
|
|
||||||
public class BuildConsoleManager implements IBuildConsoleManager, IResourceChangeListener, IPropertyChangeListener {
|
public class BuildConsoleManager implements IBuildConsoleManager, IResourceChangeListener, IPropertyChangeListener {
|
||||||
|
|
||||||
ListenerList listeners = new ListenerList(1);
|
ListenerList listeners = new ListenerList();
|
||||||
BuildConsole fConsole;
|
BuildConsole fConsole;
|
||||||
private Map fConsoleMap = new HashMap();
|
private Map fConsoleMap = new HashMap();
|
||||||
Color infoColor, outputColor, errorColor;
|
Color infoColor, outputColor, errorColor;
|
||||||
|
|
|
@ -336,7 +336,6 @@ public class BuildConsolePage extends Page
|
||||||
|
|
||||||
protected void setInitialSelection() {
|
protected void setInitialSelection() {
|
||||||
// Use the selection, if any
|
// Use the selection, if any
|
||||||
Object input;
|
|
||||||
IWorkbenchPage page= getSite().getPage();
|
IWorkbenchPage page= getSite().getPage();
|
||||||
ISelection selection= null;
|
ISelection selection= null;
|
||||||
if (page != null)
|
if (page != null)
|
||||||
|
@ -446,7 +445,7 @@ public class BuildConsolePage extends Page
|
||||||
/**
|
/**
|
||||||
* Sets the tab width for this page.
|
* Sets the tab width for this page.
|
||||||
*
|
*
|
||||||
* @param int
|
* @param tabs
|
||||||
* tab width
|
* tab width
|
||||||
*/
|
*/
|
||||||
protected void setTabs(int tabs) {
|
protected void setTabs(int tabs) {
|
||||||
|
|
|
@ -43,7 +43,6 @@ public class AddIncludesOperation implements IWorkspaceRunnable {
|
||||||
private ITranslationUnit fTranslationUnit;
|
private ITranslationUnit fTranslationUnit;
|
||||||
private IRequiredInclude[] fIncludes;
|
private IRequiredInclude[] fIncludes;
|
||||||
private String[] fUsings;
|
private String[] fUsings;
|
||||||
private boolean fDoSave;
|
|
||||||
|
|
||||||
private String newLine = System.getProperty("line.separator", "\n"); //$NON-NLS-1$//$NON-NLS-2$
|
private String newLine = System.getProperty("line.separator", "\n"); //$NON-NLS-1$//$NON-NLS-2$
|
||||||
|
|
||||||
|
@ -62,7 +61,6 @@ public class AddIncludesOperation implements IWorkspaceRunnable {
|
||||||
fIncludes= includes;
|
fIncludes= includes;
|
||||||
fUsings = using;
|
fUsings = using;
|
||||||
fTranslationUnit = tu;
|
fTranslationUnit = tu;
|
||||||
fDoSave= save;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void executeInludes(IProgressMonitor monitor) throws CoreException {
|
public void executeInludes(IProgressMonitor monitor) throws CoreException {
|
||||||
|
|
|
@ -20,20 +20,20 @@ import org.eclipse.swt.SWT;
|
||||||
public class StubUtility {
|
public class StubUtility {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.jdt.ui.CodeGeneration#getTypeComment(ICompilationUnit, String, String)
|
* Not implemented, returns <code>""</code>.
|
||||||
*/
|
*/
|
||||||
public static String getHeaderFileContent(ITranslationUnit cu, String typeComment, String typeContent, String lineDelimiter) throws CoreException {
|
public static String getHeaderFileContent(ITranslationUnit cu, String typeComment, String typeContent, String lineDelimiter) throws CoreException {
|
||||||
return ""; //$NON-NLS-1$
|
return ""; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
/**
|
/**
|
||||||
* @see org.eclipse.jdt.ui.CodeGeneration#getTypeComment(ICompilationUnit, String, String)
|
* Not implemented, returns <code>""</code>.
|
||||||
*/
|
*/
|
||||||
public static String getBodyFileContent(ITranslationUnit cu, String typeComment, String typeContent, String lineDelimiter) throws CoreException {
|
public static String getBodyFileContent(ITranslationUnit cu, String typeComment, String typeContent, String lineDelimiter) throws CoreException {
|
||||||
return ""; //$NON-NLS-1$
|
return ""; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
/*
|
/**
|
||||||
* @see org.eclipse.jdt.ui.CodeGeneration#getTypeComment(ICompilationUnit, String, String)
|
* Not implemented, returns <code>""</code>.
|
||||||
*/
|
*/
|
||||||
public static String getClassComment(ITranslationUnit cu, String typeQualifiedName, String lineDelim) throws CoreException {
|
public static String getClassComment(ITranslationUnit cu, String typeQualifiedName, String lineDelim) throws CoreException {
|
||||||
return ""; //$NON-NLS-1$
|
return ""; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
|
@ -24,11 +24,8 @@ import org.eclipse.swt.graphics.Image;
|
||||||
|
|
||||||
class CNode extends DocumentRangeNode implements ITypedElement {
|
class CNode extends DocumentRangeNode implements ITypedElement {
|
||||||
|
|
||||||
private CNode fParent;
|
|
||||||
|
|
||||||
public CNode(CNode parent, int type, String id, IDocument doc, int start, int length) {
|
public CNode(CNode parent, int type, String id, IDocument doc, int start, int length) {
|
||||||
super(type, id, doc, start, length);
|
super(type, id, doc, start, length);
|
||||||
fParent= parent;
|
|
||||||
if (parent != null) {
|
if (parent != null) {
|
||||||
parent.addChild(this);
|
parent.addChild(this);
|
||||||
}
|
}
|
||||||
|
@ -38,23 +35,14 @@ class CNode extends DocumentRangeNode implements ITypedElement {
|
||||||
this(parent, type, id, parent.getDocument(), start, length);
|
this(parent, type, id, parent.getDocument(), start, length);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see ITypedInput#getName
|
|
||||||
*/
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return getId();
|
return getId();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see ITypedInput#getType
|
|
||||||
*/
|
|
||||||
public String getType() {
|
public String getType() {
|
||||||
return "c2"; //$NON-NLS-1$
|
return "c2"; //$NON-NLS-1$
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see ITypedInput#getImage
|
|
||||||
*/
|
|
||||||
public Image getImage() {
|
public Image getImage() {
|
||||||
ImageDescriptor descriptor = CElementImageProvider.getImageDescriptor(getTypeCode());
|
ImageDescriptor descriptor = CElementImageProvider.getImageDescriptor(getTypeCode());
|
||||||
return CUIPlugin.getImageDescriptorRegistry().get(descriptor);
|
return CUIPlugin.getImageDescriptorRegistry().get(descriptor);
|
||||||
|
|
|
@ -47,16 +47,10 @@ public class CStructureCreator implements IStructureCreator {
|
||||||
public CStructureCreator() {
|
public CStructureCreator() {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see IStructureCreator#getTitle
|
|
||||||
*/
|
|
||||||
public String getName() {
|
public String getName() {
|
||||||
return CUIPlugin.getResourceString(NAME);
|
return CUIPlugin.getResourceString(NAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see IStructureCreator#getStructure
|
|
||||||
*/
|
|
||||||
public IStructureComparator getStructure(Object input) {
|
public IStructureComparator getStructure(Object input) {
|
||||||
|
|
||||||
String s = null;
|
String s = null;
|
||||||
|
@ -94,30 +88,18 @@ public class CStructureCreator implements IStructureCreator {
|
||||||
return root;
|
return root;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see IStructureCreator#canSave
|
|
||||||
*/
|
|
||||||
public boolean canSave() {
|
public boolean canSave() {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see IStructureCreator#locate
|
|
||||||
*/
|
|
||||||
public IStructureComparator locate(Object path, Object source) {
|
public IStructureComparator locate(Object path, Object source) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see IStructureCreator#canRewriteTree
|
|
||||||
*/
|
|
||||||
public boolean canRewriteTree() {
|
public boolean canRewriteTree() {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @see IStructureCreator#rewriteTree
|
|
||||||
*/
|
|
||||||
public void rewriteTree(Differencer differencer, IDiffContainer root) {
|
public void rewriteTree(Differencer differencer, IDiffContainer root) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -204,7 +204,7 @@ public class CView extends ViewPart implements ISetSelectionTarget, IPropertyCha
|
||||||
* Reveal and select the passed element selection in self's visual
|
* Reveal and select the passed element selection in self's visual
|
||||||
* component
|
* component
|
||||||
*
|
*
|
||||||
* @see ISetSelectionTarget#selectReveal()
|
* @see ISetSelectionTarget#selectReveal(ISelection)
|
||||||
*/
|
*/
|
||||||
public void selectReveal(ISelection selection) {
|
public void selectReveal(ISelection selection) {
|
||||||
IStructuredSelection ssel = SelectionConverter.convertSelectionToCElements(selection);
|
IStructuredSelection ssel = SelectionConverter.convertSelectionToCElements(selection);
|
||||||
|
|
|
@ -21,6 +21,8 @@ import org.eclipse.swt.events.KeyEvent;
|
||||||
import org.eclipse.ui.IActionBars;
|
import org.eclipse.ui.IActionBars;
|
||||||
import org.eclipse.ui.IMemento;
|
import org.eclipse.ui.IMemento;
|
||||||
import org.eclipse.ui.actions.ActionGroup;
|
import org.eclipse.ui.actions.ActionGroup;
|
||||||
|
import org.eclipse.ui.views.navigator.SortAndFilterActionGroup;
|
||||||
|
import org.eclipse.ui.views.navigator.WorkspaceActionGroup;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is the action group for all the view actions.
|
* This is the action group for all the view actions.
|
||||||
|
@ -43,7 +45,7 @@ public abstract class CViewActionGroup extends ActionGroup {
|
||||||
/**
|
/**
|
||||||
* Constructs a new navigator action group and creates its actions.
|
* Constructs a new navigator action group and creates its actions.
|
||||||
*
|
*
|
||||||
* @param navigator the resource navigator
|
* @param cview the CView
|
||||||
*/
|
*/
|
||||||
public CViewActionGroup(CView cview) {
|
public CViewActionGroup(CView cview) {
|
||||||
this.cview = cview;
|
this.cview = cview;
|
||||||
|
|
|
@ -90,9 +90,6 @@ public class CViewContentProvider extends CElementContentProvider {
|
||||||
return ref.getChildren();
|
return ref.getChildren();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* @return
|
|
||||||
*/
|
|
||||||
private Object[] getProjectChildren(ICProject cproject) throws CModelException {
|
private Object[] getProjectChildren(ICProject cproject) throws CModelException {
|
||||||
Object[] extras = null;
|
Object[] extras = null;
|
||||||
IArchiveContainer archive = cproject.getArchiveContainer();
|
IArchiveContainer archive = cproject.getArchiveContainer();
|
||||||
|
|
|
@ -27,10 +27,6 @@ import org.eclipse.swt.graphics.Image;
|
||||||
*/
|
*/
|
||||||
public class CViewLabelProvider extends StandardCElementLabelProvider {
|
public class CViewLabelProvider extends StandardCElementLabelProvider {
|
||||||
|
|
||||||
/**
|
|
||||||
* @param flags
|
|
||||||
* @param adormentProviders
|
|
||||||
*/
|
|
||||||
public CViewLabelProvider(int textFlags, int imageFlags) {
|
public CViewLabelProvider(int textFlags, int imageFlags) {
|
||||||
super(textFlags, imageFlags);
|
super(textFlags, imageFlags);
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,7 +31,6 @@ public class SelectionTransferDragAdapter extends BasicSelectionTransferDragAdap
|
||||||
for (Iterator iter= ((IStructuredSelection)selection).iterator(); iter.hasNext();) {
|
for (Iterator iter= ((IStructuredSelection)selection).iterator(); iter.hasNext();) {
|
||||||
Object element= iter.next();
|
Object element= iter.next();
|
||||||
if (element instanceof ICElement) {
|
if (element instanceof ICElement) {
|
||||||
ICElement celement = (ICElement)element;
|
|
||||||
if (!(element instanceof ISourceReference)) {
|
if (!(element instanceof ISourceReference)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,27 +39,13 @@ public abstract class StatusDialog extends Dialog {
|
||||||
private String fTitle;
|
private String fTitle;
|
||||||
private Image fImage;
|
private Image fImage;
|
||||||
|
|
||||||
private boolean fStatusLineAboveButtons;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates an instane of a status dialog.
|
* Creates an instane of a status dialog.
|
||||||
*/
|
*/
|
||||||
public StatusDialog(Shell parent) {
|
public StatusDialog(Shell parent) {
|
||||||
super(parent);
|
super(parent);
|
||||||
fStatusLineAboveButtons= false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Specifies whether status line appears to the left of the buttons (default)
|
|
||||||
* or above them.
|
|
||||||
*
|
|
||||||
* @param aboveButtons if <code>true</code> status line is placed above buttons; if
|
|
||||||
* <code>false</code> to the right
|
|
||||||
*/
|
|
||||||
public void setStatusLineAboveButtons(boolean aboveButtons) {
|
|
||||||
fStatusLineAboveButtons= aboveButtons;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update the dialog's status line to reflect the given status.
|
* Update the dialog's status line to reflect the given status.
|
||||||
* It is save to call this method before the dialog has been opened.
|
* It is save to call this method before the dialog has been opened.
|
||||||
|
|
Loading…
Add table
Reference in a new issue