ebresie / python4nb

This is a Python Plugin for Netbeans.
Apache License 2.0
13 stars 1 forks source link

Run command uses first configured "Main" script #19

Open ebresie opened 2 years ago

ebresie commented 2 years ago

When attempting to run, it allows selection of the "main script" when not configured initially. After subsequent run even when in a different script it continues to use the original selected project main script.

ebresie commented 2 years ago

There is PythonProjectProperties which includes the "main.file" and a "mainModule" which may set similar attributes.

The RunCommand findMainFile may also be confuse things some being run multiple time.

There could also be a scope issue as the "script" is present in one context but not in another context.

ebresie commented 2 years ago

Believe the information is stored in

nbproject\project.properties file present which seems to be read each time.

In my development/source folder, the folder is at the main level; in deployed case, it doesn't appear to be present which may cause some of the problems.

In cases where it does not exist, need to create a version of the file which can then be used to store project specific files.