Skip to main content
Günter_Schenk
Inspiring
May 17, 2010
Answered

make codehints work within defined start/end - tags only ?

  • May 17, 2010
  • 1 reply
  • 1166 views

Hi there,

would like to know if it´s possible to make custom codehints work inside defined opening/closing tags, say, PHP codehints which should only appear when typing a pattern inside existing <?php ... ?> tags.

Cheers,

Günter

This topic has been closed for replies.
Correct answer Randy Edmunds
should have mentioned that I´m not using codehints "functions", but menu patterns which have the DOCTYPES="PHP_MySQL" defined, example:


<menu pattern="whatever" DOCTYPES="PHP_MySQL" casesensitive="true">

....

</menu>

This is fixed with the displayrestriction attribute. Set it to the Code Coloring <scheme> that you want to limit the code hinting to.

What does Code Coloring have to do with Code Hints? The "Code Coloring" feature is a bit of a misnomer. The Code Coloring patterns define different syntax states that are used for code coloring, but they are used by other code view features.

Look in Configuration/CodeColoring/PHP.xml, and you'll see that the main PHP <scheme> has id="PHP_Script". So, add this:

  displayrestriction="PHP_Script"

to the <menu> tag.

Regards,

Randy

1 reply

Randy Edmunds
Adobe Employee
Adobe Employee
May 17, 2010

would like to know if it´s possible to make custom codehints work inside defined opening/closing tags, say, PHP codehints which should only appear when typing a pattern inside existing <?php ... ?> tags.

Yes. Specify doctypes="PHP_MySQL" on each <function> tag.

You can see an example in Configuration/CodeHints/php_codehints.xml .

HTH,

Randy

Günter_Schenk
Inspiring
May 17, 2010

Randy Edmunds wrote:

Yes. Specify doctypes="PHP_MySQL" on each <function> tag.

Hi Randy,

should have mentioned that I´m not using codehints "functions", but menu patterns which have the DOCTYPES="PHP_MySQL" defined, example:

<menu pattern="whatever" DOCTYPES="PHP_MySQL" casesensitive="true">

....

</menu>

In this context the "doctypes" doesn´t seem to do what I thought they would, because the corresponding labels will also become displayed when typing a pattern outside the <?php ?> tags.

Cheers,

Günter

Randy Edmunds
Adobe Employee
Randy EdmundsCorrect answer
Adobe Employee
May 17, 2010
should have mentioned that I´m not using codehints "functions", but menu patterns which have the DOCTYPES="PHP_MySQL" defined, example:


<menu pattern="whatever" DOCTYPES="PHP_MySQL" casesensitive="true">

....

</menu>

This is fixed with the displayrestriction attribute. Set it to the Code Coloring <scheme> that you want to limit the code hinting to.

What does Code Coloring have to do with Code Hints? The "Code Coloring" feature is a bit of a misnomer. The Code Coloring patterns define different syntax states that are used for code coloring, but they are used by other code view features.

Look in Configuration/CodeColoring/PHP.xml, and you'll see that the main PHP <scheme> has id="PHP_Script". So, add this:

  displayrestriction="PHP_Script"

to the <menu> tag.

Regards,

Randy