Shop OBEX P1 Docs P2 Docs Learn Events
Spin Tools IDE - Page 27 — Parallax Forums

Spin Tools IDE

1212223242527»

Comments

  • RaymanRayman Posts: 15,564

    @macca Think seeing something maybe not perfect with embedded files...

    Have a program with some embedded images. Seems that when these images are updated using external tools, Spin Tools Ide appears to be keeping a cached version and not updating it...

  • maccamacca Posts: 918

    @Rayman said:
    @macca Think seeing something maybe not perfect with embedded files...

    Have a program with some embedded images. Seems that when these images are updated using external tools, Spin Tools Ide appears to be keeping a cached version and not updating it...

    Ah... yes, binary files included with the file directive are not checked for updates, forgot that, will work to fix it.

    For now you need to make just a small change the source that loads them to trigger a new compile (simple like type space and backspace).

  • RaymanRayman Posts: 15,564

    @macca think the problem is that there's another file that is pinned as "Top Object".
    Maybe changing that one would reload, not sure. But, changing the sub object with the files doesn't seem to...

  • maccamacca Posts: 918

    @Rayman said:
    @macca think the problem is that there's another file that is pinned as "Top Object".
    Maybe changing that one would reload, not sure. But, changing the sub object with the files doesn't seem to...

    Subobjects should trigger the recompile of the pinned top object as well, one quick test is to introduce an error in the subobject and see if it propagates to the top object, I'll check if there are problems with that.

  • RaymanRayman Posts: 15,564

    @macca Sometimes seeing top file compile with errors flagged in sub object being worked on...
    Not sure exactly what it's doing in that case...

  • Here's some incredibly pedantic nonsense to ruin your day: the Spin coloring in Spin Tools doesn't exactly match Propeller Tool.

    Also note how PropTool starts with the darker CON section because it takes the implicit CON section at the top of the file into account. The primary CON section color is actually very light.

  • JonnyMacJonnyMac Posts: 9,442
    edited 2025-08-30 15:04

    Marco: If you're going to crack things open to adjust the colors, would you consider adding a hot key or better yet, a tool bar button to toggle the outline view (like you do with Toggle Console)?

    Sometimes I want more screen space for wide listings, and Spin Tools doesn't (yet?) allow changing font size with Ctrl + Scroll Wheel.

    I don't care about the colors, but I did do a screen grab from Propeller Tool and sampled the colors inside Inkscape to save you the trouble.

    PropTool starts with the darker CON section because it takes the implicit CON section at the top of the file into account. The primary CON section color is actually very light.

    Here's a visual of that statement.

    FWIW, I'd rather have code folding in the editor window than an exact color match with Propeller Tool.

    246 x 782 - 1M
  • RaymanRayman Posts: 15,564

    Here's some old SpinEdit code that think has all the correct colors to match Prop Tool:

            if (line == "PUB")
            {
                m_nPub[i]++;
                newcolor = (m_nPub[i] & 1) ? RGB(191, 223, 255) : RGB(167, 210, 253);
                if (m_LineBackgroundColors[i] != newcolor)
                    bRedraw = true;
                m_LineBackgroundColors[i] = newcolor;
                m_sSectionList.AddTail(CString(_GetLine(i)));
                m_nSectionList.AddTail(i);
            }
            else if (line == "PRI")
            {
                m_nPri[i]++;
                newcolor = (m_nPri[i] & 1) ? RGB(191, 248, 255) : RGB(167, 243, 253);
                if (m_LineBackgroundColors[i] != newcolor)
                    bRedraw = true;
                m_LineBackgroundColors[i] = newcolor;
                m_sSectionList.AddTail(CString(_GetLine(i)));
                m_nSectionList.AddTail(i);
            }
            else if (line == "CON")
            {
                m_nCon[i]++;
                newcolor = (m_nCon[i] & 1) ? RGB(253, 243, 168) : RGB(255, 248, 192);
                if (m_LineBackgroundColors[i] != newcolor)
                    bRedraw = true;
                m_LineBackgroundColors[i] = newcolor;
                m_sSectionList.AddTail(CString(_GetLine(i)));
                m_nSectionList.AddTail(i);
            }
            else if (line == "VAR")
            {
                m_nVar[i]++;
                newcolor = (m_nVar[i] & 1) ? RGB(255, 223, 191) : RGB(253, 210, 167);
                if (m_LineBackgroundColors[i] != newcolor)
                    bRedraw = true;
                m_LineBackgroundColors[i] = newcolor;
                m_sSectionList.AddTail(CString(_GetLine(i)));
                m_nSectionList.AddTail(i);
            }
            else if (line == "DAT")
            {
                m_nDat[i]++;
                newcolor = (m_nDat[i] & 1) ? RGB(191, 255, 200) : RGB(167, 253, 179);
                if (m_LineBackgroundColors[i] != newcolor)
                    bRedraw = true;
                m_LineBackgroundColors[i] = newcolor;
                m_sSectionList.AddTail(CString(_GetLine(i)));
                m_nSectionList.AddTail(i);
            }
            else if (line == "OBJ")
            {
                m_nObj[i]++;
                newcolor = (m_nObj[i] & 1) ? RGB(255, 191, 191) : RGB(253, 167, 167);
                if (m_LineBackgroundColors[i] != newcolor)
                    bRedraw = true;
                m_LineBackgroundColors[i] = newcolor;
                m_sSectionList.AddTail(CString(_GetLine(i)));
                m_nSectionList.AddTail(i);
            }
            else
            {
                if (m_LineBackgroundColors[i] != currentcolor)
                    bRedraw = true;
                m_LineBackgroundColors[i] = currentcolor;
            }
            currentcolor = m_LineBackgroundColors[i];
    
  • maccamacca Posts: 918

    @Wuerfel_21 said:
    Here's some incredibly pedantic nonsense to ruin your day: the Spin coloring in Spin Tools doesn't exactly match Propeller Tool.

    The background base colors are the same as Propeller Tool (got from Propeller Tool preferences, and matches the values reported by @JonnyMac and @Rayman), the alternate color are a bit different, they should be -6% than the base colors (if I remember correctly) but maybe I haven't used the same formula used by Propeller Tool.
    Specific elements are colored depending on the type, like constants, global variables, local variables, ecc. I think Propeller Tool doesn't highlight them.

    Also note how PropTool starts with the darker CON section because it takes the implicit CON section at the top of the file into account. The primary CON section color is actually very light.

    Yes, I tought that would be better to have the implicit section with the same color as the subsequent CON section, but I can change it.

    @JonnyMac said:
    Marco: If you're going to crack things open to adjust the colors, would you consider adding a hot key or better yet, a tool bar button to toggle the outline view (like you do with Toggle Console)?

    Definitely, I'll add color theme preferences.
    Yes, I can add a button to toggle the outline view.

  • JonnyMacJonnyMac Posts: 9,442
    edited 2025-08-30 17:33

    Yes, I can add a button to toggle the outline view.

    Thank you! With Red Bull out of the running I may have to start cheering for Ferrari! 😆

    I think the only thing left on my wish list is code folding of the editor window (which you've explained is difficult) -- alternately, and since you're dealing with colors now, would it be possible to select background colors in the outline? That would help me visually.

    As always, thanks so much for your efforts and making Spin Tools a really great IDE for Propeller programmers.

  • maccamacca Posts: 918

    @JonnyMac said:
    I think the only thing left on my wish list is code folding of the editor window (which you've explained is difficult) -- alternately, and since you're dealing with colors now, would it be possible to select background colors in the outline? That would help me visually.

    Yes, I can add background colors to the outline view.

    I was looking at the code folding in Propeller Tool and I think I need a clarification, you mean the folding using the top buttons (Full Source, Condensed, Summary, Documentation) ?
    Maybe I had a hallucination but I tought that Propeller Tool had folding buttons for sections but seems I can't see them now...

    I'm asking because that kind of folding (Summary) is a bit easier to implement, since it is a momentary view (when you type a key the view goes back to full source). But also not much different than the outline view...
    Not what I would like to implement but a bit easier.

  • JonnyMacJonnyMac Posts: 9,442
    edited 2025-08-30 18:50

    When I say "code folding" I am referring to the Summary view (which affects the whole file; it's not method-by-method as in some editors). I don't need the other views. I find that the Summary view, combined with background colors, helps me find my way through very long listings, especially since I add comment tags to non-code sections.

  • maccamacca Posts: 918

    @JonnyMac said:
    When I say "code folding" I am referring to the Summary view (which affects the whole file; it's not method-by-method as in some editors). I don't need the other views. I find that the Summary view, combined with background colors, helps me find my way through very long listings, especially since I add comment tags to non-code sections.

    Ok, that is a bit more easy to implement.
    Sorry I haven't realized that before, for some reasons I tought Propeller Tool had individual section folding buttons. I still want to implement that, but a summary view is good interim implementation.

  • RaymanRayman Posts: 15,564

    The Prop Tool Summary View is nice, use that a lot as well...
    The view on the right in Spin Tools is almost as good.

  • JonnyMacJonnyMac Posts: 9,442
    edited 2025-08-30 22:33

    ... for some reasons I thought Propeller Tool had individual section folding buttons.

    You're probably thinking of BST (Brad's Spin Tool) which does.

  • maccamacca Posts: 918

    Released version 0.49.1

    Bugfix release to fix some bugs from the previous release.

    • Use optimized opcodes for floating point constants
    • Fixed orgh inline assembly count
    • Implemented DITTO in inline PAsm
    • Fixed case-sensitive debug window names
    • Fixed scope debug window initialization
    • Fixed bookmarks alignment with editor changes
    • Allow .pasm and .p2asm files to load and compile
    • Trigger compile with external dependencies update
    • Background colors adjustments
  • Something strange with this new version on Win11. Clicking the blue triangle to load the code, CPU 100% for several seconds, but no load attempt. After that settles, click the load icon again and it works. Change anything in the code, and same routine.

    It's like the initial compile is getting hung up doing something new, like trying to compile- perhaps while accessing OBJ files in the same folder.
    Not sure how to share diagnosis- do you have a Win11 machine to test on ?

    I'll try another reboot in-case it's a Java permissions weirdness since the update. (Though I did get the usual Windows firewall popup request for the new EXE, and granted permissions)

  • Reboot didn't solve- though I notice now it's not always 100% CPU in task manager. Sometimes the IDE is just unresponsive without raising the CPU much/at all. After 2-3 seconds it clears, and after 2-3 clicks on the icon, then it will compile/load.

    I guess I should try upgrading Java next, in case that is old. No idea!
    After this reboot it should be noted, Windows has a new nag screen for Edge. That might not help, though I could close the darn thing eventually!

  • VonSzarvasVonSzarvas Posts: 3,605
    edited 2025-09-02 08:48

    Java updated. Same behaviour. Though it might be com port related- I noticed the CPU spike changes if I purposely lock the COM port and try programming. Then continue to try with an unlocked (available) port. Could be a com related process stuck unterminated in SpinTools that impacts future compile/load attempts.

    I'm happy with the prior version- so no rush to investigate on my behalf. If I spot anything else useful toward diagnostics I'll drop you an email.

    Edit: Oh yeah--- the old version immediately pops up a modal when it detects the com port is in-use elsewhere and appears to gracefully terminate the process. The new version gets stuck into a CPU race to the top, with no messaging. That seems like a clue.

  • One feature suggestion...

    The mouse wheel scroll works in the last window that was clicked, regardless of the current location of the mouse pointer.

    Feels to me like it would be more intuitive for the scroll to operate on the window the the mouse pointer is currently over. (either the code pane, or outline pane).

    As it works now- if we click a function name in the outline pane, then move the mouse to the code pane and try scrolling to reach the code, then it's the outline pane that continues scrolling. And visa-versa, when hunting the outline pane for a function, you can't actually scroll it with the mouse wheel until you select one of the objects in the list. (It's not enough even to select the panel, you have to select an object in the panel with Windows). Hence I'm thinking a hover-location-related detection might be more efficient,- if possible.

  • RaymanRayman Posts: 15,564

    Just installed on a PC that didn't have it before.
    Seems to work just fine.

    I'll try on another machine that already had it and see if that's any different...

  • JonnyMacJonnyMac Posts: 9,442
    edited 2025-09-02 15:48

    Yes, I can add a button to toggle the outline view.

    Would you also consider adding "Close Editor" and "Close All Editors" buttons to the tool bar (just to the right of Save All)? Thanks.

  • maccamacca Posts: 918

    @VonSzarvas said:
    Something strange with this new version on Win11. Clicking the blue triangle to load the code, CPU 100% for several seconds, but no load attempt. After that settles, click the load icon again and it works. Change anything in the code, and same routine.

    It's like the initial compile is getting hung up doing something new, like trying to compile- perhaps while accessing OBJ files in the same folder.
    Not sure how to share diagnosis- do you have a Win11 machine to test on ?

    I have a laptop with Windows 11 I did some quick tests with the sources I have and I don't see problems here.

    Dos that happens with every source or only with a specific source ?
    I mean, if you start with the default template does it work ?

    A possible cause of this kind of problem could be the check for external changes, that in this version also includes the binary files embedded with the file directive, that may trigger a number of recompiles.
    Can you check if the compiler is running much longer than expected (the tab title font turns to italic when the compiler is running) ?

    I guess I should try upgrading Java next, in case that is old. No idea!

    No need, the Java runtime is included in the Spin Tools package, it doesn't use the system-installed runtime, and it is the same as before.

    Edit: Oh yeah--- the old version immediately pops up a modal when it detects the com port is in-use elsewhere and appears to gracefully terminate the process. The new version gets stuck into a CPU race to the top, with no messaging. That seems like a clue.

    Ah... well, one change I did was to close the serial port (if open by the terminal window) when running the external tools, so you can use a propeller loader without closing the terminal (and have the output in the same terminal). But this was done with the previous release and should affect only external tools. Wondering what may have changed.

  • JonnyMacJonnyMac Posts: 9,442

    @macca, I'm wondering if you could "fix" (adjust) a niggly behavior with the Tab key. Let's say I have a comment at the end of a line, and then the code gets extended so the comment gets pushed out of alignment. In Propeller Tool (and other editors), I can drag select several characters to the left of the comment, press the Tab key, and all is well (i.e., the comment is realigned). This is not the case with Spin Tools; instead of replacing the selection with the expected Tab behavior, the cursor moves to the end of the selection. This only seems to happen with the Tab key; if I press another key, the selected region is replaced with that key. This forces me to select, press space, then press Tab -- but I often forget and it becomes a bit annoying.

    Thanks for considering.

  • VonSzarvasVonSzarvas Posts: 3,605
    edited 2025-09-02 17:42

    @macca said:
    Can you check if the compiler is running much longer than expected (the tab title font turns to italic when the compiler is running) ?

    Yes - that is happening - title goes italic for a long time when the compile/load fails to complete.

    BTW... As you mentioned serial terminal--- I'm using HTerm by der-hammer. Standalone- not set up in SpinTools IDE as an external tool.

Sign In or Register to comment.