Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Web Tools Project (WTP) » StringEditorInput implements IStorageEditorInput Input WebPageEditor(Don't work context and palete with this input)
StringEditorInput implements IStorageEditorInput Input WebPageEditor [message #646594] Wed, 29 December 2010 03:22
Agustin  is currently offline Agustin
Messages: 26
Registered: November 2010
Location: Uruguay
Junior Member

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;

}



};

}



}


Previous Topic:Attribute "xmlns:web" in web.xml
Next Topic:how to change the DOM of a StructuredTextEditor
Goto Forum:
  


Current Time: Mon Sep 22 20:34:21 GMT 2014

Powered by FUDForum. Page generated in 0.01519 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software