diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/util/CColorManager.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/util/CColorManager.java index f86c6b8cb9e..e0130b20f71 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/util/CColorManager.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/util/CColorManager.java @@ -1,11 +1,11 @@ /******************************************************************************* - * Copyright (c) 2000, 2009 IBM 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 - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: + * Copyright (c) 2000, 2009 IBM 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 + * http://www.eclipse.org/legal/epl-v10.html + * + * Contributors: * IBM Corporation - initial API and implementation * QNX Software System * Anton Leherbauer (Wind River Systems) @@ -22,14 +22,12 @@ import org.eclipse.swt.widgets.Display; import org.eclipse.cdt.ui.text.IColorManager; - /** * CDT color manager. */ public class CColorManager implements IColorManager { - - protected Map fKeyTable= new HashMap(10); - protected Map> fDisplayTable= new HashMap>(2); + protected Map fKeyTable= new HashMap<>(10); + protected Map> fDisplayTable= new HashMap<>(2); /** * Flag which tells if the colors are automatically disposed when @@ -51,7 +49,8 @@ public class CColorManager implements IColorManager { * * @param autoDisposeOnDisplayDispose if true the color manager * automatically disposes all managed colors when the current display gets disposed - * and all calls to {@link org.eclipse.jface.text.source.ISharedTextColors#dispose()} are ignored. + * and all calls to {@link org.eclipse.jface.text.source.ISharedTextColors#dispose()} are + * ignored. * * @since 4.0 */ @@ -68,19 +67,15 @@ public class CColorManager implements IColorManager { } } - /* - * @see IColorManager#getColor(RGB) - */ @Override public Color getColor(RGB rgb) { - if (rgb == null) return null; final Display display= Display.getCurrent(); Map colorTable= fDisplayTable.get(display); if (colorTable == null) { - colorTable= new HashMap(10); + colorTable= new HashMap<>(10); fDisplayTable.put(display, colorTable); if (fAutoDisposeOnDisplayDispose) { display.disposeExec(new Runnable() { @@ -101,18 +96,12 @@ public class CColorManager implements IColorManager { return color; } - /* - * @see IColorManager#dispose - */ @Override public void dispose() { if (!fAutoDisposeOnDisplayDispose) dispose(Display.getCurrent()); } - /* - * @see IColorManager#getColor(String) - */ @Override public Color getColor(String key) { @@ -123,9 +112,6 @@ public class CColorManager implements IColorManager { return getColor(rgb); } - /* - * @see IColorManager#bindColor(String, RGB) - */ @Override public void bindColor(String key, RGB rgb) { Object value= fKeyTable.get(key); @@ -135,9 +121,6 @@ public class CColorManager implements IColorManager { fKeyTable.put(key, rgb); } - /* - * @see IColorManager#unbindColor(String) - */ @Override public void unbindColor(String key) { fKeyTable.remove(key); diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/util/CWhitespaceDetector.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/util/CWhitespaceDetector.java index 6ad8ec96458..3091be041a3 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/util/CWhitespaceDetector.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/util/CWhitespaceDetector.java @@ -14,15 +14,10 @@ package org.eclipse.cdt.internal.ui.text.util; import org.eclipse.jface.text.rules.IWhitespaceDetector; - /** * A simple white space detector. */ public class CWhitespaceDetector implements IWhitespaceDetector { - - /* - * @see IWhitespaceDetector#isWhitespace(char) - */ @Override public boolean isWhitespace(char c) { switch (c) { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/util/CWordDetector.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/util/CWordDetector.java index 1925d8f9a9a..655ffdece9a 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/util/CWordDetector.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/util/CWordDetector.java @@ -13,23 +13,15 @@ package org.eclipse.cdt.internal.ui.text.util; import org.eclipse.jface.text.rules.IWordDetector; - /** * A C aware word detector. */ public class CWordDetector implements IWordDetector { - - /* - * @see org.eclipse.jface.text.rules.IWordDetector#isWordStart(char) - */ @Override public boolean isWordStart(char c) { return Character.isJavaIdentifierStart(c) || c == '@'; } - /* - * @see org.eclipse.jface.text.rules.IWordDetector#isWordPart(char) - */ @Override public boolean isWordPart(char c) { return Character.isJavaIdentifierPart(c);