drools-eclipse/org.drools.eclipse/src/main/java/org/drools/eclipse/editors/completion/DefaultCompletionProcessor.java
private IJavaProject getCurrentJavaProject() {
        IEditorInput input = getEditor().getEditorInput();
        if ( !(input instanceof IFileEditorInput) ) {
            return null;
        }
        IProject project = ((IFileEditorInput) input).getFile().getProject();
        IJavaProject javaProject = JavaCore.create( project );
        return javaProject;
    }
private IJavaProject getCurrentJavaProject() {
        IEditorInput input = getEditor().getEditorInput();
        if ( !(input instanceof IFileEditorInput) ) {
            return null;
        }
        IProject project = ((IFileEditorInput) input).getFile().getProject();
        IJavaProject javaProject = JavaCore.create( project );
        return javaProject;
    }
private IJavaProject getCurrentJavaProject ( ) { IEditorInput input = getEditor ( ) . getEditorInput ( ) ; if ( ! ( input instanceof IFileEditorInput ) ) { return null ; } IProject project = ( ( IFileEditorInput ) input ) . getFile ( ) . getProject ( ) ; IJavaProject javaProject = JavaCore . create ( project ) ; return javaProject ; }
/*
create and returns a java project based on the current editor input or returns null
/ * create and returns a java project based on the current editor input or returns null