Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Problem while creating the issues on other resources(Problem while creating the issues on other resources)
Problem while creating the issues on other resources [message #1779744] Fri, 12 January 2018 06:58
Venkata Santosh Lingam is currently offline Venkata Santosh LingamFriend
Messages: 3
Registered: October 2014
Junior Member
I want to throw validations on other resources

I tried below way to create issue to resource

LinedDiagnostic diagnostic = new LinedDiagnostic("validation on other resource", resource.getURI().toString(), 1, 1);
resource.getErrors().add(diagnostic);


LinedDiagnostic class:
public class LinedDiagnostic implements Diagnostic {

    final String message;
    final int line;
    final String resourceURI;

    public LinedDiagnostic(String message, String location, int line, int column) {
        this.message = message;
        this.line = line;
        this.resourceURI = location;
    }

    @Override
    public String getMessage() {
        return message;
    }

    @Override
    public String getLocation() {
        return resourceURI;
    }

    @Override
    public int getLine() {
        return 0;
    }

    @Override
    public int getColumn() {
        return 0;
    }
}


But after adding diagnostic to the resource, it's not reflecting in the UI.
Can some one help me how to create issues on other resources?


Previous Topic:Access a model element from a value converter
Next Topic:Invalid resource link in BatckLinkableResourceStorageWritable
Goto Forum:
  


Current Time: Wed Nov 14 20:25:57 GMT 2018

Powered by FUDForum. Page generated in 0.01896 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top