Is there an IDE out there that does structural syn

2019-03-12 00:38发布

Somewhat inspired by this question about a graphical programming environment. I don't think that C++ or C# are really conducive to this type of environment, but perhaps there's something halfway there.

Lot's of IDEs that I've used will use syntax highlighting to change the foreground (or even the background) colour of text for keywords, strings, comments, etc...

Are there IDEs out there that will highlight larger syntactic structures? Here's an example of what I'm thinking of.

Example code structure http://img256.imageshack.us/img256/9441/codestructure.png

(Please don't comment on my poor choice of colours... I'm not a graphic designer for a reason.)

While it's not a graphical drag-and-drop environment, the highlighting would still give an overall view of the structure of the code. Personally, learning C# after years of C++, I still catch myself tripping over the fact that at the end of a file you usually have the end of a class and the end of a namespace, so the end of a function is two-levels in. (In a C++ code file, the end of a function is usually at the top level of indentation). I help myself out there by throwing in little comments at the close brackets:

    } // end class 
} // end namespace

But it seems to me that some automatic colouring would make that completely unnecessary. Anyway, has this been done already? Bonus if it's an add-on to Visual Studio.

11条回答
迷人小祖宗
2楼-- · 2019-03-12 01:20

The closest thing that I've seen is Codekana, although doesn't have "background syntax-highlighting" it colorizes the different flow-control structures:


(source: codekana.com)



(source: codekana.com)

  • Red for loops
  • Green for if-blocks
  • Brown for else-blocks
  • Aquamarine for switch-blocks
  • Olive for exception blocks
  • Orange for 'return'
查看更多
SAY GOODBYE
3楼-- · 2019-03-12 01:21

I'm the author of Codekana. Indeed, what you describe above was the main goal for the product. BTW, I'm about to publish an article about the "making of" and the underlying technology, which is pretty nifty. It will probably be available next week (March 26, '09 or so). Recommended reading, if I may say so myself.

The reason Codekana only provides outlines, instead of a colored background, are limitations in VS's text rendering extensibility. I will hopefully be able to implement a solid-background version at some point in the future, although it will definitely require serious hacking and "rocket surgery".

I would have commented above, instead of providing another answer, but my reputation doesn't allow commenting. :(

[UPDATE: Thanks for the upvotes, now I can comment!]

查看更多
爱情/是我丢掉的垃圾
4楼-- · 2019-03-12 01:23

The current BlueJ editor does exactly what you describe:

BlueJ editor screenshot

查看更多
\"骚年 ilove
5楼-- · 2019-03-12 01:24

I'm working on a Visual Studio extension inspired by this question. You can see what I have so far here:

http://lorgonblog.wordpress.com/2010/11/12/the-f-compiler-source-release-making-it-easy-to-write-cool-visual-studio-extensions/

查看更多
甜甜的少女心
6楼-- · 2019-03-12 01:26

You should try this Addin and you will never work in visual studio without it, http://www.jetbrains.com/resharper/features/index.html

PS: I'm not affiliated with this company or product but I'm an addict using it and I can never work without it, it saves me alot of time in my coding tasks and code exploration and debugging.

查看更多
登录 后发表回答