Skip to main content

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

thanks, that one was pretty obvious actually ;)


best

-robert

Am 11/11/09 11:50 AM, schrieb Michael Spector:
Hi,

You should add org.eclipse.wst.sse.ui plug-in to the dependencies list.

Best regards,
Michael

2009/11/11 Robert Gründler <robert@xxxxxxxxxxx>
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:

org.eclipse.php.core
org.eclipse.php.ui

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 {

   @Override
   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.

thanks!

-robert


_______________________________________________
pdt-dev mailing list
pdt-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/pdt-dev

_______________________________________________ pdt-dev mailing list pdt-dev@xxxxxxxxxxx https://dev.eclipse.org/mailman/listinfo/pdt-dev


Back to the top