You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by on 2018/10/28 03:34:46 UTC

Examples of Braces completion.

Where can I find examples of braces completion. I tried doing it in IndentTask and it isn't quite working. I was thinking about getting a hold of the token sequence and working my way through. But may be looking at existing examples is a better idea. 

In Java, when user enters a '{' and presses enter, the corresponding '}' is added and the cursor is placed between '{' and '}'. This is the behaviour I am trying to replicate.

I searched in Indent tasks of other modules like Groovy and XML. But they don't have any braces completion logic. Is there any modules in incubator-netbeans source I can look at for examples ?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
For additional commands, e-mail: dev-help@netbeans.incubator.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Examples of Braces completion.

Posted by .
"Use case 2. - Pair characters completion"

Thankyou, looks like that is exactly what I am looking for.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
For additional commands, e-mail: dev-help@netbeans.incubator.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Examples of Braces completion.

Posted by Junichi Yamamoto <ju...@gmail.com>.
Hi,

Please see the typing hooks SPI:
http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-lib2/org/netbeans/spi/editor/typinghooks/package-summary.html
Maybe, you need TypedTextInterceptor and its Factory.

HTH,
Junichi
On Tue, Oct 30, 2018 at 6:23 AM venkatram.akkineni@gmail.com
<ve...@gmail.com> wrote:
>
> Thanks Geertjan. I was able to implement braces matching. I was hoping to get automatic brace completion working as well.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
> For additional commands, e-mail: dev-help@netbeans.incubator.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
For additional commands, e-mail: dev-help@netbeans.incubator.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Examples of Braces completion.

Posted by .
Thanks Geertjan. I was able to implement braces matching. I was hoping to get automatic brace completion working as well. 

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
For additional commands, e-mail: dev-help@netbeans.incubator.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists




Re: Examples of Braces completion.

Posted by Geertjan Wielenga <ge...@googlemail.com.INVALID>.
https://github.com/GeertjanWielenga/Python4NetBeans/blob/master/PythonEditor/src/org/netbeans/modules/python/editor/PythonBracesMatcherFactory.java

http://bits.netbeans.org/dev/javadoc/org-netbeans-modules-editor-bracesmatching/org/netbeans/spi/editor/bracesmatching/support/BracesMatcherSupport.html

Gj

On Sun, Oct 28, 2018 at 6:26 AM venkatram.akkineni@gmail.com <
venkatram.akkineni@gmail.com> wrote:

> Where can I find examples of braces completion. I tried doing it in
> IndentTask and it isn't quite working. I was thinking about getting a hold
> of the token sequence and working my way through. But may be looking at
> existing examples is a better idea.
>
> In Java, when user enters a '{' and presses enter, the corresponding '}'
> is added and the cursor is placed between '{' and '}'. This is the
> behaviour I am trying to replicate.
>
> I searched in Indent tasks of other modules like Groovy and XML. But they
> don't have any braces completion logic. Is there any modules in
> incubator-netbeans source I can look at for examples ?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@netbeans.incubator.apache.org
> For additional commands, e-mail: dev-help@netbeans.incubator.apache.org
>
> For further information about the NetBeans mailing lists, visit:
> https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists
>
>
>
>