Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ public ICategoryTreeNode[] getChildren() {
return children;
}

// implements the interface method
@Override
public final ICategoryTreeNode getParent() {
return parent;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -248,7 +246,6 @@ protected List<ICategoryTreeNode> createChildren() {
return result;
}

// implements the interface method
@Override
public void checkStateChanged(CheckStateChangedEvent event) {
boolean newState = event.getChecked();
Expand Down Expand Up @@ -329,7 +326,6 @@ private void updateParent() {
}
}

// implements the interface method
@Override
public void updateCheckState(ICategoryTreeNode child) {
if (child.isGrayed()) {
Expand Down Expand Up @@ -364,7 +360,6 @@ public void updateCheckState(ICategoryTreeNode child) {
}
}

// implements the interface method
@Override
public void updateCheckState(IConstraintNode constraint) {
boolean newValue = constraint.isChecked();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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<Category> 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()) {
Expand All @@ -151,9 +127,6 @@ public void setChecked(boolean checked) {
}
}

/*
* (non-Javadoc) Implements the inherited method.
*/
@Override
public boolean isMandatory() {
if (mandatory == null) {
Expand All @@ -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()) {
Expand All @@ -208,9 +172,6 @@ public void checkStateChanged(CheckStateChangedEvent event) {
}
}

/*
* (non-Javadoc) Implements the inherited method.
*/
@Override
public void applyToPreferences() {
// set the preference
Expand All @@ -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()));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@ public PreferenceInitializer() {
super();
}

/*
* (non-Javadoc) Implements the inherited method.
*/
@Override
public void initializeDefaultPreferences() {
Preferences prefs = ValidationUIPlugin.getPlugin().getPluginPreferences();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
Expand All @@ -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();
Expand Down Expand Up @@ -261,7 +257,6 @@ public void checkStateChanged(CheckStateChangedEvent event) {
}
}

// implements the interface method
@Override
public void selectionChanged(SelectionChangedEvent event) {
IStructuredSelection selection = (IStructuredSelection) event.getSelection();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand All @@ -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 {
Expand All @@ -105,9 +101,6 @@ public IStatus validate(IValidationContext ctx) {
}
}

/*
* (non-Javadoc) Implements the interface method.
*/
@Override
public IConstraintDescriptor getDescriptor() {
return descriptor;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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
Expand All @@ -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 {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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.
*
Expand All @@ -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;
Expand All @@ -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<IModelConstraint> getConstraints() {
return filteredConstraints;
Expand Down
Loading