Hello everyone,
I am new here, so please point me to the correct newsgroup if this is
not the right newsgroup to ask the following question.
I am trying to develop a new editor for all the files with extension
cfe. I followed all the steps that are shown in numerous tutorials for
creating an editor but for some reason what works for everyone is not
working for me. I created a CfeEditor class (extends EditorPart) with
the following init() function.
*******************************************************************
import org.eclipse.ui.IFileEditorInput;
import org.eclipse.ui.part.EditorPart;
import org.eclipse.ui.part.FileEditorInput;
public void init(IEditorSite site, IEditorInput input)
throws PartInitException
{
setSite(site);
setInput(input);
System.out.println("INPUT: "+input.getClass());
if(input instanceof FileEditorInput)
{
System.out.println("input is an instance of FileEditorInput.");
}
else
{
System.out.println("input is NOT an instance of FileEditorInput");
}
}
*******************************************************************
I got the following output:
*******************************************************************
INPUT: class org.eclipse.ui.part.FileEditorInput
input is NOT an instance of FileEditorInput
*******************************************************************
(Note I tried using instanceof IFileEditorInput instead of
FileEditorInput, but got the same results)