facebook

‘Save failed:null’ when trying to save .xml [Closed]

💡
Our Forums Have Moved

For help with installation, bugs reports or feature requests, please head over to our new forums.
Genuitec Community on GitHub

  1. MyEclipse Archived
  2.  > 
  3. Bugs
Viewing 3 posts - 16 through 18 (of 18 total)
  • Author
    Posts
  • #216872

    Scott Anderson
    Participant

    Michael,

    Thanks for looking into this. I looked at the code in the NPE and it’s playing around with the undo manager trying to reset the caret in the text widget. We’ll put in a guard for the problem in the next release, but I don’t know why the VI plugin would trigger this when normal operation doesn’t. If you’d like to diagnose the cause, you could do that against the IBM web tools contribution’s text editors since we’ve based ours upon those. Anything you find should be applicable to all products based on that editing framework.

    #216881

    Hi Scott!

    Now that’s funny! There are 2 possible reasons why this happens:

    – When viPlugin is activated it removes the current UndoManager and sets a new DefaultUndoManager (Eclipse is very strict in what it wants to give to plugins, so I had to do that).
    – viPlugin takes over the caret (thick caret — thin caret switching) for different modes.

    I’ll try to restore the original caret, when saving and see if that helps :o)

    Another question: I’ve seen that you (as company) are certifying plugins that work well with MyEclipseIDE. Is such a certificate possible for viPlugin, or is this too far fetched?

    Thx & Best regards,
    Michael

    #216895

    Scott Anderson
    Participant

    Michael,

    – When viPlugin is activated it removes the current UndoManager and sets a new DefaultUndoManager (Eclipse is very strict in what it wants to give to plugins, so I had to do that).

    That’s likely a problem as the IBM editors have an extensive undo framework that they use. Your change might kill standard undo functionality in the editor as a result.

    – viPlugin takes over the caret (thick caret — thin caret switching) for different modes.

    Also problematic as the caret is reset when the “changed” event fires.

    I’ll try to restore the original caret, when saving and see if that helps :o)

    To help you out, here’s the code that’s barfing below.

    
        public void changed(Object element) {
    
            super.changed(element);
    
            // end recording for revert
            if (fChangingElements.contains(element)) {
                fChangingElements.remove(element);
                StructuredTextUndoManager undoMgr = getModel(element).getUndoManager();
                undoMgr.endRecording(this, 0, 0);
                undoMgr.getTextViewer().getTextWidget().setCaretOffset(0);  // line 929 from the stacktrace
            }
        }
    

    Another question: I’ve seen that you (as company) are certifying plugins that work well with MyEclipseIDE. Is such a certificate possible for viPlugin, or is this too far fetched?

    It’s not far-fetched, but in light of the amount of time we spend enhancing the portal and MyEclipse itself, we (as a company) haven’t actively pursued the certification thing. We just haven’t had time. 🙂

Viewing 3 posts - 16 through 18 (of 18 total)
Reply To: ‘Save failed:null’ when trying to save .xml [Closed]

You must be logged in to post in the forum log in