Skip to content

Commit

Permalink
Minor fix to prevent an NPE when documenting constants.
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexisDrogoul committed Apr 17, 2024
1 parent 6bb26de commit f2d4188
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ public void doDocument(final ModelDescription description) {
public void setGamlDocumentation(final EObject e, final IGamlDescription d) {
// Called by SymbolDescription to document individual expressions -- they are kept in a Map<EObject,
// IGamlDescription> and done when the whole model is documented
if (shouldDocument) { expressionsToDocument.put(e, d); }
if (shouldDocument && e != null && d != null) { expressionsToDocument.put(e, d); }
}

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/*******************************************************************************************************
*
* FileMetaDataProvider.java, in gama.ui.navigator.view, is part of the source code of the GAMA modeling and
* simulation platform .
* FileMetaDataProvider.java, in gama.ui.navigator, is part of the source code of the GAMA modeling and simulation
* platform (v.2024-06).
*
* (c) 2007-2024 UMI 209 UMMISCO IRD/SU & Partners (IRIT, MIAT, TLU, CTU)
* (c) 2007-2024 UMI 209 UMMISCO IRD/SU & Partners (IRIT, MIAT, ESPACE-DEV, CTU)
*
* Visit https://github.com/gama-platform/gama for license information and contacts.
*
Expand Down Expand Up @@ -44,15 +44,15 @@

import gama.core.common.GamlFileExtension;
import gama.core.util.file.GamaCSVFile;
import gama.core.util.file.GamaCSVFile.CSVInfo;
import gama.core.util.file.GamaFileMetaData;
import gama.core.util.file.GamaOsmFile;
import gama.core.util.file.GamaOsmFile.OSMInfo;
import gama.core.util.file.GamaShapeFile;
import gama.core.util.file.GamaShapeFile.ShapeInfo;
import gama.core.util.file.GamlFileInfo;
import gama.core.util.file.IFileMetaDataProvider;
import gama.core.util.file.IGamaFileMetaData;
import gama.core.util.file.GamaCSVFile.CSVInfo;
import gama.core.util.file.GamaOsmFile.OSMInfo;
import gama.core.util.file.GamaShapeFile.ShapeInfo;
import gama.dev.DEBUG;
import gama.dev.THREADS;
import gama.gaml.compilation.GAML;
Expand Down Expand Up @@ -643,16 +643,6 @@ private void startup() {
});
} catch (final CoreException e) {}
});
// new Thread(() -> {
// try {
// TIMER_WITH_EXCEPTIONS(
// DEBUG.PAD("> GAMA: workspace projects ", 55, ' ') + DEBUG.PAD(" built in", 15, '_'), () -> {
// workspace.build(IncrementalProjectBuilder.FULL_BUILD, null);
// });
// } catch (CoreException e) {
// e.printStackTrace();
// }
// }).start();

try {
workspace.addSaveParticipant("gama.ui.shared.modeling", getSaveParticipant());
Expand Down

0 comments on commit f2d4188

Please sign in to comment.