Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > creating "read only" code lines in Net Beans

Thread Tools

creating "read only" code lines in Net Beans

Ken Kafieh
Posts: n/a
Does anyone know how to do this?

Whenever you create a form in Net Beans and then manually edit the code, you
may have noticed that most of automatically generated code is shaded in
light blue, and it cannot be modified in the Net Beans editor. Does anyone
know of a way that we can mark our own code as read only like this? This
would be especially useful when used in a template.


Reply With Quote
Posts: n/a
> light blue, and it cannot be modified in the Net Beans editor. Does
My guess is there is an object behind the code and in conjunction with the
IDE, it enforces read only properties on those lines. I personally don't
know of any way to do this and make it IDE specific. What I'm getting at is
you might want to take a look at the editor object in Net Beans and see what
data structure it's using and the methods in there. JB doesn't have
something like this at the moment.

What happens when you save the file to the filesystem? Is the file in a
native .java format? Can you run a javac on it outside of NetBeans? If you
can, see if there is any special formatting in there that NetBeans would be
using to interpret special blocks of code was read only. If the code you're
looking at is in an xml format, then you might want to look for a
corresponding NetBeans xslt? Or at the editor methods again.

Good luck.

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Code completion for Ruby - Net Beans, RDT, and more S. Robert James Ruby 2 03-22-2007 10:18 PM
Creating beans from database tables Java 1 09-28-2006 06:05 PM
Asp.Net Calender, how to display 5 lines if there are only 5 lines in one month? Jack ASP .Net 9 10-12-2005 03:44 AM
handy access to attributes of entity beans from session beans Torsten Schmeissel Java 0 04-29-2005 05:19 PM
beans and C code in java prog. Nishi Bhonsle Java 1 01-06-2004 07:50 PM