Search in sources :

Example 1 with PhpBaseElement

use of org.netbeans.modules.php.api.editor.PhpBaseElement in project cakephp-netbeans by cakephp.

the class CakePhpGoToViewAction method goToView.

@Override
public boolean goToView() {
    EditorSupport editorSupport = Lookup.getDefault().lookup(EditorSupport.class);
    PhpBaseElement phpElement = editorSupport.getElement(controller, offset);
    if (phpElement == null) {
        return false;
    }
    FileObject view = CakePhpUtils.getView(controller, phpElement);
    if (view != null) {
        UiUtils.open(view, DEFAULT_OFFSET);
        return true;
    }
    return false;
}
Also used : EditorSupport(org.netbeans.modules.php.api.editor.EditorSupport) FileObject(org.openide.filesystems.FileObject) PhpBaseElement(org.netbeans.modules.php.api.editor.PhpBaseElement)

Aggregations

EditorSupport (org.netbeans.modules.php.api.editor.EditorSupport)1 PhpBaseElement (org.netbeans.modules.php.api.editor.PhpBaseElement)1 FileObject (org.openide.filesystems.FileObject)1