From b03a49c1c019ffd2ad84a61e01d04c09928fa79d Mon Sep 17 00:00:00 2001 From: Pierre-Charles David Date: Tue, 28 Jul 2026 09:08:15 +0200 Subject: [PATCH] [cleanup] Remove redundant comment blocks Signed-off-by: Pierre-Charles David --- .../preferences/AbstractCategoryTreeNode.java | 1 - .../preferences/CategoryTreeNode.java | 5 --- .../internal/preferences/ConstraintNode.java | 45 ------------------- .../preferences/PreferenceInitializer.java | 3 -- .../ConstraintsSelectionBlock.java | 5 --- .../emfadapter/EMFConstraintAdapter.java | 9 +--- .../emfadapter/EMFConstraintParser.java | 10 ----- .../EMFValidationContextAdapter.java | 3 -- .../AbstractGetConstraintsOperation.java | 12 +---- .../service/AbstractValidationContext.java | 25 +---------- .../internal/service/AbstractValidator.java | 24 +--------- .../internal/service/BatchValidator.java | 39 ---------------- .../internal/service/ClientContext.java | 7 ++- .../internal/service/ConstraintCache.java | 2 - .../internal/service/LiveValidator.java | 3 -- .../internal/service/ProviderDescriptor.java | 2 - .../internal/util/JavaConstraintParser.java | 1 - .../util/XmlConfigurationElement.java | 14 ------ .../util/XmlConstraintDescriptor.java | 15 ------- .../emf/validation/model/Category.java | 1 - .../service/AbstractConstraintDescriptor.java | 18 -------- .../actions/BatchValidationDelegate.java | 5 --- .../actions/EnableLiveValidationDelegate.java | 5 --- .../actions/LiveValidationContentAdapter.java | 7 --- .../actions/ShowValidationEventsDelegate.java | 5 --- .../constraints/NonEmptyNamesConstraint.java | 7 --- .../ValidationDelegateClientSelector.java | 6 --- 27 files changed, 8 insertions(+), 271 deletions(-) diff --git a/bundles/org.eclipse.emf.validation.ui/src/org/eclipse/emf/validation/ui/internal/preferences/AbstractCategoryTreeNode.java b/bundles/org.eclipse.emf.validation.ui/src/org/eclipse/emf/validation/ui/internal/preferences/AbstractCategoryTreeNode.java index 60dc13a2..0cb699b5 100644 --- a/bundles/org.eclipse.emf.validation.ui/src/org/eclipse/emf/validation/ui/internal/preferences/AbstractCategoryTreeNode.java +++ b/bundles/org.eclipse.emf.validation.ui/src/org/eclipse/emf/validation/ui/internal/preferences/AbstractCategoryTreeNode.java @@ -141,7 +141,6 @@ public ICategoryTreeNode[] getChildren() { return children; } - // implements the interface method @Override public final ICategoryTreeNode getParent() { return parent; diff --git a/bundles/org.eclipse.emf.validation.ui/src/org/eclipse/emf/validation/ui/internal/preferences/CategoryTreeNode.java b/bundles/org.eclipse.emf.validation.ui/src/org/eclipse/emf/validation/ui/internal/preferences/CategoryTreeNode.java index c7db834b..3b3a7fe2 100644 --- a/bundles/org.eclipse.emf.validation.ui/src/org/eclipse/emf/validation/ui/internal/preferences/CategoryTreeNode.java +++ b/bundles/org.eclipse.emf.validation.ui/src/org/eclipse/emf/validation/ui/internal/preferences/CategoryTreeNode.java @@ -208,13 +208,11 @@ public boolean accept(IConstraintDescriptor constraint, EObject target) { return result; } - // implements the interface method @Override public boolean isChecked() { return checked; } - // implements the interface method @Override public boolean isGrayed() { return grayed; @@ -248,7 +246,6 @@ protected List createChildren() { return result; } - // implements the interface method @Override public void checkStateChanged(CheckStateChangedEvent event) { boolean newState = event.getChecked(); @@ -329,7 +326,6 @@ private void updateParent() { } } - // implements the interface method @Override public void updateCheckState(ICategoryTreeNode child) { if (child.isGrayed()) { @@ -364,7 +360,6 @@ public void updateCheckState(ICategoryTreeNode child) { } } - // implements the interface method @Override public void updateCheckState(IConstraintNode constraint) { boolean newValue = constraint.isChecked(); diff --git a/bundles/org.eclipse.emf.validation.ui/src/org/eclipse/emf/validation/ui/internal/preferences/ConstraintNode.java b/bundles/org.eclipse.emf.validation.ui/src/org/eclipse/emf/validation/ui/internal/preferences/ConstraintNode.java index fbc83b31..107e7fbb 100644 --- a/bundles/org.eclipse.emf.validation.ui/src/org/eclipse/emf/validation/ui/internal/preferences/ConstraintNode.java +++ b/bundles/org.eclipse.emf.validation.ui/src/org/eclipse/emf/validation/ui/internal/preferences/ConstraintNode.java @@ -75,65 +75,41 @@ public static void flushCache() { instanceMap.clear(); } - /* - * (non-Javadoc) Implements the inherited method. - */ @Override public String getId() { return constraint.getId(); } - /* - * (non-Javadoc) Implements the inherited method. - */ @Override public String getName() { return constraint.getName(); } - /* - * (non-Javadoc) Implements the inherited method. - */ @Override public String getDescription() { return constraint.getDescription(); } - /* - * (non-Javadoc) Implements the inherited method. - */ @Override public Collection getCategories() { return constraint.getCategories(); } - /* - * (non-Javadoc) Implements the inherited method. - */ @Override public String getEvaluationMode() { return constraint.getEvaluationMode().getLocalizedName(); } - /* - * (non-Javadoc) Implements the inherited method. - */ @Override public String getSeverity() { return constraint.getSeverity().getLocalizedName(); } - /* - * (non-Javadoc) Implements the inherited method. - */ @Override public boolean isChecked() { return checked; } - /* - * (non-Javadoc) Implements the inherited method. - */ @Override public void setChecked(boolean checked) { if (checked != isChecked()) { @@ -151,9 +127,6 @@ public void setChecked(boolean checked) { } } - /* - * (non-Javadoc) Implements the inherited method. - */ @Override public boolean isMandatory() { if (mandatory == null) { @@ -172,25 +145,16 @@ public boolean isMandatory() { return mandatory.booleanValue(); } - /* - * (non-Javadoc) Implements the inherited method. - */ @Override public boolean isErrored() { return constraint.isError(); } - /* - * (non-Javadoc) Implements the inherited method. - */ @Override public void addCategory(ICategoryTreeNode category) { categories.add(category); } - /* - * (non-Javadoc) Implements the inherited method. - */ @Override public void checkStateChanged(CheckStateChangedEvent event) { if (event.getChecked() != isChecked()) { @@ -208,9 +172,6 @@ public void checkStateChanged(CheckStateChangedEvent event) { } } - /* - * (non-Javadoc) Implements the inherited method. - */ @Override public void applyToPreferences() { // set the preference @@ -220,17 +181,11 @@ public void applyToPreferences() { constraint.setEnabled(isChecked()); } - /* - * (non-Javadoc) Implements the inherited method. - */ @Override public void revertFromPreferences() { setChecked(!EMFModelValidationPreferences.isConstraintDisabled(constraint.getId())); } - /* - * (non-Javadoc) Implements the inherited method. - */ @Override public void restoreDefaults() { setChecked(!EMFModelValidationPreferences.isConstraintDisabledByDefault(constraint.getId())); diff --git a/bundles/org.eclipse.emf.validation.ui/src/org/eclipse/emf/validation/ui/internal/preferences/PreferenceInitializer.java b/bundles/org.eclipse.emf.validation.ui/src/org/eclipse/emf/validation/ui/internal/preferences/PreferenceInitializer.java index 9ebb9dc4..489d197f 100644 --- a/bundles/org.eclipse.emf.validation.ui/src/org/eclipse/emf/validation/ui/internal/preferences/PreferenceInitializer.java +++ b/bundles/org.eclipse.emf.validation.ui/src/org/eclipse/emf/validation/ui/internal/preferences/PreferenceInitializer.java @@ -29,9 +29,6 @@ public PreferenceInitializer() { super(); } - /* - * (non-Javadoc) Implements the inherited method. - */ @Override public void initializeDefaultPreferences() { Preferences prefs = ValidationUIPlugin.getPlugin().getPluginPreferences(); diff --git a/bundles/org.eclipse.emf.validation.ui/src/org/eclipse/emf/validation/ui/preferences/ConstraintsSelectionBlock.java b/bundles/org.eclipse.emf.validation.ui/src/org/eclipse/emf/validation/ui/preferences/ConstraintsSelectionBlock.java index d1497d2e..af619e94 100644 --- a/bundles/org.eclipse.emf.validation.ui/src/org/eclipse/emf/validation/ui/preferences/ConstraintsSelectionBlock.java +++ b/bundles/org.eclipse.emf.validation.ui/src/org/eclipse/emf/validation/ui/preferences/ConstraintsSelectionBlock.java @@ -201,9 +201,6 @@ public void inputChanged(Viewer newViewer, Object oldInput, Object newInput) { } } - /* - * (non-Javadoc) Redefines/Implements/Extends the inherited method. - */ @Override public void checkStateChanged(CheckStateChangedEvent event) { category.updateCheckState((IConstraintNode) event.getElement()); @@ -220,7 +217,6 @@ private class Mediator implements ISelectionChangedListener, ICheckStateListener private boolean respondingToUserSelection; - // implements the interface method @Override public void checkStateChanged(CheckStateChangedEvent event) { Object element = event.getElement(); @@ -261,7 +257,6 @@ public void checkStateChanged(CheckStateChangedEvent event) { } } - // implements the interface method @Override public void selectionChanged(SelectionChangedEvent event) { IStructuredSelection selection = (IStructuredSelection) event.getSelection(); diff --git a/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/emfadapter/EMFConstraintAdapter.java b/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/emfadapter/EMFConstraintAdapter.java index 7aca755f..1ae62eca 100644 --- a/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/emfadapter/EMFConstraintAdapter.java +++ b/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/emfadapter/EMFConstraintAdapter.java @@ -78,7 +78,6 @@ public EMFConstraintAdapter(IConstraintDescriptor descriptor, Method validationM validationArgs[1] = null; } - // implements the interface method @Override public IStatus validate(IValidationContext ctx) { EMFValidationContextAdapter ctxAdapter = (EMFValidationContextAdapter) validationArgs[0]; @@ -90,10 +89,7 @@ public IStatus validate(IValidationContext ctx) { boolean success = ((Boolean) validationMethod.invoke(ctx.getTarget(), validationArgs)).booleanValue(); return success ? ctx.createSuccessStatus() : fail(ctxAdapter); - } catch (IllegalAccessException e) { - ctx.disableCurrentConstraint(e); - return disabledInfo(ctx, e); - } catch (InvocationTargetException e) { + } catch (IllegalAccessException | InvocationTargetException e) { ctx.disableCurrentConstraint(e); return disabledInfo(ctx, e); } finally { @@ -105,9 +101,6 @@ public IStatus validate(IValidationContext ctx) { } } - /* - * (non-Javadoc) Implements the interface method. - */ @Override public IConstraintDescriptor getDescriptor() { return descriptor; diff --git a/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/emfadapter/EMFConstraintParser.java b/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/emfadapter/EMFConstraintParser.java index 1363e342..942be9df 100644 --- a/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/emfadapter/EMFConstraintParser.java +++ b/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/emfadapter/EMFConstraintParser.java @@ -49,14 +49,6 @@ public class EMFConstraintParser implements IParameterizedConstraintParser, IXml private static final Class[] VALIDATION_METHOD_SIGNATURE = new Class[] { DiagnosticChain.class, java.util.Map.class, }; - /** - * Initializes me. - */ - public EMFConstraintParser() { - super(); - } - - // implements the interface method @Override public IModelConstraint parseConstraint(IParameterizedConstraintDescriptor descriptor) throws ConstraintParserException { @@ -67,7 +59,6 @@ public IModelConstraint parseConstraint(IParameterizedConstraintDescriptor descr return parseConstraint(className, methodName, descriptor); } - // implements the interface method @Override public IModelConstraint parseConstraint(IXmlConstraintDescriptor descriptor) throws ConstraintParserException { // the EMF interface name and method must be specified in the XML @@ -77,7 +68,6 @@ public IModelConstraint parseConstraint(IXmlConstraintDescriptor descriptor) thr return parseConstraint(className, methodName, descriptor); } - // implements the interface method private IModelConstraint parseConstraint(String className, String methodName, IConstraintDescriptor descriptor) throws ConstraintParserException { diff --git a/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/emfadapter/EMFValidationContextAdapter.java b/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/emfadapter/EMFValidationContextAdapter.java index ee3ea0b5..c9fee7c5 100644 --- a/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/emfadapter/EMFValidationContextAdapter.java +++ b/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/emfadapter/EMFValidationContextAdapter.java @@ -38,9 +38,6 @@ public EMFValidationContextAdapter() { super(EMFModelValidationPlugin.getPluginId(), 0, ValidationMessages.emfadapter_noMessage, null); } - /* - * (non-Javadoc) Redefines the inherited method - */ @Override public void add(Diagnostic diagnostic) { if (diagnostic.getSeverity() != Diagnostic.OK) { diff --git a/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/service/AbstractGetConstraintsOperation.java b/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/service/AbstractGetConstraintsOperation.java index 64febd99..dbe33cc0 100644 --- a/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/service/AbstractGetConstraintsOperation.java +++ b/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/service/AbstractGetConstraintsOperation.java @@ -41,13 +41,6 @@ public abstract class AbstractGetConstraintsOperation implements IProviderOperat private AbstractValidationContext context; - /** - * Initializes me. - */ - public AbstractGetConstraintsOperation() { - super(); - } - /** * Sets the EMF object that is to be validated. * @@ -61,7 +54,6 @@ protected final void setTarget(EObject eObject) { myConstraints.clear(); // getting constraints for a new target object } - // implements the interface method @Override public final EObject getEObject() { return eObject; @@ -86,12 +78,10 @@ private void maybeInitializeContext() { // initialize the context now, if necessary if (context == null) { context = createContext(); - filteredConstraints = new FilteredCollection<>(getUnfilteredConstraints(), - context.getConstraintFilter()); + filteredConstraints = new FilteredCollection<>(getUnfilteredConstraints(), context.getConstraintFilter()); } } - // implements the interface method @Override public final Collection getConstraints() { return filteredConstraints; diff --git a/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/service/AbstractValidationContext.java b/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/service/AbstractValidationContext.java index 158f29a0..f817a452 100644 --- a/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/service/AbstractValidationContext.java +++ b/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/service/AbstractValidationContext.java @@ -212,7 +212,6 @@ public Object getFeatureNewValue() { return null; } - // implements the interface method @Override public void disableCurrentConstraint(Throwable exception) { assert exception != null; @@ -220,18 +219,16 @@ public void disableCurrentConstraint(Throwable exception) { getDescriptor().setError(exception); } - // implements the interface method @Override public void skipCurrentConstraintFor(EObject eObject) { ignoredConstraints.ignore(eObject, getDescriptor()); } - // implements the interface method @Override public void skipCurrentConstraintForAll(Collection eObjects) { for (Object next : eObjects) { - if (next instanceof EObject) { - skipCurrentConstraintFor((EObject) next); + if (next instanceof EObject eObject) { + skipCurrentConstraintFor(eObject); } } } @@ -262,13 +259,11 @@ public boolean isDisabled() { return !getDescriptor().isEnabled(); } - // implements the interface method @Override public final Object getCurrentConstraintData() { return constraintData.get(getConstraint()); } - // implements the interface method @Override public final Object putCurrentConstraintData(Object newData) { return constraintData.put(getConstraint(), newData); @@ -293,7 +288,6 @@ void initializeResultLocus() { resultLocus.add(getTarget()); } - // implements the interface method @Override public void addResult(EObject eObject) { assert eObject != null; @@ -312,13 +306,11 @@ public void addResults(Collection eObjects) { } } - // implements the interface method @Override public Set getResultLocus() { return java.util.Collections.unmodifiableSet(resultLocus); } - // implements the interface method @Override public final String getCurrentConstraintId() { return getConstraint().getDescriptor().getId(); @@ -352,7 +344,6 @@ private void setConstraint(IModelConstraint constraint) { currentDescriptor = constraint.getDescriptor(); } - // implements the interface method @Override public final EObject getTarget() { return getOperation().getEObject(); @@ -381,7 +372,6 @@ void setReportSuccesses(boolean b) { this.reportSuccesses = b; } - // implements the interface method @Override public IStatus createSuccessStatus() { if (Trace.shouldTrace(EMFModelValidationDebugOptions.CONSTRAINTS_EVALUATION)) { @@ -392,7 +382,6 @@ public IStatus createSuccessStatus() { return isReportSuccesses() ? new SuccessStatus(getTarget(), getConstraint()) : Status.OK_STATUS; } - // implements the interface method @Override public IStatus createFailureStatus(Object... messageArgs) { @@ -426,7 +415,6 @@ class ConstraintsIterator implements Iterator { this.delegateIterator = delegateCollection.iterator(); } - // implements the interface method @Override public boolean hasNext() { return delegateIterator.hasNext(); @@ -507,25 +495,16 @@ private static class SuccessStatus extends Status implements IConstraintStatus { this.constraint = constraint; } - /* - * (non-Javadoc) Implements the inherited method. - */ @Override public IModelConstraint getConstraint() { return constraint; } - /* - * (non-Javadoc) Implements the inherited method. - */ @Override public EObject getTarget() { return target; } - /* - * (non-Javadoc) Implements the inherited method. - */ @Override public Set getResultLocus() { return Collections.emptySet(); diff --git a/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/service/AbstractValidator.java b/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/service/AbstractValidator.java index a97e9359..de151bb5 100644 --- a/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/service/AbstractValidator.java +++ b/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/service/AbstractValidator.java @@ -72,25 +72,16 @@ protected AbstractValidator(EvaluationMode mode, IProviderOperationExecutor e this.executor = executor; } - /* - * (non-Javadoc) Implements the inherited method. - */ @Override public final EvaluationMode getEvaluationMode() { return mode; } - /* - * (non-Javadoc) Implements the inherited method. - */ @Override public boolean isReportSuccesses() { return getOption(OPTION_REPORT_SUCCESSES); } - /* - * (non-Javadoc) Implements the inherited method. - */ @Override public void setReportSuccesses(boolean reportSuccesses) { if (reportSuccesses != isReportSuccesses()) { @@ -243,11 +234,7 @@ protected IStatus evaluateConstraints(AbstractValidationContext ctx, List objects, IProgressMonitor monitor) { IStatus result; @@ -133,9 +112,6 @@ public IStatus validate(Collection objects, IProgressMonitor return result; } - /* - * (non-Javadoc) Implements the inherited method. - */ @Override protected Collection doValidate(Collection objects, Set clientContexts) { @@ -290,9 +266,6 @@ private static class DefaultRecursiveTraversalStrategy implements ITraversalStra private Iterator delegateIterator; private ITraversalStrategy current; - /* - * (non-Javadoc) Redefines/Implements/Extends the inherited method. - */ @Override public void startTraversal(Collection traversalRoots, IProgressMonitor monitor) { current = null; @@ -313,9 +286,6 @@ public void startTraversal(Collection traversalRoots, IProgre delegateIterator = delegates.keySet().iterator(); } - /* - * (non-Javadoc) Redefines/Implements/Extends the inherited method. - */ @Override public boolean hasNext() { if ((current == null) && (delegateIterator.hasNext())) { @@ -336,9 +306,6 @@ public boolean hasNext() { return true; } - /* - * (non-Javadoc) Redefines/Implements/Extends the inherited method. - */ @Override public EObject next() { if (!hasNext()) { @@ -348,9 +315,6 @@ public EObject next() { return current.next(); } - /* - * (non-Javadoc) Redefines/Implements/Extends the inherited method. - */ @Override public boolean isClientContextChanged() { if (current != null) { @@ -360,9 +324,6 @@ public boolean isClientContextChanged() { return false; } - /* - * (non-Javadoc) Redefines/Implements/Extends the inherited method. - */ @Override public void elementValidated(EObject element, IStatus status) { current.elementValidated(element, status); diff --git a/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/service/ClientContext.java b/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/service/ClientContext.java index f9bd4b4b..d53662a9 100644 --- a/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/service/ClientContext.java +++ b/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/service/ClientContext.java @@ -384,9 +384,8 @@ static void pruneExtensions(Set contexts) { repeat = false; for (IClientContext next : contexts) { - if ((next instanceof ClientContext) - && contexts.removeAll(((ClientContext) next).allExtendedContexts())) { - + if ((next instanceof ClientContext clientContext) + && contexts.removeAll(clientContext.allExtendedContexts())) { repeat = true; break; } @@ -399,7 +398,7 @@ static void pruneExtensions(Set contexts) { */ @Override public boolean equals(Object obj) { - return (obj instanceof ClientContext) && ((ClientContext) obj).getId().equals(getId()); + return (obj instanceof ClientContext clientContext) && clientContext.getId().equals(getId()); } /** diff --git a/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/service/ConstraintCache.java b/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/service/ConstraintCache.java index 2d5446fd..f0f1c34f 100644 --- a/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/service/ConstraintCache.java +++ b/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/service/ConstraintCache.java @@ -294,7 +294,6 @@ private Collection execute(AbstractGetConstraintsOperation ope return operation.getUnfilteredConstraints(); } - // implements the interface method @Override public Collection getLiveConstraints(Notification notification, Collection constraints) { @@ -339,7 +338,6 @@ public Collection getLiveConstraints(Notification notification return result; } - // implements the interface method @Override public Collection getBatchConstraints(EObject eObject, Collection constraints) { diff --git a/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/service/LiveValidator.java b/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/service/LiveValidator.java index 9d02159a..dbb5ab59 100644 --- a/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/service/LiveValidator.java +++ b/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/service/LiveValidator.java @@ -50,9 +50,6 @@ public LiveValidator(IProviderOperationExecutor executor) { super(EvaluationMode.LIVE, executor); } - /* - * (non-Javadoc) Implements the inherited method. - */ @Override protected Collection doValidate(Collection objects, Set clientContexts) { diff --git a/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/service/ProviderDescriptor.java b/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/service/ProviderDescriptor.java index eabc5950..e4fbda65 100644 --- a/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/service/ProviderDescriptor.java +++ b/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/service/ProviderDescriptor.java @@ -208,13 +208,11 @@ public final boolean isCacheEnabled() { return shouldCacheConstraints; } - // implements the interface method @Override public boolean isCache() { return false; } - // implements the interface method @Override public boolean isXmlProvider() { String className = getConfig().getAttribute(XmlConfig.A_CLASS); diff --git a/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/util/JavaConstraintParser.java b/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/util/JavaConstraintParser.java index 8d04a582..2403f856 100644 --- a/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/util/JavaConstraintParser.java +++ b/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/util/JavaConstraintParser.java @@ -94,7 +94,6 @@ public JavaConstraintParser() { super(); } - // implements the interface method @Override public IModelConstraint parseConstraint(IParameterizedConstraintDescriptor descriptor) throws ConstraintParserException { diff --git a/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/util/XmlConfigurationElement.java b/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/util/XmlConfigurationElement.java index ff30197a..d07e8da0 100644 --- a/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/util/XmlConfigurationElement.java +++ b/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/util/XmlConfigurationElement.java @@ -97,19 +97,16 @@ public Object createExecutableExtension(String propertyName) throws CoreExceptio throw ce; } - // implements the interface method @Override public String getAttribute(String name) { return attributes.get(name); } - // implements the interface method @Override public String getAttributeAsIs(String name) { return getAttribute(name); } - // implements the interface method @Override public String[] getAttributeNames() { return attributes.keySet().toArray(new String[attributes.size()]); @@ -125,13 +122,11 @@ protected final void putAttribute(String name, String newValue) { attributes.put(name, newValue); } - // implements the interface method @Override public IConfigurationElement[] getChildren() { return children.toArray(new IConfigurationElement[children.size()]); } - // implements the interface method @Override public IConfigurationElement[] getChildren(String name) { java.util.List result = new java.util.ArrayList<>(children.size()); @@ -167,19 +162,16 @@ protected final void removeChild(IConfigurationElement child) { children.remove(child); } - // implements the interface method @Override public IExtension getDeclaringExtension() { return extension; } - // implements the interface method @Override public String getName() { return myName; } - // implements the interface method @Override public String getValue() { return value; @@ -194,7 +186,6 @@ protected final void setValue(String value) { this.value = value; } - // implements the interface method @Override public String getValueAsIs() { return getValue(); @@ -339,11 +330,6 @@ public String getFileName() { return getBaseUrl().getFile(); } - /* - * (non-Javadoc) - * - * @see org.eclipse.core.runtime.IConfigurationElement#getParent() - */ @Override public Object getParent() { return parent; diff --git a/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/util/XmlConstraintDescriptor.java b/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/util/XmlConstraintDescriptor.java index 85b773c9..9a7e135f 100644 --- a/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/util/XmlConstraintDescriptor.java +++ b/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/internal/util/XmlConstraintDescriptor.java @@ -184,31 +184,26 @@ public static String normalizedId(String pluginId, String id) { return result; } - // implements the interface method @Override public IConfigurationElement getConfig() { return config; } - // implements the interface method @Override public String getName() { return name; } - // implements the interface method @Override public String getId() { return id; } - // implements the interface method @Override public String getPluginId() { return pluginId; } - // implements the interface method @Override public String getDescription() { return description; @@ -218,7 +213,6 @@ private void setDescription(String description) { this.description = description; } - // implements the interface method @Override public ConstraintSeverity getSeverity() { return severity; @@ -230,7 +224,6 @@ private void setSeverity(ConstraintSeverity severity) { this.severity = severity; } - // implements the interface method @Override public int getStatusCode() { return statusCode; @@ -269,7 +262,6 @@ private TargetDescriptor getTarget(Object key) { return result; } - // implements the interface method @Override public EvaluationMode getEvaluationMode() { return mode; @@ -279,9 +271,6 @@ private void setEvaluationMode(EvaluationMode mode) { this.mode = mode; } - /* - * (non-Javadoc) Implements the inherited method. - */ @Override public void resolveTargetTypes(String[] namespaceUris) { if (resolved) { @@ -369,7 +358,6 @@ private boolean isUniversal() { return targetMap.isEmpty(); } - // implements the interface method @Override public boolean targetsTypeOf(EObject eObject) { return (eObject == null) ? false : isUniversal() || targetsType(eObject.eClass()); @@ -406,7 +394,6 @@ private TargetDescriptor addTargetType(String typeName) { return result; } - // implements the interface method @Override public boolean targetsEvent(Notification notification) { if (notification.getNotifier() instanceof EObject) { @@ -443,7 +430,6 @@ private boolean targetsEvent(EClass eClass, EMFEventType eventType, EStructuralF return getTarget(eClass).hasEvent(eventType, feature); } - // implements the interface method @Override public String getMessagePattern() { return messagePattern; @@ -453,7 +439,6 @@ private void setMessagePattern(String messagePattern) { this.messagePattern = messagePattern; } - // implements the interface method @Override public String getBody() { return body; diff --git a/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/model/Category.java b/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/model/Category.java index b3353add..d2611eab 100644 --- a/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/model/Category.java +++ b/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/model/Category.java @@ -376,7 +376,6 @@ static Collator getCollator() { return collator; } - // implements the interface method @Override public int compareTo(Category other) { Collator aCollator = getCollator(); diff --git a/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/service/AbstractConstraintDescriptor.java b/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/service/AbstractConstraintDescriptor.java index 97794050..7e55f227 100644 --- a/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/service/AbstractConstraintDescriptor.java +++ b/bundles/org.eclipse.emf.validation/src/org/eclipse/emf/validation/service/AbstractConstraintDescriptor.java @@ -46,17 +46,11 @@ protected AbstractConstraintDescriptor() { categories.add(CategoryManager.getInstance().getDefaultCategory()); } - /* - * (non-Javadoc) Implements the inherited method. - */ @Override public final boolean isError() { return getException() != null; } - /* - * (non-Javadoc) Implements the inherited method. - */ @Override public final Throwable getException() { return exception; @@ -72,17 +66,11 @@ public final void setError(Throwable exception) { this.exception = exception; } - /* - * (non-Javadoc) Implements the inherited method. - */ @Override public final boolean isEnabled() { return !isError() && enabled; } - /* - * (non-Javadoc) Implements the inherited method. - */ @Override public final void setEnabled(boolean enabled) { if (!enabled) { @@ -118,13 +106,11 @@ private boolean isMandatory() { return result; } - // implements the interface method @Override public Set getCategories() { return unmodCategories; } - // implements the interface method @Override public void addCategory(Category category) { Category defaultCategory = CategoryManager.getInstance().getDefaultCategory(); @@ -150,7 +136,6 @@ public void addCategory(Category category) { } } - // implements the interface method @Override public void removeCategory(Category category) { if (categories.contains(category)) { @@ -172,19 +157,16 @@ public void removeCategory(Category category) { } } - // implements the interface method @Override public boolean isBatch() { return getEvaluationMode().isBatch(); } - // implements the interface method @Override public boolean isLive() { return getEvaluationMode().isLive(); } - // implements the interface method public final IConstraintDescriptor getDescriptor() { return this; } diff --git a/examples/org.eclipse.emf.validation.examples.general/src/org/eclipse/emf/validation/examples/general/actions/BatchValidationDelegate.java b/examples/org.eclipse.emf.validation.examples.general/src/org/eclipse/emf/validation/examples/general/actions/BatchValidationDelegate.java index 98731992..80aa4b32 100644 --- a/examples/org.eclipse.emf.validation.examples.general/src/org/eclipse/emf/validation/examples/general/actions/BatchValidationDelegate.java +++ b/examples/org.eclipse.emf.validation.examples.general/src/org/eclipse/emf/validation/examples/general/actions/BatchValidationDelegate.java @@ -142,11 +142,6 @@ public void runWithEvent(IAction action, Event event) { run(action); } - /* - * (non-Javadoc) - * - * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction) - */ @Override public void run(IAction action) { ValidationDelegateClientSelector.running = true; diff --git a/examples/org.eclipse.emf.validation.examples.general/src/org/eclipse/emf/validation/examples/general/actions/EnableLiveValidationDelegate.java b/examples/org.eclipse.emf.validation.examples.general/src/org/eclipse/emf/validation/examples/general/actions/EnableLiveValidationDelegate.java index c54a70a7..4f85dce6 100644 --- a/examples/org.eclipse.emf.validation.examples.general/src/org/eclipse/emf/validation/examples/general/actions/EnableLiveValidationDelegate.java +++ b/examples/org.eclipse.emf.validation.examples.general/src/org/eclipse/emf/validation/examples/general/actions/EnableLiveValidationDelegate.java @@ -140,11 +140,6 @@ public void runWithEvent(IAction action, Event event) { run(action); } - /* - * (non-Javadoc) - * - * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction) - */ @Override public void run(IAction action) { for (Resource r : selectedResources) { diff --git a/examples/org.eclipse.emf.validation.examples.general/src/org/eclipse/emf/validation/examples/general/actions/LiveValidationContentAdapter.java b/examples/org.eclipse.emf.validation.examples.general/src/org/eclipse/emf/validation/examples/general/actions/LiveValidationContentAdapter.java index b13b9e0f..eabf7dda 100644 --- a/examples/org.eclipse.emf.validation.examples.general/src/org/eclipse/emf/validation/examples/general/actions/LiveValidationContentAdapter.java +++ b/examples/org.eclipse.emf.validation.examples.general/src/org/eclipse/emf/validation/examples/general/actions/LiveValidationContentAdapter.java @@ -42,13 +42,6 @@ class LiveValidationContentAdapter extends EContentAdapter { actionDelegate = delegate; } - /* - * (non-Javadoc) - * - * @see - * org.eclipse.emf.ecore.util.EContentAdapter#notifyChanged(org.eclipse.emf. - * common.notify.Notification) - */ @Override public void notifyChanged(final Notification notification) { super.notifyChanged(notification); diff --git a/examples/org.eclipse.emf.validation.examples.general/src/org/eclipse/emf/validation/examples/general/actions/ShowValidationEventsDelegate.java b/examples/org.eclipse.emf.validation.examples.general/src/org/eclipse/emf/validation/examples/general/actions/ShowValidationEventsDelegate.java index da4ea0c8..610f28d2 100644 --- a/examples/org.eclipse.emf.validation.examples.general/src/org/eclipse/emf/validation/examples/general/actions/ShowValidationEventsDelegate.java +++ b/examples/org.eclipse.emf.validation.examples.general/src/org/eclipse/emf/validation/examples/general/actions/ShowValidationEventsDelegate.java @@ -72,11 +72,6 @@ public void runWithEvent(IAction action, Event event) { run(action); } - /* - * (non-Javadoc) - * - * @see org.eclipse.ui.IActionDelegate#run(org.eclipse.jface.action.IAction) - */ @Override public void run(IAction action) { ValidationListener.displayEvents = action.isChecked(); diff --git a/examples/org.eclipse.emf.validation.examples.general/src/org/eclipse/emf/validation/examples/general/constraints/NonEmptyNamesConstraint.java b/examples/org.eclipse.emf.validation.examples.general/src/org/eclipse/emf/validation/examples/general/constraints/NonEmptyNamesConstraint.java index c15b69a0..91ec2cac 100644 --- a/examples/org.eclipse.emf.validation.examples.general/src/org/eclipse/emf/validation/examples/general/constraints/NonEmptyNamesConstraint.java +++ b/examples/org.eclipse.emf.validation.examples.general/src/org/eclipse/emf/validation/examples/general/constraints/NonEmptyNamesConstraint.java @@ -24,13 +24,6 @@ */ public class NonEmptyNamesConstraint extends AbstractModelConstraint { - /* - * (non-Javadoc) - * - * @see - * org.eclipse.emf.validation.AbstractModelConstraint#validate(org.eclipse.emf. - * validation.IValidationContext) - */ @Override public IStatus validate(IValidationContext ctx) { EObject eObj = ctx.getTarget(); diff --git a/examples/org.eclipse.emf.validation.examples.general/src/org/eclipse/emf/validation/examples/general/constraints/ValidationDelegateClientSelector.java b/examples/org.eclipse.emf.validation.examples.general/src/org/eclipse/emf/validation/examples/general/constraints/ValidationDelegateClientSelector.java index 18ed20f7..774db0f2 100644 --- a/examples/org.eclipse.emf.validation.examples.general/src/org/eclipse/emf/validation/examples/general/constraints/ValidationDelegateClientSelector.java +++ b/examples/org.eclipse.emf.validation.examples.general/src/org/eclipse/emf/validation/examples/general/constraints/ValidationDelegateClientSelector.java @@ -38,12 +38,6 @@ public class ValidationDelegateClientSelector public static boolean running = false; - /* - * (non-Javadoc) - * - * @see - * org.eclipse.emf.validation.model.IClientSelector#selects(java.lang.Object) - */ @Override public boolean selects(Object object) { return running;