AS3: New P-code editing syntax inspired by RABCDAsm.

AS3: Multiname and namespace editing.
AS3: Editing whole trait in one textarea
AS3: Removed messages about adding new constants
AS3: Modified colors in editor
AS3: Highlighting pair parenthesis/bracket
AS3: Editing various new P-code parameters
This commit is contained in:
Jindra Pet��k
2013-09-14 18:57:08 +02:00
parent 71d3ba4425
commit c777e82980
76 changed files with 4592 additions and 1054 deletions
@@ -16,43 +16,30 @@
*/
package com.jpexs.decompiler.flash.gui.abc;
import static com.jpexs.decompiler.flash.gui.AppStrings.translate;
import javax.swing.JScrollPane;
import javax.swing.JTabbedPane;
import java.awt.BorderLayout;
import javax.swing.JPanel;
/**
*
* @author JPEXS
*/
public class MethodTraitDetailPanel extends JTabbedPane implements TraitDetail {
public class MethodTraitDetailPanel extends JPanel implements TraitDetail {
public MethodCodePanel methodCodePanel;
public MethodBodyParamsPanel methodBodyParamsPanel;
public MethodInfoPanel methodInfoPanel;
public ABCPanel abcPanel;
public MethodTraitDetailPanel(ABCPanel abcPanel) {
this.abcPanel = abcPanel;
methodCodePanel = new MethodCodePanel(abcPanel.decompiledTextArea);
methodBodyParamsPanel = new MethodBodyParamsPanel(abcPanel);
methodInfoPanel = new MethodInfoPanel();
addTab(translate("abc.detail.methodinfo"), methodInfoPanel);
addTab(translate("abc.detail.body.code"), methodCodePanel);
addTab(translate("abc.detail.body.params"), new JScrollPane(methodBodyParamsPanel));
setSelectedIndex(1);
setLayout(new BorderLayout());
add(methodCodePanel, BorderLayout.CENTER);
}
@Override
public boolean save() {
if (!methodInfoPanel.save()) {
return false;
}
if (!methodCodePanel.save(abcPanel.abc.constants)) {
return false;
}
if (!methodBodyParamsPanel.save()) {
return false;
}
return true;
}
@@ -60,8 +47,6 @@ public class MethodTraitDetailPanel extends JTabbedPane implements TraitDetail {
@Override
public void setEditMode(boolean val) {
methodCodePanel.setEditMode(val);
methodBodyParamsPanel.setEditMode(val);
methodInfoPanel.setEditMode(val);
}
private boolean active = false;