Lines 94-99
import org.openide.util.Exceptions;
Link Here
|
94 |
import org.openide.util.ImageUtilities; |
94 |
import org.openide.util.ImageUtilities; |
95 |
import org.openide.util.NbBundle; |
95 |
import org.openide.util.NbBundle; |
96 |
import org.openide.xml.XMLUtil; |
96 |
import org.openide.xml.XMLUtil; |
|
|
97 |
import org.netbeans.swing.plaf.LFCustoms; |
97 |
|
98 |
|
98 |
/** |
99 |
/** |
99 |
* |
100 |
* |
Lines 1054-1060
public abstract class JavaCompletionItem implements CompletionItem {
Link Here
|
1054 |
|
1055 |
|
1055 |
static class TypeParameterItem extends JavaCompletionItem { |
1056 |
static class TypeParameterItem extends JavaCompletionItem { |
1056 |
|
1057 |
|
1057 |
private static final String TYPE_PARAMETER_COLOR = "<font color=#000000>"; //NOI18N |
|
|
1058 |
|
1058 |
|
1059 |
private String simpleName; |
1059 |
private String simpleName; |
1060 |
private String leftText; |
1060 |
private String leftText; |
Lines 1078-1084
public abstract class JavaCompletionItem implements CompletionItem {
Link Here
|
1078 |
|
1078 |
|
1079 |
protected String getLeftHtmlText() { |
1079 |
protected String getLeftHtmlText() { |
1080 |
if (leftText == null) |
1080 |
if (leftText == null) |
1081 |
leftText = TYPE_PARAMETER_COLOR + simpleName + COLOR_END; |
1081 |
leftText = LFCustoms.getTextFgColor() + simpleName + COLOR_END; |
1082 |
return leftText; |
1082 |
return leftText; |
1083 |
} |
1083 |
} |
1084 |
|
1084 |
|
Lines 1382-1388
public abstract class JavaCompletionItem implements CompletionItem {
Link Here
|
1382 |
private static final String METHOD_ST_PROTECTED = "org/netbeans/modules/editor/resources/completion/method_static_protected_16.png"; //NOI18N |
1382 |
private static final String METHOD_ST_PROTECTED = "org/netbeans/modules/editor/resources/completion/method_static_protected_16.png"; //NOI18N |
1383 |
private static final String METHOD_ST_PRIVATE = "org/netbeans/modules/editor/resources/completion/method_static_private_16.png"; //NOI18N |
1383 |
private static final String METHOD_ST_PRIVATE = "org/netbeans/modules/editor/resources/completion/method_static_private_16.png"; //NOI18N |
1384 |
private static final String METHOD_ST_PACKAGE = "org/netbeans/modules/editor/resources/completion/method_static_package_private_16.png"; //NOI18N |
1384 |
private static final String METHOD_ST_PACKAGE = "org/netbeans/modules/editor/resources/completion/method_static_package_private_16.png"; //NOI18N |
1385 |
private static final String METHOD_COLOR = "<font color=#000000>"; //NOI18N |
|
|
1386 |
private static final String PARAMETER_NAME_COLOR = "<font color=#a06001>"; //NOI18N |
1385 |
private static final String PARAMETER_NAME_COLOR = "<font color=#a06001>"; //NOI18N |
1387 |
private static ImageIcon icon[][] = new ImageIcon[2][4]; |
1386 |
private static ImageIcon icon[][] = new ImageIcon[2][4]; |
1388 |
|
1387 |
|
Lines 1464-1470
public abstract class JavaCompletionItem implements CompletionItem {
Link Here
|
1464 |
protected String getLeftHtmlText() { |
1463 |
protected String getLeftHtmlText() { |
1465 |
if (leftText == null) { |
1464 |
if (leftText == null) { |
1466 |
StringBuilder lText = new StringBuilder(); |
1465 |
StringBuilder lText = new StringBuilder(); |
1467 |
lText.append(METHOD_COLOR); |
1466 |
lText.append(LFCustoms.getTextFgColor()); |
1468 |
if (!isInherited) |
1467 |
if (!isInherited) |
1469 |
lText.append(BOLD); |
1468 |
lText.append(BOLD); |
1470 |
if (isDeprecated || isBlackListed()) |
1469 |
if (isDeprecated || isBlackListed()) |
Lines 1747-1753
public abstract class JavaCompletionItem implements CompletionItem {
Link Here
|
1747 |
return sb.toString(); |
1746 |
return sb.toString(); |
1748 |
} |
1747 |
} |
1749 |
} |
1748 |
} |
1750 |
|
1749 |
|
1751 |
static class OverrideMethodItem extends MethodItem { |
1750 |
static class OverrideMethodItem extends MethodItem { |
1752 |
|
1751 |
|
1753 |
private static final String IMPL_BADGE_PATH = "org/netbeans/modules/java/editor/resources/implement_badge.png"; |
1752 |
private static final String IMPL_BADGE_PATH = "org/netbeans/modules/java/editor/resources/implement_badge.png"; |
Lines 1868-1874
public abstract class JavaCompletionItem implements CompletionItem {
Link Here
|
1868 |
private static final String METHOD_PUBLIC = "org/netbeans/modules/editor/resources/completion/method_16.png"; //NOI18N |
1867 |
private static final String METHOD_PUBLIC = "org/netbeans/modules/editor/resources/completion/method_16.png"; //NOI18N |
1869 |
private static final String GETTER_BADGE_PATH = "org/netbeans/modules/java/editor/resources/getter_badge.png"; //NOI18N |
1868 |
private static final String GETTER_BADGE_PATH = "org/netbeans/modules/java/editor/resources/getter_badge.png"; //NOI18N |
1870 |
private static final String SETTER_BADGE_PATH = "org/netbeans/modules/java/editor/resources/setter_badge.png"; //NOI18N |
1869 |
private static final String SETTER_BADGE_PATH = "org/netbeans/modules/java/editor/resources/setter_badge.png"; //NOI18N |
1871 |
private static final String METHOD_COLOR = "<font color=#000000>"; //NOI18N |
|
|
1872 |
private static final String PARAMETER_NAME_COLOR = "<font color=#a06001>"; //NOI18N |
1870 |
private static final String PARAMETER_NAME_COLOR = "<font color=#a06001>"; //NOI18N |
1873 |
|
1871 |
|
1874 |
private static ImageIcon superIcon; |
1872 |
private static ImageIcon superIcon; |
Lines 1919-1925
public abstract class JavaCompletionItem implements CompletionItem {
Link Here
|
1919 |
protected String getLeftHtmlText() { |
1917 |
protected String getLeftHtmlText() { |
1920 |
if (leftText == null) { |
1918 |
if (leftText == null) { |
1921 |
StringBuilder lText = new StringBuilder(); |
1919 |
StringBuilder lText = new StringBuilder(); |
1922 |
lText.append(METHOD_COLOR); |
1920 |
lText.append(LFCustoms.getTextFgColor()); |
1923 |
lText.append(BOLD); |
1921 |
lText.append(BOLD); |
1924 |
lText.append(name); |
1922 |
lText.append(name); |
1925 |
lText.append(BOLD_END); |
1923 |
lText.append(BOLD_END); |
Lines 2493-2499
public abstract class JavaCompletionItem implements CompletionItem {
Link Here
|
2493 |
static class ParametersItem extends JavaCompletionItem { |
2491 |
static class ParametersItem extends JavaCompletionItem { |
2494 |
|
2492 |
|
2495 |
private static final String PARAMETERS_COLOR = "<font color=#808080>"; //NOI18N |
2493 |
private static final String PARAMETERS_COLOR = "<font color=#808080>"; //NOI18N |
2496 |
private static final String ACTIVE_PARAMETER_COLOR = "<font color=#000000>"; //NOI18N |
|
|
2497 |
|
2494 |
|
2498 |
protected ElementHandle<ExecutableElement> elementHandle; |
2495 |
protected ElementHandle<ExecutableElement> elementHandle; |
2499 |
private boolean isDeprecated; |
2496 |
private boolean isDeprecated; |
Lines 2564-2570
public abstract class JavaCompletionItem implements CompletionItem {
Link Here
|
2564 |
for (int i = 0; i < params.size(); i++) { |
2561 |
for (int i = 0; i < params.size(); i++) { |
2565 |
ParamDesc paramDesc = params.get(i); |
2562 |
ParamDesc paramDesc = params.get(i); |
2566 |
if (i == activeParamsIndex) |
2563 |
if (i == activeParamsIndex) |
2567 |
lText.append(COLOR_END).append(ACTIVE_PARAMETER_COLOR).append(BOLD); |
2564 |
lText.append(COLOR_END).append(LFCustoms.getTextFgColor()).append(BOLD); |
2568 |
lText.append(escape(paramDesc.typeName)); |
2565 |
lText.append(escape(paramDesc.typeName)); |
2569 |
lText.append(' '); |
2566 |
lText.append(' '); |
2570 |
lText.append(paramDesc.name); |
2567 |
lText.append(paramDesc.name); |