setVisibleName( editorInput );
try {
InputStream stream = null;
if (editorInput instanceof FileEditorInput) {
FileEditorInput input = (FileEditorInput) editorInput;
stream = input.getFile().getContents();
} else if (editorInput instanceof IStorageEditorInput) {
IStorageEditorInput input = (IStorageEditorInput) editorInput;
stream = input.getStorage().getContents();
}
model = new NLGrammarModel();
DSLMappingFile file = new DSLTokenizedMappingFile();
file.parseAndLoad( new InputStreamReader( stream ) );