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

  • Home
  • SEARCH
  • 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 9233549
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:34:47+00:00 2026-06-18T06:34:47+00:00

I implemented the belowed code into MySemanticHighlightingCalculator and the color for the one element

  • 0

I implemented the belowed code into MySemanticHighlightingCalculator and the color for the one element changes as expected. But the default default highlighting, like the purple color for keywords didn’t work anymore.

INode root = resource.getParseResult().getRootNode();
        BidiTreeIterator<INode> iterator = root.getAsTreeIterable().iterator();
        while (iterator.hasNext()) {
            INode node = iterator.next();
            if (node.getSemanticElement() instanceof ParameterDesc) {
                ParameterDesc paramdesc = (ParameterDesc) node
                        .getSemanticElement();
                if (paramdesc.isUnselected() == true) {
                    acceptor.addPosition(
                            node.getOffset(),
                            node.getLength(),
                            MySemanticHighlightingConfiguration.PARAMETER_DESCRIPTION);
                }
            }
        }

public static final String PARAMETER_DESCRIPTION = "Parameter_Description";

public void configure(IHighlightingConfigurationAcceptor acceptor) {
    addType(acceptor, PARAMETER_DESCRIPTION, 255, 0, 0, TextAttribute.STRIKETHROUGH);
}

public void addType(IHighlightingConfigurationAcceptor acceptor, String s,
        int r, int g, int b, int style) {
    TextStyle textStyle = new TextStyle();
    textStyle.setColor(new RGB(r, g, b));
    textStyle.setStyle(style);
    acceptor.acceptDefaultHighlighting(s, s, textStyle);
}

But when I remove the MySemanticHighlightingConfiguration from MyDSLUiModule, the default highlighting work again:

public Class<? extends IHighlightingConfiguration> bindIHighlightingConfiguration() {
        return MySemanticHighlightingConfiguration.class;
    }

I know that the default highlighting will not be applyed between offset and offset+length, but I want it for the rest of the document.

  • 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-06-18T06:34:49+00:00Added an answer on June 18, 2026 at 6:34 am

    Your highlighting configuration has to extend the DefaultHighlightingConfiguration and you have to invoke super.configure(). That will do the trick.

    Please note that resource.getParseResult() may be null in some rare situations.

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

Sidebar

Related Questions

We implemented In-app Billing one year ago with no problems following the sample code
I implemented strstr() myself,the code works fine for all strings but when the string
I implemented one functionality where div is populating via ajax response, check below code
I implemented the following code, which does what it's supposed to, but I think
I implemented this code: C# Processing Fixed Width Files But since my work PC
Implemented a generic repository with several Methods. One of those is this: public IEnumerable<T>
I implemented the exception filter like here: http://www.asp.net/web-api/overview/web-api-routing-and-actions/exception-handling And registered it globally, like microsoft
I implemented Adwhirl into my new universal app. And was able to get the
I implemented class that serves as TcpCLient server. Looks like this: { [Export] public
I implemented some code using backbone.js in Asp.NEt MVC3 and found backbone.js very helpful.

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.