Skip to content

Commit

Permalink
Release 0.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
hajdam committed Jan 25, 2020
1 parent 5121e4b commit 59769c2
Show file tree
Hide file tree
Showing 24 changed files with 135 additions and 88 deletions.
9 changes: 0 additions & 9 deletions .idea/libraries/paged_data_0_2_0_20191217_095305_1.xml

This file was deleted.

9 changes: 9 additions & 0 deletions .idea/libraries/paged_data_0_2_0_20200124_190956_4.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion changes.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
0.2.2
0.2.2 (2020-01-25)
- Minor GUI improvements
- Support for multiple decoders in debugging view
- Display the number of bytes selected (issue #26)
- Fixed opening via dialog crashes IntelliJ (mac) (issue #22)
- Fixed "HIDE_DEFAULT_EDITOR is supported only for DumbAware providers" error message (issue #24)
- Fixed NullPointerException when trying to hex-view bytearray in Debug mode (issue #27)
- Fixed Editor stops responding when I use Find (issue #19)
- Fixed Cursor position is lost if you switch tabs (issue #25)

0.2.1 (2019-08-22)
- Minor GUI improvements
Expand Down
Binary file modified lib/bined-core-0.2.0-SNAPSHOT.jar
Binary file not shown.
Binary file modified lib/bined-extended-0.2.0-SNAPSHOT.jar
Binary file not shown.
Binary file modified lib/bined-highlight-swing-0.2.0-SNAPSHOT.jar
Binary file not shown.
Binary file modified lib/bined-operation-0.2.0-SNAPSHOT.jar
Binary file not shown.
Binary file modified lib/bined-operation-swing-0.2.0-SNAPSHOT.jar
Binary file not shown.
Binary file modified lib/bined-swing-0.2.0-SNAPSHOT.jar
Binary file not shown.
Binary file modified lib/bined-swing-extended-0.2.0-SNAPSHOT.jar
Binary file not shown.
27 changes: 17 additions & 10 deletions resources/META-INF/plugin.xml
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
<idea-plugin version="2" url="https://bined.exbin.org/intellij-plugin">
<id>org.exbin.deltahex.intellij</id>
<name>BinEd - Binary/Hexadecimal Editor</name>
<version>0.2.2.snapshot</version>
<vendor email="hajdam@users.sf.net" url="https://exbin.org">ExBin Project</vendor>
<version>0.2.2</version>
<vendor email="exbinproject@gmail.com" url="https://exbin.org">ExBin Project</vendor>

<description><![CDATA[
<p>Binary/hexadecimal editor plugin based on BinEd binary editor.</p>
<p>Binary/hexadecimal editor plugin based on BinEd library.</p>
<p>Use "Open as Binary" action in main "File" menu or in project files context menu.</p>
<p>Use "View as Binary" action in context menu in Variables window.</p>
<p>Use "View as Binary" action in context menu in variables/debug window.</p>
<h1>Preview</h1>
<p><img src="https://bined.exbin.org/images/bined-intellij-plugin-preview-0.2.2.png" alt="bined-intellij-plugin-preview" width="382" height="65"/></p>
<p><img src="https://bined.exbin.org/images/bined-intellij-plugin-preview-0.2.2.png" alt="[bined-intellij-plugin-preview]" width="382" height="65"/></p>
<h1>Features</h1>
<ul><li>Visualize data as numerical (hexadecimal) codes and text representation</li>
Expand Down Expand Up @@ -38,6 +38,7 @@ Sources: <a href="https://github.com/exbin/bined-intellij-plugin">https://github
<li>Fixed "HIDE_DEFAULT_EDITOR is supported only for DumbAware providers" error message</li>
<li>Fixed NullPointerException when trying to hex-view bytearray in Debug mode</li>
<li>Fixed Editor stops responding when I use Find</li>
<li>Fixed Cursor position is lost if you switch tabs</li>
</ul>
]]>
</change-notes>
Expand All @@ -54,7 +55,9 @@ Sources: <a href="https://github.com/exbin/bined-intellij-plugin">https://github
</project-components>

<application-components>
<component><implementation-class>org.exbin.bined.intellij.BinEdFileSystem</implementation-class></component>
<component>
<implementation-class>org.exbin.bined.intellij.BinEdFileSystem</implementation-class>
</component>
<!-- <component><implementation-class>org.exbin.bined.intellij.BinEdFileEditorProvider</implementation-class></component> -->
<!-- <component>
<implementation-class>org.exbin.bined.intellij.Configuration</implementation-class>
Expand All @@ -69,14 +72,16 @@ Sources: <a href="https://github.com/exbin/bined-intellij-plugin">https://github

<actions>
<action id="BinEdEditor.OpenAsBinaryAction" class="org.exbin.bined.intellij.OpenAsBinaryAction"
text="Open As Binary" description="Opens file in binary/hexadecimal viewer/editor" icon="/images/icon-idea.png"/>
text="Open As Binary" description="Opens file in binary/hexadecimal viewer/editor"
icon="/images/icon-idea.png"/>
<group>
<reference id="BinEdEditor.OpenAsBinaryAction"/>
<add-to-group group-id="ProjectViewPopupMenu" relative-to-action="EditorDelete" anchor="after"/>
</group>

<action id="BinEdEditor.FileOpenAsBinary" class="org.exbin.bined.intellij.FileOpenAsBinaryAction"
text="Open as Binary..." description="Opens file in binary/hexadecimal viewer/editor" icon="/images/icon-idea.png">
text="Open as Binary..." description="Opens file in binary/hexadecimal viewer/editor"
icon="/images/icon-idea.png">
<add-to-group group-id="FileOpenGroup" relative-to-action="OpenFile" anchor="after"/>
</action>

Expand All @@ -86,10 +91,12 @@ Sources: <a href="https://github.com/exbin/bined-intellij-plugin">https://github
</group>

<group>
<action id="Debugger.BinEdShowAsBinary" class="org.exbin.bined.intellij.debug.DebugViewBinaryAction" text="Show As Binary" icon="/images/icon-idea.png"/>
<action id="Debugger.BinEdShowAsBinary" class="org.exbin.bined.intellij.debug.DebugViewBinaryAction"
text="Show As Binary" icon="/images/icon-idea.png"/>

<add-to-group group-id="XDebugger.Watches.Tree.Popup" anchor="last"/>
<add-to-group group-id="XDebugger.Watches.Tree.Toolbar" anchor="after" relative-to-action="XDebugger.Actions"/>
<add-to-group group-id="XDebugger.Watches.Tree.Toolbar" anchor="after"
relative-to-action="XDebugger.Actions"/>
<add-to-group group-id="XDebugger.Variables.Tree.Popup" anchor="last"/>
<add-to-group group-id="XDebugger.Evaluation.Dialog.Tree.Popup" anchor="last"/>
<add-to-group group-id="XDebugger.Inspect.Tree.Popup" anchor="last"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
Application.name = BinEd
Application.title = BinEd Binary/Hexadecimal Editor
Application.release = 0.2.2
Application.mode = DEV
Application.version = 0.2.2 DEV
Application.product= BinEd Binary/Hexadecimal Editor 0.2.2 DEV
Application.mode =
Application.version = 0.2.2
Application.product= BinEd Binary/Hexadecimal Editor 0.2.2
Application.vendor = ExBin Project
Application.homepage = https://bined.exbin.org/intellij-plugin/
Application.vendorId = ExBin Project
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 4 additions & 4 deletions src/org/exbin/bined/intellij/BinEdFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,6 @@ public void actionPerformed(ActionEvent e) {
});
}

public static PropertiesComponent getPreferences() {
return PropertiesComponent.getInstance();
}

public boolean isModified() {
return componentPanel.isModified();
}
Expand Down Expand Up @@ -379,4 +375,8 @@ private void setNewData() {
codeArea.setContentData(new PagedData());
}
}

public JComponent getPreferredFocusedComponent() {
return componentPanel.getCodeArea();
}
}
2 changes: 1 addition & 1 deletion src/org/exbin/bined/intellij/BinEdFileEditor.java
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ public JComponent getComponent() {
@Nullable
@Override
public JComponent getPreferredFocusedComponent() {
return virtualFile.getEditorPanel();
return virtualFile.getPreferredFocusedComponent();
}

@Nonnull
Expand Down
4 changes: 4 additions & 0 deletions src/org/exbin/bined/intellij/BinEdVirtualFile.java
Original file line number Diff line number Diff line change
Expand Up @@ -180,4 +180,8 @@ public boolean isClosed() {
public void setClosed(boolean closed) {
this.closed = closed;
}

public JComponent getPreferredFocusedComponent() {
return editorFile.getPreferredFocusedComponent();
}
}
3 changes: 3 additions & 0 deletions src/org/exbin/bined/intellij/panel/BinEdComponentPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -884,6 +884,9 @@ public void setUndoHandler(BinaryDataUndoHandler undoHandler) {
toolbarPanel.setUndoHandler(undoHandler);
CodeAreaOperationCommandHandler commandHandler = new CodeAreaOperationCommandHandler(codeArea, undoHandler);
codeArea.setCommandHandler(commandHandler);
if (valuesPanel != null) {
valuesPanel.setCodeArea(codeArea, undoHandler);
}
// TODO set ENTER KEY mode in apply options

undoHandler.addUndoUpdateListener(new BinaryDataUndoUpdateListener() {
Expand Down
87 changes: 54 additions & 33 deletions src/org/exbin/bined/intellij/panel/BinEdToolbarPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ public class BinEdToolbarPanel extends javax.swing.JPanel {
private final AnAction octalCodeTypeAction;
private final AnAction decimalCodeTypeAction;
private final AnAction hexadecimalCodeTypeAction;
private boolean modified = false;

public BinEdToolbarPanel(BinaryEditorPreferences preferences, ExtCodeArea codeArea, AnAction optionsAction) {
this.preferences = preferences;
Expand Down Expand Up @@ -121,13 +122,6 @@ public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
public AnAction[] getChildren(@Nullable AnActionEvent anActionEvent) {
return new AnAction[]{binaryCodeTypeAction, octalCodeTypeAction, decimalCodeTypeAction, hexadecimalCodeTypeAction};
}

@Override
public void update(@NotNull AnActionEvent e) {
if (e.getInputEvent() != null) {
super.update(e);
}
}
};
cycleCodeTypesSplitAction = new CodeTypeSplitAction(cycleActionGroup);

Expand All @@ -150,8 +144,8 @@ private void init() {
public void setUndoHandler(BinaryDataUndoHandler undoHandler) {
this.undoHandler = undoHandler;

toolbar.getPresentation(undoEditButton).setVisible(true);
toolbar.getPresentation(redoEditButton).setVisible(true);
setActionVisible(undoEditButton, true);
setActionVisible(redoEditButton, true);
}

private void updateCycleButtonState() {
Expand Down Expand Up @@ -188,28 +182,34 @@ private void updateCycleButtonState() {

public void applyFromCodeArea() {
updateCycleButtonState();
setActionSelection(showUnprintablesToggleButton, codeArea.isShowUnprintables());
updateUnprintables();
}

public void loadFromPreferences() {
codeArea.setCodeType(preferences.getCodeAreaPreferences().getCodeType());
updateCycleButtonState();
setActionSelection(showUnprintablesToggleButton, preferences.getCodeAreaPreferences().isShowUnprintables());
updateUnprintables();
}

public void updateUndoState() {
toolbar.getPresentation(undoEditButton).setEnabled(undoHandler.canUndo());
toolbar.getPresentation(redoEditButton).setEnabled(undoHandler.canRedo());
toolbar.getPresentation(undoEditButton).setEnabled(undoHandler != null && undoHandler.canUndo());
toolbar.getPresentation(redoEditButton).setEnabled(undoHandler != null && undoHandler.canRedo());
}

public void updateUnprintables() {
boolean showUnprintables = codeArea.isShowUnprintables();
setActionSelection(showUnprintablesToggleButton, showUnprintables);
}

public void updateModified(boolean modified) {
toolbar.getPresentation(saveFileButton).setEnabled(saveAction != null && modified);
this.modified = modified;
toolbar.getPresentation(saveFileButton).setEnabled(modified);
updateUndoState();
}

public void setSaveAction(ActionListener saveAction) {
this.saveAction = saveAction;
toolbar.getPresentation(saveFileButton).setVisible(true);
setActionVisible(saveFileButton, true);
}

// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
Expand All @@ -225,10 +225,17 @@ private void initComponents() {
public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
if (saveAction != null) saveAction.actionPerformed(new ActionEvent(BinEdToolbarPanel.this, 0, ""));
}

@Override
public void update(@NotNull AnActionEvent e) {
super.update(e);
Presentation presentation = e.getPresentation();
presentation.setVisible(saveAction != null);
presentation.setEnabled(modified);
}
};
actionGroup.add(saveFileButton);
toolbar.getPresentation(saveFileButton).setEnabled(false);
toolbar.getPresentation(saveFileButton).setVisible(false);
actionGroup.addAction(saveFileButton);
setActionVisible(saveFileButton, false);
actionGroup.addSeparator();

undoEditButton = new AnAction(
Expand All @@ -240,10 +247,17 @@ public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
undoEditButtonActionPerformed();
}

@Override
public void update(@NotNull AnActionEvent e) {
super.update(e);
Presentation presentation = e.getPresentation();
presentation.setVisible(undoHandler != null);
presentation.setEnabled(undoHandler != null && undoHandler.canUndo());
}
};
actionGroup.add(undoEditButton);
toolbar.getPresentation(undoEditButton).setEnabled(false);
toolbar.getPresentation(undoEditButton).setVisible(false);
actionGroup.addAction(undoEditButton);
setActionVisible(undoEditButton, false);

redoEditButton = new AnAction(
"Redo last undid operation",
Expand All @@ -254,15 +268,22 @@ public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
redoEditButtonActionPerformed();
}

@Override
public void update(@NotNull AnActionEvent e) {
super.update(e);
Presentation presentation = e.getPresentation();
presentation.setVisible(undoHandler != null);
presentation.setEnabled(undoHandler != null && undoHandler.canRedo());
}
};
actionGroup.add(redoEditButton);
toolbar.getPresentation(redoEditButton).setEnabled(false);
toolbar.getPresentation(redoEditButton).setVisible(false);
actionGroup.addAction(redoEditButton);
setActionVisible(redoEditButton, false);

showUnprintablesToggleButton = new ToggleAction(
resourceBundle.getString("showUnprintablesToggleButton.toolTipText"),
null,
new javax.swing.ImageIcon(getClass().getResource("/org/exbin/bined/intellij/resources/icons/insert-pilcrow_disabled.png"))
new javax.swing.ImageIcon(getClass().getResource("/org/exbin/bined/intellij/resources/icons/insert-pilcrow.png"))
) {
@Override
public boolean isSelected(@NotNull AnActionEvent anActionEvent) {
Expand All @@ -272,16 +293,12 @@ public boolean isSelected(@NotNull AnActionEvent anActionEvent) {
@Override
public void setSelected(@NotNull AnActionEvent anActionEvent, boolean selected) {
codeArea.setShowUnprintables(selected);
toolbar.getPresentation(showUnprintablesToggleButton).setIcon(
selected ?
new javax.swing.ImageIcon(getClass().getResource("/org/exbin/bined/intellij/resources/icons/insert-pilcrow.png"))
: new javax.swing.ImageIcon(getClass().getResource("/org/exbin/bined/intellij/resources/icons/insert-pilcrow_disabled.png"))
);
updateUnprintables();
}
};
actionGroup.add(showUnprintablesToggleButton);
actionGroup.addAction(showUnprintablesToggleButton);

actionGroup.add(cycleCodeTypesSplitAction);
actionGroup.addAction(cycleCodeTypesSplitAction);
updateCycleButtonState();

actionGroup.addSeparator();
Expand All @@ -295,7 +312,7 @@ public void actionPerformed(@NotNull AnActionEvent anActionEvent) {
optionsAction.actionPerformed(anActionEvent);
}
};
actionGroup.add(settingsAction);
actionGroup.addAction(settingsAction);
}// </editor-fold>//GEN-END:initComponents

// Variables declaration - do not modify//GEN-BEGIN:variables
Expand Down Expand Up @@ -325,6 +342,10 @@ private void redoEditButtonActionPerformed() {
}
}

private void setActionVisible(AnAction action, boolean enabled) {
toolbar.getPresentation(action).setVisible(enabled);
}

private void setActionSelection(AnAction action, boolean selected) {
toolbar.getPresentation(action).putClientProperty("selected", selected);
}
Expand Down
Loading

0 comments on commit 59769c2

Please sign in to comment.