Skip to content

Commit

Permalink
Release 0.2.8
Browse files Browse the repository at this point in the history
  • Loading branch information
hajdam committed May 19, 2023
1 parent 08f032e commit c2901fb
Show file tree
Hide file tree
Showing 30 changed files with 834 additions and 285 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ Java Development Kit (JDK) version 11 or later is required to build this project

IntelliJ Idea platform is necessary to build this plugin. See. http://jetbrains.org

Assign SDK using 2022.2.1 IntelliJ platform / add and use "Plugin" run configuration to execute.
Assign SDK using 2022.2.1 IntelliJ platform / add and use "Other/Plugin" run configuration to execute.

License
-------
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ plugins {
}

group = "org.exbin.deltahex.intellij"
version = "0.2.8-SNAPSHOT"
version = "0.2.8"
val ideLocalPath = providers.gradleProperty("ideLocalPath").getOrElse("")

repositories {
Expand Down
2 changes: 1 addition & 1 deletion changes.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
0.2.8
0.2.8 (2023-05-19)
- Added edit as binary action for columns in database view
- Added byte-to-byte compare diff option
- Added integration options page
Expand Down
Binary file modified lib/bined-core-0.2.1-SNAPSHOT.jar
Binary file not shown.
Binary file modified lib/bined-extended-0.2.1-SNAPSHOT.jar
Binary file not shown.
Binary file modified lib/bined-highlight-swing-0.2.1-SNAPSHOT.jar
Binary file not shown.
Binary file modified lib/bined-operation-0.2.1-SNAPSHOT.jar
Binary file not shown.
Binary file modified lib/bined-operation-swing-0.2.1-SNAPSHOT.jar
Binary file not shown.
Binary file modified lib/bined-swing-0.2.1-SNAPSHOT.jar
Binary file not shown.
Binary file modified lib/bined-swing-extended-0.2.1-SNAPSHOT.jar
Binary file not shown.
Binary file modified lib/jetbrains/database-plugin-2022.2.1.jar
Binary file not shown.
Binary file modified lib/paged_data-0.2.1-SNAPSHOT.jar
Binary file not shown.
Binary file modified lib/paged_data-delta-0.2.1-SNAPSHOT.jar
Binary file not shown.
101 changes: 0 additions & 101 deletions src/main/java/org/exbin/bined/intellij/BinEdDiffTool.java

This file was deleted.

43 changes: 0 additions & 43 deletions src/main/java/org/exbin/bined/intellij/BinEdFileListener.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,17 @@
import com.intellij.openapi.extensions.ExtensionPointAdapter;
import com.intellij.openapi.extensions.ExtensionPointName;
import com.intellij.openapi.extensions.PluginDescriptor;
import com.intellij.openapi.fileEditor.FileEditorManager;
import com.intellij.openapi.fileEditor.FileEditorManagerListener;
import com.intellij.openapi.progress.ProcessCanceledException;
import com.intellij.openapi.project.DumbAware;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.project.ProjectManager;
import com.intellij.openapi.startup.StartupActivity;
import com.intellij.openapi.ui.DialogWrapper;
import com.intellij.openapi.vfs.VirtualFile;
import com.intellij.util.messages.MessageBus;
import com.intellij.util.messages.MessageBusConnection;
import com.intellij.util.ui.JBUI;
import com.intellij.util.ui.components.BorderLayoutPanel;
import org.exbin.auxiliary.paged_data.BinaryData;
Expand All @@ -34,6 +40,7 @@
import org.exbin.bined.intellij.gui.BinEdComponentPanel;
import org.exbin.bined.intellij.options.IntegrationOptions;
import org.exbin.bined.intellij.preferences.IntegrationPreferences;
import org.exbin.framework.bined.BinEdFileHandler;
import org.exbin.framework.bined.FileHandlingMode;

import javax.annotation.Nonnull;
Expand Down Expand Up @@ -66,16 +73,20 @@ public final class BinEdPluginStartupActivity implements StartupActivity, DumbAw

@Override
public void runActivity(Project project) {
ProjectManager.getInstance().addProjectManagerListener(new BinEdVetoableProjectListener());
if (initialIntegrationOptions == null) {
ProjectManager.getInstance().addProjectManagerListener(new BinEdVetoableProjectListener());

BINED_VIEW_DATA.addExtensionPointListener(new ExtensionPointAdapter<>() {
@Override
public void extensionListChanged() {
initExtensions();
}
}, null);
initExtensions();
initIntegration();
BINED_VIEW_DATA.addExtensionPointListener(new ExtensionPointAdapter<>() {
@Override
public void extensionListChanged() {
initExtensions();
}
}, null);
initExtensions();
initIntegration();
}

projectOpened(project);
}

private void initExtensions() {
Expand All @@ -88,13 +99,33 @@ private void initExtensions() {
});
}

private void initIntegration() {
private static void initIntegration() {
initialIntegrationOptions = new IntegrationPreferences(
new IntelliJPreferencesWrapper(BinEdComponentPanel.getPreferences(), BinEdIntelliJPlugin.PLUGIN_PREFIX)
);
applyIntegrationOptions(initialIntegrationOptions);
}

private static void projectOpened(Project project) {
MessageBus messageBus = project.getMessageBus();
MessageBusConnection connect = messageBus.connect();
connect.subscribe(FileEditorManagerListener.Before.FILE_EDITOR_MANAGER, new FileEditorManagerListener.Before() {
@Override
public void beforeFileClosed(@Nonnull FileEditorManager source, @Nonnull VirtualFile file) {
if (file instanceof BinEdVirtualFile && !((BinEdVirtualFile) file).isMoved()
&& !((BinEdVirtualFile) file).isClosing()) {
((BinEdVirtualFile) file).setClosing(true);
BinEdFileHandler editorPanel = ((BinEdVirtualFile) file).getEditorFile();
if (!editorPanel.releaseFile()) {
((BinEdVirtualFile) file).setClosing(false);
throw new ProcessCanceledException();
}
((BinEdVirtualFile) file).setClosing(false);
}
}
});
}

public static void addIntegrationOptionsListener(IntegrationOptionsListener integrationOptionsListener) {
INTEGRATION_OPTIONS_LISTENERS.add(integrationOptionsListener);
if (initialIntegrationOptions != null) {
Expand Down
59 changes: 0 additions & 59 deletions src/main/java/org/exbin/bined/intellij/BinEdProjectListener.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ public void actionPerformed(ActionEvent e) {

@Override
public boolean isEnabled() {
return codeArea.hasSelection();
return codeArea.isEditable() && codeArea.hasSelection();
}
});
cutMenuItem.setText("Cut");
Expand Down Expand Up @@ -369,7 +369,7 @@ public void actionPerformed(ActionEvent e) {

@Override
public boolean isEnabled() {
return codeArea.canPaste();
return codeArea.isEditable() && codeArea.canPaste();
}
});
pasteMenuItem.setText("Paste");
Expand All @@ -383,7 +383,7 @@ public void actionPerformed(ActionEvent e) {

@Override
public boolean isEnabled() {
return codeArea.hasSelection();
return codeArea.isEditable() && codeArea.hasSelection();
}
});
deleteMenuItem.setText("Delete");
Expand Down
Loading

0 comments on commit c2901fb

Please sign in to comment.