Search in sources :

Example 71 with IEditorInput

use of org.eclipse.ui.IEditorInput in project bndtools by bndtools.

the class TestSuiteLabelProvider method getJavaProject.

IJavaProject getJavaProject() {
    IFormPage page = (IFormPage) getManagedForm().getContainer();
    IEditorInput input = page.getEditorInput();
    IFile file = ResourceUtil.getFile(input);
    if (file != null) {
        return JavaCore.create(file.getProject());
    }
    return null;
}
Also used : IFile(org.eclipse.core.resources.IFile) IFormPage(org.eclipse.ui.forms.editor.IFormPage) IEditorInput(org.eclipse.ui.IEditorInput)

Aggregations

IEditorInput (org.eclipse.ui.IEditorInput)71 IFile (org.eclipse.core.resources.IFile)26 PartInitException (org.eclipse.ui.PartInitException)21 IEditorPart (org.eclipse.ui.IEditorPart)19 IWorkbenchPage (org.eclipse.ui.IWorkbenchPage)17 IEditorReference (org.eclipse.ui.IEditorReference)14 CoreException (org.eclipse.core.runtime.CoreException)13 ArrayList (java.util.ArrayList)11 IViewPart (org.eclipse.ui.IViewPart)11 FileEditorInput (org.eclipse.ui.part.FileEditorInput)10 Shell (org.eclipse.swt.widgets.Shell)9 ICubridNode (com.cubrid.common.ui.spi.model.ICubridNode)8 IFileEditorInput (org.eclipse.ui.IFileEditorInput)8 IWorkbenchPart (org.eclipse.ui.IWorkbenchPart)8 File (java.io.File)7 StructuredSelection (org.eclipse.jface.viewers.StructuredSelection)7 IWorkbenchWindow (org.eclipse.ui.IWorkbenchWindow)7 Item (org.talend.core.model.properties.Item)7 XLIFFEditorImplWithNatTable (net.heartsome.cat.ts.ui.xliffeditor.nattable.editor.XLIFFEditorImplWithNatTable)6 IProject (org.eclipse.core.resources.IProject)6