Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » DefaultLastSegmentFinder.getLastSegment()(What is the purpose of this implementation?)
DefaultLastSegmentFinder.getLastSegment() [message #1709818] Thu, 01 October 2015 11:26
Stephan Hildebrandt is currently offline Stephan HildebrandtFriend
Messages: 25
Registered: July 2015
Junior Member
Hi,

I just stumbled across the implementation of LastSegmentFinder.getLastSegment() in FQNPrefixMatcher.DefaultLastSegmentFinder. From the name of the method and the interface I would have guessed that the method simply returns the last segment of a fully qualified name, e.g. "MyClass" from the FQN "MyPackage.MyClass". However, that is not all what the implementation in DefaultLastSegmentFinder does. If the FQN starts with an upper-case letter, the method returns the complete FQN. Why is that?

The effect of this implementation is that only those elements are shown in the list of content assist proposals that reside in a container whose name does not start with an upper-case letter.

I am changing this behavior by injecting my own implementation of LastSegmentFinder but I'd like to know the reason why the default implementation is like it is.


Best regards

Stephan
Previous Topic:xtext standalone builder via gradle failing to validate
Next Topic:Parsing an IProject and returning parsed model to another plugin within Eclipse
Goto Forum:
  


Current Time: Fri Apr 26 22:07:40 GMT 2024

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

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

Back to the top