From: SourceForge.net <no...@so...> - 2011-02-06 19:48:14
|
Plugin Bugs item #857802, was opened at 2003-12-10 20:29 Message generated for change (Comment added) made by kerik-sf You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=565475&aid=857802&group_id=588 Please note that this message will contain a full copy of the comment thread, including the initial issue submission, for this request, not just the latest update. Category: None Group: None Status: Open >Resolution: Fixed Priority: 5 Private: No Submitted By: Lars Naber (nobettername) Assigned to: Eric Le Lay (kerik-sf) Summary: xml: insert closing tag in macro Initial Comment: When I record a macro in a html file and enter a tag the following command is recorded: xml.XmlActions.insertClosingTagKeyTyped(view); The insert commands of the xml plugin are switched off. xmp.props says: plugin.xml.XmlPlugin.version=0.13 ---------------------------------------------------------------------- >Comment By: Eric Le Lay (kerik-sf) Date: 2011-02-06 20:48 Message: As of r19347, the temporary macro should look like this (if you also disabled the Sidekick popup, or dismiss it when it appears as you type "/") : textArea.setSelectedText("<book"); xml.XmlActions.insertClosingTagKeyTyped(view); textArea.setSelectedText("bla</book"); xml.XmlActions.insertClosingTagKeyTyped(view); so the extra closing brackets are not there anymore. This should take care of your problem. xml.XmlActions.insertClosingTagKeyTyped(view) is still there because it's an action bound to the ">" keystroke (for the record, it's configured in XML.props). But all it does is insert ">" in the text-area. There is still an issue when you enable the Sidekick completion popup : when you type "</", the completion popup appears and shows "</book>". If you ignore it and type "book>", nothing is recorded in the macro. I traced it down to sidekick.SideKickCompletionPopup.keyTyped(), but shall confirm this with the developers of SideKick. ---------------------------------------------------------------------- Comment By: Eric Le Lay (kerik-sf) Date: 2011-02-06 10:29 Message: I'll look into it... ---------------------------------------------------------------------- Comment By: ratlan (ratlan) Date: 2011-02-05 17:08 Message: (sorry, my previous comment is missing a line) For me this issue is not out of date, I have experienced the same problem for years. Now I installed XML-Plugin 2.8.0, and the problem is still there. The problem does not occur without XML-Plugin. jEdit 4.3.2 - JRE 1.6.0_21 - Win 7 ---------------- All XML-Plugin options are off. File / New File / Save c:\temp\1.xml Macro / Record Temporary Macro type: <book>bla</book> Macro / Stop Recording Macro / Run Temporary Macro Text area now looks like this. Note the two obsolete closing brackets. <book>bla</book><book>>bla</book>> The Temporary_Macro looks like this textArea.setSelectedText("<book>"); xml.XmlActions.insertClosingTagKeyTyped(view); textArea.setSelectedText("bla</book>"); xml.XmlActions.insertClosingTagKeyTyped(view); ---------------- ---------------------------------------------------------------------- Comment By: ratlan (ratlan) Date: 2011-02-05 17:05 Message: For me this issue is not out of date, I have experienced the same problem for years. Now I installed XML-Plugin 2.8.0, and the problem is still there. The problem does not occur without XML-Plugin. jEdit 4.3.2 - JRE 1.6.0_21 - Win 7 ---------------- All XML-Plugin options are off. File / New File / Save c:\temp\1.xml Macro / Record Temporary Macro type: <book>bla</book> Macro / Stop Recording Text area now looks like this. Note the two obsolete closing brackets. <book>bla</book><book>>bla</book>> The Temporary_Macro looks like this textArea.setSelectedText("<book>"); xml.XmlActions.insertClosingTagKeyTyped(view); textArea.setSelectedText("bla</book>"); xml.XmlActions.insertClosingTagKeyTyped(view); ---------------- ---------------------------------------------------------------------- Comment By: Robert Schwenn (rschwenn) Date: 2007-03-03 15:46 Message: Logged In: YES user_id=1486645 Originator: NO Well, my jEdit does it quite a bit different: In "HTML" mode: - The <br>-Tag is not closed automatically - When I type "<table>" the closing tag is inserted automatically - The recorded macro contains following 2 lines: textArea.setSelectedText("<table></table>"); textArea.setCaretPosition(textArea.getCaretPosition() - 8); In "XML" mode: - For every arbitrary Tag the closing tag is inserted automatically - The recorded macro contains following 3 lines: textArea.setSelectedText("<ArbitraryTag></ArbitraryTag>"); textArea.setCaretPosition(textArea.getCaretPosition() - 15); xml.XmlActions.insertClosingTagKeyTyped(view); So, what do we see? 1. My recorded text contains the automatically inserted text, Yours not. 2. The method "xml.XmlActions.insertClosingTagKeyTyped(view)" that seems to do the magic insertion, is recorded in xml mode only. But it should not be recorded, if the automatically inserted text is already recorded. 3. I guess Your probem is an empty list of the xml insert dockable? May be "someone" switched Your edit mode to xml. In this case the list is empty, if there is not a proper doctype given. For me, the list is empty with this first line in the html file: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" >, but the list is ok with this line: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" ""> Also, the list content is context-sensitive. May be, after recording Your macro, the caret is located in a context whre no tags can be inserted? jEdit 4.3pre9 java1.5.0_11 WinXP SP2 ---------------------------------------------------------------------- Comment By: Lars Naber (nobettername) Date: 2007-03-03 07:43 Message: Logged In: YES user_id=686953 Originator: YES The problem isn't there if i choose a completion. Please try to type the text. I did the following: - Open a html file - Start Macro Recording - TYPE "<br>" or something - Stop Macro Recording Look at the recorded macro: Here it says now: textArea.setSelectedText("<br>"); xml.XmlActions.insertClosingTagKeyTyped(view); I just noticed that the problem only occurs if the entered tag is valid. Recorded example: textArea.setSelectedText("<br>"); xml.XmlActions.insertClosingTagKeyTyped(view); textArea.setSelectedText("<brs>"); Hope it helps. ---------------------------------------------------------------------- Comment By: Robert Schwenn (rschwenn) Date: 2007-03-02 22:08 Message: Logged In: YES user_id=1486645 Originator: NO When I insert a tag via the xml insert dockable the macro records *nothing*. When I type "<" and use the completion popup to insret a tag, the macro records somthing like this: textArea.setSelectedText("<applet height=\"\" width=\"\"></applet>"); textArea.setCaretPosition(textArea.getCaretPosition() - 9); What are You doing? ---------------------------------------------------------------------- Comment By: Lars Naber (nobettername) Date: 2007-03-02 11:30 Message: Logged In: YES user_id=686953 Originator: YES I just changed to 4.3pre9 yesterday and updated all plugins. plugin.xml.XmlPlugin.version=2.0.5 The error still occurs in exactly the same way. ---------------------------------------------------------------------- Comment By: Robert Schwenn (rschwenn) Date: 2007-03-01 23:14 Message: Logged In: YES user_id=1486645 Originator: NO Can You reproduce this with at least jEdit 4.2final? Also XML Plugin has grown in the meantime from version 0 to version 2. I'd think this issue is out of date. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=565475&aid=857802&group_id=588 |