some usability questions

Hi, just starting out with the EAP..

1. Is there a way to let the diff tool ignore starting and trailing whitespaces? right now, when I reformat netbeans files, everything is marked as changed, but it's only a changed from 4 spaces to 2 spaces at the start.

2. Is there a way to make the reformat command default to "this file" ?

3. Can I use jquery in rubymine javascript autocomplete instead of prototype?

4. Is there a way to distinguise between an "unbounded" identifier and "bound"/methods like in netbeans?
As far as I can tell, they are both identifiers for rubymine editor

example:
def test
   some1.thing2.map(&:id)
end

some1 is the primary object in this line, thing2 & map are methods so they are secondery.. it's easier to read code this way

4 comments
Comment actions Permalink

1. Is there a way to let the diff tool ignore starting and trailing whitespaces? right now, when I reformat netbeans files, everything is marked as changed, but it's only a changed from 4 spaces to 2 spaces at the start.

In diff dialog you can change ignoring whitespace policy
Picture 4.png

2. Is there a way to make the reformat command default to "this file" ?


What do you mean? Please provide an example

4. Is there a way to distinguise between an "unbounded" identifier and "bound"/methods like in netbeans?
As far as I can tell, they are both identifiers for rubymine editor

example:
def test
   some1.thing2.map(&:id)
end

some1 is the primary object in this line, thing2 & map are methods so they are secondery.. it's easier to read code this way


Here "some1" may be some call. RubyMine provides special highlighting for local variables and parameters.
Picture 5.png
RM doesn't provide any special highlighting for first parts of calls chains. If it is really useful I can file an issue.

0
Comment actions Permalink

1. I saw that, but it is still marked as "changed" in the editor- is there a way to effect the editor?

2. when you press the command to reformat code, there is a popup asking you if you want to reformat the file, or all files in the directory.. 99% you want to reformat only the file you are editing, is there a way to make it the default?

4. it's not just the "first of the chain", it's the unbound status.. I guess it's hard to explain.. by unbound i mean that you can infer it's nature from the surrounding code- you can infer a parameter, a variable or a chain method call, but from your example, you dont know what is "some2" so it's safe to say thats it's either a method or a typo..
maybe i'm just used to that notion from netbeans...

thanks for your help!

0
Comment actions Permalink

> right now, when I reformat netbeans files, everything is marked as changed, but it's only a changed from 4 spaces to 2 spaces at the start.

>I saw that, but it is still marked as "changed" in the editor- is there a way to effect the editor?



It's known problem. May be better was is to use the same code style? You can easily change default indent in RubyMine | File | Settings | Cody Style | General | Ruby | Indent


2. when you press the command to reformat code, there is a popup asking you if you want to reformat the file, or all files in the directory.. 99% you want to reformat only the file you are editing, is there a way to make it the default?



It is also known problem..

4. it's not just the "first of the chain", it's the unbound status.. I guess it's hard to explain.. by unbound i mean that you can infer it's nature from the surrounding code- you can infer a parameter, a variable or a chain method call, but from your example, you dont know what is "some2" so it's safe to say thats it's either a method or a typo..


Ok it seems I understand you, we call them "unresolved references". RubyMine has Unresolved Ruby reference inspection (see File | Settings | Inspections | Ruby). This inspection is enabled by default (see screenshot).
Screen shot 2009-09-02 at 20.17.20.png
This inspection will underwave possibly undefined (in current context) local variables. parameters, calls, classes, files. On screenshot you see that unresolved1 reference is highlighted and quick information popup is available.

Actually inspection has two modes (see "Warn about implicit text matched resolve results" checkbox in inspection settings):
1. By default such checkbox isn't checked and RubyMine doesn't highlight unresolved identifiers if such identifiers are defined in current context but aren't available using type inference. E.g on screenshot some_method isn't highlighted because in current context method is defined in class Foo. E.g using some dynamic magic you can include this method in context of test() method so warning wont be correct.

2. If "Warn about implicit text matched resolve results" is checked them RubyMine will honestly warn about all identifiers which aren't available using RubyMine's type inference.

Also RubyMine doesn't include method in autocompletion list if we are not sure that the method really is available, thus "some_method" will not be available in autocompletion inside "test" method but will be available in class Foo or after Foo.new.

0
Comment actions Permalink

Thanks for explaining the Unresolved Ruby reference

For my 3rd question, is there a way to let rubymine js module know i use jquery?

Right now, if I write $ and press autocomplete, it's autcompeting prototype, but my project use jquery..

0

Please sign in to leave a comment.