Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Remove String from IDocument
Remove String from IDocument [message #333557] Wed, 17 December 2008 10:29 Go to next message
Artur Zeiler is currently offline Artur ZeilerFriend
Messages: 10
Registered: July 2009
Junior Member
Hi all,
is is possible to remove a String from IDocument?

My plugin uses it's own content assist. My Problem is, that i have to
remove the String i searched for in the content assist. For example i type:
"create", then the content assist inserts me the following code:

createActions(){
super.createActions();
IAction a=new
TextOperationAction(JavaEditorMessages.getResourceBundle(),"ContentAssistProposal. ",this,ISourceViewer.CONTENTASSIST_PROPOSALS);

a.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTE NT_ASSIST_PROPOSALS);
setAction("ContentAssistProposal",a);
a=new
TextOperationAction(JavaEditorMessages.getResourceBundle(),"ContentAssistTip. ",this,ISourceViewer.CONTENTASSIST_CONTEXT_INFORMATION);

a.setActionDefinitionId(ITextEditorActionDefinitionIds.CONTE NT_ASSIST_CONTEXT_INFORMATION);
setAction("ContentAssistTip",a);
a=new
DefineFoldingRegionAction(JavaEditorMessages.getResourceBund le(), "DefineFoldingRegion.",this);
setAction("DefineFoldingRegion",a);
}
create <<<<< Here is the problem

So now i want to remove "create" shown in the last line?
Any ideas?

Thanks
Re: Remove String from IDocument [message #333561 is a reply to message #333557] Wed, 17 December 2008 10:58 Go to previous message
Remy Suen is currently offline Remy SuenFriend
Messages: 462
Registered: July 2009
Senior Member
Artur Zeiler wrote:
> is is possible to remove a String from IDocument?

document.replace(5, 5, "") to _replace_ offset 5, and subsequent 5
characters (length of 5), with empty string = delete?

Remy
Previous Topic:I get "NLS unused message" at Eclipse 3.3.2 startup
Next Topic:[SWT/Linux] Startup takes ages
Goto Forum:
  


Current Time: Fri Jul 05 03:29:28 GMT 2024

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

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

Back to the top