Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Keller2015-11-29 21:11:24 +0000
committerMarkus Keller2015-12-01 01:50:38 +0000
commit64b34b614087b96e6cc92c72143768b98ae32602 (patch)
tree4f4f493fd8161f9a5885f11021cd14a923946e9f /org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples
parentf01dd079500e382823d5d1767996cb9ef85233ee (diff)
downloadeclipse.platform.text-64b34b614087b96e6cc92c72143768b98ae32602.tar.gz
eclipse.platform.text-64b34b614087b96e6cc92c72143768b98ae32602.tar.xz
eclipse.platform.text-64b34b614087b96e6cc92c72143768b98ae32602.zip
Bug 478673: added @Override/@Deprecated and removed non-Javadoc boilerplate
Diffstat (limited to 'org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples')
-rw-r--r--org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/NonRuleBasedDamagerRepairer.java12
-rw-r--r--org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/TagRule.java1
-rw-r--r--org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/TemplateEditor.java2
-rw-r--r--org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/XMLConfiguration.java4
-rw-r--r--org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/XMLDocumentProvider.java1
-rw-r--r--org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/XMLDoubleClickStrategy.java1
-rw-r--r--org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/XMLWhitespaceDetector.java1
-rw-r--r--org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/preferences/TemplatesPreferencePage.java2
-rw-r--r--org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/template/AntVariableResolver.java5
-rw-r--r--org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/template/XMLCompletionProcessor.java5
10 files changed, 22 insertions, 12 deletions
diff --git a/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/NonRuleBasedDamagerRepairer.java b/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/NonRuleBasedDamagerRepairer.java
index 8e747b3c0..61d5f6069 100644
--- a/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/NonRuleBasedDamagerRepairer.java
+++ b/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/NonRuleBasedDamagerRepairer.java
@@ -42,9 +42,7 @@ public class NonRuleBasedDamagerRepairer implements IPresentationDamager, IPrese
fDefaultTextAttribute= defaultTextAttribute;
}
- /*
- * @see org.eclipse.jface.text.presentation.IPresentationRepairer#setDocument(org.eclipse.jface.text.IDocument)
- */
+ @Override
public void setDocument(IDocument document) {
fDocument= document;
}
@@ -73,9 +71,7 @@ public class NonRuleBasedDamagerRepairer implements IPresentationDamager, IPrese
}
}
- /*
- * @see org.eclipse.jface.text.presentation.IPresentationDamager#getDamageRegion(org.eclipse.jface.text.ITypedRegion, org.eclipse.jface.text.DocumentEvent, boolean)
- */
+ @Override
public IRegion getDamageRegion(ITypedRegion partition, DocumentEvent event, boolean documentPartitioningChanged) {
if (!documentPartitioningChanged) {
try {
@@ -100,9 +96,7 @@ public class NonRuleBasedDamagerRepairer implements IPresentationDamager, IPrese
return partition;
}
- /*
- * @see org.eclipse.jface.text.presentation.IPresentationRepairer#createPresentation(org.eclipse.jface.text.TextPresentation, org.eclipse.jface.text.ITypedRegion)
- */
+ @Override
public void createPresentation(TextPresentation presentation, ITypedRegion region) {
addRange(presentation, region.getOffset(), region.getLength(), fDefaultTextAttribute);
}
diff --git a/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/TagRule.java b/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/TagRule.java
index c99705e00..7df6475a8 100644
--- a/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/TagRule.java
+++ b/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/TagRule.java
@@ -19,6 +19,7 @@ public class TagRule extends MultiLineRule {
public TagRule(IToken token) {
super("<", ">", token); //$NON-NLS-1$//$NON-NLS-2$
}
+ @Override
protected boolean sequenceDetected(
ICharacterScanner scanner,
char[] sequence,
diff --git a/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/TemplateEditor.java b/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/TemplateEditor.java
index 48ea1bf77..353b647a8 100644
--- a/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/TemplateEditor.java
+++ b/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/TemplateEditor.java
@@ -32,11 +32,13 @@ public class TemplateEditor extends AbstractDecoratedTextEditor {
setDocumentProvider(new XMLDocumentProvider());
}
+ @Override
public void dispose() {
colorManager.dispose();
super.dispose();
}
+ @Override
protected void createActions() {
super.createActions();
diff --git a/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/XMLConfiguration.java b/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/XMLConfiguration.java
index e22cc7397..c75f5bc5e 100644
--- a/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/XMLConfiguration.java
+++ b/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/XMLConfiguration.java
@@ -37,11 +37,13 @@ public class XMLConfiguration extends TextSourceViewerConfiguration {
this.colorManager= colorManager;
}
+ @Override
public String[] getConfiguredContentTypes(ISourceViewer sourceViewer) {
return new String[]{IDocument.DEFAULT_CONTENT_TYPE, XMLPartitionScanner.XML_COMMENT,
XMLPartitionScanner.XML_TAG};
}
+ @Override
public ITextDoubleClickStrategy getDoubleClickStrategy(ISourceViewer sourceViewer, String contentType) {
if (doubleClickStrategy == null)
doubleClickStrategy= new XMLDoubleClickStrategy();
@@ -66,6 +68,7 @@ public class XMLConfiguration extends TextSourceViewerConfiguration {
return tagScanner;
}
+ @Override
public IPresentationReconciler getPresentationReconciler(ISourceViewer sourceViewer) {
PresentationReconciler reconciler= new PresentationReconciler();
@@ -85,6 +88,7 @@ public class XMLConfiguration extends TextSourceViewerConfiguration {
return reconciler;
}
+ @Override
public IContentAssistant getContentAssistant(ISourceViewer sourceViewer) {
ContentAssistant assistant= new ContentAssistant();
assistant.setDocumentPartitioning(getConfiguredDocumentPartitioning(sourceViewer));
diff --git a/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/XMLDocumentProvider.java b/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/XMLDocumentProvider.java
index ac1068f37..b6a1f60b3 100644
--- a/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/XMLDocumentProvider.java
+++ b/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/XMLDocumentProvider.java
@@ -20,6 +20,7 @@ import org.eclipse.ui.editors.text.FileDocumentProvider;
public class XMLDocumentProvider extends FileDocumentProvider {
+ @Override
protected IDocument createDocument(Object element) throws CoreException {
IDocument document = super.createDocument(element);
if (document != null) {
diff --git a/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/XMLDoubleClickStrategy.java b/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/XMLDoubleClickStrategy.java
index 66f623d3d..4d44971be 100644
--- a/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/XMLDoubleClickStrategy.java
+++ b/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/XMLDoubleClickStrategy.java
@@ -18,6 +18,7 @@ import org.eclipse.jface.text.ITextViewer;
public class XMLDoubleClickStrategy implements ITextDoubleClickStrategy {
protected ITextViewer fText;
+ @Override
public void doubleClicked(ITextViewer part) {
int pos = part.getSelectedRange().x;
diff --git a/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/XMLWhitespaceDetector.java b/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/XMLWhitespaceDetector.java
index aa9483db6..83cc855fa 100644
--- a/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/XMLWhitespaceDetector.java
+++ b/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/editors/XMLWhitespaceDetector.java
@@ -14,6 +14,7 @@ import org.eclipse.jface.text.rules.IWhitespaceDetector;
public class XMLWhitespaceDetector implements IWhitespaceDetector {
+ @Override
public boolean isWhitespace(char c) {
return (c == ' ' || c == '\t' || c == '\n' || c == '\r');
}
diff --git a/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/preferences/TemplatesPreferencePage.java b/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/preferences/TemplatesPreferencePage.java
index 6bb626003..aaeb852e9 100644
--- a/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/preferences/TemplatesPreferencePage.java
+++ b/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/preferences/TemplatesPreferencePage.java
@@ -26,11 +26,13 @@ public class TemplatesPreferencePage extends TemplatePreferencePage {
setContextTypeRegistry(TemplateEditorUI.getDefault().getContextTypeRegistry());
}
+ @Override
protected boolean isShowFormatterSetting() {
return false;
}
+ @Override
public boolean performOk() {
boolean ok= super.performOk();
diff --git a/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/template/AntVariableResolver.java b/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/template/AntVariableResolver.java
index 401feea92..f94551325 100644
--- a/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/template/AntVariableResolver.java
+++ b/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/template/AntVariableResolver.java
@@ -21,14 +21,13 @@ import org.eclipse.jface.text.templates.TemplateVariableResolver;
* their prefix-likeness with the variable type.
*/
public class AntVariableResolver extends TemplateVariableResolver {
- /*
- * @see org.eclipse.jface.text.templates.TemplateVariableResolver#resolveAll(org.eclipse.jface.text.templates.TemplateContext)
- */
+ @Override
protected String[] resolveAll(TemplateContext context) {
String[] proposals= new String[] { "${srcDir}", "${dstDir}" }; //$NON-NLS-1$ //$NON-NLS-2$
Arrays.sort(proposals, new Comparator() {
+ @Override
public int compare(Object o1, Object o2) {
return getCommonPrefixLength(getType(), (String) o2) - getCommonPrefixLength(getType(), (String) o1);
}
diff --git a/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/template/XMLCompletionProcessor.java b/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/template/XMLCompletionProcessor.java
index 6998a0263..481870b9a 100644
--- a/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/template/XMLCompletionProcessor.java
+++ b/org.eclipse.ui.examples.javaeditor/Template Editor Example/org/eclipse/ui/examples/templateeditor/template/XMLCompletionProcessor.java
@@ -40,6 +40,7 @@ public class XMLCompletionProcessor extends TemplateCompletionProcessor {
* @param offset the offset left of which the prefix is detected
* @return the detected prefix
*/
+ @Override
protected String extractPrefix(ITextViewer viewer, int offset) {
IDocument document= viewer.getDocument();
int i= offset;
@@ -67,6 +68,7 @@ public class XMLCompletionProcessor extends TemplateCompletionProcessor {
* @param prefix the prefix
* @return the relevance of the <code>template</code> for the given <code>prefix</code>
*/
+ @Override
protected int getRelevance(Template template, String prefix) {
if (prefix.startsWith("<")) //$NON-NLS-1$
prefix= prefix.substring(1);
@@ -81,6 +83,7 @@ public class XMLCompletionProcessor extends TemplateCompletionProcessor {
* @param contextTypeId the context type, ignored in this implementation
* @return all templates
*/
+ @Override
protected Template[] getTemplates(String contextTypeId) {
return TemplateEditorUI.getDefault().getTemplateStore().getTemplates();
}
@@ -92,6 +95,7 @@ public class XMLCompletionProcessor extends TemplateCompletionProcessor {
* @param region the region, ignored in this implementation
* @return the supported XML context type
*/
+ @Override
protected TemplateContextType getContextType(ITextViewer viewer, IRegion region) {
return TemplateEditorUI.getDefault().getContextTypeRegistry().getContextType(XMLContextType.XML_CONTEXT_TYPE);
}
@@ -102,6 +106,7 @@ public class XMLCompletionProcessor extends TemplateCompletionProcessor {
* @param template the template, ignored in this implementation
* @return the default template image
*/
+ @Override
protected Image getImage(Template template) {
ImageRegistry registry= TemplateEditorUI.getDefault().getImageRegistry();
Image image= registry.get(DEFAULT_IMAGE);

Back to the top