-
Notifications
You must be signed in to change notification settings - Fork 49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for Primitives in Detail Formatter #586
base: master
Are you sure you want to change the base?
Support for Primitives in Detail Formatter #586
Conversation
5fe49cd
to
e42dd75
Compare
Hi @jukzi , could u pls check this when you have time. |
@@ -307,14 +325,13 @@ private void selectType() { | |||
SelectionDialog dialog= null; | |||
try { | |||
dialog= JavaUI.createTypeDialog(shell, PlatformUI.getWorkbench().getProgressService(), | |||
SearchEngine.createWorkspaceScope(), IJavaElementSearchConstants.CONSIDER_ALL_TYPES, false, fTypeNameText.getText()); | |||
SearchEngine.createWorkspaceScope(), IJavaElementSearchConstants.CONSIDER_ALL_TYPES, false, fTypeNameText.getText()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks like unintentional space change
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Auto format issue - will resolve it
@@ -254,6 +254,8 @@ DetailFormatterDialog_Add_Detail_Formatter_2=Add Detail Formatter | |||
DetailFormatterDialog_Associated_code_must_not_be_empty_3=Detail formatter code snippet must not be empty | |||
DetailFormatterDialog_Detail_formatter__code_snippet__1=Detail formatter &code snippet: | |||
DetailFormatterDialog_17=Detail formatter &code snippet ({0} for code assist): | |||
DetailFormatterPrimitiveSelect=Select Primitives |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe the noun should be low caps. i am not sure
*/ | ||
@SuppressWarnings("nls") | ||
private List<String> getPrimitiveTypes() { | ||
return List.of("int", "long", "short", "float", "double", "boolean", "char", "byte", "int[]", "long[]", "short[]", "float[]", "double[]", "boolean[]", "char[]", "byte[]"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does it work with arrays of multiple dimensions? for example char[][]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes it works.. added test case for that too
@@ -55,6 +56,10 @@ public interface IRuntimeContext { | |||
*/ | |||
IJavaObject getThis() throws CoreException; | |||
|
|||
default IJavaPrimitiveValue getThisPrimitive() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please add javadoc
@@ -745,22 +745,12 @@ | |||
id="org.eclipse.jdt.debug.ui.FilteredJavaVariableActions"> | |||
<visibility> | |||
<and> | |||
<objectState |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
are this lines removed intantionally?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes.. to get detail formatter option in variables view
looks like a cool feature. i would love to see char[] and char[][] fromatted by default |
e4b558b
to
f06ef02
Compare
|
i actually tried this PR for char[][] ->
what am i am doing wrong? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
but i want a custom format to just concat a chars. |
This commit provides support for Primitive types and Primitive arrays in Detail Formatter for variables view. Fixes : eclipse-jdt#268
f06ef02
to
55c37bf
Compare
Provides support for primitive types (int,float,char etc) for detail formatter
Fixes : #268
What it does
How to test
Author checklist