Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJonah Graham2022-04-17 19:34:43 +0000
committerJonah Graham2022-04-20 00:13:15 +0000
commita1c02e2cce72f98aa1c73324225fc53563a81856 (patch)
treedfef033f1eed2f6b46a39700c5c0dddc5a27b405 /core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist
parent148ae40d0f4303d9ee4fcda44a3ef9297f6d3079 (diff)
downloadorg.eclipse.cdt-a1c02e2cce72f98aa1c73324225fc53563a81856.tar.gz
org.eclipse.cdt-a1c02e2cce72f98aa1c73324225fc53563a81856.tar.xz
org.eclipse.cdt-a1c02e2cce72f98aa1c73324225fc53563a81856.zip
[releng] Apply auto-clean of save to all files with Eclipse 4.23
This mostly is using diamond operator, but includes adding missing @Override and organizing imports and applying formatting improvements in the JDT formatter. Change-Id: Id91cbff33b0a039cc5121945ffbc407ecba45866
Diffstat (limited to 'core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist')
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CContentAssistInvocationContext.java24
-rw-r--r--core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/ContentAssistProcessor.java2
2 files changed, 13 insertions, 13 deletions
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CContentAssistInvocationContext.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CContentAssistInvocationContext.java
index 50f0609adcc..2d6555195ef 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CContentAssistInvocationContext.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/CContentAssistInvocationContext.java
@@ -74,7 +74,7 @@ public class CContentAssistInvocationContext extends ContentAssistInvocationCont
// may need a corresponding adjustment, and this stores the adjusted offset.
private int fAdjustedParseOffset = -1;
- private Lazy<Integer> fContextInfoPosition = new Lazy<Integer>() {
+ private Lazy<Integer> fContextInfoPosition = new Lazy<>() {
@Override
protected Integer calculateValue() {
return guessContextInformationPosition();
@@ -83,7 +83,7 @@ public class CContentAssistInvocationContext extends ContentAssistInvocationCont
private final Lazy<ITranslationUnit> fTU;
- private final Lazy<Integer> fParseOffset = new Lazy<Integer>() {
+ private final Lazy<Integer> fParseOffset = new Lazy<>() {
@Override
protected Integer calculateValue() {
int result = doCalculate();
@@ -196,7 +196,7 @@ public class CContentAssistInvocationContext extends ContentAssistInvocationCont
return null;
}
- private final Lazy<IASTCompletionNode> fCN = new Lazy<IASTCompletionNode>() {
+ private final Lazy<IASTCompletionNode> fCN = new Lazy<>() {
@Override
protected IASTCompletionNode calculateValue() {
int offset = getParseOffset();
@@ -253,7 +253,7 @@ public class CContentAssistInvocationContext extends ContentAssistInvocationCont
}
};
- private final Lazy<Boolean> afterOpeningAngleBracket = new Lazy<Boolean>() {
+ private final Lazy<Boolean> afterOpeningAngleBracket = new Lazy<>() {
@Override
protected Boolean calculateValue() {
final int parseOffset = getParseOffset();
@@ -264,7 +264,7 @@ public class CContentAssistInvocationContext extends ContentAssistInvocationCont
}
};
- private final Lazy<Boolean> afterOpeningParenthesisOrBrace = new Lazy<Boolean>() {
+ private final Lazy<Boolean> afterOpeningParenthesisOrBrace = new Lazy<>() {
@Override
protected Boolean calculateValue() {
final int invocationOffset = getInvocationOffset();
@@ -295,7 +295,7 @@ public class CContentAssistInvocationContext extends ContentAssistInvocationCont
}
};
- private final Lazy<Boolean> inUsingDeclaration = new Lazy<Boolean>() {
+ private final Lazy<Boolean> inUsingDeclaration = new Lazy<>() {
/**
* Checks whether the invocation offset is inside a using-declaration.
*
@@ -331,7 +331,7 @@ public class CContentAssistInvocationContext extends ContentAssistInvocationCont
}
};
- private final Lazy<Boolean> followedBySemicolon = new Lazy<Boolean>() {
+ private final Lazy<Boolean> followedBySemicolon = new Lazy<>() {
@Override
protected Boolean calculateValue() {
final IDocument doc = getDocument();
@@ -342,7 +342,7 @@ public class CContentAssistInvocationContext extends ContentAssistInvocationCont
}
};
- private final Lazy<Boolean> followedByOpeningParen = new Lazy<Boolean>() {
+ private final Lazy<Boolean> followedByOpeningParen = new Lazy<>() {
@Override
protected Boolean calculateValue() {
final IDocument doc = getDocument();
@@ -353,7 +353,7 @@ public class CContentAssistInvocationContext extends ContentAssistInvocationCont
}
};
- private final Lazy<String> functionParameterDelimiter = new Lazy<String>() {
+ private final Lazy<String> functionParameterDelimiter = new Lazy<>() {
@Override
protected String calculateValue() {
String propertyKey = DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_METHOD_DECLARATION_PARAMETERS;
@@ -362,7 +362,7 @@ public class CContentAssistInvocationContext extends ContentAssistInvocationCont
}
};
- private final Lazy<String> templateParameterDelimiter = new Lazy<String>() {
+ private final Lazy<String> templateParameterDelimiter = new Lazy<>() {
@Override
protected String calculateValue() {
String propertyKey = DefaultCodeFormatterConstants.FORMATTER_INSERT_SPACE_AFTER_COMMA_IN_TEMPLATE_PARAMETERS;
@@ -387,7 +387,7 @@ public class CContentAssistInvocationContext extends ContentAssistInvocationCont
fIsCompletion = isCompletion;
fIsContextInformationStyle = !isCompletion;
fIsAutoActivated = isAutoActivated;
- fTU = new Lazy<ITranslationUnit>() {
+ fTU = new Lazy<>() {
@Override
protected ITranslationUnit calculateValue() {
return CUIPlugin.getDefault().getWorkingCopyManager().getWorkingCopy(fEditor.getEditorInput());
@@ -402,7 +402,7 @@ public class CContentAssistInvocationContext extends ContentAssistInvocationCont
*/
public CContentAssistInvocationContext(final ITranslationUnit unit, boolean isCompletion) {
super();
- fTU = new Lazy<ITranslationUnit>() {
+ fTU = new Lazy<>() {
@Override
protected ITranslationUnit calculateValue() {
return unit;
diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/ContentAssistProcessor.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/ContentAssistProcessor.java
index f21a081ec23..b3117214923 100644
--- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/ContentAssistProcessor.java
+++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/text/contentassist/ContentAssistProcessor.java
@@ -92,7 +92,7 @@ public class ContentAssistProcessor implements IContentAssistProcessor {
*/
private static final String PREF_WARN_ABOUT_EMPTY_ASSIST_CATEGORY = "EmptyDefaultAssistCategory"; //$NON-NLS-1$
- private static final Comparator<CompletionProposalCategory> ORDER_COMPARATOR = new Comparator<CompletionProposalCategory>() {
+ private static final Comparator<CompletionProposalCategory> ORDER_COMPARATOR = new Comparator<>() {
@Override
public int compare(CompletionProposalCategory d1, CompletionProposalCategory d2) {
return d1.getSortOrder() - d2.getSortOrder();

Back to the top