import net.sourceforge.phpeclipse.ui.editor.ShowExternalPreviewAction;
-import org.eclipse.core.resources.IFile;
-import org.eclipse.ui.IEditorInput;
+//import org.eclipse.core.resources.IFile;
+//import org.eclipse.ui.IEditorInput;
import org.eclipse.ui.IEditorPart;
-import org.eclipse.ui.IFileEditorInput;
+//import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.texteditor.BasicTextEditorActionContributor;
import org.eclipse.ui.texteditor.ITextEditor;
/**
* Common base class for action contributors for Java editors.
*/
-public class SmartyEditorActionContributor extends BasicTextEditorActionContributor {
+public class SmartyEditorActionContributor extends
+ BasicTextEditorActionContributor {
/*
* (non-Javadoc)
textEditor = (ITextEditor) part;
if (textEditor != null) {
- IFile file = null;
- IEditorInput editorInput = textEditor.getEditorInput();
+ //IFile file = null;
+ //IEditorInput editorInput = textEditor.getEditorInput();
- if (editorInput instanceof IFileEditorInput) {
- file = ((IFileEditorInput) editorInput).getFile();
- }
+// if (editorInput instanceof IFileEditorInput) {
+// file = ((IFileEditorInput) editorInput).getFile();
+// }
- ShowExternalPreviewAction fShowExternalPreviewAction = ShowExternalPreviewAction.getInstance();
+ ShowExternalPreviewAction fShowExternalPreviewAction = ShowExternalPreviewAction
+ .getInstance();
fShowExternalPreviewAction.setEditor(textEditor);
fShowExternalPreviewAction.update();
if (fShowExternalPreviewAction != null)
- fShowExternalPreviewAction.doRun(ShowExternalPreviewAction.SMARTY_TYPE);
+ fShowExternalPreviewAction
+ .doRun(ShowExternalPreviewAction.SMARTY_TYPE);
}
}
}