Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Outline view is blank for remote file(Outline view is blank for remote file, when user opens model file using File->Open File..)
Outline view is blank for remote file [message #1814820] Thu, 19 September 2019 08:10 Go to next message
Virag Purnam is currently offline Virag PurnamFriend
Messages: 142
Registered: June 2014
Senior Member
Hi,

When user opens a file, which is not in local system using File -> Open File.. File gets into dsl editor. User can see the file and all color coding, hyperlinks works fine, but outline view is blank for the file.

What changes I have to make to see the outline for remote file?

Thanks and regards,
Virag Purnam
Re: Outline view is blank for remote file [message #1814824 is a reply to message #1814820] Thu, 19 September 2019 08:41 Go to previous messageGo to next message
Virag Purnam is currently offline Virag PurnamFriend
Messages: 142
Registered: June 2014
Senior Member
After debugging I found that below method in AbstractOutlineNode returns empty list for remote file.

@Override
	public List<IOutlineNode> getChildren() {
		if (isLeaf)
			return Collections.emptyList();
		if (children == null) {
			readOnly(new IUnitOfWork.Void<EObject>() {
				@Override
				public void process(EObject eObject) throws Exception {
					getTreeProvider().createChildren(AbstractOutlineNode.this, eObject);
				}
			});
			if (children == null) {
				// tree provider did not create any child
				isLeaf = true;
				return Collections.emptyList();
			}
		}
		return Collections.unmodifiableList(children);
	}


How to fix this ?
Re: Outline view is blank for remote file [message #1814825 is a reply to message #1814820] Thu, 19 September 2019 08:45 Go to previous messageGo to next message
Karsten Thoms is currently offline Karsten ThomsFriend
Messages: 762
Registered: July 2009
Location: Dortmund, Germany
Senior Member

If you find a clean solution, please raise a PR to https://github.com/eclipse/xtext-eclipse.
Re: Outline view is blank for remote file [message #1814826 is a reply to message #1814825] Thu, 19 September 2019 09:04 Go to previous message
Tamas Miklossy is currently offline Tamas MiklossyFriend
Messages: 157
Registered: February 2016
Senior Member
Hello Virag!

Could you please attach a screenshot so that we can better imagine the problem?

Thanks!
Tamás
Previous Topic:Use *completely external* EMF model?
Next Topic:editing Hex Numbers fail in some cases
Goto Forum:
  


Current Time: Thu Apr 25 20:11:32 GMT 2024

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

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

Back to the top