mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Cosmetics
This commit is contained in:
parent
1d28b9bce9
commit
b9d4a197f4
3 changed files with 13 additions and 31 deletions
|
@ -12,7 +12,6 @@
|
|||
package org.eclipse.cdt.make.internal.ui.text;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.jface.text.source.ISharedTextColors;
|
||||
|
@ -21,7 +20,6 @@ import org.eclipse.swt.graphics.RGB;
|
|||
import org.eclipse.swt.widgets.Display;
|
||||
|
||||
public class ColorManager implements ISharedTextColors {
|
||||
|
||||
public static final String MAKE_COMMENT_COLOR ="org.eclipse.cdt.make.ui.editor.comment"; //$NON-NLS-1$
|
||||
public static final String MAKE_KEYWORD_COLOR = "org.eclipse.cdt.make.ui.editor.keyword"; //$NON-NLS-1$
|
||||
public static final String MAKE_FUNCTION_COLOR = "org.eclipse.cdt.make.ui.editor.function"; //$NON-NLS-1$
|
||||
|
@ -52,19 +50,13 @@ public class ColorManager implements ISharedTextColors {
|
|||
|
||||
protected Map<RGB, Color> fColorTable = new HashMap<RGB, Color>(10);
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.jface.text.source.ISharedTextColors#dispose()
|
||||
*/
|
||||
@Override
|
||||
public void dispose() {
|
||||
Iterator<Color> e = fColorTable.values().iterator();
|
||||
while (e.hasNext())
|
||||
(e.next()).dispose();
|
||||
for (Color color : fColorTable.values()) {
|
||||
color.dispose();
|
||||
}
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.jface.text.source.ISharedTextColors#getColor(org.eclipse.swt.graphics.RGB)
|
||||
*/
|
||||
@Override
|
||||
public Color getColor(RGB rgb) {
|
||||
Color color = fColorTable.get(rgb);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2000, 2010 QNX Software Systems and others.
|
||||
* Copyright (c) 2000, 2013 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
|
||||
|
@ -10,22 +10,17 @@
|
|||
*******************************************************************************/
|
||||
package org.eclipse.cdt.make.internal.ui.text;
|
||||
|
||||
|
||||
import java.util.Comparator;
|
||||
|
||||
import org.eclipse.jface.text.contentassist.ICompletionProposal;
|
||||
|
||||
public class CompletionProposalComparator implements Comparator<ICompletionProposal> {
|
||||
|
||||
/**
|
||||
* Constructor for CompletionProposalComparator.
|
||||
*/
|
||||
public CompletionProposalComparator() {
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see Comparator#compare(Object, Object)
|
||||
*/
|
||||
@Override
|
||||
public int compare(ICompletionProposal c1, ICompletionProposal c2) {
|
||||
return c1.getDisplayString().compareToIgnoreCase(c2.getDisplayString());
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2000, 2006 QNX Software Systems and others.
|
||||
* Copyright (c) 2000, 2013 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
|
||||
|
@ -8,7 +8,6 @@
|
|||
* Contributors:
|
||||
* QNX Software Systems - Initial API and implementation
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.cdt.make.internal.ui.text;
|
||||
|
||||
import org.eclipse.jface.text.BadLocationException;
|
||||
|
@ -81,10 +80,6 @@ public class WordPartDetector {
|
|||
return isMacro;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @return String
|
||||
*/
|
||||
@Override
|
||||
public String toString() {
|
||||
return wordPart;
|
||||
|
|
Loading…
Add table
Reference in a new issue