- private static TextualModuleSource toTextualModuleSource(Object input) {
- if(!(input instanceof SCLModuleEditorInput))
- return null;
- ModuleSource source = ((SCLModuleEditorInput)input).getAdapter(ModuleSource.class);
+ private void updateTextualModuleSource(Object input) {
+ if (currentElement != null && currentElement.equals(input))
+ return;
+ currentElement = input;
+ if(!(currentElement instanceof SCLModuleEditorInput))
+ return;
+
+ ModuleSource source = ((SCLModuleEditorInput)currentElement).getAdapter(ModuleSource.class);