This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 155964 - Patch for: Syntax coloring preview should be editable
Summary: Patch for: Syntax coloring preview should be editable
Status: NEW
Alias: None
Product: editor
Classification: Unclassified
Component: Options (show other bugs)
Version: 6.x
Hardware: All All
: P2 blocker with 2 votes (vote)
Assignee: Milutin Kristofic
URL: http://stackoverflow.com/questions/38...
Keywords: PATCH_AVAILABLE
: 153421 198766 217307 (view as bug list)
Depends on:
Blocks:
 
Reported: 2008-12-22 21:35 UTC by Torbjorn Norbye
Modified: 2013-03-10 22:32 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments
Proposed patch which enables pasting of custom code into the preview panel (690 bytes, patch)
2012-11-30 00:57 UTC, markiewb
Details | Diff
Preview with custom code which was pasted (12.61 KB, image/png)
2012-11-30 00:58 UTC, markiewb
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Torbjorn Norbye 2008-12-22 21:35:16 UTC
We provide preview panels for color & fonts settings, as well as for formatting options.

Usually, the preview panels contains most of the code constructs that you are trying to customize. But in some cases
(for example, for the formatting options) you have to scroll down to see some of the changes you are making, and in
other cases, you are customizing the color for something (say regular expressions) which aren't present in the code sample.

There's a trivial solution for this:  Make the preview panels editable!!  Whenever the user switches to a new language
or formatting category, they get the default text.  But they can replace this text (or insert/edit it) to contain
whatever they would like to see in the preview. (I don't think we need to over-engineer this and try to make it
persistent - it's just for quick explorations of the results of a change).

Also, to make this possibility blindingly obvious, we should insert a label below the text preview area which says "The
above code sample is editable!" - or we can just edit all the code samples to have their first line mention this.
Comment 2 Vitezslav Stejskal 2009-02-16 13:58:50 UTC
*** Issue 153421 has been marked as a duplicate of this issue. ***
Comment 3 superole2 2011-06-14 08:03:43 UTC
I would also like to have the option to change the definitions of the different file-types.
e.g. I would like to add a definition for variables and positional parameters in .bat/.sh files.
This might not be feasible, but if I could even add definitions for my own file-types it would be really cool. Then I could have color coding anywhere I find it useful!
Comment 4 Milutin Kristofic 2012-11-29 17:53:56 UTC
*** Bug 217307 has been marked as a duplicate of this bug. ***
Comment 5 markiewb 2012-11-30 00:57:27 UTC
Created attachment 128616 [details]
Proposed patch which enables pasting of custom code into the preview panel

I like to propose this simple patch, which enables pasting of custom code into the preview panel. 

A small problem: The preview panel uses a special caret handling. So you can select all via "CTRL-A", the selection is not visible, but you can paste. See screenshot

@NetBeans-Dev: Please review, discuss and commit. Thanks.
Comment 6 markiewb 2012-11-30 00:58:19 UTC
Created attachment 128617 [details]
Preview with custom code which was pasted
Comment 7 markiewb 2013-03-10 22:32:46 UTC
*** Bug 198766 has been marked as a duplicate of this bug. ***