private IJavaProject getJavaProject() { return EditorUtility.getJavaProject(fEditor.getEditorInput()); }
private IJavaProject getJavaProject() { return EditorUtility.getJavaProject(fEditor.getEditorInput()); }
/** * Creates and returns the preference store for this Java editor with the given input. * * @param input The editor input for which to create the preference store * @return the preference store for this editor * * @since 3.0 */ private IPreferenceStore createCombinedPreferenceStore(IEditorInput input) { List<IPreferenceStore> stores= new ArrayList<>(3); IJavaProject project= EditorUtility.getJavaProject(input); if (project != null) { stores.add(new EclipsePreferencesAdapter(new ProjectScope(project.getProject()), JavaCore.PLUGIN_ID)); } stores.add(JavaPlugin.getDefault().getPreferenceStore()); stores.add(new PreferencesAdapter(JavaPlugin.getJavaCorePluginPreferences())); stores.add(EditorsUI.getPreferenceStore()); stores.add(PlatformUI.getPreferenceStore()); return new ChainedPreferenceStore(stores.toArray(new IPreferenceStore[stores.size()])); }
/** * Creates and returns the preference store for this Java editor with the given input. * * @param input The editor input for which to create the preference store * @return the preference store for this editor * * @since 3.0 */ private IPreferenceStore createCombinedPreferenceStore(IEditorInput input) { List<IPreferenceStore> stores= new ArrayList<>(3); IJavaProject project= EditorUtility.getJavaProject(input); if (project != null) { stores.add(new EclipsePreferencesAdapter(new ProjectScope(project.getProject()), JavaCore.PLUGIN_ID)); } stores.add(JavaPlugin.getDefault().getPreferenceStore()); stores.add(new PreferencesAdapter(JavaPlugin.getJavaCorePluginPreferences())); stores.add(EditorsUI.getPreferenceStore()); stores.add(PlatformUI.getPreferenceStore()); return new ChainedPreferenceStore(stores.toArray(new IPreferenceStore[stores.size()])); }
/** * Creates and returns the preference store for this Java editor with the given input. * * @param input The editor input for which to create the preference store * @return the preference store for this editor * * @since 3.0 */ private IPreferenceStore createCombinedPreferenceStore(IEditorInput input) { List stores= new ArrayList(3); IJavaProject project= EditorUtility.getJavaProject(input); if (project != null) { stores.add(new EclipsePreferencesAdapter(new ProjectScope(project.getProject()), JavaCore.PLUGIN_ID)); } stores.add(JavaPlugin.getDefault().getPreferenceStore()); stores.add(new PreferencesAdapter(JavaCore.getPlugin().getPluginPreferences())); stores.add(EditorsUI.getPreferenceStore()); return new ChainedPreferenceStore((IPreferenceStore[]) stores.toArray(new IPreferenceStore[stores.size()])); }
boolean[] separateState= new boolean[categories.size()]; boolean[] enabledState= new boolean[categories.size()]; IJavaProject javaProject = EditorUtility.getJavaProject(editor.getEditorInput()); int i= 0; for (Iterator<CompletionProposalCategory> it= categories.iterator(); it.hasNext(); i++) {
boolean[] separateState= new boolean[categories.size()]; boolean[] enabledState= new boolean[categories.size()]; IJavaProject javaProject = EditorUtility.getJavaProject(editor.getEditorInput()); int i= 0; for (Iterator<CompletionProposalCategory> it= categories.iterator(); it.hasNext(); i++) {
private boolean computeEnablement(ITextEditor editor) { if (editor == null) return false; ITextOperationTarget target= editor.getAdapter(ITextOperationTarget.class); if (target == null || ! target.canDoOperation(ISourceViewer.CONTENTASSIST_PROPOSALS)) return false; IJavaProject javaProject = EditorUtility.getJavaProject(editor.getEditorInput()); if (! fCategory.matches(javaProject)) return false; ISelection selection= editor.getSelectionProvider().getSelection(); return isValidSelection(selection); }
private boolean computeEnablement(ITextEditor editor) { if (editor == null) return false; ITextOperationTarget target= editor.getAdapter(ITextOperationTarget.class); if (target == null || ! target.canDoOperation(ISourceViewer.CONTENTASSIST_PROPOSALS)) return false; IJavaProject javaProject = EditorUtility.getJavaProject(editor.getEditorInput()); if (! fCategory.matches(javaProject)) return false; ISelection selection= editor.getSelectionProvider().getSelection(); return isValidSelection(selection); }