Skip to content

Commit 11977f0

Browse files
committed
Release 0.2.7
1 parent 23cb47b commit 11977f0

5 files changed

Lines changed: 74 additions & 75 deletions

File tree

changes.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
0.2.7
1+
0.2.7 (2022-12-08)
22
- Added byte array support for some fields for Rider/CLion/GoLand (debug tree child nodes extraction)
33
- Minor layout fix (issue #45)
44
- Fixed settings save (issue #44)

resources/META-INF/plugin.xml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<idea-plugin version="2" url="https://bined.exbin.org/intellij-plugin">
22
<id>org.exbin.deltahex.intellij</id>
33
<name>BinEd - Binary/Hexadecimal Editor</name>
4-
<version>0.2.7.snapshot</version>
4+
<version>0.2.7</version>
55
<vendor email="exbinproject@gmail.com" url="https://exbin.org">ExBin Project</vendor>
66

77
<description><![CDATA[
@@ -24,7 +24,7 @@
2424
<li>Show debug variables as binary data</li></ul>
2525
2626
<h1>License</h1>
27-
<a href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>
27+
<a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>
2828
2929
<h1>Links</h1>
3030
Homepage: <a href="https://bined.exbin.org/intellij-plugin/">https://bined.exbin.org/intellij-plugin/</a><br/>
@@ -41,10 +41,10 @@ Sources: <a href="https://github.com/exbin/bined-intellij-plugin">https://github
4141
]]>
4242
</change-notes>
4343

44-
<!-- please see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html for description -->
44+
<!-- please see https://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/build_number_ranges.html for description -->
4545
<idea-version since-build="211.1"/>
4646

47-
<!-- please see http://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/plugin_compatibility.html
47+
<!-- please see https://www.jetbrains.org/intellij/sdk/docs/basics/getting_started/plugin_compatibility.html
4848
on how to target different products -->
4949
<depends>com.intellij.modules.lang</depends>
5050
<depends optional="true" config-file="debugger-ext.xml">com.intellij.modules.xdebugger</depends>
@@ -92,7 +92,7 @@ Sources: <a href="https://github.com/exbin/bined-intellij-plugin">https://github
9292
<action id="BinEdEditor.OpenAsBinaryAction" class="org.exbin.bined.intellij.OpenAsBinaryAction"
9393
text="Open As Binary" description="Opens file in binary/hexadecimal viewer/editor"
9494
icon="/images/icon-idea.png"/>
95-
<group>
95+
<group id="BinEdEditor.ProjectView">
9696
<reference id="BinEdEditor.OpenAsBinaryAction"/>
9797
<add-to-group group-id="ProjectViewPopupMenu" relative-to-action="EditorDelete" anchor="after"/>
9898
</group>
@@ -103,7 +103,7 @@ Sources: <a href="https://github.com/exbin/bined-intellij-plugin">https://github
103103
<add-to-group group-id="FileOpenGroup" relative-to-action="OpenFile" anchor="after"/>
104104
</action>
105105

106-
<group>
106+
<group id="BinEdEditor.Editor">
107107
<reference id="BinEdEditor.OpenAsBinaryAction"/>
108108
<add-to-group group-id="EditorPopupMenu" relative-to-action="EditorDelete" anchor="after"/>
109109
</group>

resources/org/exbin/bined/intellij/resources/Bundle.properties

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
Application.name = BinEd
22
Application.title = BinEd Binary/Hexadecimal Editor
33
Application.release = 0.2.7
4-
Application.mode = DEV
5-
Application.version = 0.2.7 DEV
6-
Application.product= BinEd Binary/Hexadecimal Editor 0.2.7 DEV
4+
Application.mode =
5+
Application.version = 0.2.7
6+
Application.product= BinEd Binary/Hexadecimal Editor 0.2.7
77
Application.vendor = ExBin Project
88
Application.homepage = https://bined.exbin.org/intellij-plugin/
99
Application.vendorId = ExBin Project

src/org/exbin/bined/intellij/BinEdPluginStartupActivity.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ public void extensionListChanged() {
125125
}
126126

127127
private void initExtensions() {
128-
BINED_VIEW_DATA.extensions().filter(binaryViewData -> !initialized.contains(binaryViewData)).forEach(binaryViewData -> {
128+
BINED_VIEW_DATA.getExtensionList().stream().filter(binaryViewData -> !initialized.contains(binaryViewData)).forEach(binaryViewData -> {
129129
binaryViewData.passHandler(viewHandler);
130130
initialized.add(binaryViewData);
131131
});

src/org/exbin/bined/intellij/debug/intellij/XValueNodeConvertor.java

Lines changed: 63 additions & 64 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@
3131
import com.jetbrains.php.debug.common.PhpNavigatableValue;
3232
import com.jetbrains.php.lang.psi.resolve.types.PhpType;
3333
import com.jetbrains.python.debugger.PyDebugValue;
34-
import com.jetbrains.rider.debugger.DotNetNamedValue;
3534
import com.sun.jdi.ArrayReference;
3635
import com.sun.jdi.ArrayType;
3736
import com.sun.jdi.ByteValue;
@@ -208,64 +207,6 @@ public List<DebugViewDataProvider> identifyAvailableProviders(@Nullable XValueNo
208207
}
209208
}
210209

211-
if (dotNetValueClassAvailable && container instanceof DotNetNamedValue) {
212-
String typeName = myDataNode.getRawValue();
213-
int arraySizePos = typeName.indexOf("[");
214-
if (arraySizePos > 0) {
215-
try {
216-
String childType = typeName.substring(0, arraySizePos);
217-
int arraySize = Integer.parseInt(typeName.substring(arraySizePos + 1, typeName.length() - 1));
218-
childValueExtractor = XValueNodeConvertor::getDotNetValueText;
219-
switch (childType) {
220-
case "bool": {
221-
childValueType = ChildNodesPageProvider.ValueType.BOOLEAN;
222-
childValueSize = arraySize;
223-
break;
224-
}
225-
case "byte": {
226-
childValueType = ChildNodesPageProvider.ValueType.BYTE;
227-
childValueSize = arraySize;
228-
break;
229-
}
230-
case "short": {
231-
childValueType = ChildNodesPageProvider.ValueType.SHORT;
232-
childValueSize = arraySize;
233-
break;
234-
}
235-
case "int": {
236-
childValueType = ChildNodesPageProvider.ValueType.INTEGER;
237-
childValueSize = arraySize;
238-
break;
239-
}
240-
case "long": {
241-
childValueType = ChildNodesPageProvider.ValueType.LONG;
242-
childValueSize = arraySize;
243-
break;
244-
}
245-
}
246-
} catch (Exception ex) {
247-
}
248-
}
249-
250-
// DotNetNamedValue namedValue = (DotNetNamedValue) container;
251-
// Project project = myDataNode.getTree().getProject();
252-
// XDebuggerManager debuggerManager = XDebuggerManager.getInstance(project);
253-
// XDebugSession debuggerSession = debuggerManager.getCurrentSession();
254-
// XStackFrame debuggerStackFrame = debuggerSession.getCurrentStackFrame();
255-
// ((DotNetExecutionStack) ((XDebugSessionImpl) debuggerSession).getCurrentExecutionStack()).getContext();
256-
//
257-
// ObjectProxy objectProxy = namedValue.getObjectProxy();
258-
// DotNetValue value = new DotNetValue(namedValue.getFrame(), objectProxy, namedValue.getLifetime(), namedValue.getSessionId());
259-
/// value.
260-
// ObjectPropertiesProxy properties = objectProxy.getProperties();
261-
// if (properties.isArray()) {
262-
// switch (properties.getType()) {
263-
//
264-
// }
265-
// }
266-
// TODO Extract value somehow
267-
}
268-
269210
if (pythonValueClassAvailable && container instanceof PyDebugValue) {
270211
String dataType = ((PyDebugValue) container).getType();
271212
if (dataType != null) {
@@ -452,6 +393,64 @@ public List<DebugViewDataProvider> identifyAvailableProviders(@Nullable XValueNo
452393
}
453394
}
454395

396+
if (dotNetValueClassAvailable && DOTNET_VALUE_CLASS.equals(valueCanonicalName)) {
397+
String typeName = myDataNode.getRawValue();
398+
int arraySizePos = typeName.indexOf("[");
399+
if (arraySizePos > 0) {
400+
try {
401+
String childType = typeName.substring(0, arraySizePos);
402+
int arraySize = Integer.parseInt(typeName.substring(arraySizePos + 1, typeName.length() - 1));
403+
childValueExtractor = XValueNodeConvertor::getDotNetValueText;
404+
switch (childType) {
405+
case "bool": {
406+
childValueType = ChildNodesPageProvider.ValueType.BOOLEAN;
407+
childValueSize = arraySize;
408+
break;
409+
}
410+
case "byte": {
411+
childValueType = ChildNodesPageProvider.ValueType.BYTE;
412+
childValueSize = arraySize;
413+
break;
414+
}
415+
case "short": {
416+
childValueType = ChildNodesPageProvider.ValueType.SHORT;
417+
childValueSize = arraySize;
418+
break;
419+
}
420+
case "int": {
421+
childValueType = ChildNodesPageProvider.ValueType.INTEGER;
422+
childValueSize = arraySize;
423+
break;
424+
}
425+
case "long": {
426+
childValueType = ChildNodesPageProvider.ValueType.LONG;
427+
childValueSize = arraySize;
428+
break;
429+
}
430+
}
431+
} catch (Exception ex) {
432+
}
433+
}
434+
435+
// DotNetNamedValue namedValue = (DotNetNamedValue) container;
436+
// Project project = myDataNode.getTree().getProject();
437+
// XDebuggerManager debuggerManager = XDebuggerManager.getInstance(project);
438+
// XDebugSession debuggerSession = debuggerManager.getCurrentSession();
439+
// XStackFrame debuggerStackFrame = debuggerSession.getCurrentStackFrame();
440+
// ((DotNetExecutionStack) ((XDebugSessionImpl) debuggerSession).getCurrentExecutionStack()).getContext();
441+
//
442+
// ObjectProxy objectProxy = namedValue.getObjectProxy();
443+
// DotNetValue value = new DotNetValue(namedValue.getFrame(), objectProxy, namedValue.getLifetime(), namedValue.getSessionId());
444+
/// value.
445+
// ObjectPropertiesProxy properties = objectProxy.getProperties();
446+
// if (properties.isArray()) {
447+
// switch (properties.getType()) {
448+
//
449+
// }
450+
// }
451+
// TODO Extract value somehow
452+
}
453+
455454
if (VARIABLE_VIEW_VALUE_CLASS.equals(valueCanonicalName)) {
456455
org.jetbrains.debugger.values.Value value = ((VariableView) container).getValue();
457456
String valueType = value.getValueString();
@@ -496,7 +495,7 @@ public List<DebugViewDataProvider> identifyAvailableProviders(@Nullable XValueNo
496495
if (childValueType != null) {
497496
// Debug tree child nodes extraction calls child tree nodes generation in GUI and tries to extract single values from it
498497
BinaryData binaryData = new ChildNodesPageProvider(myDataNode, childValueType, childValueSize, childValueExtractor);
499-
providers.add(new DefaultDebugViewDataProvider("Debug tree child nodes", binaryData));
498+
providers.add(new DefaultDebugViewDataProvider("Tree child nodes (lazy)", binaryData));
500499
}
501500

502501
providers.add(new DebugViewDataProvider() {
@@ -545,10 +544,6 @@ public static Optional<XValueNodeImpl> getDataNode(AnActionEvent event) {
545544
return Optional.of(node);
546545
}
547546

548-
if (dotNetValueClassAvailable && container instanceof DotNetNamedValue) {
549-
return Optional.of(node);
550-
}
551-
552547
if (cValueClassAvailable && container instanceof CidrValue) {
553548
return Optional.of(node);
554549
}
@@ -562,6 +557,10 @@ public static Optional<XValueNodeImpl> getDataNode(AnActionEvent event) {
562557
return Optional.of(node);
563558
}
564559

560+
if (dotNetValueClassAvailable && DOTNET_VALUE_CLASS.equals(valueCanonicalName)) {
561+
return Optional.of(node);
562+
}
563+
565564
if (VARIABLE_VIEW_VALUE_CLASS.equals(valueCanonicalName)) {
566565
return Optional.of(node);
567566
}

0 commit comments

Comments
 (0)