/* (non-Javadoc) * @see org.eclipse.jface.viewers.IContentProvider#inputChanged(org.eclipse.jface.viewers.Viewer, java.lang.Object, java.lang.Object) */ public void inputChanged(Viewer viewer, Object oldInput, Object newInput) { if (oldInput != null) { makefile = nullMakefile; } if (newInput != null) { IWorkingCopyManager manager = AutomakeEditorFactory.getDefault().getWorkingCopyManager(); makefile = manager.getWorkingCopy((IEditorInput) newInput); if (makefile == null) { makefile = nullMakefile; } } }
@Override protected void initializeEditor() { setRangeIndicator(new DefaultRangeIndicator()); setEditorContextMenuId("#MakefileEditorContext"); // $NON-NLS-1$ setRulerContextMenuId("#MakefileRulerContext"); // $NON-NLS-1$ setDocumentProvider(AutomakeEditorFactory.getDefault().getAutomakefileDocumentProvider()); IPreferenceStore[] stores = new IPreferenceStore[2]; stores[0] = AutotoolsPlugin.getDefault().getPreferenceStore(); stores[1] = EditorsUI.getPreferenceStore(); ChainedPreferenceStore chainedStore = new ChainedPreferenceStore(stores); setPreferenceStore(chainedStore); sourceViewerConfiguration = new AutomakefileSourceConfiguration(chainedStore, this); setSourceViewerConfiguration(sourceViewerConfiguration); AutotoolsEditorPreferenceConstants.initializeDefaultValues(stores[0]); AutomakeEditorPreferencePage.initDefaults(stores[0]); configureInsertMode(SMART_INSERT, false); setInsertMode(INSERT); }
public AutomakeDocumentProvider getAutomakefileDocumentProvider() { return AutomakeEditorFactory.getDefault().getAutomakefileDocumentProvider(); }