Skip to content
Snippets Groups Projects
Commit f5dc216f authored by Alexander Diewald's avatar Alexander Diewald
Browse files

Code-Review: RED

* Red: Namings in CustomUndoRedoForSourceEditor, SourceEditorBase.
* GREEN: annotations.

Issue-Ref: 3582
Issue-Url: https://af3-developer.fortiss.org/issues/3582


Signed-off-by: default avatarAlexander Diewald <diewald@fortiss.org>
parent 6cadad1e
No related branches found
No related tags found
1 merge request!40Moved the abstract source editor to tooling base.
...@@ -3,10 +3,10 @@ AllocationDiagramEditorBase.java fa544546f73eea1150d90b7257b0e6bce82c288c GREEN ...@@ -3,10 +3,10 @@ AllocationDiagramEditorBase.java fa544546f73eea1150d90b7257b0e6bce82c288c GREEN
CommonDiagramEditorBase.java 69994faea09eec342b8dfaa484ffc03b60978496 GREEN CommonDiagramEditorBase.java 69994faea09eec342b8dfaa484ffc03b60978496 GREEN
ConstraintBasedProcessEditor.java 155a5a7ac41c668ae7ef978e8be13b83f5abd67d GREEN ConstraintBasedProcessEditor.java 155a5a7ac41c668ae7ef978e8be13b83f5abd67d GREEN
ConstraintBasedProcessEditorHelper.java 11d48e8a2aecd48eea259a42ef1192c4b292a334 GREEN ConstraintBasedProcessEditorHelper.java 11d48e8a2aecd48eea259a42ef1192c4b292a334 GREEN
CustomUndoRedoForSourceEditor.java 30c68687962e1b8ff299cfdb938c4dad444edee0 YELLOW CustomUndoRedoForSourceEditor.java 3bf49cf31d99482ac4b102132450ab05faf7c22c RED
DiagramEditorBase.java 09663ce095074d1a8eef086284eea0a7776e0431 GREEN DiagramEditorBase.java 09663ce095074d1a8eef086284eea0a7776e0431 GREEN
DiagramKeyHandler.java cfd15ac8f9fc933739cef5e7039960e19826d1ce GREEN DiagramKeyHandler.java cfd15ac8f9fc933739cef5e7039960e19826d1ce GREEN
FormsEditorBase.java 4046d340913d951340084ae7240d79f8e75cb8d4 GREEN FormsEditorBase.java 4046d340913d951340084ae7240d79f8e75cb8d4 GREEN
GEFEditorBase.java e668f596f45f07215994cbbd3929a9438331718f GREEN GEFEditorBase.java e668f596f45f07215994cbbd3929a9438331718f GREEN
SourceEditorBase.java 66c3c1c0aea638912efeef6de7cc6502481b95ae YELLOW SourceEditorBase.java be8c65507ff54ad79d1a5b5a35de649a3f86deb9 RED
TreeViewerEditorBase.java 1c59689ff57c4f3cc180d85f13021fc03461ecb0 GREEN TreeViewerEditorBase.java 1c59689ff57c4f3cc180d85f13021fc03461ecb0 GREEN
...@@ -29,6 +29,7 @@ import org.eclipse.swt.events.KeyListener; ...@@ -29,6 +29,7 @@ import org.eclipse.swt.events.KeyListener;
* *
* @author aravantinos * @author aravantinos
*/ */
// TODO (AD): Please rename to SourceEditorUndoRedo (Easier to read).
public class CustomUndoRedoForSourceEditor implements KeyListener, ExtendedModifyListener { public class CustomUndoRedoForSourceEditor implements KeyListener, ExtendedModifyListener {
/** /**
* Encapsulation of the Undo and Redo stack(s). * Encapsulation of the Undo and Redo stack(s).
......
...@@ -307,6 +307,8 @@ public abstract class SourceEditorBase<T extends EObject> extends EditorBase<T> ...@@ -307,6 +307,8 @@ public abstract class SourceEditorBase<T extends EObject> extends EditorBase<T>
abstract protected String getStringRepresentation(); abstract protected String getStringRepresentation();
/** Update the string representation in the model element. */ /** Update the string representation in the model element. */
// TODO(AD): Please reuse the the "setStringRepresentation": It is really a string representation
// of the source code model.
abstract protected void updateTheStringInTheModel(String s); abstract protected void updateTheStringInTheModel(String s);
/** Displays the actual error in the editor. */ /** Displays the actual error in the editor. */
......
AnnotationHover.java 02988c3a040a394afb427af10c965d9f82b9a01d YELLOW AnnotationHover.java 02988c3a040a394afb427af10c965d9f82b9a01d GREEN
AnnotationMarkerAccess.java d6435f60fb60e8f62f2d08287a0a9d59ed2e8ae7 YELLOW AnnotationMarkerAccess.java 1977a4093f76d42638a560ed305f1d2cc3dedc4e GREEN
ErrorAnnotation.java 3e05aaeb93ca19bb99aed312427752c2c3f1959f YELLOW ErrorAnnotation.java 3e05aaeb93ca19bb99aed312427752c2c3f1959f GREEN
...@@ -52,8 +52,9 @@ public class AnnotationMarkerAccess implements IAnnotationAccess, IAnnotationAcc ...@@ -52,8 +52,9 @@ public class AnnotationMarkerAccess implements IAnnotationAccess, IAnnotationAcc
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public String getTypeLabel(Annotation annotation) { public String getTypeLabel(Annotation annotation) {
if(annotation instanceof ErrorAnnotation) if(annotation instanceof ErrorAnnotation) {
return "Errors"; return "Errors";
}
return null; return null;
} }
...@@ -61,8 +62,9 @@ public class AnnotationMarkerAccess implements IAnnotationAccess, IAnnotationAcc ...@@ -61,8 +62,9 @@ public class AnnotationMarkerAccess implements IAnnotationAccess, IAnnotationAcc
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public int getLayer(Annotation annotation) { public int getLayer(Annotation annotation) {
if(annotation instanceof ErrorAnnotation) if(annotation instanceof ErrorAnnotation) {
return ((ErrorAnnotation)annotation).getLayer(); return ((ErrorAnnotation)annotation).getLayer();
}
return 0; return 0;
} }
...@@ -77,8 +79,9 @@ public class AnnotationMarkerAccess implements IAnnotationAccess, IAnnotationAcc ...@@ -77,8 +79,9 @@ public class AnnotationMarkerAccess implements IAnnotationAccess, IAnnotationAcc
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public boolean isPaintable(Annotation annotation) { public boolean isPaintable(Annotation annotation) {
if(annotation instanceof ErrorAnnotation) if(annotation instanceof ErrorAnnotation) {
return ((ErrorAnnotation)annotation).getImage() != null; return ((ErrorAnnotation)annotation).getImage() != null;
}
return false; return false;
} }
...@@ -86,8 +89,9 @@ public class AnnotationMarkerAccess implements IAnnotationAccess, IAnnotationAcc ...@@ -86,8 +89,9 @@ public class AnnotationMarkerAccess implements IAnnotationAccess, IAnnotationAcc
/** {@inheritDoc} */ /** {@inheritDoc} */
@Override @Override
public boolean isSubtype(Object annotationType, Object potentialSupertype) { public boolean isSubtype(Object annotationType, Object potentialSupertype) {
if(annotationType.equals(potentialSupertype)) if(annotationType.equals(potentialSupertype)) {
return true; return true;
}
return false; return false;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment