Commit 02f22975 authored by Kristof Szabados's avatar Kristof Szabados
Browse files

does not need the index.


Signed-off-by: Kristof Szabados's avatarKristof Szabados <Kristof.Szabados@ericsson.com>
parent b934ef66
...@@ -290,16 +290,16 @@ public class ProjectSourceSemanticAnalyzer { ...@@ -290,16 +290,16 @@ public class ProjectSourceSemanticAnalyzer {
* @return the status of the operation when it finished. * @return the status of the operation when it finished.
* */ * */
static IStatus analyzeMultipleProjectsSemantically(final List<IProject> tobeSemanticallyAnalyzed, final IProgressMonitor monitor, final CompilationTimeStamp compilationCounter) { static IStatus analyzeMultipleProjectsSemantically(final List<IProject> tobeSemanticallyAnalyzed, final IProgressMonitor monitor, final CompilationTimeStamp compilationCounter) {
for (int i = 0; i < tobeSemanticallyAnalyzed.size(); i++) { for (final IProject project: tobeSemanticallyAnalyzed) {
if (!tobeSemanticallyAnalyzed.get(i).isAccessible() || !TITANNature.hasTITANNature(tobeSemanticallyAnalyzed.get(i))) { if (!project.isAccessible() || !TITANNature.hasTITANNature(project)) {
return Status.CANCEL_STATUS; return Status.CANCEL_STATUS;
} }
} }
final long semanticCheckStart = System.nanoTime(); final long semanticCheckStart = System.nanoTime();
for (int i = 0; i < tobeSemanticallyAnalyzed.size(); i++) { for (final IProject project: tobeSemanticallyAnalyzed) {
final ProjectSourceSemanticAnalyzer semanticAnalyzer = GlobalParser.getProjectSourceParser(tobeSemanticallyAnalyzed.get(i)).getSemanticAnalyzer(); final ProjectSourceSemanticAnalyzer semanticAnalyzer = GlobalParser.getProjectSourceParser(project).getSemanticAnalyzer();
synchronized (semanticAnalyzer.outdatedModuleMap) { synchronized (semanticAnalyzer.outdatedModuleMap) {
semanticAnalyzer.outdatedModuleMap.clear(); semanticAnalyzer.outdatedModuleMap.clear();
} }
...@@ -325,9 +325,9 @@ public class ProjectSourceSemanticAnalyzer { ...@@ -325,9 +325,9 @@ public class ProjectSourceSemanticAnalyzer {
final List<String> semanticallyChecked = new ArrayList<String>(); final List<String> semanticallyChecked = new ArrayList<String>();
//remove module name duplication markers. It shall be done before starting the next for-loop! //remove module name duplication markers. It shall be done before starting the next for-loop!
for (int i = 0; i < tobeSemanticallyAnalyzed.size(); i++) { for (final IProject project: tobeSemanticallyAnalyzed) {
final ProjectSourceSemanticAnalyzer semanticAnalyzer = final ProjectSourceSemanticAnalyzer semanticAnalyzer =
GlobalParser.getProjectSourceParser(tobeSemanticallyAnalyzed.get(i)).getSemanticAnalyzer(); GlobalParser.getProjectSourceParser(project).getSemanticAnalyzer();
for (final Module module: semanticAnalyzer.fileModuleMap.values()) { for (final Module module: semanticAnalyzer.fileModuleMap.values()) {
if(module instanceof TTCN3Module){ if(module instanceof TTCN3Module){
MarkerHandler.markAllSemanticMarkersForRemoval(module.getIdentifier()); MarkerHandler.markAllSemanticMarkersForRemoval(module.getIdentifier());
...@@ -335,9 +335,9 @@ public class ProjectSourceSemanticAnalyzer { ...@@ -335,9 +335,9 @@ public class ProjectSourceSemanticAnalyzer {
} }
} }
for (int i = 0; i < tobeSemanticallyAnalyzed.size(); i++) { for (final IProject project: tobeSemanticallyAnalyzed) {
final ProjectSourceSemanticAnalyzer semanticAnalyzer = final ProjectSourceSemanticAnalyzer semanticAnalyzer =
GlobalParser.getProjectSourceParser(tobeSemanticallyAnalyzed.get(i)).getSemanticAnalyzer(); GlobalParser.getProjectSourceParser(project).getSemanticAnalyzer();
for (final Module module: semanticAnalyzer.fileModuleMap.values()) { for (final Module module: semanticAnalyzer.fileModuleMap.values()) {
final String name = module.getIdentifier().getName(); final String name = module.getIdentifier().getName();
allModules.add(module); allModules.add(module);
...@@ -415,9 +415,9 @@ public class ProjectSourceSemanticAnalyzer { ...@@ -415,9 +415,9 @@ public class ProjectSourceSemanticAnalyzer {
//Not supported markers are handled here, at the and of checking. Otherwise they would be deleted //Not supported markers are handled here, at the and of checking. Otherwise they would be deleted
final IPreferencesService preferenceService = Platform.getPreferencesService(); final IPreferencesService preferenceService = Platform.getPreferencesService();
final String option = preferenceService.getString(ProductConstants.PRODUCT_ID_DESIGNER, PreferenceConstants.REPORTUNSUPPORTEDCONSTRUCTS, GeneralConstants.WARNING, null); final String option = preferenceService.getString(ProductConstants.PRODUCT_ID_DESIGNER, PreferenceConstants.REPORTUNSUPPORTEDCONSTRUCTS, GeneralConstants.WARNING, null);
for (int i = 0; i < tobeSemanticallyAnalyzed.size(); i++) { for (final IProject project: tobeSemanticallyAnalyzed) {
// report the unsupported constructs in the project // report the unsupported constructs in the project
final ProjectSourceSyntacticAnalyzer syntacticAnalyzer = GlobalParser.getProjectSourceParser(tobeSemanticallyAnalyzed.get(i)).getSyntacticAnalyzer(); final ProjectSourceSyntacticAnalyzer syntacticAnalyzer = GlobalParser.getProjectSourceParser(project).getSyntacticAnalyzer();
for (final IFile file : syntacticAnalyzer.unsupportedConstructMap.keySet()) { for (final IFile file : syntacticAnalyzer.unsupportedConstructMap.keySet()) {
final List<TITANMarker> markers = syntacticAnalyzer.unsupportedConstructMap.get(file); final List<TITANMarker> markers = syntacticAnalyzer.unsupportedConstructMap.get(file);
if (markers != null && file.isAccessible()) { if (markers != null && file.isAccessible()) {
...@@ -435,8 +435,8 @@ public class ProjectSourceSemanticAnalyzer { ...@@ -435,8 +435,8 @@ public class ProjectSourceSemanticAnalyzer {
} }
progress.subTask("Cleanup operations"); progress.subTask("Cleanup operations");
for (int i = 0; i < tobeSemanticallyAnalyzed.size(); i++) { for (final IProject project: tobeSemanticallyAnalyzed) {
final ProjectSourceSemanticAnalyzer semanticAnalyzer = GlobalParser.getProjectSourceParser(tobeSemanticallyAnalyzed.get(i)).getSemanticAnalyzer(); final ProjectSourceSemanticAnalyzer semanticAnalyzer = GlobalParser.getProjectSourceParser(project).getSemanticAnalyzer();
synchronized (semanticAnalyzer.semanticallyUptodateModules) { synchronized (semanticAnalyzer.semanticallyUptodateModules) {
semanticAnalyzer.semanticallyUptodateModules.clear(); semanticAnalyzer.semanticallyUptodateModules.clear();
semanticAnalyzer.semanticallyUptodateModules.addAll(semanticAnalyzer.moduleMap.keySet()); semanticAnalyzer.semanticallyUptodateModules.addAll(semanticAnalyzer.moduleMap.keySet());
...@@ -453,14 +453,13 @@ public class ProjectSourceSemanticAnalyzer { ...@@ -453,14 +453,13 @@ public class ProjectSourceSemanticAnalyzer {
} }
progress.done(); progress.done();
for (int i = 0; i < tobeSemanticallyAnalyzed.size(); i++) { for (final IProject project: tobeSemanticallyAnalyzed) {
final IProject actualProject = tobeSemanticallyAnalyzed.get(i); final ProjectSourceParser parser = GlobalParser.getProjectSourceParser(project);
final ProjectSourceParser parser = GlobalParser.getProjectSourceParser(actualProject);
parser.setLastTimeChecked(compilationCounter); parser.setLastTimeChecked(compilationCounter);
GlobalProjectStructureTracker.updateData(actualProject); GlobalProjectStructureTracker.updateData(project);
MarkerHandler.removeAllOnTheFlyMarkedMarkers(tobeSemanticallyAnalyzed.get(i)); MarkerHandler.removeAllOnTheFlyMarkedMarkers(project);
} }
return Status.OK_STATUS; return Status.OK_STATUS;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment