DeltaEscher / editra

Automatically exported from code.google.com/p/editra
Other
0 stars 0 forks source link

[patch] CodeBrowser java has bugs when strings contain comment-like characters #482

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
This patch fixes the following kind of patterns, and also other minor bugs:

if (a.equals("http://mysite")) {
  return;
}

The code considers // as a comment and skips the {

Original issue reported on code.google.com by gaudet.e...@gmail.com on 20 Feb 2010 at 1:47

Attachments:

GoogleCodeExporter commented 8 years ago
Applied with some minor changes to fix some indentation issues around line 176.

Also why do you change the methods names to have '_' in front of them? I think 
it
would be better if it showed the actual method names.

Thanks

Original comment by CodyPrec...@gmail.com on 20 Feb 2010 at 4:57

GoogleCodeExporter commented 8 years ago
Thanks. I add a prefix to the method names for 2 reasons: to show the kind of 
methods
they are (ie: _ for static methods, > for constructors), and also so that 
methods of
the same kind are grouped together when alphabetically sorted.  I didn't find a 
nice
way to do all the things I like with the current browser implementation.  This 
is a
cosmetic hack that I find useful, but I agree this is a question of taste. 

Original comment by gaudet.e...@gmail.com on 20 Feb 2010 at 7:47

GoogleCodeExporter commented 8 years ago
Hi,

If that is the case I would suggest just defining some new object that derive 
from
Scope for each of those groups and group the methods under them. It seems 
unlikely
that anyone else using the plugin will know what the meaning of the _, < ... 
symbols
are for. I thought 

You should also be able to subclass the DocStruct object and override 
GetElements to
return the things in the order that you want them to be returned in.

Original comment by CodyPrec...@gmail.com on 20 Feb 2010 at 9:02