now considering reference order changes as synchronization infos
diff --git a/plugins/org.eclipse.mylyn.docs.intent.client.synchronizer/src/org/eclipse/mylyn/docs/intent/client/synchronizer/factory/SynchronizerStatusFactory.java b/plugins/org.eclipse.mylyn.docs.intent.client.synchronizer/src/org/eclipse/mylyn/docs/intent/client/synchronizer/factory/SynchronizerStatusFactory.java
index a89df57..7b751b3 100644
--- a/plugins/org.eclipse.mylyn.docs.intent.client.synchronizer/src/org/eclipse/mylyn/docs/intent/client/synchronizer/factory/SynchronizerStatusFactory.java
+++ b/plugins/org.eclipse.mylyn.docs.intent.client.synchronizer/src/org/eclipse/mylyn/docs/intent/client/synchronizer/factory/SynchronizerStatusFactory.java
@@ -69,8 +69,14 @@
SynchronizerCompilationStatus status = CompilerFactory.eINSTANCE
.createSynchronizerCompilationStatus();
- status.setSeverity(CompilationStatusSeverity.WARNING);
- status.setType(CompilationMessageType.SYNCHRONIZER_WARNING);
+ if (difference instanceof ReferenceOrderChange) {
+ status.setSeverity(CompilationStatusSeverity.INFO);
+ status.setType(CompilationMessageType.SYNCHRONIZER_INFO);
+ } else {
+ status.setSeverity(CompilationStatusSeverity.WARNING);
+ status.setType(CompilationMessageType.SYNCHRONIZER_WARNING);
+ }
+
IntentGenericElement targetInstruction = getTargetInstructionFromDiffElement(indexEntry,
difference);
status.setMessage(SynchronizerMessageProvider.createMessageFromDiffElement(difference));
diff --git a/plugins/org.eclipse.mylyn.docs.intent.client.synchronizer/src/org/eclipse/mylyn/docs/intent/client/synchronizer/synchronizer/IntentSynchronizer.java b/plugins/org.eclipse.mylyn.docs.intent.client.synchronizer/src/org/eclipse/mylyn/docs/intent/client/synchronizer/synchronizer/IntentSynchronizer.java
index bfa244a..c82691f 100644
--- a/plugins/org.eclipse.mylyn.docs.intent.client.synchronizer/src/org/eclipse/mylyn/docs/intent/client/synchronizer/synchronizer/IntentSynchronizer.java
+++ b/plugins/org.eclipse.mylyn.docs.intent.client.synchronizer/src/org/eclipse/mylyn/docs/intent/client/synchronizer/synchronizer/IntentSynchronizer.java
@@ -164,7 +164,7 @@
while (statusIterator.hasNext()) {
CompilationStatus status = statusIterator.next();
- if (status.getType().equals(CompilationMessageType.SYNCHRONIZER_WARNING)) {
+ if (isSyncStatus(status)) {
statusIterator.remove();
}
}
@@ -179,7 +179,7 @@
Iterator<CompilationStatus> iterator = instruction.getCompilationStatus().iterator();
while (iterator.hasNext()) {
CompilationStatus status = iterator.next();
- if (status.getType().equals(CompilationMessageType.SYNCHRONIZER_WARNING)) {
+ if (isSyncStatus(status)) {
iterator.remove();
}
}
@@ -188,6 +188,19 @@
}
/**
+ * Returns true if the given status is related to a synchronization issue.
+ *
+ * @param status
+ * the status to test
+ * @return true if the given status is related to a synchronization issue
+ */
+ private boolean isSyncStatus(CompilationStatus status) {
+ CompilationMessageType type = status.getType();
+ return type.equals(CompilationMessageType.SYNCHRONIZER_WARNING)
+ || type.equals(CompilationMessageType.SYNCHRONIZER_INFO);
+ }
+
+ /**
* Using the given TraceabilitIndexEntry, compares the model located at the indicated path with the model
* located at the path indicated by the resource declaration.
*
diff --git a/plugins/org.eclipse.mylyn.docs.intent.client.ui/src/org/eclipse/mylyn/docs/intent/client/ui/editor/IntentDocumentProvider.java b/plugins/org.eclipse.mylyn.docs.intent.client.ui/src/org/eclipse/mylyn/docs/intent/client/ui/editor/IntentDocumentProvider.java
index af8dde3..e5ccf64 100644
--- a/plugins/org.eclipse.mylyn.docs.intent.client.ui/src/org/eclipse/mylyn/docs/intent/client/ui/editor/IntentDocumentProvider.java
+++ b/plugins/org.eclipse.mylyn.docs.intent.client.ui/src/org/eclipse/mylyn/docs/intent/client/ui/editor/IntentDocumentProvider.java
@@ -56,6 +56,7 @@
import org.eclipse.mylyn.docs.intent.compare.MergingException;
import org.eclipse.mylyn.docs.intent.core.compiler.CompilationStatus;
import org.eclipse.mylyn.docs.intent.core.compiler.CompilationStatusManager;
+import org.eclipse.mylyn.docs.intent.core.compiler.CompilationStatusSeverity;
import org.eclipse.mylyn.docs.intent.core.compiler.CompilerPackage;
import org.eclipse.mylyn.docs.intent.core.document.IntentGenericElement;
import org.eclipse.mylyn.docs.intent.core.document.IntentStructuredElement;
@@ -168,9 +169,11 @@
posit = new ParsedElementPosition(0, 0);
}
- annotationModelManager.addAnnotationFromStatus(
- this.listenedElementsHandler.getRepositoryAdapter(), status,
- new Position(posit.getOffset(), posit.getLength()));
+ if (!status.getSeverity().equals(CompilationStatusSeverity.INFO)) {
+ annotationModelManager.addAnnotationFromStatus(
+ this.listenedElementsHandler.getRepositoryAdapter(), status,
+ new Position(posit.getOffset(), posit.getLength()));
+ }
}
}
return annotationModelManager.getAnnotationModel();
@@ -515,10 +518,12 @@
Position position = new Position(parsedElementPosition.getOffset(),
parsedElementPosition.getLength());
- // Step 2.2 : Adding this annotation to the model (will update overview and vertical rulers of
- // the editor)
- annotationModelManager.addAnnotationFromStatus(
- this.listenedElementsHandler.getRepositoryAdapter(), statusToAdd, position);
+ if (!statusToAdd.getSeverity().equals(CompilationStatusSeverity.INFO)) {
+ // Step 2.2 : Adding this annotation to the model (will update overview and vertical rulers of
+ // the editor)
+ annotationModelManager.addAnnotationFromStatus(
+ this.listenedElementsHandler.getRepositoryAdapter(), statusToAdd, position);
+ }
}
}
diff --git a/plugins/org.eclipse.mylyn.docs.intent.client.ui/src/org/eclipse/mylyn/docs/intent/client/ui/editor/annotation/IntentAnnotationModelManager.java b/plugins/org.eclipse.mylyn.docs.intent.client.ui/src/org/eclipse/mylyn/docs/intent/client/ui/editor/annotation/IntentAnnotationModelManager.java
index 85b235f..58ab3fa 100644
--- a/plugins/org.eclipse.mylyn.docs.intent.client.ui/src/org/eclipse/mylyn/docs/intent/client/ui/editor/annotation/IntentAnnotationModelManager.java
+++ b/plugins/org.eclipse.mylyn.docs.intent.client.ui/src/org/eclipse/mylyn/docs/intent/client/ui/editor/annotation/IntentAnnotationModelManager.java
@@ -22,6 +22,7 @@
import org.eclipse.jface.text.source.IAnnotationModel;
import org.eclipse.mylyn.docs.intent.collab.handlers.adapters.RepositoryAdapter;
import org.eclipse.mylyn.docs.intent.core.compiler.CompilationStatus;
+import org.eclipse.mylyn.docs.intent.core.compiler.CompilationStatusSeverity;
import org.eclipse.mylyn.docs.intent.core.compiler.SynchronizerCompilationStatus;
import org.eclipse.mylyn.docs.intent.core.document.IntentGenericElement;
@@ -91,7 +92,6 @@
.createAnnotationFromCompilationStatus(uri, status);
addAnnotation(annotation, position);
handledCompilationStatus.put(status, annotation);
-
}
}
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/model/compilerInformations.ecore b/plugins/org.eclipse.mylyn.docs.intent.core/model/compilerInformations.ecore
index 0e469d3..3d31019 100644
--- a/plugins/org.eclipse.mylyn.docs.intent.core/model/compilerInformations.ecore
+++ b/plugins/org.eclipse.mylyn.docs.intent.core/model/compilerInformations.ecore
@@ -65,6 +65,7 @@
<eLiterals name="INVALID_VALUE_ERROR" value="5"/>
<eLiterals name="GENERAL_WARNING" value="6"/>
<eLiterals name="SYNCHRONIZER_WARNING" value="7" literal="SYNCHRONIZER_WARNING"/>
+ <eLiterals name="SYNCHRONIZER_INFO" value="8" literal="SYNCHRONIZER_INFO"/>
</eClassifiers>
<eClassifiers xsi:type="ecore:EClass" name="CompilationStatus">
<eStructuralFeatures xsi:type="ecore:EReference" name="target" lowerBound="1"
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/model/intent.genmodel b/plugins/org.eclipse.mylyn.docs.intent.core/model/intent.genmodel
index 98b9c91..135b674 100644
--- a/plugins/org.eclipse.mylyn.docs.intent.core/model/intent.genmodel
+++ b/plugins/org.eclipse.mylyn.docs.intent.core/model/intent.genmodel
@@ -96,6 +96,7 @@
<genEnumLiterals ecoreEnumLiteral="compilerInformations.ecore#//CompilationMessageType/INVALID_VALUE_ERROR"/>
<genEnumLiterals ecoreEnumLiteral="compilerInformations.ecore#//CompilationMessageType/GENERAL_WARNING"/>
<genEnumLiterals ecoreEnumLiteral="compilerInformations.ecore#//CompilationMessageType/SYNCHRONIZER_WARNING"/>
+ <genEnumLiterals ecoreEnumLiteral="compilerInformations.ecore#//CompilationMessageType/SYNCHRONIZER_INFO"/>
</genEnums>
<genEnums typeSafeEnumCompatible="false" ecoreEnum="compilerInformations.ecore#//SynchronizerResourceState">
<genEnumLiterals ecoreEnumLiteral="compilerInformations.ecore#//SynchronizerResourceState/DEFAULT"/>
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/compiler/CompilationMessageType.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/compiler/CompilationMessageType.java
index 6aa7756..09cc906 100644
--- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/compiler/CompilationMessageType.java
+++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/compiler/CompilationMessageType.java
@@ -96,7 +96,15 @@
* @generated
* @ordered
*/
- SYNCHRONIZER_WARNING(7, "SYNCHRONIZER_WARNING", "SYNCHRONIZER_WARNING");
+ SYNCHRONIZER_WARNING(7, "SYNCHRONIZER_WARNING", "SYNCHRONIZER_WARNING"), /**
+ * The '<em><b>SYNCHRONIZER INFO</b></em>' literal object.
+ * <!-- begin-user-doc -->
+ * <!-- end-user-doc -->
+ * @see #SYNCHRONIZER_INFO_VALUE
+ * @generated
+ * @ordered
+ */
+ SYNCHRONIZER_INFO(8, "SYNCHRONIZER_INFO", "SYNCHRONIZER_INFO");
/**
* The '<em><b>RESOLVE ERROR</b></em>' literal value.
@@ -219,6 +227,21 @@
public static final int SYNCHRONIZER_WARNING_VALUE = 7;
/**
+ * The '<em><b>SYNCHRONIZER INFO</b></em>' literal value.
+ * <!-- begin-user-doc -->
+ * <p>
+ * If the meaning of '<em><b>SYNCHRONIZER INFO</b></em>' literal object isn't clear,
+ * there really should be more of a description here...
+ * </p>
+ * <!-- end-user-doc -->
+ * @see #SYNCHRONIZER_INFO
+ * @model
+ * @generated
+ * @ordered
+ */
+ public static final int SYNCHRONIZER_INFO_VALUE = 8;
+
+ /**
* An array of all the '<em><b>Compilation Message Type</b></em>' enumerators.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
@@ -226,7 +249,7 @@
*/
private static final CompilationMessageType[] VALUES_ARRAY = new CompilationMessageType[] {RESOLVE_ERROR,
PACKAGE_NOT_FOUND_ERROR, PACKAGE_REGISTRATION_ERROR, INVALID_REFERENCE_ERROR, VALIDATION_ERROR,
- INVALID_VALUE_ERROR, GENERAL_WARNING, SYNCHRONIZER_WARNING,
+ INVALID_VALUE_ERROR, GENERAL_WARNING, SYNCHRONIZER_WARNING, SYNCHRONIZER_INFO,
};
/**
@@ -294,6 +317,8 @@
return GENERAL_WARNING;
case SYNCHRONIZER_WARNING_VALUE:
return SYNCHRONIZER_WARNING;
+ case SYNCHRONIZER_INFO_VALUE:
+ return SYNCHRONIZER_INFO;
}
return null;
}
diff --git a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/compiler/impl/CompilerPackageImpl.java b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/compiler/impl/CompilerPackageImpl.java
index 41a1f62..d2e86c9 100644
--- a/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/compiler/impl/CompilerPackageImpl.java
+++ b/plugins/org.eclipse.mylyn.docs.intent.core/src-gen/org/eclipse/mylyn/docs/intent/core/compiler/impl/CompilerPackageImpl.java
@@ -1227,6 +1227,7 @@
addEEnumLiteral(compilationMessageTypeEEnum, CompilationMessageType.INVALID_VALUE_ERROR);
addEEnumLiteral(compilationMessageTypeEEnum, CompilationMessageType.GENERAL_WARNING);
addEEnumLiteral(compilationMessageTypeEEnum, CompilationMessageType.SYNCHRONIZER_WARNING);
+ addEEnumLiteral(compilationMessageTypeEEnum, CompilationMessageType.SYNCHRONIZER_INFO);
initEEnum(synchronizerResourceStateEEnum, SynchronizerResourceState.class,
"SynchronizerResourceState");