Skip to content

Commit

Permalink
Fixes #189
Browse files Browse the repository at this point in the history
  • Loading branch information
lesquoyb committed Jun 13, 2024
1 parent d2c44fd commit a94dc42
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 12 deletions.
13 changes: 3 additions & 10 deletions gama.core/src/gama/gaml/variables/Variable.java
Original file line number Diff line number Diff line change
Expand Up @@ -512,23 +512,18 @@ public void assertCanBeParameter(final VariableDescription cd) {
public Variable(final IDescription sd) {
super(sd);
final VariableDescription desc = (VariableDescription) sd;
setName(sd.getName());
parameter = null;
category = null;
setName(sd.getName());
parameter = desc.getParameterName();
category = getLiteral(IKeyword.CATEGORY, null);
updateExpression = getFacet(IKeyword.UPDATE);
functionExpression = getFacet(IKeyword.FUNCTION);
initExpression = getFacet(IKeyword.INIT);
amongExpression = getFacet(IKeyword.AMONG);
onChangeExpression = getFacet(IKeyword.ON_CHANGE);
isNotModifiable = desc.isNotModifiable();
type = desc.getGamlType();
// computeSpeciesConst();
}

// private void computeSpeciesConst() {
// isSpeciesConst = isNotModifiable && updateExpression == null && functionExpression == null && getter == null
// && setter == null && (initExpression == null || initExpression.isConst());
// }

/**
* Builds the helpers.
Expand Down Expand Up @@ -557,9 +552,7 @@ private void addListeners(final AbstractSpecies species) {

// }

// VariableDescription var = (VariableDescription) description;
SpeciesDescription sp = species.getDescription();
// if (var.isBuiltIn()) return;
Class base = sp.getJavaBase();
if (base == null) return;
List<GamaHelper> helpers = new ArrayList<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,12 +104,14 @@ public abstract class AbstractEditor<T> implements SelectionListener, ModifyList
protected EditorsGroup parent;

/** The editor toolbar. */
@SuppressWarnings("rawtypes")
protected EditorToolbar editorToolbar;

/** The editor label. */
protected EditorLabel editorLabel;

/** The editor control. */
@SuppressWarnings("rawtypes")
protected EditorControl editorControl;

/**
Expand All @@ -124,7 +126,6 @@ public abstract class AbstractEditor<T> implements SelectionListener, ModifyList
* @param l
* the l
*/
@SuppressWarnings ("unchecked")
public AbstractEditor(@Nonnull final IAgent a, @Nonnull final IParameter parameter,
@Nullable final EditorListener<T> l) {
param = parameter;
Expand Down Expand Up @@ -357,7 +358,7 @@ Color getEditorControlForeground() {
*
* @return the editor toolbar
*/
@SuppressWarnings ("unchecked")
@SuppressWarnings ({ "unchecked", "rawtypes" })
EditorToolbar createEditorToolbar() {
editorToolbar = new EditorToolbar(this, parent);
updateToolbar();
Expand All @@ -369,6 +370,7 @@ EditorToolbar createEditorToolbar() {
*
* @return the editor control
*/
@SuppressWarnings("rawtypes")
EditorControl createEditorControl() {
boolean isCombo = param.getAmongValue(getScope()) != null;
boolean isEditable = param.isEditable();
Expand Down

0 comments on commit a94dc42

Please sign in to comment.