[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[pdt-dev] BuildError when importing PHPStructuredEditor

Hi everyone,

i'm implementing a key-binding handler, which should switch between files that logically
belong together. However, when i try to get the ActiveEditor using the HandlerUtil and
cast it to a PHPStructuredEditor, i get the following build error:

The type org.eclipse.wst.sse.ui.StructuredTextEditor cannot be resolved. It is indirectly referenced from required .class files SwitchViewHandler.java

I've tryied to add the org.eclipse.wst.sse package to the dependencied (like in the php.ui project), but i still get the error.
The ui project has the following php dependencies:


The code looks like this:

package com.dubture.cpdt.internal.handlers;

import org.eclipse.core.commands.AbstractHandler;
import org.eclipse.core.commands.ExecutionEvent;
import org.eclipse.core.commands.ExecutionException;
import org.eclipse.php.internal.ui.editor.PHPStructuredEditor;
import org.eclipse.ui.IEditorPart;
import org.eclipse.ui.handlers.HandlerUtil;

public class SwitchViewHandler extends AbstractHandler {

    public Object execute(ExecutionEvent event) throws ExecutionException {

        IEditorPart editor = HandlerUtil.getActiveEditor(event);

        if (editor instanceof PHPStructuredEditor)
            PHPStructuredEditor pEditor = (PHPStructuredEditor)editor;

        return null;

Any hints would be greatly appreciated.