Guarded File Regions with OpenAPI?

Hi,

Is such a thing:
http://www.jroller.com/comments/santhosh/Weblog/document_guard

possible with the OpenAPI at the moment? Or it's not possible
with IntelliJ at all?

Many frameworks generate parts of files (java/xml, etc.) that must not be changed,
and in order to make a useful plug-in in IntelliJ for those frameworks, such a 'guarded'
functionality would be required.

Even more, that highlight could be marked with a different color on the left margin, to know
right away that it's readonly.

Thanks in advance,

Ahmed.

4 comments
Comment actions Permalink

Hello Ahmed,

AM> Is such a thing:
AM> http://www.jroller.com/comments/santhosh/Weblog/document_guard
AM> possible with the OpenAPI at the moment? Or it's not possible with
AM> IntelliJ at all?

Yes, this is possible. See Document.createGuardedBlock() and related methods
(documentation for them was added in 5.0.2).

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

Hello Ahmed,

AM> Even more, that highlight could be marked with a different color on
AM> the left margin, to know right away that it's readonly.

There is no default highlighting for guarded regions, but the OpenAPI allows
you to add highlighting for the regions that you create.

--
Dmitry Jemerov
Software Developer
JetBrains, Inc.
http://www.jetbrains.com
"Develop with pleasure!"


0
Comment actions Permalink

AM> Is such a thing:
AM> http://www.jroller.com/comments/santhosh/Weblog/document_guard
AM> possible with the OpenAPI at the moment? Or it's not possible with
AM> IntelliJ at all?

Yes, this is possible. See Document.createGuardedBlock() and related
methods (documentation for them was added in 5.0.2).

Thank you for the quick reply.

Ahmed.

0
Comment actions Permalink

There is default highlighting actually. See Settings|Colors&Fonts|General|Readonly
fragments background

-


Maxim Shafirov
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Hello Ahmed,

AM>> Even more, that highlight could be marked with a different color on
AM>> the left margin, to know right away that it's readonly.
AM>>

There is no default highlighting for guarded regions, but the OpenAPI
allows you to add highlighting for the regions that you create.



0

Please sign in to leave a comment.