public void init(IWorkbench workbench, IStructuredSelection structuredSelection) { IWorkbenchWindow window= workbench.getActiveWorkbenchWindow(); List selected= Collections.EMPTY_LIST; if (window != null) { ISelection selection= window.getSelectionService().getSelection(); if (selection instanceof IStructuredSelection) { selected= ((IStructuredSelection) selection).toList(); } else { IJavaElement element= EditorUtility.getActiveEditorJavaInput(); if (element != null) { selected= new ArrayList(); selected.add(element); } } } fStore= new JavadocOptionsManager(fXmlJavadocFile, getDialogSettings(), selected); }
public void init(IWorkbench workbench, IStructuredSelection structuredSelection) { IWorkbenchWindow window = workbench.getActiveWorkbenchWindow(); List selected = Collections.EMPTY_LIST; if (window != null) { ISelection selection = window.getSelectionService().getSelection(); if (selection instanceof IStructuredSelection) { selected = ((IStructuredSelection) selection).toList(); } else { IJavaElement element = EditorUtility.getActiveEditorJavaInput(); if (element != null) { selected = new ArrayList(); selected.add(element); } } } fStore = new AJdocOptionsManager(fXmlJavadocFile, getDialogSettings(), selected); }
@Override public void init(IWorkbench workbench, IStructuredSelection structuredSelection) { IWorkbenchWindow window= workbench.getActiveWorkbenchWindow(); List<?> selected= Collections.EMPTY_LIST; if (window != null) { ISelection selection= window.getSelectionService().getSelection(); if (selection instanceof IStructuredSelection) { selected= ((IStructuredSelection) selection).toList(); } else { IJavaElement element= EditorUtility.getActiveEditorJavaInput(); if (element != null) { selected= Arrays.asList(element); } } } fStore= new JavadocOptionsManager(fXmlJavadocFile, getDialogSettings(), selected); }
@Override public void init(IWorkbench workbench, IStructuredSelection structuredSelection) { IWorkbenchWindow window= workbench.getActiveWorkbenchWindow(); List<?> selected= Collections.EMPTY_LIST; if (window != null) { ISelection selection= window.getSelectionService().getSelection(); if (selection instanceof IStructuredSelection) { selected= ((IStructuredSelection) selection).toList(); } else { IJavaElement element= EditorUtility.getActiveEditorJavaInput(); if (element != null) { selected= Arrays.asList(element); } } } fStore= new JavadocOptionsManager(fXmlJavadocFile, getDialogSettings(), selected); }
private String getProjectPath(IStructuredSelection selection) { Object selectedElement= null; if (selection == null || selection.isEmpty()) { selectedElement= EditorUtility.getActiveEditorJavaInput(); } else if (selection.size() == 1) { selectedElement= selection.getFirstElement(); } if (selectedElement instanceof IResource) { IProject proj= ((IResource)selectedElement).getProject(); if (proj != null) { return proj.getFullPath().makeRelative().toString(); } } else if (selectedElement instanceof IJavaElement) { IJavaProject jproject= ((IJavaElement)selectedElement).getJavaProject(); if (jproject != null) { return jproject.getProject().getFullPath().makeRelative().toString(); } } return null; }
private String getProjectPath(IStructuredSelection selection) { Object selectedElement= null; if (selection == null || selection.isEmpty()) { selectedElement= EditorUtility.getActiveEditorJavaInput(); } else if (selection.size() == 1) { selectedElement= selection.getFirstElement(); } if (selectedElement instanceof IResource) { IProject proj= ((IResource)selectedElement).getProject(); if (proj != null) { return proj.getFullPath().makeRelative().toString(); } } else if (selectedElement instanceof IJavaElement) { IJavaProject jproject= ((IJavaElement)selectedElement).getJavaProject(); if (jproject != null) { return jproject.getProject().getFullPath().makeRelative().toString(); } } return null; }
private String getProjectPath(IStructuredSelection selection) { Object selectedElement= null; if (selection == null || selection.isEmpty()) { selectedElement= EditorUtility.getActiveEditorJavaInput(); } else if (selection.size() == 1) { selectedElement= selection.getFirstElement(); } if (selectedElement instanceof IResource) { IProject proj= ((IResource)selectedElement).getProject(); if (proj != null) { return proj.getFullPath().makeRelative().toString(); } } else if (selectedElement instanceof IJavaElement) { IJavaProject jproject= ((IJavaElement)selectedElement).getJavaProject(); if (jproject != null) { return jproject.getProject().getFullPath().makeRelative().toString(); } } return null; }