StringEditorInput implements IStorageEditorInput Input WebPageEditor [message #646594] |
Tue, 28 December 2010 22:22 |
Eclipse User |
|
|
|
Hello!
I need help with html editor (WebPageEditor), implement this takes as input a String (which is what happens in a IStorageEditorinput), "StringEditorInput"
The editor takes input without problems, but the problem is to stop working context, ctrl'space shows nothing and the palette also
Alguein could help me with this with some example of how the model setear HTML editor, my goal is that the editor WebPageEditor take as input any string that I pass
public class StringEditorInput implements IStorageEditorInput {
private final String inputString;
public StringEditorInput(String inputString) {
this.inputString = inputString;
}
public boolean exists() {
return false;
}
public ImageDescriptor getImageDescriptor() {
return null;
}
public IPersistableElement getPersistable() {
return null;
}
public Object getAdapter(Class adapter) {
return null;
}
public String getName() {
return "input name";
}
public String getToolTipText() {
return "tool tip";
}
public IStorage getStorage() throws CoreException {
return new IStorage() {
public InputStream getContents() throws CoreException {
return new StringBufferInputStream(inputString);
}
public IPath getFullPath() {
return null;
}
public String getName() {
return StringEditorInput.this.getName();
}
public boolean isReadOnly() {
return false;
}
public Object getAdapter(Class adapter) {
return null;
}
};
}
}
|
|
|
Powered by
FUDForum. Page generated in 1.05108 seconds