Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 297171
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T06:36:55+00:00 2026-05-12T06:36:55+00:00

Example. I have an XML document: <document> <region type=type1>text of region1 </region> some simple

  • 0

Example. I have an XML document:

<document>
<region type="type1">text of region1
</region>
some simple text
<region type="type2">text of region2
</region>

And I want it to be presented as

text of region1
some simple text
text of region2

The basic Eclipse coloring works independent from folding, as I know. But I need text to be colored depending on the xml info. Or maybe I need something other, than folding? It’s probably easier to just manipulate StyledText, but I need other Eclipse Editor functions to continue working.

=========
upd: Still no suggestions? Is it at least possible?
I’ve looked at projection, but… does text attributes directly accessible from this branch of editor?
upd: Maybe at least some thoughts/articles about custom projections?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T06:36:56+00:00Added an answer on May 12, 2026 at 6:36 am

    I’ve implementet it via document listener service, ProjectionDocument.removeMasterDocumentRange and ProjectionDocument.getDocumentInformationMapping(). Coloring by SourceViewer.getTextWidget().setStyleRange(). There is a little problem if PresentationReconciler will be added, but since I know it, its safe.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm practicing some XSL and using this XML document as a simple example: <?xml
I have an XML document which contains some invalid characters (é for example). Unfortunalty
I have an xml document that contains some Item elements with ids. I want
I have an XML document that I want to generate unique IDs for. Some
If I for example have <p> some long text </p> on my HTML page,
If I have an xml document, for example: <colors> <color1>1452</color1> <color2></color2> <color3></color3> </colors> I
I have an XML document, want to do syntax highlighting. The code uses XPathDocument
Say I have an XML document (represented as text, a W3C DOM, whatever), and
Say I have an XML document on a web server ( www.example.com/example.xml ). On
I have example.xml <?xml version=1.0 encoding=UTF-8 standalone=no?> <Document xmlns=urn:iso:std:iso:20022:tech:xsd:pain.001.001.02> <content> <books> <book> <qty>12</qty> <title>C++</title>

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.