diff --git a/gama.core/src/gama/gaml/variables/Variable.java b/gama.core/src/gama/gaml/variables/Variable.java index f1f41743b5..5f87236019 100644 --- a/gama.core/src/gama/gaml/variables/Variable.java +++ b/gama.core/src/gama/gaml/variables/Variable.java @@ -512,9 +512,9 @@ 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); @@ -522,13 +522,8 @@ public Variable(final IDescription sd) { 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. @@ -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 helpers = new ArrayList<>(); diff --git a/gama.ui.shared/src/gama/ui/shared/parameters/AbstractEditor.java b/gama.ui.shared/src/gama/ui/shared/parameters/AbstractEditor.java index 36d0d760bb..eabf4aad07 100644 --- a/gama.ui.shared/src/gama/ui/shared/parameters/AbstractEditor.java +++ b/gama.ui.shared/src/gama/ui/shared/parameters/AbstractEditor.java @@ -104,12 +104,14 @@ public abstract class AbstractEditor 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; /** @@ -124,7 +126,6 @@ public abstract class AbstractEditor implements SelectionListener, ModifyList * @param l * the l */ - @SuppressWarnings ("unchecked") public AbstractEditor(@Nonnull final IAgent a, @Nonnull final IParameter parameter, @Nullable final EditorListener l) { param = parameter; @@ -357,7 +358,7 @@ Color getEditorControlForeground() { * * @return the editor toolbar */ - @SuppressWarnings ("unchecked") + @SuppressWarnings ({ "unchecked", "rawtypes" }) EditorToolbar createEditorToolbar() { editorToolbar = new EditorToolbar(this, parent); updateToolbar(); @@ -369,6 +370,7 @@ EditorToolbar createEditorToolbar() { * * @return the editor control */ + @SuppressWarnings("rawtypes") EditorControl createEditorControl() { boolean isCombo = param.getAmongValue(getScope()) != null; boolean isEditable = param.isEditable();