Community
Participate
Working Groups
It would be nice if the Open Model Element dialog (class XtextEObjectSearchDialog) would initialize the name pattern field with the current text selection in the Eclipse workbench. FilteredResourceSelectionDialog can be used as a reference for how to do this.
Created attachment 191741 [details] patch for XtextEObjectSearchDialog
Is it worth to include this feature in Xtext 2.0?
I like that, please feel free to push the changes. Just two minor remarks: The getter and setter should be either both protected or both public - I prefer protected. Please mark the new methods with @Since 2.0.
I actually copied the idea of the getInitialPattern() and setInitialPattern() methods from the FilteredItemsSelectionDialog class, where they are declared as protected and public respectively. I think the idea behind this is that client code instantiating and thus *using* the dialog should be able to set the initial search pattern before opening the dialog (thus public) while code which subclasses the dialog should be able to access the pattern (thus protected as the field is private). So I would either leave it as is or mark both as public :-)
fix pushed to master