diff --git a/lib/jsyntaxpane-0.9.5.jar b/lib/jsyntaxpane-0.9.5.jar index 35613c063..753cec999 100644 Binary files a/lib/jsyntaxpane-0.9.5.jar and b/lib/jsyntaxpane-0.9.5.jar differ diff --git a/libsrc/jsyntaxpane/jsyntaxpane/src/main/java/jsyntaxpane/syntaxkits/PlainDebugSyntaxKit.java b/libsrc/jsyntaxpane/jsyntaxpane/src/main/java/jsyntaxpane/syntaxkits/PlainDebugSyntaxKit.java new file mode 100644 index 000000000..872b4b46f --- /dev/null +++ b/libsrc/jsyntaxpane/jsyntaxpane/src/main/java/jsyntaxpane/syntaxkits/PlainDebugSyntaxKit.java @@ -0,0 +1,28 @@ +/* + * Copyright 2008 Ayman Al-Sairafi ayman.alsairafi@gmail.com + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License + * at http://www.apache.org/licenses/LICENSE-2.0 + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package jsyntaxpane.syntaxkits; + +import jsyntaxpane.DefaultSyntaxKit; +import jsyntaxpane.lexers.EmptyLexer; + +/** + * + * @author JPEXS + */ +public class PlainDebugSyntaxKit extends DefaultSyntaxKit { + + public PlainDebugSyntaxKit() { + super(new EmptyLexer()); + } +} diff --git a/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/META-INF/services/jsyntaxpane/kitsfortypes.properties b/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/META-INF/services/jsyntaxpane/kitsfortypes.properties index ab9b02f62..c1f30633d 100644 --- a/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/META-INF/services/jsyntaxpane/kitsfortypes.properties +++ b/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/META-INF/services/jsyntaxpane/kitsfortypes.properties @@ -24,6 +24,7 @@ text/xpath=jsyntaxpane.syntaxkits.XPathSyntaxKit text/xhtml=jsyntaxpane.syntaxkits.XHTMLSyntaxKit text/lua=jsyntaxpane.syntaxkits.LuaSyntaxKit text/plain=jsyntaxpane.syntaxkits.PlainSyntaxKit +text/plaindebug=jsyntaxpane.syntaxkits.PlainDebugSyntaxKit text/flasm3=jsyntaxpane.syntaxkits.Flasm3SyntaxKit text/flasm3methodinfo=jsyntaxpane.syntaxkits.Flasm3MethodInfoSyntaxKit text/flasm=jsyntaxpane.syntaxkits.FlasmSyntaxKit diff --git a/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/META-INF/services/jsyntaxpane/syntaxkits/plaindebugsyntaxkit/config.properties b/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/META-INF/services/jsyntaxpane/syntaxkits/plaindebugsyntaxkit/config.properties new file mode 100644 index 000000000..212bacef2 --- /dev/null +++ b/libsrc/jsyntaxpane/jsyntaxpane/src/main/resources/META-INF/services/jsyntaxpane/syntaxkits/plaindebugsyntaxkit/config.properties @@ -0,0 +1,19 @@ +# +# Plain / Empty Document +# +Components = jsyntaxpane.components.LineNumbersBreakpointsRuler +PopupMenu = \ + cut-to-clipboard , \ + copy-to-clipboard , \ + paste-from-clipboard , \ + - , \ + select-all , \ + - , \ + undo , \ + redo , \ + - , \ + find , \ + find-next , \ + goto-line , \ + - , \ + complete-word diff --git a/src/com/jpexs/decompiler/flash/gui/editor/UndoFixedEditorPane.java b/src/com/jpexs/decompiler/flash/gui/editor/UndoFixedEditorPane.java index 77f6bbb73..06237fe73 100644 --- a/src/com/jpexs/decompiler/flash/gui/editor/UndoFixedEditorPane.java +++ b/src/com/jpexs/decompiler/flash/gui/editor/UndoFixedEditorPane.java @@ -88,37 +88,42 @@ public class UndoFixedEditorPane extends JEditorPane { } public void changeContentType(String type) { - if (!type.equals(getContentType())) { - removeDocumentListener(); - Font oldFont = getFont(); - setContentType(type); - setFont(oldFont); - addDocumentListener(); - } + View.execInEventDispatch(new Runnable() { + @Override + public void run() { + if (!type.equals(getContentType())) { + removeDocumentListener(); + Font oldFont = getFont(); + setContentType(type); + setFont(oldFont); + addDocumentListener(); + } - if (!Configuration.autoCloseQuotes.get()) { - getActionMap().remove("quotes"); - KeyStroke ks = KeyStroke.getKeyStroke("typed '"); - getInputMap(JTextComponent.WHEN_FOCUSED).remove(ks); - } + if (!Configuration.autoCloseQuotes.get()) { + getActionMap().remove("quotes"); + KeyStroke ks = KeyStroke.getKeyStroke("typed '"); + getInputMap(JTextComponent.WHEN_FOCUSED).remove(ks); + } - if (!Configuration.autoCloseDoubleQuotes.get()) { - getActionMap().remove("double-quotes"); - KeyStroke ks = KeyStroke.getKeyStroke("typed \""); - getInputMap(JTextComponent.WHEN_FOCUSED).remove(ks); - } + if (!Configuration.autoCloseDoubleQuotes.get()) { + getActionMap().remove("double-quotes"); + KeyStroke ks = KeyStroke.getKeyStroke("typed \""); + getInputMap(JTextComponent.WHEN_FOCUSED).remove(ks); + } - if (!Configuration.autoCloseBrackets.get()) { - getActionMap().remove("brackets"); - KeyStroke ks = KeyStroke.getKeyStroke("typed ["); - getInputMap(JTextComponent.WHEN_FOCUSED).remove(ks); - } + if (!Configuration.autoCloseBrackets.get()) { + getActionMap().remove("brackets"); + KeyStroke ks = KeyStroke.getKeyStroke("typed ["); + getInputMap(JTextComponent.WHEN_FOCUSED).remove(ks); + } - if (!Configuration.autoCloseParenthesis.get()) { - getActionMap().remove("parenthesis"); - KeyStroke ks = KeyStroke.getKeyStroke("typed ("); - getInputMap(JTextComponent.WHEN_FOCUSED).remove(ks); - } + if (!Configuration.autoCloseParenthesis.get()) { + getActionMap().remove("parenthesis"); + KeyStroke ks = KeyStroke.getKeyStroke("typed ("); + getInputMap(JTextComponent.WHEN_FOCUSED).remove(ks); + } + } + }); } @Override @@ -139,7 +144,11 @@ public class UndoFixedEditorPane extends JEditorPane { if (!t.equals(getText())) { boolean plain = t.length() > Configuration.syntaxHighlightLimit.get(); if (plain) { - contentType = "text/plain"; + if (this instanceof DebuggableEditorPane) { + contentType = "text/plaindebug"; + } else { + contentType = "text/plain"; + } originalContentType = getContentType(); changeContentType(contentType); } else if (originalContentType != null) {