Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes #189 #211

Merged
merged 1 commit into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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