In Scratch how do you determine in the IDE if a variable is "For all sprites" or not AFTER the variable has already been created? - mit-scratch

I know that when you are creating a variable in Scratch by pressing "Make a variable" button, you then get a dialogue box where you can select the scope of the variable with the radio buttons for either "For all sprites" or "For this sprite only".
However, after the variable has been created how can I look at my code to determine which scope was used?
At the moment, because I don't know the answer to this question. I keep deleting my variables and recreating them in the IDE to make sure the scope is what was required. This has the side effect of deleting all code that references those variables, which is obviously problematic.

Select "Stage" (bottom right of the project editor page, next to the list of sprites), then check if your variable is present in the list of available variables (left-hand side of the project editor page, tab "Code"). If it is there, then it is a "For all sprites" variable. If it is not, then it is a "For this sprite only" variable.

Related

Folder View Focus Disable Automatic Search

I would like to change the automatic find that happens when the Explorer Folder View is in focus:
Steps to reproduce (provided you have default bindings):
Open a workspace with files
Focus on the folders view
Start typing anything
This is to find files based on what you type (notice the find query in the top right) and the arrow keys skip to them. I would like to remap this feature to something like Ctrl+F (with a 'when expression', if possible) that way I can use other shortcuts for things like adding a new file. If this can not be remapped, I'm ok with disabling it, provided that's allowed.
I used to have the atom keymap extension that changed this but I removed it so I would be forced to learn all the default shortcuts so when I go into work I wouldn't be phased no matter what device I am on
I was looking through the atom keymap repo and found a comment on the main js file about 'new explorer filtration'. Interesting to see documentation being useful :p Anyways, I noticed they added a context setting so I changed the following user setting:
workbench.list.automaticKeyboardNavigation = false
Controls whether keyboard navigation in lists and trees is automatically triggered simply by typing. If set to false, keyboard navigation is only triggered when executing the list.toggleKeyboardNavigation command, for which you can assign a keyboard shortcut
We need either better setting id naming conventions or better ways to find settings, especially now that the list has grown substantially. I would have never guessed this would be the name of the setting, or list.toggleKeyboardNavigation being a trigger, since you aren't actually navigating

How do I find all references without "peeking"?

I want to see all references in a bottom-docked window (similar to how to the "Problems" window appears). I am trying to find all references to a function so that I can then jump to each place I am using the function and make changes. The current "peek" feature makes this very inconvenient to do. For example:
First I find all references of getStartDate
The inline "peek" window appears and shows me the reference in the current file, along with others. I click on another reference:
The editor navigates to that file and splits the file in half in order to display... the file I am already editing. Please tell me there is a way to dock this window to the bottom of the screen. Or better yet, that there is a "full" find all references as opposed to a "peek" find all references.
v1.22 changed how to go to references across files, see navigating to references across files . At least it doesn't do the editor splitting you describe - you can just cycle through the references going to each file in its already opened editor in turn.
You can DownArrow through the references, and then F4 or Shift-F4 to go that reference in another file.

Eclipse working sets -- how to rename them? Also, can the error-icon be disabled?

After mild frustration with the difficulty to make top-level "plain old folders" within Eclipse for visual-organization purposes, I discovered that the thing I'm after is called a "working set". Hooray! But they don't seem to be rename-able, by any of the apparent avenues (right-clicking on it or using the Configure Working Sets window).
Is that just the way things are, since no one should be so lazy as to refuse making a new working set with the right name and transferring everything over? Or am I missing something obvious?
I also have a more minor question whose answer I already think I know. Can I tell a specific working set not to change its icon to have the "red X" when one of its children has an error? Nothing in the preferences under Debugging suggests to me the ability to turn off the automatic icon-changing. It's a useful feature, but I have a few simple practice projects with very basic errors, and I don't need the visual reminder to "fix" them, especially if they're in my "Practice" working set, whose icon I'd prefer not to change.
To rename a Working Set, you need to get to the dialogue of selecting a Working Set (click on the white down arrow at the top right of the package explorer > Configure Working Sets..), focus on your Working Set and click the "Edit" button. There, you can change the Working Set's name, as well as what's actually included in the Working Set.
There is no way (that I know of) to change the icon display to avoid showing the errors marker.

Show All Local Variables in Eclipse

I think I already know the answer to this question is "No", but I ask anyway just in case I missed something in the dox.
I adore the Eclipse "Quick Outline" feature where I can easily see all the member variables and methods for the class my cursor is currently located in by typing Control + O (or Navigate -> Quick Outline).
What would be equally useful is a way to see all local variables available at the point my cursor is. Does such a feature exist?
Thanks!
You can probably use content assist for this. Just press Ctrl+Space on an empty line, the resulting content assist popup should offer suggestions on what can be inserted at that point, local variables should be on top followed by fields and then member functions.

eclipse: Do not show references from binary types in call hierarchy

Is there any way to remove binary references from "call hierarchy" (Ctrl-Alt-H) ?
Our project setup is such that for many members we have duplicated references (one reference from source file and one from the jar file with class compiled from that source file). The navigation is inconvenient and I wondering if any ways to fix that is available.
Call hierarchy can be limited in scope to a working set. You just need to set one up to exclude all your libraries.
If you click on the white down arrow in the top right of the Call Hierarchy window a popup menu will appear. Choose Search Scope/Working set and then select or set up the working set you want. A working set can include a source folder or a jar. Once set up your working sets will appear at the bottom of the Search Scope menu so you can access them quickly in future.
I've discovered another way to accomplish this, and since this question is one of the top results in google, I thought it would be good to add it as an answer.
In the Call Hierarchy view, one can click the 'View Menu' (the downward facing arrow) and select "Search In...". In the window that pops up, the user can un-check the options they want to exclude. For example, I only have 'Sources' and 'Required projects' checked.