jboffel / smartypdt

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

Comment highlighting continues past end of comment {* *} #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Insert a Smarty comment {* comment *} with source code after
2.
3.

What is the expected output? What do you see instead?
A syntax highlighted comment which ends at the first *} "tag"
Instead the comment highlighting continues beyond the end of the first
comment and comments out source code that should be highlighted, finally
stopping when it reaches the last comment tag in the source.

What version of the product are you using? On what operating system?
0.5.2 on Windows Vista

Please provide any additional information below.

Original issue reported on code.google.com by dap...@gmail.com on 13 Dec 2007 at 8:41

Attachments:

GoogleCodeExporter commented 9 years ago
Also have same bug.
OpenSUSE 10.3

Eclipse Platform
Version: 3.3.1.1
Build id: M20071023-1652

PDT Plug-in 1.0.1v20071210

smartypdt 0.5.2 (0.5.2.200711091705)

Original comment by kontakt....@gmail.com on 20 Dec 2007 at 11:56

GoogleCodeExporter commented 9 years ago
I too have this bug.
Vista Business (32bit)
Eclipse
Version: 3.3.1.1
Build:M20071023-1652

Smartypdt 1.5.2
PDT Plug-in 1.0.1v20071209

Points I've noted:
1. Bracket matching functions correctly, just {* matching doesn't
2. Deleting the start  {* of the comment,refreshing, then retyping the start
_sometimes_ fixes it for the comment in question (must be repeated for every 
broken
comment in the template}
3. Easiest to reproduce when pasting chunks of code into the editor, I've also 
been
able to reproduce the error when manually typing comments in.
4. I've cut and pasted the following snippet as well as manually typed it and 
have
not been able to reliably determine the order of operations that makes it fail,
although it fails most frequently when pasted:

{* comment *}
hello
{* comment2 *}

Original comment by bdgeo...@gmail.com on 30 Dec 2007 at 7:22

GoogleCodeExporter commented 9 years ago
This problem is bugging me, too.

  WinXP
  Eclipse 3.3.1.1, build M20071023-1652
  Smarty Feature 0.5.2.200711091705

I've attached another example screen shot.  The problem doesn't always (ever?)
(dis)appear immediately.  You may need to save and re-open your file.

Original comment by donmckee on 30 Dec 2007 at 8:40

Attachments:

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
Hi again, can we bump up the priority on this issue? At the moment its forcing 
me to
turn to my old fashioned text editor of choice to work with smarty, as for me 
eclipse
is now pretty much unusable for anything with more that 2 lines of code in it 
:-)

Is there anyone _not_ having it and if so what OS and Eclipse/smartypdt builds 
are
you using?

Thanks

Original comment by bdgeo...@gmail.com on 12 Jan 2008 at 3:16

GoogleCodeExporter commented 9 years ago
i have this problem too, always

and it is really making this plugin useless on files with smarty comments

Original comment by sebastia...@gmail.com on 16 Jan 2008 at 8:56

GoogleCodeExporter commented 9 years ago
I suppose that someone familiar with jFlex (I'm not :-( ), could beat this 
issue 
easily. I think that roots of problem begin here - 
http://smartypdt.googlecode.com/
svn/trunk/org.eclipse.php.smarty.core/src/org/eclipse/php/smarty/internal/core/
documentModel/parser/devTools/
Could someone check files at given location and make sure that smarty grammar 
is 
described right (in relation to comments, at least)?

Thanks

Original comment by trickste...@gmail.com on 21 Jan 2008 at 4:38

GoogleCodeExporter commented 9 years ago
Here's a fix for this bug, replace
org.eclipse.php.smarty.core/src/org/eclipse/php/smarty/internal/core/documentMod
el/parser/devTools/SmartyTokenizer.jflex

with the attached file, then run jflex on it to re-build SmartyTokenizer.java.

Changed:
SMARTY_COMMENT =([\*]([^*]|(.))*[\*])
TO:
SMARTY_COMMENT =([\*]([^*]|{WHITESPACE})*[\*])

Was going to submit that with a fix on another issue, but that other fix was 
taking
longer than I thought..

Original comment by ohhe...@gmail.com on 22 Jan 2008 at 3:31

Attachments:

GoogleCodeExporter commented 9 years ago
Great, thank you for your time,

next steps are:
1) I add you as committer
2) you commit changes - flex and generated code
3) you close the bug

Again, welcome and thanks
- Roy

Original comment by ganoro on 22 Jan 2008 at 9:51

GoogleCodeExporter commented 9 years ago
Fix committed to latest SVN.

Original comment by ohhe...@gmail.com on 23 Jan 2008 at 3:45

GoogleCodeExporter commented 9 years ago

Original comment by ohhe...@gmail.com on 23 Jan 2008 at 3:47